433 Commits

Author SHA1 Message Date
Zoltan Kochan
1cc61e87bc feat!: change the default values of blockExoticSubdeps and strictDepBuilds (#10332) 2025-12-22 14:36:46 +01:00
Khải
97cf97609e fix(cli/config): phantom keys (#10323)
* fix(cli/config): phantom keys

Fixes https://github.com/pnpm/pnpm/issues/10296

This patch also include other refactors.

* test: does not traverse the prototype chain

* test: more properties

* test: fix other tests

* feat: revert unrelated changes
2025-12-22 12:26:14 +01:00
btea
79791d879f chore: replace mem with memoize (#10344) 2025-12-21 18:09:02 +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
76718b32ad feat: create a new field for allowing/disallowing builds (#10311)
ref #10235
2025-12-13 22:14:27 +01:00
Oren
ae8b816121 feat: support blockExoticSubdeps option to disallow non-trusted dep sources in subdeps (#10265)
* feat(core): add onlyRegistryDependencies option to disallow non-registry subdependencies

* fix: onlyRegistryDependencies=>registrySubdepsOnly

* fix: allow resolution from custom resolver

* fix: add registry-subdeps-only to types

* docs: update changesets

* refactor: registry-only

* refactor: registrySubdepsOnly=>blockExoticSubdeps

* fix: trust runtime deps

* refactor: remove comment

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-12-10 12:14:16 +01:00
Bart Riepe
7730a7f25c feat: allow loading certificates from scoped cert, ca and key (#10230)
* feat: allow loading certificates from `cert`, `ca` and `key`

These properties are supported in .npmrc, but get ignored by pnpm, this will make pnpm read
and use them as well.

* refactor: getNetworkConfigs.ts

* docs: update changesets

* fix: issues

* docs: update changesets

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-11-29 11:37:57 +01:00
Zoltan Kochan
7e2910e70f chore(release): 11.0.0-alpha.0 2025-11-13 15:44:27 +01:00
Zoltan Kochan
3ad031d787 fix: compile 2025-11-11 13:05:57 +01:00
Ryo Matsukawa
9d3f00b09a feat: add support for trustPolicyExclude (#10168)
close #10164
2025-11-11 13:00:20 +01:00
Khải
075aa993bb feat(config): global yaml (#10145)
* feat(config): global `rc.yaml`

* fix: undefined `rawConfig`

* test: add a test

* feat: re-export `isSupportedNpmConfig`

* feat: return `'compat'` to distinguish compatibility reason

* docs: `isSupportedNpmConfig`

* fix: eslint

* docs: clarify the case of the config key

* feat(cli/config/set): target yaml for pnpm-specific settings

* fix: read the correct file

* fix: write to the correct directory

* refactor: remove disabled code

* refactor: get `configDir` directly

* docs: remove outdated documentation

* test: fix a test

* test: rename

* fix: explicitly tell npm the config file path

* test: add a test

* test: add a test

* test: fix a test

* fix: local config dir

* fix: `managingAuthSettings`

* test: rename

* test: fix

* test: add a test

* test: demonstrate choosing config files

* test: fix

* docs: yet another consideration

* test: demonstrate choosing config files

* fix: correct local config file names in test helper

* test: demonstrate choosing config files

* test: use the helper

* test: add a test

* test: correct a test

* test: fix

* test: fix

* fix: eslint

* test: remove duplicate

* feat: validate `rc.yaml`

* docs: changeset

* test: fix `configDelete.test.ts`

* feat: other `npm` call-sites

* fix: make optional again

* feat: remove the change from `publish`

* fix: eslint

* refactor: just one is sufficient

* refactor: replace type union with 3 functions

* refactor(test): extract helper functions

* fix: add `rc.yaml` to `rawConfig`

* test: keep workspace settings out of `rc.yaml`

* test: fix `spawn ENOENT`

* chore(git): revert invalid change

This reverts commit 1ff6fe2323.

* feat: rename `rc.yaml` to `config.yaml`

* refactor: replace `acceptNonRc` with `!globalSettingsOnly`

* feat!: remove compat completely

* refactor: rename a function

* fix: no actual catalogs

* refactor: replace bool flag with preemptive filter

* feat!: filter global config keys

* test: fix

* fix: exclude `deploy-all-files`

* fix: reverse schema merge order

* feat(cli/config/set): validate global config yaml key

* test: remove duplicated assertion

* docs: correct

* docs: goal changed
2025-11-11 11:24:06 +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
Ryo Matsukawa
d5d4eedeeb feat: add support for pnpm config get globalconfig (#10090)
close #9977
2025-11-08 14:14:36 +01:00
Mike DiDomizio
357490525a fix: gitBranchLockfile/mergeGitBranchLockfilesBranchPattern set in workspace file (#10139)
close #9651
2025-11-06 15:42:21 +01:00
Khải
d392c3d059 fix: explicitly tell npm the config file path (#10154)
* fix: explicitly tell npm the config file path

* fix: `managingAuthSettings`

* feat: other `npm` call-sites

* docs: changeset

* fix: make optional again

* feat: remove the change from `publish`

* fix: eslint

* refactor: just one is sufficient
2025-11-05 23:46:20 +01:00
Khải
d4bf2d0e60 feat(cli/config)!: config command outputs changed from INI to JSON with camelCase keys (#10142) 2025-10-30 11:34:48 +01:00
Zoltan Kochan
3ce5f82bd7 Merge remote-tracking branch 'origin/main' into v11 2025-10-28 18:40:05 +01:00
Zoltan Kochan
49f03d14ee chore(release): 10.20.0 2025-10-28 17:35:21 +01:00
Khải
ae43ac79fa feat(cli/config)!: breaking changes (#9854)
* feat(cli/config)!: breaking changes

* refactor(test): remove `deepNullProto` and reuse `getOutputString`

* feat(cli/config/list): censor protected settings

* test: censorship of protected settings

* docs(changeset): censorship of protected settings

* fix: eslint

* feat(config)!: exclude non-option from `rawConfig`

* fix: eslint

* refactor: move default registries to builtin (#9886)

* feat(config)!: filter rc settings

* feat(config): don't exclude non-options

This reverts commit a79f72dbfb.

* feat(cli/config/get)!: print array as json

* test: fix

* docs(changeset): correct

* test: fix

* feat(cli/config)!: only kebabize option fields (wip)

* chore(git): revert the implementation

This reverts commit 529f9bdd47.

* test: restore

This reverts commit d8191e0ed8.

* feat(cli/config)!: only kebabize option fields (wip)

* feat: use `types` instead

* feat(cli/config/get)!: only kebabize rc fields

* test: add

* test: non-rc kebab-case keys

* test: correct

* docs(changeset): correct

* docs(changeset): style

* docs(changeset): correct

* test: only kebabize rc fields

* fix: import path

* fix: eslint

* fix: `isCamelCase`

* feat(cli/config/set)!: forbid unknown rc fields

* test: fix existing test

* test: refuse unsupported rc settings

* feat: hint

* feat(cli/config/set)!: refuse kebab-case workspace-specific settings

* feat(config)!: ignore non-camelCase from `pnpm-workspace.yaml`

* test: config get

* test: config list

* refactor: extract shared code into its own package

* test: `isCamelCase`

* feat(cli/config/list)!: consistent naming cases

* refactor: make it more reusable

* feat(cli/config/get)!: consistent naming cases

* feat(cli/config/get): censor protected settings

* test: `get ''` should be the same as `list`

* docs(test): quotation marks

* refactor: remove unnecessary `test.each`

* docs(changeset): case changes

* test: unknown keys

* docs(changeset): correct

* docs(changeset): non camelCase from `pnpm-workspace.yaml`

* fix: eslint

* docs(changeset): correct terminology

* docs(changeset): clarify

* feat!: do not load non-auth and non-registry

* fix: implementation

* test: no hidden settings

* fix: eslint

* fix: do not drop default values

* test: fix

* test: remove irrelevant tests

* test: fix (wip)

* fix: auth

* test: skip an inapplicable test

* test: temporary skip a test

* test: fix 'respects testPattern'

* test: fix 'respects changedFilesIgnorePattern'

* test: fix 'changedFilesIgnorePattern is respected'

* test: rename a test

* test: fix `package-lock=false`

* feat: exception for `managePackageManagerVersions`

* test: `managePackageManagerVersions: false`

* test: fix (wip)

* test: workaround

* fix: default `optional` to `true`

* fix: `filter` on `pnpm-workspace.yaml`

* test: fix

* test: disable ones that no longer apply

* chore(git): revert incorrect change

* fix: `filter` on `pnpm-workspace.yaml` (#10127)

* fix: `filter` on `pnpm-workspace.yaml`

* docs: changeset

* fix: actual fix

* fix: don't set default on config

* docs(readme): correct a package description

* fix: typo

* test: fix

* test: use a field that wouldn't be ignored

* test: replace some `.npmrc` with `pnpm-workspace.yaml`

* docs(changeset): less awkward wordings

* docs(changeset): correction
2025-10-28 17:09:15 +01:00
Khải
ed1a7fe7cd fix: filter on pnpm-workspace.yaml (#10127)
* fix: `filter` on `pnpm-workspace.yaml`

* docs: changeset

* fix: actual fix

* fix: don't set default on config
2025-10-27 13:36:35 +01:00
Zoltan Kochan
dab9abef5c Merge remote-tracking branch 'origin/main' into v11 2025-10-24 14:19:07 +02:00
Zoltan Kochan
0cde1287c8 chore: update repository fields 2025-10-23 11:57:12 +02:00
Zoltan Kochan
43d7b18c2f chore(release): 10.19.0 2025-10-21 15:30:20 +02:00
Zoltan Kochan
dee39ecb8a feat: support allowing the build of specific versions of dependencies (#10104)
close #10076
2025-10-21 12:38:16 +02:00
Ryo Matsukawa
7c1382f7b7 feat: add support for exact versions in minimumReleaseAgeExclude (#10059)
close #9985

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-10-18 11:10:08 +02:00
Khải
91aae6c302 fix(config/env): pnpm_config_registry (#10069)
* feat(config): load env `pnpm_config_*`

* fix: `getEnvKeySuffix`

* fix: regex in `isEnvKeySuffix`

* refactor: use regex `+`

* test: parseEnvVars

* feat: read from `opts.env`

* test: load env `pnpm_config_*`

* fix: `types['only-built-dependencies']`

* feat: json and schema (wip)

* feat: json and schema

* test: fix

* feat: override workspace but not CLI

* fix: don't override kebab-case CLI arguments

* test: correct syntax

* docs(changeset): add information

* test: use `pnpm_config_*` env

* fix(config/env): `pnpm_config_registry`

* refactor: replace `if` with `switch`

* docs: remove outdated comment

* fix: eslint

* refactor: use `JSON.stringify`

* fix: use `npm_config_store_dir` for now

* fix(test): do not override pnpm-workspace.yaml

* test: `pnpm_config_registry`
2025-10-14 18:37:26 +02:00
Zoltan Kochan
1bfc105da0 chore(release): 10.18.3 2025-10-14 11:27:45 +02:00
Ryo Matsukawa
47295e2d25 fix: handle scoped registry keys in config get (#10082)
* fix: handle scoped registry keys in config get

* Update config/plugin-commands-config/test/configGet.test.ts

Co-authored-by: Khải <hvksmr1996@gmail.com>

* Update config/plugin-commands-config/test/configGet.test.ts

Co-authored-by: Khải <hvksmr1996@gmail.com>

* Update config/plugin-commands-config/test/configGet.test.ts

Co-authored-by: Khải <hvksmr1996@gmail.com>

* chore: add a comment

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>

close #9362
2025-10-14 00:23:08 +02:00
Khải
7fab2a224d feat(config): load env pnpm_config_* (#10029)
* feat(config): load env `pnpm_config_*`

* fix: `getEnvKeySuffix`

* fix: regex in `isEnvKeySuffix`

* refactor: use regex `+`

* test: parseEnvVars

* feat: read from `opts.env`

* test: load env `pnpm_config_*`

* fix: `types['only-built-dependencies']`

* feat: json and schema (wip)

* feat: json and schema

* test: fix

* feat: override workspace but not CLI

* fix: don't override kebab-case CLI arguments

* test: correct syntax

* docs(changeset): add information

* refactor: replace `if` with `switch`

* docs: remove outdated comment

* fix: eslint

* refactor: use `JSON.stringify`
2025-10-13 14:38:40 +02:00
Ryo Matsukawa
587424f24f fix: config set --location=project with npm-managed settings (#10074)
close #9884
2025-10-12 18:33:23 +02:00
Ryo Matsukawa
eaaf8cb965 fix: match read/write priority when both pnpm-workspace.yaml and .npmrc exist (#10073)
* fix: match read/write priority when both pnpm-workspace.yaml and .npmrc exist

* chore: update help message

close #10072
2025-10-12 15:43:57 +02:00
sadan4
986516756c fix(config): fix infinite loop when using pre/post install scripts and verifyDepsBeforeInstall (#10062)
* fix(config): fix loop when using pre/post install scripts and verifyDepsBeforeInstall

If pre/post install scripts were used and `verifyDepsBeforeInstall` was
set to `install` and aforementioned scripts called other pnpm scripts,
pnpm would enter an infinite loop

close #10060

* fix: correct order of priority for reading verifyDepsBeforeRun

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-10-10 18:32:39 +02:00
Zoltan Kochan
a43166624e Merge remote-tracking branch 'origin/main' into v11 2025-10-10 10:01:19 +02:00
Zoltan Kochan
1b15e45ae9 chore(release): 10.18.2 2025-10-09 16:56:04 +02:00
Zoltan Kochan
6618431aee chore(release): libs 2025-09-29 11:56:00 +02:00
Zoltan Kochan
7d075325b9 Merge remote-tracking branch 'origin/main' into v11 2025-09-28 16:01:58 +02:00
Zoltan Kochan
fb4da0c0ab feat: print a warning if network requests are slow (#10025)
* feat: print a warning if network requests are slow

* feat: print a warning if network requests are slow

add a new setting for fetch tarball speed

* feat: print a warning if network requests are slow

* fix: src/fetch.ts

* docs: add changeset
2025-09-28 11:19:10 +02:00
Zoltan Kochan
f307b9a130 Merge remote-tracking branch 'origin/main' into v11 2025-09-24 10:51:53 +02:00
Zoltan Kochan
f6242c333b chore(release): 10.17.1 2025-09-22 15:09:34 +02:00
Zoltan Kochan
cb0c5b94c6 Merge remote-tracking branch 'origin/main' into v11 2025-09-19 14:31:36 +02:00
Zoltan Kochan
1a1a272fa4 chore(release): 10.17.0 2025-09-17 16:48:25 +02:00
Zoltan Kochan
ea44ff979f chore(release): 10.16.1 2025-09-13 19:20:27 +02:00
Zoltan Kochan
6f861bccaa Merge remote-tracking branch 'origin/main' into v11 2025-09-12 22:35:14 +02:00
Zoltan Kochan
a3c1498403 chore(release): 10.16.0 2025-09-12 14:24:30 +02:00
Zoltan Kochan
e792927841 feat: support finder functions for performing complex searches with list and why commands (#9946) 2025-09-12 11:46:32 +02:00
Zoltan Kochan
38e2599ecd feat: set minimumReleaseAge to delay new versions of dependencies from being installed (#9957)
close #9921
2025-09-11 17:25:11 +02:00
Zoltan Kochan
df8d57fe0b fix: throw an error if nodeVersion is not a semver version (#9936)
ref #9934
2025-09-04 19:50:45 +02:00
Zoltan Kochan
3d1711a439 chore(release): 10.15.1 2025-09-01 11:41:05 +02:00
Zoltan Kochan
46a65def8e Merge remote-tracking branch 'origin/main' into v11 2025-08-29 13:30:11 +02:00