-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: implement npmMinimalAgeGate and npmPreapprovedPackages config options
#6901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
a05df86
feat: implement `minimumNpmReleaseAge` and `minimumNpmReleaseAgeExclu…
bienzaaron db24b78
fix: support `npm:` prefix for locators too
bienzaaron 900a7d2
test: adding tests for `minimumNpmReleaseAge` and `minimumNpmReleaseA…
bienzaaron 11f5edd
fix: rename options to better align with existing npm-related options
bienzaaron eccba6c
fix: change the way unknowns are resolved to fix `add`/`up`
bienzaaron 257fa2d
fix: fix release packages based on ci output
bienzaaron 84d4b5d
refactor: rename options
bienzaaron 0c7b130
Revert "fix: change the way unknowns are resolved to fix `add`/`up`"
bienzaaron ebd41b5
refactor: move exclusion logic to a helper
bienzaaron 79d3aa7
fix: crawl package versions from highest to lowest if `latest` tag do…
bienzaaron 55b5185
refactor: rename gate check function
bienzaaron 9db6b3b
docs: update doc language to match option name
bienzaaron 93957a6
refactor: move npm-related configs into plugin-npm
bienzaaron 98e58ad
fix: if latest is unsuitable, ensure we don't select a higher version
bienzaaron fb35bc8
simplify `npmPreapprovedPackages`
bienzaaron ef35b65
Couple of tweaks
arcanis b0d4031
Merge remote-tracking branch 'origin/master' into pr/bienzaaron/6901
arcanis 0cdbdfb
Merge remote-tracking branch 'origin/master' into pr/bienzaaron/6901
arcanis e4cd5dd
Versions
arcanis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| releases: | ||
| "@yarnpkg/cli": minor | ||
| "@yarnpkg/plugin-npm": minor | ||
|
|
||
| declined: | ||
| - "@yarnpkg/plugin-compat" | ||
| - "@yarnpkg/plugin-constraints" | ||
| - "@yarnpkg/plugin-dlx" | ||
| - "@yarnpkg/plugin-essentials" | ||
| - "@yarnpkg/plugin-init" | ||
| - "@yarnpkg/plugin-interactive-tools" | ||
| - "@yarnpkg/plugin-nm" | ||
| - "@yarnpkg/plugin-npm-cli" | ||
| - "@yarnpkg/plugin-pack" | ||
| - "@yarnpkg/plugin-patch" | ||
| - "@yarnpkg/plugin-pnp" | ||
| - "@yarnpkg/plugin-pnpm" | ||
| - "@yarnpkg/plugin-stage" | ||
| - "@yarnpkg/plugin-typescript" | ||
| - "@yarnpkg/plugin-version" | ||
| - "@yarnpkg/plugin-workspace-tools" | ||
| - "@yarnpkg/builder" | ||
| - "@yarnpkg/core" | ||
| - "@yarnpkg/doctor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.0.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ges/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.0.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "@scoped/release-date", | ||
| "version": "1.0.0", | ||
| "dist-tags": { | ||
| "latest": "1.1.1" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ges/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "@scoped/release-date", | ||
| "version": "1.1.0", | ||
| "dist-tags": { | ||
| "latest": "1.1.1" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.1/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ges/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.1/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "@scoped/release-date", | ||
| "version": "1.1.1", | ||
| "dist-tags": { | ||
| "latest": "1.1.1" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.2/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ges/acceptance-tests/pkg-tests-fixtures/packages/@scoped__release-date-1.1.2/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "@scoped/release-date", | ||
| "version": "1.1.2", | ||
| "dist-tags": { | ||
| "latest": "1.1.1" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.0.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.0.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "release-date", | ||
| "version": "1.0.0", | ||
| "dependencies": { | ||
| "release-date-transitive": "^1.0.0" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.1.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.1.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "release-date", | ||
| "version": "1.1.0", | ||
| "dependencies": { | ||
| "release-date-transitive": "^1.0.0" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.1.1/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-1.1.1/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "release-date", | ||
| "version": "1.1.1", | ||
| "dependencies": { | ||
| "release-date-transitive": "^1.0.0" | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.0.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
...s/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.0.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "release-date-transitive", | ||
| "version": "1.0.0" | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.1.0/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
...s/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.1.0/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "release-date-transitive", | ||
| "version": "1.1.0" | ||
| } |
7 changes: 7 additions & 0 deletions
7
packages/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.1.1/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = require(`./package.json`); | ||
|
|
||
| for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { | ||
| for (const dep of Object.keys(module.exports[key] || {})) { | ||
| module.exports[key][dep] = require(dep); | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
...s/acceptance-tests/pkg-tests-fixtures/packages/release-date-transitive-1.1.1/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "release-date-transitive", | ||
| "version": "1.1.1" | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an a bug leftover from a while ago or something. My tests were failing because the array was not being parsed correctly -- they are comma-delimited when passed as
YARN_- seeberry/packages/yarnpkg-core/sources/Configuration.ts
Lines 754 to 759 in 5aad466