Skip to content

ci(release): bun run build before npm publish (v0.4.1)#33

Merged
aaronstevenwhite merged 1 commit into
mainfrom
fix/schema-publish-build
Apr 26, 2026
Merged

ci(release): bun run build before npm publish (v0.4.1)#33
aaronstevenwhite merged 1 commit into
mainfrom
fix/schema-publish-build

Conversation

@aaronstevenwhite

Copy link
Copy Markdown
Contributor

Summary

Fix the npm publish step in the release workflow. The publish-npm job ran bun install + bun run typecheck + npm publish but never invoked bun run build. Since packages/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/schema saw "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 build step between typecheck and publish, bumps to v0.4.1, and CHANGELOG-notes the fix.

Change class

  • bug fix
  • feature (non-breaking)
  • refactor (no behavior change)
  • documentation only
  • release scaffolding / CI / build
  • schema change (lexicon edit — will be classified by check-compat)

Testing

  • cd packages/schema && bun run build — succeeds, emits dist/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) wipes dist/ before rebuilding, so there's no stale-artifact risk from running typecheck first (the typecheck step writes only .tsbuildinfo because composite: true requires a build-info file even under --noEmit).

The republish-npm.yml workflow 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.

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.
@aaronstevenwhite aaronstevenwhite merged commit 5aa2c9c into main Apr 26, 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.

1 participant