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

@W-14545340@ Add support for node 20 #1612

Merged
merged 17 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 15 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
15 changes: 9 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
# Run all matrix env at once because we will not deploy demo app to MRT.
node: [16, 18]
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
Expand All @@ -21,7 +21,8 @@ jobs:
# 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)
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
# 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) }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
# Run one matrix env at a time because we need to deploy each app to MRT and run e2e tests there
max-parallel: 1
matrix:
node: [16, 18]
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
Expand All @@ -67,7 +68,8 @@ jobs:
# 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)
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
# 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) }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -132,7 +134,7 @@ jobs:
# Run one matrix env at a time because we need to deploy each app to MRT and run e2e tests there
max-parallel: 1
matrix:
node: [16, 18]
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
Expand All @@ -142,7 +144,8 @@ jobs:
# 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)
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
# 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) }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18]
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
Expand All @@ -42,10 +42,11 @@ jobs:
# 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)
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
# 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) }}
# 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 == 16 && matrix.npm == 8 }}
IS_MRT_NODE: ${{ matrix.node == 18 && matrix.npm == 10 }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18]
node: [16, 18, 20]
npm: [8, 9, 10]
exclude: # node 16 is not compatible with npm 10
- node: 16
Expand All @@ -136,10 +137,11 @@ jobs:
# 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)
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 9) }}
# 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) }}
# 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 == 16 && matrix.npm == 8 }}
IS_MRT_NODE: ${{ matrix.node == 18 && matrix.npm == 10 }}
runs-on: windows-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -180,7 +182,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

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

- name: Setup Windows Machine
uses: "./.github/actions/setup_windows"
Expand Down Expand Up @@ -319,7 +321,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16] # Should match node version supported by MRT.
node: [18] # Should match node version supported by MRT.
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
90 changes: 46 additions & 44 deletions 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 @@ -30,7 +30,7 @@
"syncpack": "^10.1.0"
},
"engines": {
"node": "^16.11.0 || ^18.0.0",
"node": "^16.11.0 || ^18.0.0 || ^20.0.0",
"npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
},
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/commerce-sdk-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## v1.3.0-dev (Dec 08, 2023)

- Add support for node 20 [#1612](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1612)

## v1.2.0 (Dec 08, 2023)

- Add StorefrontPreview component 'onContextChange' property to prepare for future Storefront Preview release [#1527](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1527)
- Update engine compatibility to include npm 10 [#1597](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1597)

Expand Down
Loading