Repository navigation
Fix npm source package missing files and add darwin-x64 binary packages - #1411
Merged
Merged
Conversation
Fix issue BYVoid#1409: npm install of opencc fell back to a source build on platforms without a prebuilt binary (such as Intel Mac) and failed because the npm tarball was missing files required by the node-gyp build. Bump npm packages to 1.4.1; the package-lock.json will be regenerated with integrity hashes once the platform-specific scoped packages are published at 1.4.1. Detailed Changes: - **package.json**: - Add missing source files to the "files" whitelist: src/ConfigBasedConverter.hpp, src/PipelineConverter.cpp/.hpp, src/SingleStageConverter.cpp/.hpp, src/opencc_config_schema.inc. - Add @opencc/opencc-darwin-x64 optional dependency; bump versions to 1.4.1. - **scripts/verify-node-main-package.js**: - Verify at prepack that every file in the gyp source list and its #include closure is covered by the "files" whitelist, so future source files cannot be silently dropped from the tarball again. - Expect the new darwin-x64 scoped package. - **plugins/jieba/node**: - Add @opencc/opencc-jieba-darwin-x64 optional dependency and expected scoped package; bump versions to 1.4.1. - **.github/workflows/release-npm-binaries.yml**: - Add darwin-x64 (macos-15-intel) matrix entries to both binary publish jobs. - **.github/workflows/nodejs.yml**: - Add pack-source-install job that installs the packed npm tarball with --omit=optional on ubuntu / macOS ARM / macOS Intel, forcing the node-gyp source build path that issue BYVoid#1409 hit, plus a conversion smoke test. - Add macos-15-intel to the build-and-test matrix. - **NEWS.md**: Add 1.4.1 release notes.
Keep the BYVoid#1409 fix (files whitelist, include-closure prepack check, CI source-build tests) but defer the 1.4.1 release: revert package versions to 1.4.0, restore package-lock.json, drop the not-yet-published @opencc/opencc-darwin-x64 and @opencc/opencc-jieba-darwin-x64 optional dependencies (no 1.4.0 exists on npm, so keeping them would break npm install) and their verify-script expectations, and remove the 1.4.1 NEWS entry. Revert this commit when cutting the next release.
frankslin
added a commit
that referenced
this pull request
Jul 8, 2026
…es (#1411) * Fix npm source package missing files and add darwin-x64 binary packages Fix issue #1409: npm install of opencc fell back to a source build on platforms without a prebuilt binary (such as Intel Mac) and failed because the npm tarball was missing files required by the node-gyp build. Bump npm packages to 1.4.1; the package-lock.json will be regenerated with integrity hashes once the platform-specific scoped packages are published at 1.4.1. Detailed Changes: - **package.json**: - Add missing source files to the "files" whitelist: src/ConfigBasedConverter.hpp, src/PipelineConverter.cpp/.hpp, src/SingleStageConverter.cpp/.hpp, src/opencc_config_schema.inc. - Add @opencc/opencc-darwin-x64 optional dependency; bump versions to 1.4.1. - **scripts/verify-node-main-package.js**: - Verify at prepack that every file in the gyp source list and its #include closure is covered by the "files" whitelist, so future source files cannot be silently dropped from the tarball again. - Expect the new darwin-x64 scoped package. - **plugins/jieba/node**: - Add @opencc/opencc-jieba-darwin-x64 optional dependency and expected scoped package; bump versions to 1.4.1. - **.github/workflows/release-npm-binaries.yml**: - Add darwin-x64 (macos-15-intel) matrix entries to both binary publish jobs. - **.github/workflows/nodejs.yml**: - Add pack-source-install job that installs the packed npm tarball with --omit=optional on ubuntu / macOS ARM / macOS Intel, forcing the node-gyp source build path that issue #1409 hit, plus a conversion smoke test. - Add macos-15-intel to the build-and-test matrix. - **NEWS.md**: Add 1.4.1 release notes. * Temporarily roll back npm version bump to 1.4.0 Keep the #1409 fix (files whitelist, include-closure prepack check, CI source-build tests) but defer the 1.4.1 release: revert package versions to 1.4.0, restore package-lock.json, drop the not-yet-published @opencc/opencc-darwin-x64 and @opencc/opencc-jieba-darwin-x64 optional dependencies (no 1.4.0 exists on npm, so keeping them would break npm install) and their verify-script expectations, and remove the 1.4.1 NEWS entry. Revert this commit when cutting the next release. --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Fix issue #1409: npm install of opencc fell back to a source build on platforms without a prebuilt binary (such as Intel Mac) and failed because the npm tarball was missing files required by the node-gyp build.