Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Upgrading to Node.js 20 #1293

Merged
merged 12 commits into from
Mar 12, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropping support for 18 is a breaking change.

node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.1
20.10.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "One Amex SPA technology stack.",
"main": "index.js",
"engines": {
"node": ">=18 <=20",
"npm": ">=8"
Comment on lines -7 to -8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to still support node 18

"node": ">=20",
"npm": ">=10"
},
"scripts": {
"preinstall": "npx check-engines@1",
Expand Down Expand Up @@ -55,18 +55,7 @@
"bugs": {
"url": "https://github.com/americanexpress/one-app/issues"
},
"contributors": [
"Andres Escobar <Andres.Escobar@aexp.com> (https://github.com/anescobar1991)",
"James Singleton <James.Singleton1@aexp.com> (https://github.com/JamesSingleton)",
"Jamie King <Jamie.King@aexp.com> (https://github.com/10xLaCroixDrinker)",
"Jonathan Adshead <Jonathan.Adshead@aexp.com> (https://github.com/JAdshead)",
"Michael Tobia <Michael.M.Tobia@aexp.com> (https://github.com/Francois-Esquire)",
"Michael Tomcal <Michael.A.Tomcal@aexp.com> (https://github.com/mtomcal)",
"Stephanie Coates <Stephanie.Coates1@aexp.com> (https://github.com/stephaniecoates)",
"Nelly Kiboi <Nelly.J.Kiboi@aexp.com> (https://github.com/nellyk)",
"Nickolas Oliver <nickolas.oliver@aexp.com> (https://github.com/PixnBits)",
"Ruben Casas <ruben.casas@aexp.com> (https://github.com/infoxicator)"
],
"author": "One App Team <oneamex.careers@aexp.com>",
"license": "Apache-2.0",
"keywords": [
"spa",
Expand Down
2 changes: 1 addition & 1 deletion prod-sample/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VERSION=lts
ARG VERSION=20

FROM node:$VERSION as builder
MAINTAINER One App Team
Expand Down
19 changes: 9 additions & 10 deletions prod-sample/sample-modules/healthy-frank/0.0.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Loading