Skip to content

Commit

Permalink
chore: set workspace engines
Browse files Browse the repository at this point in the history
This align all private workspaces to the same engines as the CLI
and all public workspaces to ^16.14.0 || >=18.0.0
  • Loading branch information
lukekarrys committed Sep 15, 2023
1 parent 43241f6 commit 0270a7d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-libnpmfund.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 14.17.0
- 14.x
- 16.13.0
- 16.14.0
- 16.x
- 18.0.0
- 18.x
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci-npmcli-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 14.17.0
- 14.x
- 16.13.0
- 16.14.0
- 16.x
- 18.0.0
- 18.x
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-npmcli-mock-globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 16.14.0
- 16.x
- 18.0.0
- 18.17.0
- 18.x
- 20.5.0
- 20.x
runs-on: ${{ matrix.platform.os }}
defaults:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-npmcli-mock-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ jobs:
os: windows-latest
shell: cmd
node-version:
- 16.14.0
- 16.x
- 18.0.0
- 18.17.0
- 18.x
- 20.5.0
- 20.x
runs-on: ${{ matrix.platform.os }}
defaults:
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lib/"
],
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
},
"tap": {
"timeout": 600,
Expand Down
2 changes: 1 addition & 1 deletion mock-globals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lib/"
],
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
Expand Down
2 changes: 1 addition & 1 deletion mock-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lib/"
],
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"yaml": "^2.2.1"
},
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
}
},
"mock-globals": {
Expand All @@ -216,7 +216,7 @@
"tap": "^16.3.8"
},
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
}
},
"mock-registry": {
Expand All @@ -234,7 +234,7 @@
"tap": "^16.3.8"
},
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
}
},
"mock-registry/node_modules/@npmcli/arborist": {
Expand Down Expand Up @@ -17462,7 +17462,7 @@
"tap": "^16.3.8"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": "^16.14.0 || >=18.0.0"
}
},
"workspaces/libnpmaccess": {
Expand Down Expand Up @@ -17548,7 +17548,7 @@
"tap": "^16.3.8"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": "^16.14.0 || >=18.0.0"
}
},
"workspaces/libnpmhook": {
Expand Down
14 changes: 14 additions & 0 deletions scripts/template-oss/pkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"engines": {
"node":
{{! Set the CLI and private workspaces to the same version }}
{{~#if isRoot~}}
"^18.17.0 || >=20.5.0"
{{~else~}}{{~#if isPrivate~}}
"^18.17.0 || >=20.5.0"
{{~else~}}
{{! All public workspaces get this version }}
"^16.14.0 || >=18.0.0"
{{~/if~}}{{~/if~}}
}
}
7 changes: 6 additions & 1 deletion scripts/template-oss/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
rootModule: {
add: {
'CONTRIBUTING.md': false,
'package.json': { file: 'pkg.json', overwrite: false },
},
},
rootRepo: {
Expand All @@ -27,7 +28,11 @@ module.exports = {
'.github/workflows/pull-request.yml': false,
},
},
ciVersions: ['18.17.0', '18.x', '20.5.0', '20.x'],
workspaceModule: {
add: {
'package.json': { file: 'pkg.json', overwrite: false },
},
},
lockfile: true,
npm: '.',
defaultBranch: 'latest',
Expand Down

0 comments on commit 0270a7d

Please sign in to comment.