ci(release): bun run build before npm publish (v0.4.1)#33
Merged
Conversation
The publish-npm job ran bun install + bun run typecheck + npm publish but never invoked bun run build. With package.json's "main" / "types" / "exports" pointing at ./dist/, the v0.4.0 tarball shipped without the compiled tree — consumers importing @idiolect-dev/schema saw "Cannot find module" on typecheck. The earlier v0.3.0 publish was driven from a developer machine where bun run build ran implicitly before publish; v0.4.0 was the first fully-CI-driven release and exposed the missing step. Adds a build step between typecheck and publish in release.yml. v0.4.1 republishes the package with dist/ included.
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.
Summary
Fix the npm publish step in the release workflow. The
publish-npmjob ranbun install+bun run typecheck+npm publishbut never invokedbun run build. Sincepackages/schema/package.json's\"main\",\"types\", and\"exports\"all point at./dist/, the v0.4.0 tarball shipped without the compiled tree — anyone importing@idiolect-dev/schemasaw "Cannot find module" on typecheck. v0.3.0 was published from a developer machine where the build step ran implicitly; v0.4.0 was the first fully-CI-driven release and exposed the gap.Adds a
bun run buildstep between typecheck and publish, bumps to v0.4.1, and CHANGELOG-notes the fix.Change class
Testing
cd packages/schema && bun run build— succeeds, emitsdist/index.js(14.79 KB) plus.d.ts,.d.ts.map, and the per-module subtree.cargo build --workspace --all-features— passes against the bumped versions.cargo test --workspace— green.The publish path itself can only be exercised end-to-end at tag time; v0.4.1 will tag once this lands and the resulting tarball gets inspected before any further release.
Architecture notes
The build script (
packages/schema/scripts/build.ts) wipesdist/before rebuilding, so there's no stale-artifact risk from running typecheck first (the typecheck step writes only.tsbuildinfobecausecomposite: truerequires a build-info file even under--noEmit).The
republish-npm.ymlworkflow was deleted in #29; if we want a manual escape hatch for re-publishing an existing tag with this fix, it should come back as a separate PR.