npm.io
0.0.2 • Published 6d ago

@mochi-framework/msgpackr-extract-stub

Licence
Version
0.0.2
Deps
0
Size
2 kB
Vulns
0
Weekly
298

@mochi-framework/msgpackr-extract-stub

This is not the real msgpackr-extract. It's an empty stub meant to be substituted for it via a package.json overrides field:

"overrides": { "msgpackr-extract": "npm:@mochi-framework/msgpackr-extract-stub@^0.0.1" }

msgpackr (pulled in transitively by bunqueue) lists msgpackr-extract as an optional dependency — a native C++ accelerator that also drags in platform-specific @msgpackr-extract/* prebuilt binaries. We don't want those binaries in the install, so we replace the package with this stub.

index.cjs exports a falsy value, which mirrors the "native module not present" path inside msgpackr (its require is wrapped in try/catch and guarded by if (extractor)). The result is that msgpackr runs on its pure-JS codec, and no native binaries are downloaded.

Keywords