You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adopt remaining pic-js-mops changes before archiving the fork #282
dfinity/pic-js-mops is a fork of this repo that diverged at v0.13.1 (2025-05-07) and is a functional subset of pic-js today. It is slated for archival. Three items are worth adopting first.
The fork exists for one reason, stated in its own (now closed) PR #5: to use PocketIC "without depending on @dfinity/pic and its PocketIC binary postinstall". Item 1 removes that reason.
1. Document installing without the postinstall binary download
Blocking for archival. Docs only — every mechanism already exists:
postinstall.mjs is in files, so node node_modules/@dfinity/pic/postinstall.mjs works on demand
ignore-scripts=true installs cleanly (verified: install succeeds, no binary fetched)
docs/src/content/docs/guides/running-tests.mdx documents binPath but never ignore-scripts, air-gapped/CI installs, or invoking the postinstall script manually.
2. Ship src in packages/picfiles
sourceMap: true is enabled and dist/*.js.map is published containing "sources":["../src/pocket-ic.ts"], but files is ["dist", "postinstall.mjs"]. Every published sourcemap is unresolvable. The fork ships ["dist", "src"]. Alternatives: inlineSources, or drop sourcemaps.
3. Add a wasmMemoryLimit enforcement test
The API is fully implemented (pocket-ic-types.ts:582, pocket-ic.ts:275,644,708, management-canister.ts:48,62). Missing is a behavioral assertion that an undersized limit rejects installation — pocket-ic.spec.ts:219 covers updateCanisterSettings but not wasmMemoryLimit. ~25 lines, portable from the fork's PR #5.
Explicitly not adopting
The fork's ESM build config (.js import extensions, module: ES2022, moduleResolution: bundler): Node already resolves named exports through the current CJS emit, @icp-sdk/core ships dual-format, and bundler resolution is what breaks the fork's own Jest setup.
Considered and left out: @icp-sdk/core as a peerDependency — plausible for type-level version skew, unverified.
After archival
npm deprecate pic-js-mops "use @dfinity/pic" — archiving the repository does not unpublish the package.
Shipping src: not adopted. The published sourcemaps already map stack traces to src/*.ts lines in Jest, Vitest and node --enable-source-maps. Shipping src would only let editors open those files, which isn't worth the extra package size.
wasmMemoryLimit enforcement test: not adopted. It tests PocketIC's enforcement rather than PicJS, which only passes the setting through.
One step is left, and only the npm maintainer of pic-js-mops can take it: npm deprecate pic-js-mops. It still gets ~1.2k monthly downloads, mostly through ic-mops 2.0.0–2.19.2, which depend on it. ic-mops 2.20.0 switched to upstream @dfinity/pic, bundled into the CLI, so those users only need to upgrade ic-mops. Direct users should switch to @dfinity/pic. A message covering both: "No longer maintained. Via ic-mops: upgrade to ic-mops 2.20.0 or later. Used directly: switch to @dfinity/pic."
Activity
marc0olo commentedon Sep 25, 2026
Closing, the fork is archived and each item is settled:
binPathorPOCKET_IC_BIN, the install script can stay blocked.src: not adopted. The published sourcemaps already map stack traces tosrc/*.tslines in Jest, Vitest andnode --enable-source-maps. Shippingsrcwould only let editors open those files, which isn't worth the extra package size.wasmMemoryLimitenforcement test: not adopted. It tests PocketIC's enforcement rather than PicJS, which only passes the setting through.@icp-sdk/coreas a peer dependency: done in feat(pic)!: require @icp-sdk/core v6 as a peer dependency #291.One step is left, and only the npm maintainer of
pic-js-mopscan take it:npm deprecate pic-js-mops. It still gets ~1.2k monthly downloads, mostly throughic-mops2.0.0–2.19.2, which depend on it.ic-mops2.20.0 switched to upstream@dfinity/pic, bundled into the CLI, so those users only need to upgradeic-mops. Direct users should switch to@dfinity/pic. A message covering both: "No longer maintained. Via ic-mops: upgrade to ic-mops 2.20.0 or later. Used directly: switch to @dfinity/pic."