-
Notifications
You must be signed in to change notification settings - Fork 36
RFC: pnpm config dependency #2188
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
+1,484
−563
Merged
Changes from 69 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
e513662
pnpm-config-skuba
samchungy fa66c77
fix
samchungy 5cdd282
huh
samchungy 2529c12
Rename _.pnpm-workspace.yaml to _pnpm-workspace.yaml
samchungy 8186984
fix
samchungy 690e33a
Merge branch 'rfc-pnpm-config-skuba' of github.com:seek-oss/skuba int…
samchungy 2a9ffd1
does this work?
samchungy 588cb9c
fix
samchungy 05d3e5a
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
samchungy 5b6fe1f
Add migrate to pnpm file
samchungy 58efd29
fix
samchungy 015d5da
update
samchungy 7b09296
i am an idiot
samchungy c10b6f5
Migrate Dockerfiles
samchungy 5a57a6c
commit
samchungy 463acc9
bump pnpm
samchungy 16c30ca
bump lock
samchungy 06e626c
update script
samchungy 812056f
fix more things
samchungy 8fcdad5
oops
samchungy 1fcfa53
does this work
samchungy 1354697
ignore
samchungy 3bd76fb
changeset
samchungy f312481
fix logic
samchungy e2da9a5
update write command
samchungy 20f6bf7
remove --workspace
samchungy 1c4cd1e
cleanup
samchungy bb6299b
undo bump
samchungy 6db0569
escape items in minimumReleaseAgeExclude
samchungy e5c355e
update
samchungy c4ac4bd
prefer offline
samchungy cb145a9
set back to offline
samchungy c791c77
tweak
samchungy 8276c95
try this too
samchungy b4cf292
huh
samchungy e8fc141
does this work
samchungy 1c9ffe4
test
samchungy 30452ee
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
zbrydon a0026e9
Merge branch 'rfc-pnpm-config-skuba' of github.com:seek-oss/skuba int…
zbrydon 104ef5a
Fix
zbrydon cee7add
Move patch to new version
zbrydon b3b36ca
This is required
zbrydon fe0591b
remove
samchungy 891a4ab
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
samchungy 7b7f6ed
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
zbrydon d4f7ae3
Merge branch 'rfc-pnpm-config-skuba' of github.com:seek-oss/skuba int…
zbrydon f145030
Remove unused import
zbrydon 84bb4c4
Add `strictDepBuilds` and `trustPolicy` (#2200)
zbrydon e5719f9
Use `allowBuilds`
zbrydon 9254c3e
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
zbrydon e203d62
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
zbrydon 727f0a3
Fix broken lockfile
zbrydon 77f182f
Merge branch 'main' of github.com:seek-oss/skuba into rfc-pnpm-config…
samchungy 1b5743f
bump things
samchungy 6fda91c
Merge branch 'main' into rfc-pnpm-config-skuba
samchungy 2897937
update snap
samchungy 0ef4392
update headers
samchungy 87e1de6
test
samchungy 46066c0
Move patches to current version
zbrydon 81eeee2
Add back `--frozen-lockfile` and change to `--offline` for plugin
zbrydon 0055c6c
Remove `--frozen-lockfile`
zbrydon 9bf046f
Go back to `--prefer-offline`
zbrydon eae8063
Merge branch 'main' into rfc-pnpm-config-skuba
samchungy 2c9464a
fix
samchungy edca9fd
Merge branch 'rfc-pnpm-config-skuba' of github.com:seek-oss/skuba int…
samchungy ac59d6a
add changeset
samchungy 950a7c0
changesets
samchungy 1647947
add manifest
samchungy 81f68d7
Add readme
samchungy a488b5d
Apply suggestions
samchungy bf8ac3b
Add blockExoticSubdeps to pnpm config and sort
samchungy 536a473
more changesets
samchungy 80591e3
update pnpmfileChecksum
samchungy d2bf235
Restore comment
samchungy fb84fff
Try using force
samchungy 310d234
Merge branch 'rfc-pnpm-config-skuba' of github.com:seek-oss/skuba int…
samchungy 9af2da3
sort
samchungy 26b9a7a
fix
samchungy d3c96ff
add another note
samchungy e5e9a26
sort again
samchungy a7737e9
add recommendation
samchungy a05c805
Merge branch 'main' into rfc-pnpm-config-skuba
samchungy 28ad2d5
Merge branch 'main' into rfc-pnpm-config-skuba
samchungy 5b94f8c
add more changeset
samchungy 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
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,20 @@ | ||
| --- | ||
| 'skuba': major | ||
| --- | ||
|
|
||
| lint: Enable [`allowBuilds`](https://pnpm.io/settings#allowbuilds), [`trustPolicy`](https://pnpm.io/settings#trustpolicy) and [`ignorePatchFailures`](https://pnpm.io/cli/patch#ignorepatchfailures) in `pnpm-plugin-skuba` | ||
|
|
||
| In light of recent security vulnerabilities plaguing the JavaScript ecosystem, we are enabling some additional pnpm features to help mitigate the risk of supply chain attacks. | ||
|
|
||
| We have allowlisted a set of known packages as our default but you may need to update your `pnpm-workspace.yaml` configuration to add any additional packages you use that are not included in the default allowlist. | ||
|
|
||
| Example: | ||
|
|
||
| ```yaml | ||
| allowBuilds: | ||
| some-package: true | ||
| some-other-package@1.0.0: true | ||
|
|
||
| trustPolicyExclude: | ||
| - some-package@1.2.3 | ||
| ``` |
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,19 @@ | ||
| --- | ||
| 'skuba': major | ||
| --- | ||
|
|
||
| lint: Migrate `pnpm-workspace.yaml` skuba configuration to `pnpm-plugin-skuba` | ||
|
|
||
| This change replaces the managed skuba section in `pnpm-workspace.yaml` with a pnpm configuration plugin. | ||
|
|
||
| The migration includes removing the `minimumReleaseAgeExcludeOverload` settings from `package.json` and migrating them to `pnpm-workspace.yaml` | ||
|
|
||
| This simplifies the managed configuration `skuba` provides, allowing you to override and extend previously un-configurable settings such as `minimumReleaseAge` from your `pnpm-workspace.yaml` file. | ||
|
|
||
| Example: | ||
|
|
||
| ```yaml | ||
| minimumReleaseAge: 1440 # 1 day | ||
| minimumReleaseAgeExclude: | ||
| - some-package | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'pnpm-plugin-skuba': major | ||
| --- | ||
|
|
||
| Release stable version | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I accidentally published a snapshot version at 1.0.0 oops lol |
||
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 |
|---|---|---|
|
|
@@ -114,7 +114,7 @@ | |
| customManagers: [ | ||
| { | ||
| customType: 'regex', | ||
| managerFilePatterns: ['/pnpm.md$/'], | ||
| fileMatch: ['pnpm.md$', '(^|/)_package\\.json$'], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This caused me alot of pain as the |
||
| matchStrings: [ | ||
| '"packageManager": "(?<depName>.*?)@(?<currentValue>.*?)",', | ||
| ], | ||
|
|
||
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 @@ | ||
| packages/pnpm-plugin-skuba/pnpmfile.cjs |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # pnpm-plugin-skuba | ||
|
|
||
| [](https://www.npmjs.com/package/pnpm-plugin-skuba) | ||
| [](https://www.npmjs.com/package/pnpm-plugin-skuba) | ||
|
|
||
| Shareable pnpm config for **[skuba]**. | ||
|
|
||
| [skuba]: https://github.com/seek-oss/skuba |
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,33 @@ | ||
| { | ||
| "name": "pnpm-plugin-skuba", | ||
| "version": "1.0.0", | ||
| "private": false, | ||
| "description": "Pnpm plugin for skuba", | ||
| "homepage": "https://github.com/seek-oss/skuba/tree/main/packages/pnpm-plugin-skuba#readme", | ||
| "bugs": { | ||
| "url": "https://github.com/seek-oss/skuba/issues" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/seek-oss/skuba.git", | ||
| "directory": "packages/pnpm-plugin-skuba" | ||
| }, | ||
| "license": "MIT", | ||
| "sideEffects": false, | ||
| "main": "pnpmfile.cjs", | ||
| "files": [ | ||
| "pnpmfile.cjs" | ||
| ], | ||
| "devDependencies": { | ||
| "@pnpm/config": "^1004.9.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=22.14.0" | ||
| }, | ||
| "skuba": { | ||
| "entryPoint": "pnpmfile.cjs", | ||
| "template": "oss-npm-package", | ||
| "type": "package", | ||
| "version": "14.1.2" | ||
| } | ||
| } |
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,71 @@ | ||
| // @ts-check | ||
| const MINIMUM_RELEASE_AGE_EXCLUDE = [ | ||
| '@seek/*', | ||
| '@skuba-lib/*', | ||
| 'eslint-config-seek', | ||
| 'eslint-config-skuba', | ||
| 'eslint-plugin-skuba', | ||
| 'skuba', | ||
| 'skuba-dive', | ||
| 'tsconfig-seek', | ||
| ]; | ||
|
|
||
| const ALLOWED_BUILDS = { | ||
| '@ast-grep/lang-json': true, | ||
| '@datadog/native-appsec': true, | ||
| '@datadog/native-iast-taint-tracking': true, | ||
| '@datadog/native-metrics': true, | ||
| '@datadog/pprof': true, | ||
| 'dd-trace': true, | ||
| esbuild: true, | ||
| protobufjs: true, | ||
| 'unix-dgram': true, | ||
| 'unrs-resolver': true, | ||
| }; | ||
|
|
||
| const PUBLIC_HOIST_PATTERN = [ | ||
| '@arethetypeswrong/core', | ||
| '@eslint/*', | ||
| '@types*', | ||
| 'eslint', | ||
| 'eslint-config-skuba', | ||
| 'esbuild', | ||
| 'jest', | ||
| 'prettier', | ||
| 'publint', | ||
| 'tsconfig-seek', | ||
| 'tsdown', | ||
| 'typescript', | ||
| ]; | ||
|
|
||
| const TRUST_POLICY_EXCLUDE = ['semver@5.7.2 || 6.3.1']; | ||
|
|
||
| module.exports = { | ||
| hooks: { | ||
| /** @param {import("@pnpm/config").Config} config */ | ||
| updateConfig(config) { | ||
| if (typeof config.publicHoistPattern === 'string') { | ||
| config.publicHoistPattern = [config.publicHoistPattern]; | ||
| } | ||
| config.minimumReleaseAgeExclude ??= []; | ||
| config.minimumReleaseAgeExclude.push(...MINIMUM_RELEASE_AGE_EXCLUDE); | ||
|
|
||
| config.allowBuilds ??= {}; | ||
| Object.assign(config.allowBuilds, ALLOWED_BUILDS); | ||
|
|
||
| config.publicHoistPattern ??= []; | ||
| config.publicHoistPattern.push(...PUBLIC_HOIST_PATTERN); | ||
|
|
||
| config.trustPolicyExclude ??= []; | ||
| config.trustPolicyExclude.push(...TRUST_POLICY_EXCLUDE); | ||
|
|
||
| config.ignorePatchFailures ??= false; | ||
| config.minimumReleaseAge ??= 4320; | ||
| config.packageManagerStrictVersion ??= true; | ||
| config.strictDepBuilds ??= true; | ||
| config.trustPolicy ??= 'no-downgrade'; | ||
|
|
||
| return config; | ||
| }, | ||
| }, | ||
| }; |
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.
Uh oh!
There was an error while loading. Please reload this page.