From 33e7cd5e466d8447abd7cd8fc394f7d165a5454d Mon Sep 17 00:00:00 2001 From: April Arcus Date: Fri, 3 Apr 2026 22:07:07 -0700 Subject: [PATCH 1/3] Node -> 18 - Node 18 changes the resolution of `localhost` to ::1 (ipv6) instead of 127.0.0.1 (ipv4). In CI, we must tell Docker to map port 5432 (postgres) on ipv6 instead of ipv4. - Node 18 no longer spawns yarn.cmd with { shell: true } by default, so in `scripts/lib/run.js`, we now set it explicitly if we detect that the OS is win32. --- .github/workflows/cypress.yml | 4 ++-- .github/workflows/nodejs.yml | 4 ++-- .github/workflows/pgrita.yml | 4 ++-- .github/workflows/production-docker.yml | 6 ++++-- .github/workflows/windows-nodejs.yml | 4 ++-- production.Dockerfile | 6 +++--- scripts/_setup_utils.js | 4 ++-- scripts/lib/run.js | 1 + 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 33b82f74..ce6086e6 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] services: postgres: @@ -25,7 +25,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - - "0.0.0.0:5432:5432" + - ":::5432:5432" # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 3568ecbe..3604ee95 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] services: postgres: @@ -23,7 +23,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - - "0.0.0.0:5432:5432" + - ":::5432:5432" # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/.github/workflows/pgrita.yml b/.github/workflows/pgrita.yml index 1f98b3b7..eb05478c 100644 --- a/.github/workflows/pgrita.yml +++ b/.github/workflows/pgrita.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] services: postgres: @@ -18,7 +18,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - - "0.0.0.0:5432:5432" + - ":::5432:5432" # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/.github/workflows/production-docker.yml b/.github/workflows/production-docker.yml index f37eb96c..1840b143 100644 --- a/.github/workflows/production-docker.yml +++ b/.github/workflows/production-docker.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [18.x] services: postgres: @@ -18,7 +18,9 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - - "0.0.0.0:5432:5432" + - ":::5432:5432" + # docker bridge gateway + - "172.17.0.1:5432:5432" # needed because the postgres container does not provide a healthcheck options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/.github/workflows/windows-nodejs.yml b/.github/workflows/windows-nodejs.yml index a0e22cea..8ce24bc0 100644 --- a/.github/workflows/windows-nodejs.yml +++ b/.github/workflows/windows-nodejs.yml @@ -20,10 +20,10 @@ jobs: git config --global core.eol lf - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v1 with: - node-version: "16" + node-version: "18" - name: Start Postgres 14 run: | sc config postgresql-x64-14 start=auto diff --git a/production.Dockerfile b/production.Dockerfile index acd18868..5154b55c 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -7,7 +7,7 @@ ARG TARGET="server" ################################################################################ # Build stage 1 - `yarn build` -FROM node:16-alpine as builder +FROM node:18-alpine as builder # Import our shared args ARG NODE_ENV ARG ROOT_URL @@ -30,7 +30,7 @@ RUN yarn run build ################################################################################ # Build stage 2 - COPY the relevant things (multiple steps) -FROM node:16-alpine as clean +FROM node:18-alpine as clean # Import our shared args ARG NODE_ENV ARG ROOT_URL @@ -67,7 +67,7 @@ RUN rm -Rf /app/node_modules /app/@app/*/node_modules ################################################################################ # Build stage FINAL - COPY everything, once, and then do a clean `yarn install` -FROM node:16-alpine +FROM node:18-alpine EXPOSE $PORT WORKDIR /app/ diff --git a/scripts/_setup_utils.js b/scripts/_setup_utils.js index b06a4dfd..2d95f427 100644 --- a/scripts/_setup_utils.js +++ b/scripts/_setup_utils.js @@ -1,5 +1,5 @@ -if (parseInt(process.version.split(".")[0], 10) < 10) { - throw new Error("This project requires Node.js >= 10.0.0"); +if (parseInt(process.version.split(".")[0], 18) < 18) { + throw new Error("This project requires Node.js >= 18.0.0"); } const fsp = require("fs").promises; diff --git a/scripts/lib/run.js b/scripts/lib/run.js index a226f1cf..24951733 100644 --- a/scripts/lib/run.js +++ b/scripts/lib/run.js @@ -4,6 +4,7 @@ const runSync = (cmd, args, options = {}) => { const result = spawnSync(cmd, args, { stdio: ["inherit", "inherit", "inherit"], windowsHide: true, + shell: process.platform === "win32", ...options, env: { ...process.env, From 340f3a8f71f64d6bb0f73811fbecd9e681f6b00c Mon Sep 17 00:00:00 2001 From: April Arcus Date: Mon, 6 Apr 2026 21:15:33 -0700 Subject: [PATCH 2/3] Node -> 22 Prerequisite for Graphile 5.0.0-rc.4 --- .github/workflows/cypress.yml | 2 +- .github/workflows/nodejs.yml | 2 +- .github/workflows/pgrita.yml | 2 +- .github/workflows/production-docker.yml | 2 +- .github/workflows/windows-nodejs.yml | 4 ++-- production.Dockerfile | 2 +- scripts/_setup_utils.js | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index ce6086e6..e619cc22 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] services: postgres: diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 3604ee95..20ddba9d 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] services: postgres: diff --git a/.github/workflows/pgrita.yml b/.github/workflows/pgrita.yml index eb05478c..c083216f 100644 --- a/.github/workflows/pgrita.yml +++ b/.github/workflows/pgrita.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] services: postgres: diff --git a/.github/workflows/production-docker.yml b/.github/workflows/production-docker.yml index 1840b143..dbbca273 100644 --- a/.github/workflows/production-docker.yml +++ b/.github/workflows/production-docker.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] services: postgres: diff --git a/.github/workflows/windows-nodejs.yml b/.github/workflows/windows-nodejs.yml index 8ce24bc0..c0e712ed 100644 --- a/.github/workflows/windows-nodejs.yml +++ b/.github/workflows/windows-nodejs.yml @@ -20,10 +20,10 @@ jobs: git config --global core.eol lf - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js 18 + - name: Use Node.js 22 uses: actions/setup-node@v1 with: - node-version: "18" + node-version: "22" - name: Start Postgres 14 run: | sc config postgresql-x64-14 start=auto diff --git a/production.Dockerfile b/production.Dockerfile index 5154b55c..d8c68ce4 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -7,7 +7,7 @@ ARG TARGET="server" ################################################################################ # Build stage 1 - `yarn build` -FROM node:18-alpine as builder +FROM node:22-alpine as builder # Import our shared args ARG NODE_ENV ARG ROOT_URL diff --git a/scripts/_setup_utils.js b/scripts/_setup_utils.js index 2d95f427..2655a650 100644 --- a/scripts/_setup_utils.js +++ b/scripts/_setup_utils.js @@ -1,5 +1,5 @@ -if (parseInt(process.version.split(".")[0], 18) < 18) { - throw new Error("This project requires Node.js >= 18.0.0"); +if (parseInt(process.version.split(".")[0], 22) < 22) { + throw new Error("This project requires Node.js >= 22.0.0"); } const fsp = require("fs").promises; From 102ae2984eef3fec961dbd0dd535f386ac0f315b Mon Sep 17 00:00:00 2001 From: April Arcus Date: Mon, 6 Apr 2026 16:59:08 -0700 Subject: [PATCH 3/3] Node -> 24 --- .github/workflows/cypress.yml | 2 +- .github/workflows/nodejs.yml | 2 +- .github/workflows/pgrita.yml | 2 +- .github/workflows/production-docker.yml | 2 +- .github/workflows/windows-nodejs.yml | 4 ++-- production.Dockerfile | 6 +++--- scripts/_setup_utils.js | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index e619cc22..9affa037 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [22.x] + node-version: [24.x] services: postgres: diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 20ddba9d..988c9acb 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [22.x] + node-version: [24.x] services: postgres: diff --git a/.github/workflows/pgrita.yml b/.github/workflows/pgrita.yml index c083216f..d827f5d8 100644 --- a/.github/workflows/pgrita.yml +++ b/.github/workflows/pgrita.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [22.x] + node-version: [24.x] services: postgres: diff --git a/.github/workflows/production-docker.yml b/.github/workflows/production-docker.yml index dbbca273..8cc6392a 100644 --- a/.github/workflows/production-docker.yml +++ b/.github/workflows/production-docker.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - node-version: [22.x] + node-version: [24.x] services: postgres: diff --git a/.github/workflows/windows-nodejs.yml b/.github/workflows/windows-nodejs.yml index c0e712ed..252c77a5 100644 --- a/.github/workflows/windows-nodejs.yml +++ b/.github/workflows/windows-nodejs.yml @@ -20,10 +20,10 @@ jobs: git config --global core.eol lf - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js 22 + - name: Use Node.js 24 uses: actions/setup-node@v1 with: - node-version: "22" + node-version: "24" - name: Start Postgres 14 run: | sc config postgresql-x64-14 start=auto diff --git a/production.Dockerfile b/production.Dockerfile index d8c68ce4..a39eecb9 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -7,7 +7,7 @@ ARG TARGET="server" ################################################################################ # Build stage 1 - `yarn build` -FROM node:22-alpine as builder +FROM node:24-alpine as builder # Import our shared args ARG NODE_ENV ARG ROOT_URL @@ -30,7 +30,7 @@ RUN yarn run build ################################################################################ # Build stage 2 - COPY the relevant things (multiple steps) -FROM node:18-alpine as clean +FROM node:24-alpine as clean # Import our shared args ARG NODE_ENV ARG ROOT_URL @@ -67,7 +67,7 @@ RUN rm -Rf /app/node_modules /app/@app/*/node_modules ################################################################################ # Build stage FINAL - COPY everything, once, and then do a clean `yarn install` -FROM node:18-alpine +FROM node:24-alpine EXPOSE $PORT WORKDIR /app/ diff --git a/scripts/_setup_utils.js b/scripts/_setup_utils.js index 2655a650..8a49c95e 100644 --- a/scripts/_setup_utils.js +++ b/scripts/_setup_utils.js @@ -1,5 +1,5 @@ -if (parseInt(process.version.split(".")[0], 22) < 22) { - throw new Error("This project requires Node.js >= 22.0.0"); +if (parseInt(process.version.split(".")[0], 24) < 24) { + throw new Error("This project requires Node.js >= 24.0.0"); } const fsp = require("fs").promises;