From b4643ff6661383892eccbfd4a97c8fdf28d4eff0 Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Mon, 12 Feb 2024 11:13:38 -0500 Subject: [PATCH 1/6] refactor: upgrade to node 20 --- ...-and-trunk_one-app-unit-and-lint-tests.yml | 2 +- .nvmrc | 2 +- Dockerfile | 4 ++-- package.json | 17 +++-------------- .../healthy-frank/0.0.0/package.json | 19 +++++++++---------- 5 files changed, 16 insertions(+), 28 deletions(-) diff --git a/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml b/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml index b6e57c96d..d13520b90 100644 --- a/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml +++ b/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x, 18.x] + node-version: [20.x] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.nvmrc b/.nvmrc index 4a1f488b6..d5a159609 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.17.1 +20.10.0 diff --git a/Dockerfile b/Dockerfile index 8e93ac8b8..3bebf8204 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -ARG VERSION=lts +ARG VERSION=20 # Use the pre-baked fat node image only in the builder # which includes build utils preinstalled (e.g. gcc, make, etc). # This will result in faster and reliable One App docker image # builds as we do not have to run apk installs for alpine. FROM node:$VERSION as builder WORKDIR /opt/build -RUN npm install -g npm@9.6.7 --registry=https://registry.npmjs.org +RUN npm install -g npm@10.2.3 --registry=https://registry.npmjs.org COPY --chown=node:node ./ /opt/build # npm ci does not run postinstall with root account RUN NODE_ENV=development npm ci --build-from-source diff --git a/package.json b/package.json index 3f4d8f3e4..d4aaf71d3 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "One Amex SPA technology stack.", "main": "index.js", "engines": { - "node": ">=16 <=18", - "npm": ">=8" + "node": ">=18 <=20", + "npm": ">=10" }, "scripts": { "preinstall": "npx check-engines@1", @@ -57,18 +57,7 @@ "bugs": { "url": "https://github.com/americanexpress/one-app/issues" }, - "contributors": [ - "Andres Escobar (https://github.com/anescobar1991)", - "James Singleton (https://github.com/JamesSingleton)", - "Jamie King (https://github.com/10xLaCroixDrinker)", - "Jonathan Adshead (https://github.com/JAdshead)", - "Michael Tobia (https://github.com/Francois-Esquire)", - "Michael Tomcal (https://github.com/mtomcal)", - "Stephanie Coates (https://github.com/stephaniecoates)", - "Nelly Kiboi (https://github.com/nellyk)", - "Nickolas Oliver (https://github.com/PixnBits)", - "Ruben Casas (https://github.com/infoxicator)" - ], + "author": "Web Frameworks Engineering ", "license": "Apache-2.0", "keywords": [ "spa", diff --git a/prod-sample/sample-modules/healthy-frank/0.0.0/package.json b/prod-sample/sample-modules/healthy-frank/0.0.0/package.json index 0a118cea8..63c5f91d1 100644 --- a/prod-sample/sample-modules/healthy-frank/0.0.0/package.json +++ b/prod-sample/sample-modules/healthy-frank/0.0.0/package.json @@ -5,21 +5,20 @@ "scripts": { "prebuild": "npm run clean", "build": "bundle-module", - "clean": "rimraf build", - "prepare": "npm run build" + "clean": "rimraf build" }, "dependencies": { "@americanexpress/one-app-router": "^1.2.1", - "holocron": "^1.3.0", - "holocron-module-route": "^1.3.0", + "holocron": "^1.9.2", + "holocron-module-route": "^1.9.2", "prop-types": "^15.8.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-redux": "^7.2.8" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-redux": "^9.0.4" }, "devDependencies": { - "@americanexpress/one-app-bundler": "^6.21.1", - "babel-preset-amex": "^4.0.0", - "rimraf": "^3.0.2" + "@americanexpress/one-app-bundler": "^6.21.6", + "babel-preset-amex": "^4.0.1", + "rimraf": "^5.0.5" } } \ No newline at end of file From 9f6d21efea6c934e4d790335fe848646c1f0eb9e Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Fri, 16 Feb 2024 13:16:35 -0500 Subject: [PATCH 2/6] refactor: upgrade to node 20 --- package.json | 2 +- prod-sample/api/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9123482c9..320308ce9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "One Amex SPA technology stack.", "main": "index.js", "engines": { - "node": ">=18 <=20", + "node": ">=20", "npm": ">=10" }, "scripts": { diff --git a/prod-sample/api/Dockerfile b/prod-sample/api/Dockerfile index 42dc58fe9..c9c3e2687 100644 --- a/prod-sample/api/Dockerfile +++ b/prod-sample/api/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=lts +ARG VERSION=20 FROM node:$VERSION as builder MAINTAINER One App Team From cd400deae96695cf8017a99de8f42ae0e291007e Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Mon, 26 Feb 2024 15:57:07 -0500 Subject: [PATCH 3/6] refactor(node): changed author --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index df6fdbf31..2f07b655c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -133,7 +133,7 @@ "webdriverio": "^7.34.0" }, "engines": { - "node": ">=18 <=20", + "node": "<=20", "npm": ">=10" } }, diff --git a/package.json b/package.json index 320308ce9..214ad024e 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "bugs": { "url": "https://github.com/americanexpress/one-app/issues" }, - "author": "Web Frameworks Engineering ", + "author": "One App Team ", "license": "Apache-2.0", "keywords": [ "spa", From c181baf075f9f9687d4edd868bb3a4476e616b4d Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Wed, 28 Feb 2024 14:14:52 -0500 Subject: [PATCH 4/6] refactor(node): reverted sample module pkg change --- .../healthy-frank/0.0.0/package.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/prod-sample/sample-modules/healthy-frank/0.0.0/package.json b/prod-sample/sample-modules/healthy-frank/0.0.0/package.json index 63c5f91d1..0a118cea8 100644 --- a/prod-sample/sample-modules/healthy-frank/0.0.0/package.json +++ b/prod-sample/sample-modules/healthy-frank/0.0.0/package.json @@ -5,20 +5,21 @@ "scripts": { "prebuild": "npm run clean", "build": "bundle-module", - "clean": "rimraf build" + "clean": "rimraf build", + "prepare": "npm run build" }, "dependencies": { "@americanexpress/one-app-router": "^1.2.1", - "holocron": "^1.9.2", - "holocron-module-route": "^1.9.2", + "holocron": "^1.3.0", + "holocron-module-route": "^1.3.0", "prop-types": "^15.8.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-redux": "^9.0.4" + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-redux": "^7.2.8" }, "devDependencies": { - "@americanexpress/one-app-bundler": "^6.21.6", - "babel-preset-amex": "^4.0.1", - "rimraf": "^5.0.5" + "@americanexpress/one-app-bundler": "^6.21.1", + "babel-preset-amex": "^4.0.0", + "rimraf": "^3.0.2" } } \ No newline at end of file From 8f78975d7a92a005448eb9dc60b38a19058be96b Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Wed, 28 Feb 2024 14:50:56 -0500 Subject: [PATCH 5/6] refactor(node): correct node version in pkg lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index a3574b40b..859e1e556 100644 --- a/package-lock.json +++ b/package-lock.json @@ -132,7 +132,7 @@ "webdriverio": "^7.34.0" }, "engines": { - "node": "<=20", + "node": ">=20", "npm": ">=10" } }, From cbba2067df2a88f501429f51217fafeeea6e8aa1 Mon Sep 17 00:00:00 2001 From: Giuliano Kranevitter Date: Mon, 11 Mar 2024 15:15:51 -0400 Subject: [PATCH 6/6] chore: upgraded to latest node 20 --- .../workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml | 2 +- .nvmrc | 2 +- package-lock.json | 4 ++-- package.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml b/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml index a4330ad32..e8509182b 100644 --- a/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml +++ b/.github/workflows/on-pr-and-trunk_one-app-unit-and-lint-tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x] + node-version: [18.x, 20.x] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.nvmrc b/.nvmrc index d5a159609..2dbbe00e6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.10.0 +20.11.1 diff --git a/package-lock.json b/package-lock.json index 831a70032..a916b4c26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -132,8 +132,8 @@ "webdriverio": "^7.34.0" }, "engines": { - "node": ">=20", - "npm": ">=10" + "node": ">=18", + "npm": ">=9" } }, "node_modules/@americanexpress/env-config-utils": { diff --git a/package.json b/package.json index 2f2855f8e..8d18451ae 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "One Amex SPA technology stack.", "main": "index.js", "engines": { - "node": ">=20", - "npm": ">=10" + "node": ">=18", + "npm": ">=9" }, "scripts": { "preinstall": "npx check-engines@1",