Skip to content
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

[DO NOT MERGE] Test node 22 #2133

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/setup_pwa_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
id: setup_node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "npm"

- name: Setup PWA dependencies
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
npm: 10
node: [20, 22]
npm: [10, 10]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Node 18 is still in LTS for 5 more months. What is the timeline for this upgrade?

Copy link
Collaborator Author

@alexvuong alexvuong Nov 21, 2024

Choose a reason for hiding this comment

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

Good call. I believe we have to wait til MRT officially supports Node 22. I think at least one more RP to start this upgrade. I think it is safe to remove 16 for this upgrade since it is already out of support timeline. I'll leave 18 and will remove if it is out of support timeline by time we officially do the upgrade

runs-on: ubuntu-latest
env:
# The "default" npm is the one that ships with a given version of node.
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we end up moving forward. Don't forget to remove comments about unsupported versions.

IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) }}
IS_DEFAULT_NPM: ${{ (matrix.node == 22 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) }}
# The current recommended version for Managed Runtime:
# https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/upgrade-node-version.html
IS_MRT_NODE: ${{ matrix.node == 20 && matrix.npm == 10 }}
Expand Down Expand Up @@ -141,18 +138,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
npm: 10
node: [20, 22]
npm: [10, 10]
runs-on: windows-latest
env:
# The "default" npm is the one that ships with a given version of node.
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) }}
IS_DEFAULT_NPM: (matrix.node == 22 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) }}
# The current recommended version for Managed Runtime:
# https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/upgrade-node-version.html
IS_MRT_NODE: ${{ matrix.node == 20 && matrix.npm == 10 }}
Expand Down Expand Up @@ -196,7 +190,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 22

- name: Setup Ubuntu Machine
uses: "./.github/actions/setup_ubuntu"
Expand Down Expand Up @@ -294,7 +288,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
node-version: 22

- name: Setup Windows Machine
uses: "./.github/actions/setup_windows"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"syncpack": "^10.1.0"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

As an aside, I wonder if we should simply adopt nodes support model or a modified version of it, e.g. we only support active node LTS. Then at most we'll probably have 3 versions here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although some Node version may be in maintenance but they are still within Life-of-support timeline. IMO, when we do upgrade, we can simply drop the node versions that has no longer support officially. That would also leave us with around 2-3 version here

"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/commerce-sdk-react/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"react-router-dom": "^5.3.4"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^20.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-lib-build/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/internal-lib-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/pwa-kit-create-app/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/pwa-kit-create-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"verdaccio": "^5.22.1"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/pwa-kit-dev/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/pwa-kit-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
}
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.8.0-dev",
"license": "See license in LICENSE",
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"ccExtensibility": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-react-sdk/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/pwa-kit-react-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"react-router-dom": "^5.3.4"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/pwa-kit-runtime/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/pwa-kit-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/template-mrt-reference-app/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/template-mrt-reference-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"supertest": "^4.0.2"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"mobify": {
Expand Down
1 change: 1 addition & 0 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Accessibility Improvements
- [a11y] Fix LinkList component to follow a11y practise [#2098])(https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2098)
- Test Node 22

## v5.0.0 (Oct 28, 2024)

Expand Down
2 changes: 1 addition & 1 deletion packages/template-retail-react-app/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/template-retail-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"cross-env": "^5.2.1"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"bundlesize": [
Expand Down
2 changes: 1 addition & 1 deletion packages/template-typescript-minimal/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/template-typescript-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"typescript": "4.9.5"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"mobify": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-commerce-sdk-react/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/test-commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"typescript": "4.9.5"
},
"engines": {
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0 || ^22.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"mobify": {
Expand Down
Loading