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 b9e7fa1 commit 826f3f0
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 16 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
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 826f3f0

Please sign in to comment.