Upgrade node to 18 (#2533)
Co-authored-by: Karolina Rakoczy <karolina.rakoczy@saleor.io>
This commit is contained in:
parent
8d4cacc68c
commit
5bd79d9692
19 changed files with 42231 additions and 295 deletions
2
.github/workflows/cypress-repeat.yml
vendored
2
.github/workflows/cypress-repeat.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- name: Install cypress-repeat
|
- name: Install cypress-repeat
|
||||||
run: npm i -D cypress-repeat
|
run: npm i -D cypress-repeat
|
||||||
|
|
9
.github/workflows/deploy-and-run-cypress.yml
vendored
9
.github/workflows/deploy-and-run-cypress.yml
vendored
|
@ -33,6 +33,11 @@ jobs:
|
||||||
env: ${{ env.GITHUB_HEAD_REF_SLUG_URL }}
|
env: ${{ env.GITHUB_HEAD_REF_SLUG_URL }}
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
|
@ -96,9 +101,9 @@ jobs:
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Cypress run critical
|
- name: Cypress run critical
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v4
|
||||||
|
|
4
.github/workflows/deploy-cloud.yaml
vendored
4
.github/workflows/deploy-cloud.yaml
vendored
|
@ -24,6 +24,10 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.client_payload.ref }}
|
ref: ${{ github.event.client_payload.ref }}
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
4
.github/workflows/deploy-demo-staging.yaml
vendored
4
.github/workflows/deploy-demo-staging.yaml
vendored
|
@ -28,6 +28,10 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.git_ref || '' }}
|
ref: ${{ github.event.inputs.git_ref || '' }}
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
4
.github/workflows/deploy-demo.yaml
vendored
4
.github/workflows/deploy-demo.yaml
vendored
|
@ -23,6 +23,10 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.client_payload.ref }}
|
ref: ${{ github.event.client_payload.ref }}
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
4
.github/workflows/deploy-gcp.yml
vendored
4
.github/workflows/deploy-gcp.yml
vendored
|
@ -23,6 +23,10 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.client_payload.ref }}
|
ref: ${{ github.event.client_payload.ref }}
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
5
.github/workflows/deploy-master-staging.yaml
vendored
5
.github/workflows/deploy-master-staging.yaml
vendored
|
@ -23,7 +23,10 @@ jobs:
|
||||||
IS_CLOUD_INSTANCE: true
|
IS_CLOUD_INSTANCE: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
5
.github/workflows/deploy-staging.yaml
vendored
5
.github/workflows/deploy-staging.yaml
vendored
|
@ -38,6 +38,11 @@ jobs:
|
||||||
environment=$(echo $VERSION | sed -n 's#\([0-9]\+\).\([0-9]\+\).*#saleor-staging-v\1\2#p')
|
environment=$(echo $VERSION | sed -n 's#\([0-9]\+\).\([0-9]\+\).*#saleor-staging-v\1\2#p')
|
||||||
echo "ENVIRONMENT=${environment}" >> $GITHUB_ENV
|
echo "ENVIRONMENT=${environment}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|
6
.github/workflows/e2e.yml
vendored
6
.github/workflows/e2e.yml
vendored
|
@ -61,9 +61,9 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Wait for Deploy and tests
|
- name: Wait for Deploy and tests
|
||||||
uses: lewagon/wait-on-check-action@v1.0.0
|
uses: lewagon/wait-on-check-action@v1.0.0
|
||||||
|
@ -83,7 +83,7 @@ jobs:
|
||||||
run-tests-in-parallel-on-label:
|
run-tests-in-parallel-on-label:
|
||||||
needs: [get-selected-tags-and-containers, install-cypress]
|
needs: [get-selected-tags-and-containers, install-cypress]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: cypress/browsers:node14.16.0-chrome89-ff86
|
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 10
|
max-parallel: 10
|
||||||
|
|
14
.github/workflows/test-env-deploy.yml
vendored
14
.github/workflows/test-env-deploy.yml
vendored
|
@ -11,6 +11,10 @@ jobs:
|
||||||
base_URL: ${{ steps.set-domain.outputs.domain }}
|
base_URL: ${{ steps.set-domain.outputs.domain }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- uses: rlespinasse/github-slug-action@3.1.0
|
- uses: rlespinasse/github-slug-action@3.1.0
|
||||||
|
|
||||||
|
@ -170,7 +174,7 @@ jobs:
|
||||||
cypress-run-selected:
|
cypress-run-selected:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare-tests, deploy]
|
needs: [prepare-tests, deploy]
|
||||||
container: cypress/browsers:node14.16.0-chrome89-ff86
|
container: cypress/browsers:node18.12.0-chrome106-ff106
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 10
|
max-parallel: 10
|
||||||
|
@ -191,9 +195,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=custom_api_uri::$(echo $pull_request_body | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1 | { read custom_uri; if [ -z "$custom_uri" ]; then echo "$fallback_uri"; else echo "$custom_uri"; fi })"
|
echo "::set-output name=custom_api_uri::$(echo $pull_request_body | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1 | { read custom_uri; if [ -z "$custom_uri" ]; then echo "$fallback_uri"; else echo "$custom_uri"; fi })"
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
@ -208,7 +212,7 @@ jobs:
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||||
run: npm install
|
run: NODE_OPTIONS=--max_old_space_size=4096 npm install
|
||||||
|
|
||||||
- name: Cypress run critical
|
- name: Cypress run critical
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v4
|
||||||
|
@ -225,6 +229,6 @@ jobs:
|
||||||
CYPRESS_grepTags: ${{ needs.prepare-tests.outputs.tags }}
|
CYPRESS_grepTags: ${{ needs.prepare-tests.outputs.tags }}
|
||||||
with:
|
with:
|
||||||
parallel: true
|
parallel: true
|
||||||
group: 'UI - Chrome'
|
group: "UI - Chrome"
|
||||||
record: true
|
record: true
|
||||||
tag: Critical, ${{github.event.action}}
|
tag: Critical, ${{github.event.action}}
|
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -47,9 +47,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version-file: '.nvmrc'
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
|
@ -75,7 +75,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: ".nvmrc"
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
|
|
12
.github/workflows/tests-nightly.yml
vendored
12
.github/workflows/tests-nightly.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install saleor cli
|
- name: Install saleor cli
|
||||||
id: install-saleor-cli
|
id: install-saleor-cli
|
||||||
|
@ -118,7 +118,7 @@ jobs:
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
id: cypress
|
id: cypress
|
||||||
|
@ -161,9 +161,9 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -253,9 +253,9 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
14.19.0
|
|
1
.npmrc
1
.npmrc
|
@ -1 +1,2 @@
|
||||||
puppeteer_skip_chromium_download=true
|
puppeteer_skip_chromium_download=true
|
||||||
|
legacy-peer-deps=true
|
||||||
|
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
||||||
14.19.0
|
18
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:14 as builder
|
FROM node:18 as builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:14
|
FROM node:18
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
42418
package-lock.json
generated
42418
package-lock.json
generated
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -13,8 +13,8 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://saleor.io/",
|
"homepage": "https://saleor.io/",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14 <15",
|
"node": ">=18 <19",
|
||||||
"npm": ">=6.11.0 <7"
|
"npm": ">=8 <9"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "3.4.15",
|
"@apollo/client": "3.4.15",
|
||||||
|
@ -266,9 +266,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
|
"build-storybook": "env NODE_OPTIONS=--openssl-legacy-provider build-storybook -c src/storybook/ -o build/storybook",
|
||||||
"build-types": "graphql-codegen",
|
"build-types": "graphql-codegen",
|
||||||
"build": "npm run build-types && webpack -p",
|
"prebuild": "npm run build-types",
|
||||||
|
"build": "env NODE_OPTIONS=--openssl-legacy-provider webpack -p",
|
||||||
"check-strict-null-errors": "tsc --noEmit --strictNullChecks | node scripts/count-strict-null-check-errors.js",
|
"check-strict-null-errors": "tsc --noEmit --strictNullChecks | node scripts/count-strict-null-check-errors.js",
|
||||||
"check-types": "tsc --noEmit",
|
"check-types": "tsc --noEmit",
|
||||||
"extract-json-messages": "formatjs extract 'src/**/*.{ts,tsx}' --out-file locale/defaultMessages.json --format scripts/formatter.js",
|
"extract-json-messages": "formatjs extract 'src/**/*.{ts,tsx}' --out-file locale/defaultMessages.json --format scripts/formatter.js",
|
||||||
|
@ -276,8 +277,9 @@
|
||||||
"fetch-schema": "graphql-codegen --config ./fetch-schema.yml && node scripts/build-schema.js",
|
"fetch-schema": "graphql-codegen --config ./fetch-schema.yml && node scripts/build-schema.js",
|
||||||
"heroku-postbuild": "npm run build",
|
"heroku-postbuild": "npm run build",
|
||||||
"serve:lhci": "NODE_ENV=production npm run server",
|
"serve:lhci": "NODE_ENV=production npm run server",
|
||||||
"start": "npm run build-types && webpack-dev-server -d",
|
"prestart": "npm run build-types",
|
||||||
"storybook": "start-storybook -p 3000 -c src/storybook/",
|
"start": "env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server -d",
|
||||||
|
"storybook": "env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 3000 -c src/storybook/",
|
||||||
"cy:run": "cypress run",
|
"cy:run": "cypress run",
|
||||||
"cy:run:dashboard": "cypress run --record",
|
"cy:run:dashboard": "cypress run --record",
|
||||||
"cy:open": "cypress open",
|
"cy:open": "cypress open",
|
||||||
|
|
Loading…
Reference in a new issue