Skip to content

Release: Version Packages#67

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

Release: Version Packages#67
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 23, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@supergrain/kernel@5.0.0

Major Changes

  • b61db1b: Split side-effect primitives into a new package, @supergrain/husk.

    New package: @supergrain/husk

    @supergrain/husk is the layer between kernel's reactive core and application-specific data layers. It ships five primitives + their React hooks:

    • resource(initial, setup) — inline, one-off reactive function with cleanup. Reactive reads in setup drive reruns.
    • defineResource(initial, setup) — returns a reusable ResourceFactory<Args, T>. Each factory call produces an independent instance; callers pass an argsFn thunk whose reactive reads drive reruns. Setup reads are NOT tracked in the factory form — "what triggers a rerun" lives at the call site.
    • dispose(resource) — free function; stops a resource permanently. Idempotent, safe on any object.
    • reactivePromise(asyncFn) — inline async envelope (data, error, isPending, isResolved, isRejected, isSettled, isReady, promise). Reactive reads in asyncFn's sync prefix drive reruns; previous runs abort via AbortSignal. Matches SWR / TanStack Query / Apollo / silo field names.
    • reactiveTask(asyncFn) — imperative .run(...) command. Same envelope as reactivePromise, no auto-tracking.
    • modifier(fn) + useModifier(m, ...args) — element-scoped setup/teardown. Args flow through an internal ref so fresh closures per render don't re-register; signal reads inside setup trigger targeted re-attach on the element without re-rendering the component.

    Install:

    pnpm add @supergrain/kernel @supergrain/husk

    BREAKING: removed from @supergrain/kernel

    The following were moved out of @supergrain/kernel and @supergrain/kernel/react into @supergrain/husk and @supergrain/husk/react:

    • resource, defineResource, dispose, ResourceContext, ResourceFactory
    • reactivePromise, ReactivePromise
    • reactiveTask, ReactiveTask
    • useResource, useReactivePromise, useReactiveTask
    • modifier, useModifier, Modifier

    Migration

    -import { resource, defineResource, reactivePromise, reactiveTask, dispose } from "@supergrain/kernel";
    +import { resource, defineResource, reactivePromise, reactiveTask, dispose } from "@supergrain/husk";
    
    -import { useResource, useReactivePromise, useReactiveTask, modifier, useModifier } from "@supergrain/kernel/react";
    +import { useResource, useReactivePromise, useReactiveTask, modifier, useModifier } from "@supergrain/husk/react";

    Kernel continues to export the reactive core (createReactive, computed, effect, signal, batch) and state-centric React bindings (tracked, useReactive, useComputed, useSignalEffect, createStoreContext, For).

    Why the split

    kernel's tagline is "reactive store for React." resource / reactivePromise / reactiveTask / modifier are side-effect primitives built on top of reactivity — different concern, different audience. The ecosystem models these as separate layers (TanStack Query is separate from any state library). Separating lets each package iterate independently and keeps kernel focused on state.

    Fix: resources created inside tracked() render now propagate correctly

    While splitting, surfaced a correctness bug: resources created inside a tracked() component's render body did not re-run on their own reactive reads (setup reads for resource, argsFn reads for defineResource). Root cause: alien-signals' effect() links a new effect as a dep of activeSub when one exists, so the resource's effect was becoming nested under tracked's effect instead of standing alone. The resource's effect callback would no longer fire independently on its deps changing.

    Fix: resources now create their effect with activeSub reset to undefined, so the effect is always top-level regardless of where the resource is instantiated. Module-scope usage was unaffected; anyone using useResource / useReactivePromise / useReactiveTask inside a tracked() component with reactive reads in setup/argsFn will see the expected behavior now.

Minor Changes

  • d4a918b: Add reactive Map and Set support.

    createReactive() now accepts Map and Set values (as root state or as nested values). Reads (get, has, size, iteration) are tracked per-key; writes (set, delete, add, clear) notify only the affected subscribers.

    @supergrain/silo bucket storage is migrated from Record<string, …> to Map to use the new reactive collection support.

@supergrain/husk@0.2.0

Minor Changes

  • b61db1b: Split side-effect primitives into a new package, @supergrain/husk.

    New package: @supergrain/husk

    @supergrain/husk is the layer between kernel's reactive core and application-specific data layers. It ships five primitives + their React hooks:

    • resource(initial, setup) — inline, one-off reactive function with cleanup. Reactive reads in setup drive reruns.
    • defineResource(initial, setup) — returns a reusable ResourceFactory<Args, T>. Each factory call produces an independent instance; callers pass an argsFn thunk whose reactive reads drive reruns. Setup reads are NOT tracked in the factory form — "what triggers a rerun" lives at the call site.
    • dispose(resource) — free function; stops a resource permanently. Idempotent, safe on any object.
    • reactivePromise(asyncFn) — inline async envelope (data, error, isPending, isResolved, isRejected, isSettled, isReady, promise). Reactive reads in asyncFn's sync prefix drive reruns; previous runs abort via AbortSignal. Matches SWR / TanStack Query / Apollo / silo field names.
    • reactiveTask(asyncFn) — imperative .run(...) command. Same envelope as reactivePromise, no auto-tracking.
    • modifier(fn) + useModifier(m, ...args) — element-scoped setup/teardown. Args flow through an internal ref so fresh closures per render don't re-register; signal reads inside setup trigger targeted re-attach on the element without re-rendering the component.

    Install:

    pnpm add @supergrain/kernel @supergrain/husk

    BREAKING: removed from @supergrain/kernel

    The following were moved out of @supergrain/kernel and @supergrain/kernel/react into @supergrain/husk and @supergrain/husk/react:

    • resource, defineResource, dispose, ResourceContext, ResourceFactory
    • reactivePromise, ReactivePromise
    • reactiveTask, ReactiveTask
    • useResource, useReactivePromise, useReactiveTask
    • modifier, useModifier, Modifier

    Migration

    -import { resource, defineResource, reactivePromise, reactiveTask, dispose } from "@supergrain/kernel";
    +import { resource, defineResource, reactivePromise, reactiveTask, dispose } from "@supergrain/husk";
    
    -import { useResource, useReactivePromise, useReactiveTask, modifier, useModifier } from "@supergrain/kernel/react";
    +import { useResource, useReactivePromise, useReactiveTask, modifier, useModifier } from "@supergrain/husk/react";

    Kernel continues to export the reactive core (createReactive, computed, effect, signal, batch) and state-centric React bindings (tracked, useReactive, useComputed, useSignalEffect, createStoreContext, For).

    Why the split

    kernel's tagline is "reactive store for React." resource / reactivePromise / reactiveTask / modifier are side-effect primitives built on top of reactivity — different concern, different audience. The ecosystem models these as separate layers (TanStack Query is separate from any state library). Separating lets each package iterate independently and keeps kernel focused on state.

    Fix: resources created inside tracked() render now propagate correctly

    While splitting, surfaced a correctness bug: resources created inside a tracked() component's render body did not re-run on their own reactive reads (setup reads for resource, argsFn reads for defineResource). Root cause: alien-signals' effect() links a new effect as a dep of activeSub when one exists, so the resource's effect was becoming nested under tracked's effect instead of standing alone. The resource's effect callback would no longer fire independently on its deps changing.

    Fix: resources now create their effect with activeSub reset to undefined, so the effect is always top-level regardless of where the resource is instantiated. Module-scope usage was unaffected; anyone using useResource / useReactivePromise / useReactiveTask inside a tracked() component with reactive reads in setup/argsFn will see the expected behavior now.

Patch Changes

  • Updated dependencies [b61db1b]
  • Updated dependencies [d4a918b]
    • @supergrain/kernel@5.0.0

@supergrain/mill@5.0.0

Patch Changes

  • Updated dependencies [b61db1b]
  • Updated dependencies [d4a918b]
    • @supergrain/kernel@5.0.0

@supergrain/queries@0.0.3

Patch Changes

  • Updated dependencies [b61db1b]
  • Updated dependencies [d4a918b]
    • @supergrain/kernel@5.0.0
    • @supergrain/silo@5.0.0

@supergrain/silo@5.0.0

Patch Changes

  • Updated dependencies [b61db1b]
  • Updated dependencies [d4a918b]
    • @supergrain/kernel@5.0.0

js-framework-benchmark-react-hooks-comparison@1.0.4

Patch Changes

  • Updated dependencies [b61db1b]
  • Updated dependencies [d4a918b]
    • @supergrain/kernel@5.0.0

@github-actions github-actions Bot force-pushed the changeset-release/main branch 4 times, most recently from ff0e2c9 to e148ab2 Compare April 28, 2026 16:19
@github-actions github-actions Bot force-pushed the changeset-release/main branch from e148ab2 to 3f59e87 Compare April 30, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants