-
Notifications
You must be signed in to change notification settings - Fork 145
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
Support Node 22 (@W-17518271@) #2218
Changes from all commits
8d5c64a
868cea6
ffa7053
cf95dff
ad1a134
52ff9b4
ae2f423
ca7c252
33d1b51
2ceaeb8
5d3e7f0
df3b698
4ac9146
5f24955
c66d01a
945bd18
e89eabb
97672c1
1e9fb3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,21 +44,24 @@ 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, 18, 20, 22] | ||
npm: [8, 9, 10, 11] | ||
exclude: # node 16 with npm 10/11 and node 18 with npm 11 are not compatible | ||
- node: 16 | ||
npm: 10 | ||
- node: 16 | ||
npm: 11 | ||
- node: 18 | ||
npm: 11 | ||
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 | ||
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 == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && 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 }} | ||
IS_MRT_NODE: ${{ matrix.node == 22 && matrix.npm == 10 }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you confirm the Node 22 is already out and supported on production mrt? If not, then I believe this should stay at the older Node 20. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, production mrt does not currently support Node 22 yet. When I push a bundle, I got this error:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node 22 should be supported on product MRT soon, let me double check the timeline. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node 22 support tentatively lands January 31st, 2025 in MRT production There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is resolved now, node 22 launched last night and I smoke-tested joel's node 22 bundle here https://scaffold-pwa-joel-test-env.mobify-storefront.com/global/en-GB/category/mens-accessories-ties |
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -141,21 +144,25 @@ 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, 18, 20, 22] | ||
npm: [8, 9, 10, 11] | ||
exclude: # node 16 with npm 10/11 and node 18 with npm 11 are not compatible | ||
- node: 16 | ||
npm: 10 | ||
- node: 16 | ||
npm: 11 | ||
- node: 18 | ||
npm: 11 | ||
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 == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && 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 }} | ||
IS_MRT_NODE: ${{ matrix.node == 22 && matrix.npm == 10 }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -196,7 +203,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" | ||
|
@@ -295,7 +302,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" | ||
|
@@ -339,7 +346,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [20] # Should match node version supported by MRT. | ||
node: [22] # Should match node version supported by MRT. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ const config = { | |
require('@babel/preset-env'), | ||
{ | ||
targets: { | ||
node: 18 | ||
node: 22 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, it looks like this did not get updated last time. |
||
} | ||
} | ||
], | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ const config = { | |
require('@babel/preset-env'), | ||
{ | ||
targets: { | ||
node: 18 | ||
node: 22 | ||
} | ||
} | ||
], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for adding these excludes.