-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: zstd
-
0
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Migrate @mongodb-js/zstd off the prebuild-install install script so it installs under npm 12, which blocks dependency install scripts by default.
The driver prefers Node's built-in zstd (NODE-7097) and uses this package only as the fallback, including in the v8 line. The package is not retired, and the fallback must keep working wherever a package manager skips install scripts.
Approach
Same model as kerberos (NODE-7679, the pilot): each prebuilt binary is published as its own package, @mongodb-js/zstd-<target>, with os/cpu/libc fields. @mongodb-js/zstd lists them as exact-version optional dependencies, so the package manager installs only the matching one and no install script runs. Targets are the same as today's prebuilds. Platforms without a prebuild build from source manually, and a local build takes precedence.
Acceptance Criteria
Implementation Requirements
- prebuild-install dependency and the install script removed, "gypfile": false.
- Loader tries the local build, then the platform package, and throws an error naming the platform.
- Release workflow publishes the platform packages first, then @mongodb-js/zstd, with provenance and signing covering every tarball, as in NODE-7679.
- The @mongodb-js/zstd-* package names exist on npm with publishing configured.
Testing Requirements
- Loader test covers every target.
- CI installs the packed packages into a fresh project with npm 12 and loads the addon without approving install scripts.
Documentation Requirements
- README: platform packages and building from source.
Follow Up Requirements
- N/A
- is related to
-
NODE-7097 Adopt built-in zstd support in Node.js
-
- Closed
-