Commit Graph

170 Commits

Author SHA1 Message Date
Alessio Attilio
312226cbf0 fix: skip local file: protocol dependencies during pnpm fetch (#10514)
This fixes an issue where pnpm fetch would fail in Docker builds when
local directory dependencies (file: protocol) were not available.

The fix adds an ignoreLocalPackages option that is passed from the fetch
command to skip local dependencies during graph building, since pnpm
fetch only downloads packages from the registry and doesn't need local
packages that won't be available in Docker builds.

close #10460
2026-02-06 17:28:39 +01:00
Trevor Burnham
680c543263 fix: allow env vars and updateConfig hook to override frozen-lockfile in CI (#10224)
When CI=true, pnpm automatically enables frozen-lockfile mode. Previously,
this could only be overridden via .npmrc files or CLI flags because the
code checked rawLocalConfig (which excludes env vars and hook changes).

Now checks the fully resolved config values (frozenLockfile and
preferFrozenLockfile) instead of rawLocalConfig, allowing:
- Environment variables (pnpm_config_frozen_lockfile=false)
- updateConfig hook in .pnpmfile.cjs
- .npmrc files (already worked)
- CLI flags (already worked)

Fixes #9861
2026-02-05 23:06:12 +01:00
Zoltan Kochan
3c40892b90 feat!: remove old way of declaring node.js in dependencies (#10507) 2026-01-25 16:07:30 +01:00
Zoltan Kochan
e3b35b6f37 style: update eslint to v9 (#10474) 2026-01-17 12:01:23 +01:00
Zoltan Kochan
a8fe2d5298 feat!: remove the server command (#10463) 2026-01-15 11:32:07 +01:00
Zoltan Kochan
8b4bdf9a83 refactor: replace onlyBuiltDependencies and ignoredBuiltDependencies with allowBuilds (#10401) 2026-01-02 23:21:17 +01:00
Zoltan Kochan
cb367b9515 feat!: deprecate old settings that were replaced by allowBuilds (#10382) 2026-01-02 12:22:42 +01:00
btea
facdd717bf feat: add trustPolicyIgnoreAfter (#10359)
* feat: add `trustPolicyIgnoreAfter`

* Update .changeset/big-lies-pump.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: npm-resolver

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-12-28 02:01:09 +01:00
Zoltan Kochan
71de2b3f2b feat!: remove use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field (#10373) 2025-12-27 22:41:53 +01:00
Brandon Cheng
6f806be0ae chore: enable TypeScript's erasableSyntaxOnly config (#10365)
* chore: configure `erasableSyntaxOnly`

* refactor: remove class property access modifiers in constructor

```
../dedupe/check/src/DedupeCheckIssuesError.ts:5:16 - error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.

5   constructor (public dedupeCheckIssues: DedupeCheckIssues) {
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../reviewing/dependencies-hierarchy/src/getTree.ts:243:24 - error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.

243   private constructor (private readonly keypath: readonly string[]) {}
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

* chore: migrate from enum types

```
../pkg-manager/plugin-commands-installation/src/import/index.ts:66:6 - error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.

66 enum YarnLockType {
        ~~~~~~~~~~~~

../lockfile/detect-dep-types/src/index.ts:5:13 - error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.

5 export enum DepType {
              ~~~~~~~
```

* chore: add changelog

* chore: remove `ts-node` dev dependency (#10371)

* chore: remove `ts-node` dev dependency

* chore: remove `ts-node` usages from `package.json` scripts
2025-12-27 11:23:49 +01:00
Khải
90bd3c31f8 feat(config)!: project-specific packageConfigs (#10304)
* feat(config)!: project level `config.yaml`

* test: fix

* refactor: shorten some names

* docs(changeset): change wording

* feat: move project settings to pnpm-workspace.yaml

* test: remove unneeded fixture

* docs(changeset): correct

* refactor: replace validation with creation

* docs: consistent terminology

* perf: validate once

* test: projectConfig

* refactor: explicitly use `undefined`

* refactor: reuse `ProjectConfigRecord`

* chore(deps): remove unused dependency

* style: remove extra pipe character

* refactor: rename to `projectConfigs`

* feat: flatten `projectConfig` with `match`

* refactor: correct error class names

* docs(changeset): update

* test: fix

* feat: rename to `packageConfigs`

Rename `projectConfigs` to `packageConfigs` in the workspace manifest.

The term "project config" is still used internally, because, internally,
"project" refers to workspace packages whilst "package" refers to 3rd party
packages and dependencies.

* docs(changeset): clarify `project-N`
2025-12-21 12:01:18 +01:00
Zoltan Kochan
05fb1aee5f fix: reporting ignored dependency builds (#10276) 2025-12-06 16:32:19 +01:00
Ryo Matsukawa
b51bb42da5 feat!: support lowercase options in pnpm add (-d, -p, -o, -e) (#10079)
close #9197
2025-11-17 23:52:11 +01:00
Ryo Matsukawa
9d3f00b09a feat: add support for trustPolicyExclude (#10168)
close #10164
2025-11-11 13:00:20 +01:00
Ryo Matsukawa
10bc39152e feat: add support for npm package trust evidence check via a new trustPolicy setting (#10103)
close #8889

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-11-09 23:23:58 +01:00
btea
cbdc1067cc refactor: replace deprecated method (#10075) 2025-11-09 11:23:24 +01:00
Trevor Burnham
0b5ccc9238 fix(update): prevent package.json updates when updating indirect dependencies (#5118) (#10155)
close #5118
2025-11-06 15:13:51 +01:00
Zoltan Kochan
e146e988ea feat: loading ESM pnpmfiles (#9730) 2025-10-10 09:50:21 +02:00
Zoltan Kochan
7d075325b9 Merge remote-tracking branch 'origin/main' into v11 2025-09-28 16:01:58 +02:00
btea
93fdc73626 fix: correctly apply cleanupUnusedCatalogs when remove pkg (#10005)
close #9993

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-09-28 00:55:43 +02:00
Zoltan Kochan
6f861bccaa Merge remote-tracking branch 'origin/main' into v11 2025-09-12 22:35:14 +02:00
btea
c182b2d588 fix: remove pkg apply cleanupUnusedCatalogs (#9930)
* fix: remove pkg apply cleanupUnusedCatalogs

* fix: lint
2025-09-07 00:03:56 +02:00
Zoltan Kochan
3df6702bcb fix: update load-json-file, write-json-file, write-pkg 2025-08-28 11:37:38 +02:00
Zoltan Kochan
491a84fb26 feat: use ESM instead of commonjs (#9870) 2025-08-25 10:02:00 +02:00
Zoltan Kochan
facd7656e8 refactor: always use extensions in relative imports (#9878) 2025-08-19 15:25:11 +02:00
btea
8747b4e7f6 feat: add cleanupUnusedCatalogs config (#9793) 2025-08-14 12:26:51 +02:00
btea
9dbada8315 refactor: combine addCatalogs to updateWorkspaceManifest (#9850) 2025-08-13 17:32:43 +02:00
Khải
6f7ac0f48b feat: customize supportedArchitectures using CLI (#9745)
close #7510
2025-07-16 00:56:00 +02:00
Zoltan Kochan
cf630a8e84 feat: allow to set multiple pnpmfiles (#9702) 2025-07-08 14:54:07 +02:00
Zoltan Kochan
b511eac107 fix: running an install after the fetch command should hoist all dependencies (#9690)
close #9689
2025-06-25 01:14:45 +02:00
Khải
1ccd634f56 refactor: stricter type for mutation (#9680) 2025-06-21 23:00:18 +02:00
Nikita Skovoroda
45580ad93d fix: 15% smaller bundle size (#8810) 2025-06-13 22:04:48 +02:00
Khải
983efdc7f1 fix(deploy): overrides contain peer dependencies (#9604)
close #9595
2025-06-10 00:45:55 +02:00
Zoltan Kochan
b217bbb4a7 feat: add a new setting for telling pnpm if the env is CI (#9616)
This is an addition to https://github.com/pnpm/pnpm/pull/8190. The global virtual store isn't a good choice for CI. So, we disable it even if the setting sets `enableGlobalVirtualStore` to `true`.
2025-06-08 15:00:22 +02:00
Brandon Cheng
099ac93e08 refactor: use Catalogs config type instead of CatalogSnapshots for updatedCatalogs (#9589)
* refactor: use Catalogs config type instead of CatalogSnapshots

* refactor: create catalogMetadata instead of manually patching snapshots
2025-06-01 23:53:04 +02:00
martinkors
046af72a96 feat: add new catalogMode setting (#9552)
* feat: add new `catalogMode` setting

Add new `catalogMode` setting for automatically adding new dependencies to
the default catalog.

Closes pnpm#8876, Closes pnpm#8308

* fix: catalogs don't only store semver ranges and versions

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-20 16:47:05 +02:00
Brandon Cheng
e7d0f6cdcf refactor: rename newCatalogs to updatedCatalogs (#9561) 2025-05-20 11:15:41 +02:00
Khải
c8341cca57 feat: pnpm add option to add new entries to catalogs (#9484)
close #9425

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-14 18:32:05 +02:00
modten
36d1448c48 feat: add workspace-concurrency cli option for pack and publish command (#9493)
* refactor: set the default `workspaceConcurrency` to `Math.min(os.availableParallelism(), 4)`

* feat(plugin-commands-publishing): add `workspace-concurrency` cli option for pack and publish

* feat(recursive): add support for `recursive pack`

* feat: get default workspaceConcurrency from config package

* test(config): mock cpus to support Node.js 18
2025-05-09 10:30:21 +02:00
Zoltan Kochan
9362b5fb15 fix: updateConfig in pnpm-workspace.yaml should not be ignored (#9501)
* fix: updateConfig in pnpm-workspace.yaml should not be ignored

close #9500

* fix: reading executionEnv from pnpm-workspace.yaml
2025-05-08 12:24:43 +02:00
btea
62029d1794 fix: add command --allow-build option should specify package (#9489)
* fix: add command --allow-build option should specify package

* chore: remove warn

* fix: validating the --allow-build flag

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-05-07 18:18:39 +02:00
Khải
3f70b673bf refactor: add type to action (#9490)
* refactor: add type to `action`

* fix: eslint
2025-05-05 13:46:19 +02:00
Zoltan Kochan
8a9f3a4835 refactor: rename pref to bare specifier (#9445) 2025-04-20 22:58:08 +02:00
Zoltan Kochan
56bb69b004 feat: dangerouslyAllowAllBuilds allows to enable the build of all dependencies (#9440)
close #9102
2025-04-20 13:13:11 +02:00
Zoltan Kochan
5b73df1eb1 refactor: resolvers should calculate the specifiers that are saved into package.json (#9426)
* refactor: resolvers should return specifier templates

* refactor: updating workspace protocol specs in package.json

* refactor: move workspace selector calculation logic to npm-resolver

* refactor: move workspace selector calculation logic to npm-resolver

* refactor: calculating range in npm-resolver

* refactor: rename normalizedPref and specifierTemplate to specifier

* refactor: specifiers creation

* refactor: npm-resolver

* refactor: remove which-version-is-pinned package

* refactor: which version is pinned

* docs: add changesets

* refactor: implement suggestions

* refactor: revert regex usage
2025-04-18 17:48:03 +02:00
btea
4d95e93040 fix: write allow-build value to pnpm-workspace.yaml (#9404) 2025-04-14 11:43:03 +02:00
Zoltan Kochan
750ae7d1d7 feat(cli): installing new configurational dependencies (#9377) 2025-04-07 13:38:18 +02:00
Zoltan Kochan
80338543fb fix: pnpm link should update overrides in pnpm-workspace.yaml (#9365) 2025-04-03 01:12:31 +02:00
Zoltan Kochan
1413c25435 feat: config update hook (#9325) 2025-03-31 08:08:32 +02:00
Zoltan Kochan
c1f09d48fa fix: dlx with --allow-build flag (#9281)
close #9263
2025-03-14 02:27:58 +01:00