fix(release): reduce npm package size and harden smoke test#93
Merged
simongdavies merged 1 commit intomainfrom Apr 29, 2026
Merged
fix(release): reduce npm package size and harden smoke test#93simongdavies merged 1 commit intomainfrom
simongdavies merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates HyperAgent’s release/publish pipeline to produce smaller, release-optimized native artifacts and to make post-publish verification more reliable (including registry propagation + tarball availability checks).
Changes:
- Build native addons in release mode with stripping enabled (including explicit handling for musl-only artifact uploads).
- Add an npm package unpacked-size guard (300MB) during packing to prevent accidental bloat.
- Simplify the standalone binary build process to only place
.nodefiles in the appropriate package subdirectories, and harden the npm publish smoke-test polling to verify both metadata and tarball shasum.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/code-validator/guest/package.json |
Builds the guest N-API addon in release mode with stripping to reduce artifact size. |
scripts/build-binary.js |
Stops duplicating .node files into the top-level lib/ directory; keeps them under the appropriate package directories for resolution. |
Justfile |
Ensures release builds of native addons use --strip (including Windows path) to reduce output size. |
.github/workflows/publish.yml |
Streamlines musl packaging, enforces max unpacked size, rebuilds release addons post-test, and strengthens smoke-test registry polling with tarball shasum verification. |
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.
This pull request updates the build and release process for native addons and npm packaging, focusing on improving artifact handling, package size enforcement, and reliability of npm publish verification. The most significant changes streamline the build matrix for musl targets, enforce stricter packaging constraints, and simplify the binary build script.
Build and Packaging Improvements:
.github/workflows/publish.ymlnow explicitly build native addons in release mode with stripping enabled, and remove glibc artifacts to ensure only musl binaries are uploaded for that matrix leg.NPM Publish Verification:
Build Script and Cross-Platform Artifacts:
scripts/build-binary.jsscript is simplified to only copy platform-specific.nodefiles into the correct package subdirectories, rather than duplicating them in the mainlibdirectory.Justfileandpackage.jsonbuild scripts are updated to use the--stripflag for smaller, optimized native binaries in release builds.