feat(config-pnpm-scopes): allow global scope #4553
Merged
+14
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
global
scope.@commitlint/config-pnpm-scopes
tests with the newglobal
scope expectation.When using a pnpm workspace, it’s not possible to specify a scope for file changes made directly under the root.
I used pnpm add --global as a reference and named the scope global.
https://pnpm.io/ja/cli/add#--global--g
Motivation and Context
The pnpm workspace root often needs commits that touch shared files. Without a shared scope option, commitlint rejects those messages. Adding
global
keeps the restriction for packages while enabling root-level changes.Usage examples
How Has This Been Tested?
pnpm vitest run --environment node @commitlint/config-pnpm-scopes/index.test.ts
@commitlint/test
cannot be resolved; please re-run in a full workspace environment)Types of changes
Checklist: