diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ef0618eb8..d8a41404c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -16,10 +16,10 @@ jobs: - uses: actions/checkout@v4 # Beginning of yarn setup - - name: use node.js 18.x + - name: use node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x registry-url: https://registry.npmjs.org/ # Needed for auth - name: cache all node_modules id: cache-modules diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 0214f90cd..851173bc5 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v4 # Beginning of yarn setup - - name: use node.js 18.x + - name: use node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x registry-url: https://registry.npmjs.org/ # Needed for auth - name: cache all node_modules id: cache-modules diff --git a/.github/workflows/techdocs.yml b/.github/workflows/techdocs.yml index 36a9564ab..992c44c64 100644 --- a/.github/workflows/techdocs.yml +++ b/.github/workflows/techdocs.yml @@ -24,10 +24,10 @@ jobs: repository: backstage/backstage fetch-depth: 1 - - name: Setup Node 18.x + - name: Setup Node 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x registry-url: https://registry.npmjs.org/ # Needed for auth - name: Setup Python 3.9 diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index d299bc2d4..4b8770ece 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -29,10 +29,10 @@ jobs: fetch-depth: 1 # Beginning of yarn setup - - name: use node.js 18.x + - name: use node.js 20.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x registry-url: https://registry.npmjs.org/ # Needed for auth - name: cache all node_modules id: cache-modules diff --git a/Dockerfile b/Dockerfile index b73f19a6c..48a4a4231 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG ENVIRONMENT_CONFIG=heroku # Stage 1 - Create yarn install skeleton layer -FROM node:18-bookworm-slim AS packages +FROM node:20-bookworm-slim AS packages ARG ENVIRONMENT_CONFIG WORKDIR /app @@ -16,7 +16,7 @@ COPY packages packages RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf # Stage 2 - Install dependencies and build packages -FROM node:18-bookworm-slim AS build +FROM node:20-bookworm-slim AS build ARG ENVIRONMENT_CONFIG # Set Python interpreter for `node-gyp` to use @@ -50,7 +50,7 @@ RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \ && tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle # Stage 3 - Build the actual backend image and install production dependencies -FROM node:18-bookworm-slim +FROM node:20-bookworm-slim ARG ENVIRONMENT_CONFIG # Set Python interpreter for `node-gyp` to use @@ -105,7 +105,8 @@ ENV PORT 7007 # This switches many Node.js dependencies to production mode. ENV NODE_ENV production # Sets the max memory size of V8's old memory section -ENV NODE_OPTIONS "--max-old-space-size=1000" +# Also disables node snapshot for Node 20 to work with the Scaffolder +ENV NODE_OPTIONS "--max-old-space-size=1000 --no-node-snapshot" # Default is 'heroku', for local testing pass in 'local' ENV ENVIRONMENT_CONFIG=${ENVIRONMENT_CONFIG} diff --git a/packages/app/package.json b/packages/app/package.json index 4cb0e06e2..6e94ac3b4 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -44,7 +44,7 @@ "@playwright/test": "^1.32.3", "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", - "@types/node": "^12.0.0", + "@types/node": "^20.0.0", "@types/react-dom": "*", "@types/uuid": "^9.0.0", "uuid": "^9.0.1" diff --git a/yarn.lock b/yarn.lock index dac4d3f58..23bcd0d15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12659,7 +12659,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^20.1.1, @types/node@npm:^20.10.5": +"@types/node@npm:*, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^20.0.0, @types/node@npm:^20.1.1, @types/node@npm:^20.10.5": version: 20.11.19 resolution: "@types/node@npm:20.11.19" dependencies: @@ -12668,7 +12668,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.0.0, @types/node@npm:^12.7.1": +"@types/node@npm:^12.7.1": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 @@ -14093,7 +14093,7 @@ __metadata: "@playwright/test": ^1.32.3 "@testing-library/jest-dom": ^6.0.0 "@testing-library/react": ^14.0.0 - "@types/node": ^12.0.0 + "@types/node": ^20.0.0 "@types/react-dom": "*" "@types/uuid": ^9.0.0 react: ^18.2.0