fix(packages): publish Bun entrypoints from dist#6
Merged
Conversation
The 4.0.0/3.0.1 packages declared a Bun-specific export target of `./src/index.ts`, but the npm packages only include built artifacts. Bun prefers the `bun` condition over `import`, so Bun consumers could not import the SDK or sibling packages from npm. Point public Bun entrypoints at `dist/index.js`, add a package-export regression test, and run package tests after build so workspace imports exercise the same public entrypoint shape consumers receive. This keeps the local test path aligned with the published package contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the npm package export regression introduced in the 4.0.0/3.0.1 release.
Problem
The public package manifests declared:
but the published npm packages only include
dist/(plus schemas for protocol). Bun prefers thebuncondition, so Bun consumers could not import@hotrepl/sdkfrom npm at all:Fix
./dist/index.jsfor protocol, sdk, cli, and mcp.filesand Bun entrypoints use built JS.@hotrepl/sdk, avoiding duplicate source-vs-dist constructors after build-before-test.Release
Patch changeset:
@hotrepl/protocol4.0.1@hotrepl/sdk4.0.1@hotrepl/cli3.0.2@hotrepl/mcp3.0.2Verified locally:
bun test packages/sdk/test/package-exports.test.tsfails red before the metadata fix and passes after.bun run test && bun run typecheck && dprint check && bun changeset status --verbose.npm packtarballs installed into a clean app with npm, then imported under Bun: sdk/protocol/cli/mcp all load.