Skip to content

Commit

Permalink
[Issue upgrade to node 22.13 (#3481)
Browse files Browse the repository at this point in the history
All usages of Node in the application upgraded to latest 22 minor version (22.13). This includes:
* github actions
* Dockerfile base image
* package.json engine
* node types package

Also:
* moves linting behavior into the next config from the package script
* upgrades the release Dockerfile base to bookworm from bullseye
  • Loading branch information
doug-s-nava authored Jan 10, 2025
1 parent 91dff13 commit 755ffbf
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-frontend-a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
working-directory: ./frontend

env:
NODE_VERSION: 20
NODE_VERSION: 22
LOCKFILE_PATH: ./frontend/package-lock.json
PACKAGE_MANAGER: npm

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-frontend-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
working-directory: ./frontend

env:
NODE_VERSION: 18
NODE_VERSION: 22
LOCKFILE_PATH: ./frontend/package-lock.json
PACKAGE_MANAGER: npm

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults:
working-directory: ./frontend

env:
NODE_VERSION: 18
NODE_VERSION: 22
LOCKFILE_PATH: ./frontend/package-lock.json # or yarn.lock
PACKAGE_MANAGER: npm # or yarn

Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is largely based on the template-application-flask Dockerfile and
# Next.js Docker example: https://github.com/vercel/next.js/blob/canary/examples/with-docker-compose
# =============================================================================
FROM node:20-bookworm-slim AS base
FROM node:22-bookworm-slim AS base
WORKDIR /frontend

# Install dependencies
Expand Down Expand Up @@ -54,7 +54,7 @@ RUN npm run build -- --no-lint
# Run the Next.js server
# =====================================
# Use clean image for release, excluding any unnecessary files or dependencies
FROM node:20-bullseye-slim AS release
FROM node:22-bookworm-slim AS release
WORKDIR /frontend

# Update system and install security updates
Expand Down
12 changes: 12 additions & 0 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ const nextConfig = {
nrExternals(config);
return config;
},
eslint: {
dirs: [
"src",
"stories",
".storybook",
"tests",
"scripts",
"frontend",
"lib",
"types",
],
},
};

module.exports = withNextIntl(nextConfig);
74 changes: 11 additions & 63 deletions frontend/package-lock.json

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

6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"engines": {
"node": ">=20.0.0"
"node": ">=22.13.0"
},
"scripts": {
"all-checks": "npm run lint && npm run ts:check && npm run test && npm run build",
Expand All @@ -13,7 +13,7 @@
"debug": "NODE_OPTIONS='--inspect' next dev",
"format": "prettier --write '**/*.{js,json,md,ts,tsx,scss,yaml,yml}'",
"format-check": "prettier --check '**/*.{js,json,md,ts,tsx,scss,yaml,yml}'",
"lint": "next lint --dir src --dir stories --dir .storybook --dir tests --dir scripts --dir frontend --dir lib --dir types",
"lint": "next lint",
"lint-fix": "npm run lint -- --fix",
"postinstall": "node ./scripts/postinstall.js",
"start:nr": "NODE_OPTIONS= '-r @newrelic/next' next start -p ${PORT:-3000}",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.13",
"@types/newrelic": "^9.14.6",
"@types/node": "^20.8.2",
"@types/node": "^22.10.5",
"@types/node-fetch": "^2.6.11",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
Expand Down

0 comments on commit 755ffbf

Please sign in to comment.