Skip to content

chore: build before publish (prepack guard + green build)#16

Open
heskew wants to merge 2 commits into
mainfrom
chore/build-before-publish
Open

chore: build before publish (prepack guard + green build)#16
heskew wants to merge 2 commits into
mainfrom
chore/build-before-publish

Conversation

@heskew

@heskew heskew commented Jun 12, 2026

Copy link
Copy Markdown
Member

Makes npm run build exit clean so it can guard publishes — 0.5.0 shipped without dist/ because nothing built before npm publish.

  • prepack: "npm run build"npm publish/npm pack now always build dist/ first; a buildless publish can't happen again.
  • Cleared the pre-existing build errors so the guard doesn't block publish: skipLibCheck (3 @types/node lib-internal errors), targz.ts BufferUint8Array, and run.ts reporter compose(new spec()) — it was passing the reporter class (this also fixes the spec output, which I confirmed renders correctly).
  • CI now gates check + build alongside the tests across the matrix.

Verified locally: check/build exit 0, 15/15 tests pass, and npm pack rebuilds dist/ via prepack after rm -rf dist.


🤖 Generated with Claude Code

0.5.0 shipped without dist/ because nothing built before `npm publish`. Make the
build clean and guard publishes on it:

- prepack: "npm run build" — npm publish/pack now always build dist/ first, so a
  buildless publish can't happen again.
- Clear the pre-existing build errors so the guard doesn't block publish:
  skipLibCheck (3 @types/node lib-internal errors), targz.ts Buffer→Uint8Array,
  and run.ts reporter compose(new spec()) (was passing the class — this also
  fixes the spec reporter output).
- CI now gates check + build alongside the tests across the matrix.

Verified: check/build exit 0, 15/15 tests pass, and `npm pack` rebuilds dist/ via
prepack after `rm -rf dist`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds a prepack script to package.json, instantiates spec in src/run.ts, updates the chunk types to Uint8Array in src/targz.ts, and enables skipLibCheck in tsconfig.json. The review feedback highlights a potential issue in src/targz.ts where stream errors are not handled, which could cause the Promise to hang indefinitely. It is recommended to handle errors on both the pack and gzip streams.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/targz.ts Outdated
@heskew heskew force-pushed the chore/build-before-publish branch from 30f3c18 to 1c61156 Compare June 12, 2026 21:17
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