Skip to content

chore: adjust package engines versions #6725

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 2 commits into from
Apr 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions .github/workflows/command-l10n-update.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
fetch-depth: 0
@@ -50,21 +50,10 @@ jobs:
git config --local user.email "nextcloud-command@users.noreply.github.com"
git config --local user.name "nextcloud-command"

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v3
id: package-engines-versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm

- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
node-version-file: package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it doesn't support devEngines yet, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So no but works as long as devEngines are in the upper bound of the engines.
IMHO browser libraries like this do not even need any engine as they only target the browser not Node (in contrast to e.g. vite-config which targets Node).


- name: Install dependencies & build l10n
run: |
19 changes: 4 additions & 15 deletions .github/workflows/command-playwright-update.yml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
fetch-depth: 0
@@ -51,21 +51,10 @@ jobs:
git config --local user.email "nextcloud-command@users.noreply.github.com"
git config --local user.name "nextcloud-command"

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v3
id: package-engines-versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm

- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
node-version-file: package.json

- name: Install dependencies
run: npm ci
18 changes: 4 additions & 14 deletions .github/workflows/l10n.yml
Original file line number Diff line number Diff line change
@@ -9,22 +9,12 @@ jobs:

name: Pot check
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v3
id: versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
node-version-file: package.json

- name: Install dependencies
run: npm ci
16 changes: 3 additions & 13 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -53,22 +53,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
node-version-file: package.json

- name: Install dependencies
env:
16 changes: 3 additions & 13 deletions .github/workflows/lint-stylelint.yml
Original file line number Diff line number Diff line change
@@ -25,22 +25,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
node-version-file: package.json

- name: Install dependencies
env:
18 changes: 4 additions & 14 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -57,22 +57,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
node-version-file: package.json

- name: Install dependencies & build
env:
18 changes: 4 additions & 14 deletions .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
@@ -27,24 +27,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ matrix.branches }}

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
node-version-file: package.json

- name: Fix npm audit
id: npm-audit
16 changes: 3 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -26,22 +26,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
node-version-file: package.json

- name: Install dependencies & build
env:
30 changes: 8 additions & 22 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -4,10 +4,9 @@
name: Playwright Tests

on:
push:
branches: [ main, next ]
pull_request:
branches: [ main, next ]
branches: [ main ]

jobs:
playwright-tests:
timeout-minutes: 60
@@ -18,26 +17,13 @@ jobs:
shardIndex: [1, 2]
shardTotal: [2]

outputs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v3
id: versions
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
node-version-file: package.json

- name: Install dependencies
run: npm ci
@@ -63,10 +49,10 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@v4
with:
node-version: ${{ needs.playwright-tests.outputs.nodeVersion }}
node-version-file: package.json

- name: Install dependencies
run: npm ci
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -160,8 +160,20 @@
"webpack-merge": "^6.0.1"
},
"engines": {
"node": "^20.11.0",
"npm": "^10.0.0"
"node": "^20.11.0 || ^22",
"npm": "^10 || ^11"
},
"devEngines": {
"packageManager": {
"name": "npm",
"version": "^10",
"onFail": "error"
},
"runtime": {
"name": "node",
"version": "^22",
"onFail": "error"
}
Comment on lines +163 to +176
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall having a script to update all libs/apps

},
"overrides": {
"mdast-util-gfm": {
Loading
Oops, something went wrong.