Skip to content

chore: release packages - #51

Merged
btravers merged 1 commit into
mainfrom
changeset-release/main
Aug 9, 2026
Merged

chore: release packages#51
btravers merged 1 commit into
mainfrom
changeset-release/main

Conversation

@btravers

@btravers btravers commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

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

@btravstack/entity@0.5.0

Minor Changes

  • cea1120: Producer callbacks are now typed as their schema's input, so the cast they
    all carried is gone:

    // before
    shout: Entity.computed(Upper, (d) => d.name.toUpperCase() as z.infer<typeof Upper>),
    id: () => crypto.randomUUID() as z.infer<typeof OrgId>,
    
    // after
    shout: Entity.computed(Upper, (d) => d.name.toUpperCase()),
    id: () => crypto.randomUUID(),

    Nothing changes at runtime: a computed value was always parsed by its own schema
    on every construction path, and generated values always went through make's
    validation. The types now say so. Existing code compiles unchanged — a branded
    return still assigns to its schema's input.

    One narrowing: a generator for a field that is both .optional() and
    generated was an optional key and is now required (it may return undefined).
    Declaring that combination is not known to occur anywhere.

  • a280317: Type a root's merged field map as child-wins, matching the runtime.

    Root.extend(tag)(fields) merges fields with { ...parent.fields, ...nextFields }, so
    a variant redeclaring an inherited field wins. The types said S & S2, which typed
    that key as both brands at once while the schema held was the child's alone —
    the same lie already fixed for the computed map. The merge is now
    MergedFields<S, S2>Omit<S, keyof S2> & S2 — at extend's return type and at
    its computed and invariants input positions, so a rule's d reads a redeclared
    field honestly too.

    Nothing changes at runtime, and no entity declaration that compiled stops
    compiling — the change is confined to what extend reports for a redeclared key.
    Code consuming such a key is what may break: an assignment relying on the
    root's brand there was always unsound, since the value never carried that brand,
    and it now fails to compile instead of passing silently. As with computed, the honest
    surfaces are Entity.Output, toJSON() and output.shape — an instance still
    reads as the intersection, because a root's instance type reaches a variant
    unmapped (TS2425).

    MergedFields is exported at the top level, and as Entity.MergedFields, for the
    reason MergedComputed is: written inline, the 5.9.3 emitter copies the type
    parameter through unsubstituted and a consumer's declarations fail with TS2304.

Copilot AI lite review requested due to automatic review settings August 9, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This Changesets-generated release PR prepares @btravstack/entity for publication by bumping the package version, promoting the pending changeset entry into the package changelog, and removing the consumed changeset file.

Changes:

  • Bump @btravstack/entity from 0.4.0 to 0.5.0.
  • Add 0.5.0 release notes to packages/entity/CHANGELOG.md.
  • Remove the consumed changeset file .changeset/castless-producers.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/entity/package.json Updates package version to 0.5.0 for the release.
packages/entity/CHANGELOG.md Adds the 0.5.0 changelog entry describing the minor change.
.changeset/castless-producers.md Removes the changeset now incorporated into the changelog for publishing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@btravers
btravers force-pushed the changeset-release/main branch 2 times, most recently from 796db24 to 267ad99 Compare August 9, 2026 12:57
@btravers
btravers force-pushed the changeset-release/main branch from 267ad99 to 0aaf7ef Compare August 9, 2026 13:05
@btravers
btravers merged commit 447e8d6 into main Aug 9, 2026
13 checks passed
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.

2 participants