The engine-selection options 0.5.0 removed, named on the bag that still carries one.

#280 deleted CreateCauslOptions.engine, CreateCauslOptions.backend and AuthoritativeWasmOptions.fallbackToTs / .fallbackToJs from the TYPES, and for one release that was the whole of the removal — every construct path simply stopped reading them. Measured on aeeab58, after preloadCauslWasm():

createCausl({ engine: 'js-ssot' })   -> {engine:'rust-wasm',mode:'rust-ssot'}  0 warnings
createCausl({ backend: 'js' })       -> {engine:'rust-wasm',mode:'rust-ssot'}  0 warnings
createCausl({ engine: 'nonsense' })  -> {engine:'rust-wasm',mode:'rust-ssot'}  0 warnings

Excess-property checking only fires on an object LITERAL assigned straight into the parameter. A variable, a bag typed as CreateCauslOptions, a value parsed from JSON or an env-driven config, an as never / as any, a @ts-expect-error, or any JavaScript caller passes all four through in silence — so the compile-time removal covers the callers who were least likely to have pinned an engine, and misses the ones who did it deliberately.

That is the SILENT ENGINE SWAP this release exists to abolish, one option name over. A 0.4.x adopter who wrote engine: 'js-ssot' on purpose — because their suite depends on the floor's behaviour on the §18A.1.1 surfaces #272 established the two engines disagree on — is moved onto rust-ssot with no warning, no event, and no throw. It is also the only one of #280's removals with no loud signal at all: the capability fallback throws, the missing preload throws, and this returned a working graph running the other engine.

Note that the third line above is a REGRESSION beyond the removal itself. At the merge-base a typo'd value was a RangeError from resolveWasmEngineMode ("engine must be 'js-ssot' or 'rust-ssot'"); #280 deleted that validator along with the option, so 0.5.0 accepts nonsense where 0.4.x refused it.

So the options are now REMOVED rather than ignored, which is what CHANGELOG.md's migration step 5 already promised in writing. The remedy is always the same and is stated on the error: delete the option. There is one engine, createCausl() returns it or throws, and nothing is lost by dropping the key.

Branch on error.code === 'CAUSL_REMOVED_ENGINE_OPTION'.

Hierarchy (View Summary)

Constructors

  • Parameters

    • options: readonly string[]
    • factory: string
    • values: readonly unknown[] = []

      What each name carried, so the message echoes the caller's own value.

    Returns RemovedEngineOptionError

Properties

cause?: unknown
code: "CAUSL_REMOVED_ENGINE_OPTION" = ...

Stable discriminant — branch on this, not on instanceof.

kind: "RemovedEngineOption" = ...

Discriminated tag for exhaustive matching.

message: string
name: string = 'RemovedEngineOptionError'
options: readonly string[]

The removed option names present on the bag, in the order checked.

stack?: string
stackTraceLimit: number

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Methods

  • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

    const myObject = {};
    Error.captureStackTrace(myObject);
    myObject.stack; // Similar to `new Error().stack`

    The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

    The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

    The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

    function a() {
    b();
    }

    function b() {
    c();
    }

    function c() {
    // Create an error without stack trace to avoid calculating the stack trace twice.
    const { stackTraceLimit } = Error;
    Error.stackTraceLimit = 0;
    const error = new Error();
    Error.stackTraceLimit = stackTraceLimit;

    // Capture the stack trace above function b
    Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
    throw error;
    }

    a();

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void