@dfinity/pic downloads a ~94 MB pocket-ic binary in a postinstall that throws when it cannot. Since the published ic-mops package is the unbundled dist/ tree with the full dependency list, a plain dependencies entry would make npm i -g ic-mops pull that binary and fail outright with no network. #642 works around it by keeping pic a devDependency and pre-bundling it into dist/vendor/pic.mjs.
The workaround costs three moving parts that exist only for this: cli/vendor/pic-entry.mjs (explicit re-exports, because pic ships CJS and export * through esbuild silently yields no named exports), the vendor:pic build step, and the fix-dist import rewrite — plus cli/tests/vendor-pic.test.ts guarding the silent-failure mode.
mraszyk suggested during review of dfinity/pic-js#276 that pic download the binary lazily at runtime instead of in a postinstall: dfinity/pic-js#276 (comment)
If that lands, pic becomes an ordinary dependency and all four pieces above get deleted. It also fixes the one place the download still bites: a clean npm install in cli/ pulls the 94 MB binary for local dev and CI, because devDependency install scripts do run.
Next step is filing the request upstream (not filed yet — the idea is the maintainer's own, so it may be worth asking whether they want to implement it).
@dfinity/picdownloads a ~94 MB pocket-ic binary in apostinstallthat throws when it cannot. Since the publishedic-mopspackage is the unbundleddist/tree with the full dependency list, a plaindependenciesentry would makenpm i -g ic-mopspull that binary and fail outright with no network. #642 works around it by keeping pic a devDependency and pre-bundling it intodist/vendor/pic.mjs.The workaround costs three moving parts that exist only for this:
cli/vendor/pic-entry.mjs(explicit re-exports, because pic ships CJS andexport *through esbuild silently yields no named exports), thevendor:picbuild step, and thefix-distimport rewrite — pluscli/tests/vendor-pic.test.tsguarding the silent-failure mode.mraszyk suggested during review of dfinity/pic-js#276 that pic download the binary lazily at runtime instead of in a postinstall: dfinity/pic-js#276 (comment)
If that lands, pic becomes an ordinary dependency and all four pieces above get deleted. It also fixes the one place the download still bites: a clean
npm installincli/pulls the 94 MB binary for local dev and CI, because devDependency install scripts do run.Next step is filing the request upstream (not filed yet — the idea is the maintainer's own, so it may be worth asking whether they want to implement it).