Skip to content

Fix scoped npmMinimalAgeGate fallback#7202

Open
sjh9714 wants to merge 2 commits into
yarnpkg:masterfrom
sjh9714:fix-scoped-minimal-age-gate
Open

Fix scoped npmMinimalAgeGate fallback#7202
sjh9714 wants to merge 2 commits into
yarnpkg:masterfrom
sjh9714:fix-scoped-minimal-age-gate

Conversation

@sjh9714

@sjh9714 sjh9714 commented Jun 25, 2026

Copy link
Copy Markdown

What's the problem this PR addresses?

Fixes #7192.

Scoped npmMinimalAgeGate entries currently materialize the default 1d value even when the scope leaves the setting unset. This prevents yarn config get npmScopes --json and scoped install resolution from inheriting a global disabled gate (npmMinimalAgeGate: 0).

How did you fix it?

I added a fallback setting hook for transformed configuration output, made the scoped npm gate keep undefined when unset, and wired that scoped setting to fall back to the global npmMinimalAgeGate value. I also added regression coverage for the JSON-visible config value and the scoped install behavior when the global gate is disabled.

Testing

  • yarn test:unit --runInBand packages/yarnpkg-core/tests/Configuration.test.ts -t "scoped npmMinimalAgeGate"
  • yarn test:unit --runInBand packages/yarnpkg-core/tests/Configuration.test.ts
  • yarn build:cli
  • yarn workspace acceptance-tests test:integration --runInBand sources/features/npmMinimalAgeGate.test.ts -t "unset scope gate inherits"
  • yarn typecheck:all
  • yarn version check
  • yarn test:lint

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

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.

[Bug?]: Disabling global npmMinimalAgeGate does not disable scoped npmMinimalAgeGate

1 participant