Repository navigation
finity-core v0.0.13
Immutable
release. Only release title and notes can be modified.
New
FinityErroris the abstract base of every error finity creates, and its subclasses live in its namespace:FinityError.InvalidTransitionError.instanceof FinityErrormatches any of them.import { FinityError } from "@ghostry/finity-core"; if (error instanceof FinityError.InvalidTransitionError) { report(error.reason, error.state.to.kind); }
- The top-level
InvalidTransitionErrorexport is deprecated. It's the same class asFinityError.InvalidTransitionError, so existing imports andinstanceofchecks keep working.
- The top-level
Behavior change
- An
InvalidTransitionError's.nameis"@ghostry/finity-core:InvalidTransitionError", where it was"Error". The name identifies the error whereinstanceofcan't: across two installed copies of finity-core, or after the error is serialized.
Compatibility
onInvalidTransition's parameter is typedFinityError.InvalidTransitionError, the same class as before.package.jsondeclaresengines.node>=20.0.0andsideEffects: false.
Internal
- Each finity package has its own version and release, tagged
finity-core/vX.Y.Z. Releases up tov0.0.12covered all three packages under one version.
Docs: FinityError, FinityError.InvalidTransitionError, Public API