Repository navigation
Releases
Releases · ghostry-dev/finity
finity-solidjs v0.0.13
Immutable
release. Only release title and notes can be modified.
New
FinityErroris exported as a type, alongsideInvalidTransitionError. It's the base of every error finity creates, with its subclasses in its namespace:FinityError.InvalidTransitionError. For aninstanceofcheck, import the class from@ghostry/finity-core.
Behavior change
- The error
onInvalidTransitionreceives is named"@ghostry/finity-core:InvalidTransitionError", where it was"Error".
Compatibility
- Depends on
@ghostry/finity-core0.0.13 exactly. If you also import from finity-core directly, fornoop,never,shallowEqual, or aninstanceofcheck, install 0.0.13 so only one copy is installed. package.jsondeclaresengines.node>=20.0.0andsideEffects: false.
Internal
- Each finity package has its own version and release, tagged
finity-solidjs/vX.Y.Z. Releases up tov0.0.12covered all three packages under one version. - Tests run on
bun test.
Docs: FinityError, Installation
finity-reactjs v0.0.13
Immutable
release. Only release title and notes can be modified.
New
FinityErroris exported as a type, alongsideInvalidTransitionError. It's the base of every error finity creates, with its subclasses in its namespace:FinityError.InvalidTransitionError. For aninstanceofcheck, import the class from@ghostry/finity-core.
Behavior change
- The error
onInvalidTransitionreceives is named"@ghostry/finity-core:InvalidTransitionError", where it was"Error".
Compatibility
- Depends on
@ghostry/finity-core0.0.13 exactly. If you also import from finity-core directly, fornoop,never,shallowEqual, or aninstanceofcheck, install 0.0.13 so only one copy is installed. package.jsondeclaresengines.node>=20.0.0andsideEffects: false.
Internal
- Each finity package has its own version and release, tagged
finity-reactjs/vX.Y.Z. Releases up tov0.0.12covered all three packages under one version. - Tests run on
bun test.
Docs: FinityError, Installation
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
v0.0.12
Immutable
release. Only release title and notes can be modified.
Fixes
- Types resolve for consumers on
moduleResolution: node16ornodenext. The published declarations imported their sibling files without an extension, which those modes reject for an ESM package. UnderskipLibCheck: truethere was no error: every export was silently typed asany. Every relative import indist/typesnow names its file.
Internal
- The build type-checks the emitted declarations, so a broken
dist/typesfails the build instead of shipping.
v0.0.11
Immutable
release. Only release title and notes can be modified.
New
isEqualStateis an option ofinitialize. A transition to a state of the samekindthat it considers equal is skipped: the state isn't set, so effects and renders don't run again, and thetransitionyou called stays valid. It compares the states without theirtransitionproperty, and defaults toshallowEqual, which is also exported.@ghostry/finity-solidjs: a case can return a function to render reactively, as in(state) => () => state.kind.
Fixes
- A state's identity changes only when it is set.
value()returned a new object on every call, which made memos and effects that depend on the state run again needlessly. - A
transitionfrom an earlier render is rejected as stale once a later render has changed the state. Transitions are also checked against the latest state, not the snapshot of the render that created them. In React, that snapshot can be out of date. @ghostry/finity-reactjs:useRenderuses the current render's case functions. It memoized the case on the state, so a case kept the values its first render closed over.@ghostry/finity-solidjs: a case renders once when it starts to match, not again on every state change. While it matches, the state it receives reads the latest values, so a transition within the case updates what it rendered. Once it no longer matches, the state keeps its last values, so a latetransitionis rejected as stale.
Behavior change
- A transition to an equal state of the same
kinddoes nothing. @ghostry/finity-reactjsand@ghostry/finity-solidjspass every option to the core package, not onlyonInvalidTransition.
For integration authors
ExhaustiveSwitchtakes a fourth type parameter,F, for what a case's function may return. It defaults toR, the result ofuse.
Docs: Equal states, Rendering, Solid
v0.0.10
Immutable
release. Only release title and notes can be modified.
Fixes
UsingTransitionalStateandUsingStrictlyTransitionalStateare exported again, from all three packages. They give the type of a used state from its definition.type State = UsingStrictlyTransitionalState<typeof State>;
v0.0.9
Immutable
release. Only release title and notes can be modified.
Fixes
require()no longer points at CommonJS files that don't exist. The packages are ES modules only, andpackage.jsonno longer declaresmainor arequirecondition.@ghostry/finity-reactjsand@ghostry/finity-solidjsre-export the core types again:Config,ExhaustiveSwitch,ExhaustiveSwitchInstance,Getter,InvalidTransitionError,Setter,TransitionalState, andTransitionalStates.
v0.0.8
Immutable
release. Only release title and notes can be modified.
Compatibility
- Published to JSR again, after 0.0.5. Every exported function declares its return type, which JSR requires.
Internal
UseStrictlyTransitionalStateHooknames the type of theuseStrictlyTransitionalStatehook.
v0.0.7
Immutable
release. Only release title and notes can be modified.
Breaking changes
@ghostry/finity-coreexports only its public API. That'sinitialize,never,noop,InvalidTransitionError,ExhaustiveSwitchInstance, and the typesConfig,Getter,Setter,ExhaustiveSwitch,TransitionalState,TransitionalStates, andInitialized. Its internal types are no longer exported.UsingTransitionalStateandUsingStrictlyTransitionalStatereturn in 0.0.10.@ghostry/finity-reactjsand@ghostry/finity-solidjsno longer re-export the core package's types. Import them from@ghostry/finity-coreuntil 0.0.9 restores them.
Compatibility
- Not published to JSR. JSR goes from 0.0.5 to 0.0.8.
Internal
- Every exported symbol has a doc comment.
v0.0.6
Immutable
release. Only release title and notes can be modified.
Breaking changes
- The packages ship ES modules only. The CommonJS and UMD builds are removed, along with source maps. The
requirecondition inpackage.jsonstill points at the removed CommonJS build, sorequire()fails until 0.0.9.
Compatibility
- Not published to JSR. JSR goes from 0.0.5 to 0.0.8.