fix(pkg): include scripts/ in tarball so postinstall finds ensure-tree-sitter.mjs#214
Conversation
…nd ensure-tree-sitter.mjs PR #206 added a `postinstall: node scripts/ensure-tree-sitter.mjs` hook but did not add `scripts` to the `files` array in package.json. The published 0.7.60 tarball therefore omits the entire `scripts/` directory, and every `npm install @deeplake/hivemind` fails with: Error: Cannot find module '.../@deeplake/hivemind/scripts/ensure-tree-sitter.mjs' This bug is independent of the build host's Node version — the `files` array is what controls tarball composition, not the build environment. Fix: add `"scripts"` to the `files` array so the postinstall heal script ships with the package. The heal itself already exits 0 on platforms where the rebuild can't recover, so end-user installs stay non-fatal. Bumps version to 0.7.61; sync-versions cascaded to the per-agent metadata files. Verified: - `npm pack` produces a tarball that contains package/scripts/ensure-tree-sitter.mjs - Local global install of the resulting tarball under Node 24.12 completes without the missing-module error Confidence: 95%, because the tarball composition is mechanically verified and the postinstall script is exit-0 by design. Untested: end-to-end behavior when the tree-sitter compile fails on a host with no toolchain (heal warns + exits 0 by design, but not observed end-to-end here).
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughRoot ChangesVersion 0.7.61 Release
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage ReportNo Generated for commit be5e755. |
The previous commit manually bumped 0.7.60 → 0.7.61 and cascaded the version through sync-versions. That's redundant: release.yaml runs `npm version patch --no-git-tag-version` + `npm run build` (which calls prebuild → sync-versions) on every push to main that isn't already a release commit. The workflow would have produced the same version metadata itself. With the manual bump in, the workflow would have bumped 0.7.61 → 0.7.62 and skipped the 0.7.61 number entirely. Dropping the bump lets the workflow publish a clean 0.7.61.
Summary
npm install @deeplake/hivemind@0.7.60fails on every platform withError: Cannot find module '.../scripts/ensure-tree-sitter.mjs'because PR fix(deps): build tree-sitter from source on linux-arm64 / Node ≥22 #206 added apostinstallhook referencingscripts/ensure-tree-sitter.mjsbut did not add"scripts"to thefilesarray inpackage.json. The tarball is built without the entirescripts/directory."scripts"to thefilesarray. Bumps0.7.60 → 0.7.61;sync-versionscascades to the per-agent metadata.release.yaml— that pin (PR ci(release): pin release + publish jobs to Node 22 #207) was the right call for the CI build, but it cannot affect what's inside the published tarball. Onlyfilescontrols that.Verification
npm packon Node 22 producesdeeplake-hivemind-0.7.61.tgz(64 files, +6 vs 0.7.60), andtar tzfconfirmspackage/scripts/ensure-tree-sitter.mjsis present.npm i -g <tarball>on Node 24.12 completes without the missing-module crash.Test plan
package/scripts/ensure-tree-sitter.mjsnpm i -g @deeplake/hivemind@0.7.61succeeds on Node 24 linux-x64Summary by CodeRabbit