Skip to content

fix: filter on pnpm-workspace.yaml#10127

Merged
zkochan merged 4 commits intov11from
fix-filter-on-pnpm-workspace
Oct 27, 2025
Merged

fix: filter on pnpm-workspace.yaml#10127
zkochan merged 4 commits intov11from
fix-filter-on-pnpm-workspace

Conversation

@KSXGitHub
Copy link
Copy Markdown
Contributor

No description provided.

@KSXGitHub KSXGitHub requested a review from zkochan as a code owner October 27, 2025 04:04
Comment on lines -317 to +319
fs.writeFileSync('.npmrc', 'filter=project-1 project-2', 'utf8')
writeYamlFile('pnpm-workspace.yaml', {
filter: ['project-1', 'project-2'],
})
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced .npmrc with pnpm-workspace.yaml here instead of adding a new test because #9854 would remove filter from .npmrc.

@KSXGitHub KSXGitHub marked this pull request as draft October 27, 2025 09:26
@KSXGitHub KSXGitHub requested a review from zkochan October 27, 2025 09:42
@KSXGitHub KSXGitHub marked this pull request as ready for review October 27, 2025 09:42
@KSXGitHub KSXGitHub marked this pull request as draft October 27, 2025 10:36
@KSXGitHub KSXGitHub requested a review from zkochan October 27, 2025 12:31
@KSXGitHub KSXGitHub marked this pull request as ready for review October 27, 2025 12:31
@zkochan zkochan merged commit ed1a7fe into v11 Oct 27, 2025
8 of 9 checks passed
@zkochan zkochan deleted the fix-filter-on-pnpm-workspace branch October 27, 2025 12:36
KSXGitHub added a commit that referenced this pull request Oct 27, 2025
* fix: `filter` on `pnpm-workspace.yaml`

* docs: changeset

* fix: actual fix

* fix: don't set default on config
zkochan pushed a commit that referenced this pull request Oct 28, 2025
* 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 a79f72d.

* 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 529f9bd.

* test: restore

This reverts commit d8191e0.

* 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
zkochan pushed a commit that referenced this pull request Mar 7, 2026
* fix: `filter` on `pnpm-workspace.yaml`

* docs: changeset

* fix: actual fix

* fix: don't set default on config
zkochan pushed a commit that referenced this pull request Mar 7, 2026
* fix: `filter` on `pnpm-workspace.yaml`

* docs: changeset

* fix: actual fix

* fix: don't set default on config
@zkochan
Copy link
Copy Markdown
Member

zkochan commented Mar 10, 2026

Looks like this change is causing issues: #10909

zkochan added a commit that referenced this pull request Mar 10, 2026
… field is missing

Commit 6eedf82 removed the ['.'] fallback for workspacePackagePatterns
when pnpm-workspace.yaml has no packages field. This caused findPackages
to default to ['.', '**'], discovering ALL directories with package.json
as workspace projects. This is the same regression that was previously
reverted in 595cd41 (close #10571), reintroduced by #10127.

Projects like cdxgen that use pnpm-workspace.yaml only for settings
(e.g. minimumReleaseAge) without a packages field were broken because
test data directories were picked up as workspace projects.

close #10909

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zkochan added a commit that referenced this pull request Mar 11, 2026
…s missing (#10927)

* fix: restore ['.'] default for workspacePackagePatterns when packages field is missing

Commit 6eedf82 removed the ['.'] fallback for workspacePackagePatterns
when pnpm-workspace.yaml has no packages field. This caused findPackages
to default to ['.', '**'], discovering ALL directories with package.json
as workspace projects. This is the same regression that was previously
reverted in 595cd41 (close #10571), reintroduced by #10127.

Projects like cdxgen that use pnpm-workspace.yaml only for settings
(e.g. minimumReleaseAge) without a packages field were broken because
test data directories were picked up as workspace projects.

close #10909

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove unknown word from changeset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(config): verify workspacePackagePatterns defaults to ['.'] without packages field

Adds a regression test to ensure pnpm-workspace.yaml without a packages
field defaults workspacePackagePatterns to ['.'] (root only), preventing
all directories from being discovered as workspace projects.
dasa pushed a commit to dasa/pnpm that referenced this pull request Mar 17, 2026
…s missing (pnpm#10927)

* fix: restore ['.'] default for workspacePackagePatterns when packages field is missing

Commit 6eedf82 removed the ['.'] fallback for workspacePackagePatterns
when pnpm-workspace.yaml has no packages field. This caused findPackages
to default to ['.', '**'], discovering ALL directories with package.json
as workspace projects. This is the same regression that was previously
reverted in 595cd41 (close pnpm#10571), reintroduced by pnpm#10127.

Projects like cdxgen that use pnpm-workspace.yaml only for settings
(e.g. minimumReleaseAge) without a packages field were broken because
test data directories were picked up as workspace projects.

close pnpm#10909

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove unknown word from changeset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(config): verify workspacePackagePatterns defaults to ['.'] without packages field

Adds a regression test to ensure pnpm-workspace.yaml without a packages
field defaults workspacePackagePatterns to ['.'] (root only), preventing
all directories from being discovered as workspace projects.

(cherry picked from commit 5163697)
zkochan added a commit to dasa/pnpm that referenced this pull request Mar 18, 2026
Move the fix from config reader to findPackages, where the overly broad
default pattern was the root cause of both pnpm#10909 and pnpm#10571. This keeps
workspacePackagePatterns as undefined when packages field is missing,
preserving PR pnpm#10127's fix for filter in pnpm-workspace.yaml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zkochan pushed a commit that referenced this pull request Mar 18, 2026
…d is missing (#10996)

Commit 6eedf82 removed the ['.'] fallback for workspacePackagePatterns
when pnpm-workspace.yaml has no packages field. This caused findPackages
to default to ['.', '**'], discovering ALL directories with package.json
as workspace projects. This is the same regression that was previously
reverted in 595cd41 (close #10571), reintroduced by #10127.

Projects like cdxgen that use pnpm-workspace.yaml only for settings
(e.g. minimumReleaseAge) without a packages field were broken because
test data directories were picked up as workspace projects.

close #10909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants