Adopt remaining pic-js-mops changes before archiving the fork
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 13
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 1
Description
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.mjsis infiles, sonode node_modules/@dfinity/pic/postinstall.mjsworks on demandbinPath(#276) andPOCKET_IC_BINselect an existing binary.pocket-ic-versionpins the versionignore-scripts=trueinstalls 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/pic files
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/src/content/docs/guides/running-tests.mdx and the existing postinstall.mjs, binPath, POCKET_IC_BIN, and .pocket-ic-version references to document the supported installation paths. Then inspect packages/pic files and the sourcemap paths, followed by pocket-ic.spec.ts around line 219 and the wasmMemoryLimit API locations. Done means the installation guidance, published sources, and undersized-limit rejection test cover the three requested items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, documentation, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100