mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-29 02:15:26 -04:00
Generate a Node.js package map at `node_modules/.package-map.json` on every isolated or hoisted install, including under the global virtual store, so that third-party tooling can start experimenting with package maps. The file is serialized compactly. Two settings control how the map is consumed: - `node-experimental-package-map` (default: off): inject `--experimental-package-map` into `NODE_OPTIONS` for the Node.js scripts pnpm runs — dependency lifecycle scripts, `pnpm exec`, and `pnpm run` (including recursive runs). - `node-package-map-type` (`standard` | `loose`): choose between a strict map and one that tolerates hoisting-like access. Covered by both the pnpm CLI and the pacquet (Rust) implementation. --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
Options
| Done | Command | Notes |
|---|---|---|
| ✅ | -C , --dir | |
| -w, --workspace-root |
Manage dependencies
pacquet add <pkg>
- [~] Install from npm registry
- Install with tags are not supported. Example:
pacquet add fastify@latest
- Install with tags are not supported. Example:
- Install from the workspace
- Install from local file system
- Install from remote tarball
- Install from Git repository
| Done | Command | Notes |
|---|---|---|
| ✅ | --save-prod | |
| ✅ | --save-dev | |
| ✅ | --save-optional | |
| ✅ | --save-exact | |
| ✅ | --save-peer | |
| --ignore-workspace-root-check | ||
| --global | ||
| --workspace | ||
| --filter <package_selector> |
pacquet install
| Done | Command | Notes |
|---|---|---|
| --force | ||
| ✅ | --offline | Frozen-install only: refuses network fetches; errors with ERR_PACQUET_NO_OFFLINE_TARBALL when a snapshot isn't cached. Stage 2 resolver will additionally gate metadata fetches like upstream's pickPackage. |
| ✅ | --prefer-offline | No-op on frozen-install (warm prefetch already prefers the local store). Reserved for Stage 2's resolver. |
| --prod | ||
| ✅ | --dev | |
| ✅ | --no-optional | |
| --lockfile-only | ||
| --fix-lockfile | ||
| --frozen-lockfile | ||
| --reporter= | ||
| --use-store-server | ||
| --shamefully-hoist | ||
| --ignore-scripts | ||
| --filter <package_selector> | ||
| --resolution-only |
Run scripts
pacquet run
| Done | Command | Notes |
|---|---|---|
| ✅ | script-shell | |
| shell-emulator | ||
| ~ | --recursive | Runs every workspace project sequentially; no --filter yet |
| ✅ | --if-present | |
| --parallel | ||
| --stream | ||
| --aggregate-output | ||
| ✅ | enable-pre-post-scripts | |
| ✅ | --resume-from <package_name> | |
| ✅ | --report-summary | |
| ✅ | --no-bail | |
| --filter <package_selector> | Accepted but not yet consumed |
pacquet exec
| Done | Command | Notes |
|---|---|---|
| ✅ | -c, --shell-mode | |
| ~ | --recursive | Runs every workspace project sequentially; no --filter yet |
| ✅ | --resume-from | |
| ✅ | --report-summary | |
| ✅ | --no-bail | |
| --filter <package_selector> | Accepted but not yet consumed | |
| --workspace-concurrency |
pacquet dlx
| Done | Command | Notes |
|---|---|---|
| ✅ | --package | |
| ✅ | --allow-build | |
| ✅ | -c, --shell-mode | |
| ✅ | --cpu / --os / --libc |
pacquet test
pacquet start
Misc.
pacquet store
| Done | Command | Notes |
|---|---|---|
| status | ||
| add | ||
| ~ | prune | Currently prune removes all packages inside the directory |
| ✅ | path |