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

deps: use node.js 16 LTS #1085

Merged
merged 1 commit into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/javascript-node/.devcontainer/base.Dockerfile
ARG VARIANT="14"
ARG VARIANT="16"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

ENV NODE_OPTIONS=--max_old_space_size=8192 LOGGING=true TRUST_ICM=true
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": {
"VARIANT": "14"
"VARIANT": "16"
}
},
// https://paulhammond.org/2020/vscode-ramdisks
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dead-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
run: npm ci

- name: Find Unused TestBed declarations
run: npx npm-run-all cleanup-testbed check-no-changes
run: npm exec npm-run-all cleanup-testbed check-no-changes
36 changes: 17 additions & 19 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand All @@ -45,29 +45,27 @@ jobs:
CI: false

- name: Install e2e dependencies
run: |
cd e2e
npm i
run: cd e2e && npm i

- name: Code Formatting
run: npx npm-run-all format check-no-changes
run: npm exec npm-run-all format check-no-changes

- name: .dockerignore Sync
run: npx npm-run-all update-dockerignore check-no-changes
run: npm exec npm-run-all update-dockerignore check-no-changes

- name: Clean Localizations
run: npx npm-run-all clean-localizations check-no-changes
run: npm exec npm-run-all clean-localizations check-no-changes

- name: Compile Angular
run: npm run build client
env:
NODE_OPTIONS: --max_old_space_size=8192

- name: Compile Unit Tests
run: npx tsc -p tsconfig.all.json
run: npm run compile

- name: Compile Cypress Tests
run: (cd e2e && npx tsc -p cypress/tsconfig.json)
run: cd e2e && npm run build

- name: Run Escalated ESLint Rules
run: npm run lint-hard
Expand All @@ -81,10 +79,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand All @@ -97,7 +95,7 @@ jobs:
run: npm run test:eslint-rules

- name: schematics Jest
run: cd schematics && npm run test -- --ci
run: npm run test:schematics
env:
CI: false

Expand All @@ -111,20 +109,20 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
run: npm ci

- name: Find Dead Code
run: npx ts-node scripts/find-dead-code
run: npm run dead-code

- name: Find Unused TestBed declarations
run: npx npm-run-all "cleanup-testbed origin/develop" check-no-changes
run: npm exec npm-run-all "cleanup-testbed origin/develop" check-no-changes

Schematics:
needs: [Quality, Jest]
Expand All @@ -139,10 +137,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand All @@ -35,7 +35,7 @@ jobs:
run: node docs/check-documentation-overview

- name: Run Formatting
run: npx npm-run-all format check-no-changes
run: npm exec npm-run-all format check-no-changes

- name: Check Dead Links For Changed Files
if: github.ref != 'refs/heads/develop'
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand Down Expand Up @@ -66,10 +66,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Download Build Output
Expand Down Expand Up @@ -111,9 +111,7 @@ jobs:
uses: actions/checkout@v2

- name: Install e2e dependencies
run: |
cd e2e
npm i
run: cd e2e && npm i

- name: Download Build Output
uses: actions/download-artifact@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
run: npm ci

- name: Install e2e dependencies
run: |
cd e2e
npm i
run: cd e2e && npm i

- name: Possible Angular Updates
if: always()
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Install root dependencies
Expand All @@ -61,10 +61,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- uses: 1arp/create-a-file-action@0.2
Expand All @@ -91,10 +91,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Run developer workflow
Expand All @@ -107,10 +107,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
cache: npm

- name: Run developer workflow
Expand Down
1 change: 1 addition & 0 deletions .vscode/intershop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Mockito
PWA's
RxJS
Grafana
ngcc
NgRx
NgSW
Formly
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# synchronize-marker:docker-cache-share:begin
FROM node:14-alpine as buildstep
FROM node:16-alpine as buildstep
ENV CI=true
WORKDIR /workspace
COPY package.json package-lock.json /workspace/
Expand All @@ -20,14 +20,14 @@ COPY templates/webpack/* /workspace/templates/webpack/
ARG testing=false
ENV TESTING=${testing}
ARG activeThemes=
RUN if [ ! -z "${activeThemes}" ]; then npm config set intershop-pwa:active-themes="${activeThemes}"; fi
RUN if [ ! -z "${activeThemes}" ]; then npm config set active-themes="${activeThemes}"; fi
RUN npm run build:multi client -- --deploy-url=DEPLOY_URL_PLACEHOLDER
COPY tsconfig.server.json server.ts /workspace/
RUN npm run build:multi server
RUN node scripts/compile-docker-scripts
COPY dist/* /workspace/dist/

FROM node:14-alpine
FROM node:16-alpine
COPY --from=buildstep /workspace/dist /dist
RUN cd dist && npm install
ARG displayVersion=
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_reports
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# To build this report image, you will have to temporarily truncate the .dockerignore

# synchronize-marker:docker-cache-share:begin
FROM node:14-alpine as buildstep
FROM node:16-alpine as buildstep
ENV CI=true
WORKDIR /workspace
COPY package.json package-lock.json /workspace/
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kb_sync_latest_only
## Quick Start

Before working with this project, download and install [Node.js](https://nodejs.org) with the included npm package manager.
Currently Node.js 14.x LTS with the corresponding npm is required.
Currently Node.js 16.x LTS with the corresponding npm is required.

After having cloned the project from the Git repository, open a command line in the project folder and run `npm install`.

Expand Down
3 changes: 3 additions & 0 deletions docs/guides/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Another change is the [Formly](https://formly.dev/) downgrade from v6 pre-releas
After the updates the deprecated RxJS MapTo operators (`mapTo`, `mergeMapTo`, `switchMapTo`) were replaced [Deprecating MapTo variants](https://github.com/ReactiveX/rxjs/issues/6399).
Linting will point out these issues in custom code that can than easily be replaced.

The Intershop PWA now uses Node.js 16 LTS with a corresponding npm version >=8.0.0.
With this new npm, calls using `npx npm-run-all` in CI have to be changed to `npm run exec npm-run-all`.

# 2.0 to 2.1

The recently viewed products functionality was moved into an extension.
Expand Down
1 change: 1 addition & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"directory": "e2e"
},
"scripts": {
"build": "tsc -p cypress/tsconfig.json --noEmit",
"test": "node open-cypress"
},
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion e2e/test-schematics-customization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ grep '"serviceWorker": false' angular.json

export NODE_OPTIONS=--max_old_space_size=8192

npx npm-run-all format "lint -- --fix" compile build
npm exec npm-run-all format "lint -- --fix" compile build

nohup bash -c "npm run serve &"
npx wait-on --verbose --interval 1000 --delay 1000 --timeout 30000 tcp:4200
Expand Down
2 changes: 1 addition & 1 deletion e2e/test-schematics-normal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ grep destroy src/app/extensions/awesome/shared/dummy/dummy.component.ts

export NODE_OPTIONS=--max_old_space_size=8192

npx npm-run-all format "lint -- --fix" compile build
npm exec npm-run-all format "lint -- --fix" compile build

nohup bash -c "npm run serve &"
npx wait-on --verbose --interval 1000 --delay 1000 --timeout 30000 tcp:4200
Expand Down
Loading