Skip to content

Commit 1bd1aff

Browse files
mfilipcblanc
authored andcommitted
chore: upgrade Node.js to v24 and update dependencies to latest versions
1 parent 4e32ec5 commit 1bd1aff

25 files changed

Lines changed: 21198 additions & 26048 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Use Node.js
1414
uses: actions/setup-node@v4
1515
with:
16-
node-version: 20
16+
node-version: 24
1717

1818
- name: Cache node modules
1919
uses: actions/cache@v4
@@ -24,5 +24,8 @@ jobs:
2424
- name: Install
2525
run: npm install
2626

27+
- name: Build
28+
run: npm run build
29+
2730
- name: Test
2831
run: make test

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
20+
node-version: 24
2121

2222
- name: Cache node modules
2323
uses: actions/cache@v4

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22-alpine AS base
1+
FROM node:24-alpine AS base
22

33
RUN apk update && apk upgrade && apk add --no-cache bash
44

api/app/lib/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { destination } = pino;
66
const selectTarget = (file?: string) => {
77
if (file === undefined) return destination();
88
const output = file.toLowerCase();
9-
if (output === "stdout") return destination();
9+
if (output === "stdout") return destination({ sync: true });
1010
if (output === "perf") return destination({ sync: false });
1111
return destination(file);
1212
};

api/app/models/place.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ const seedData = async (directory: string) => {
483483
};
484484

485485
const transform = (row: string[]) => {
486-
// Skip if not a "place"
486+
// Only process populated places
487487
if (row[typeIndex] !== "populatedPlace") return null;
488488
const northings = row[csvColumns.northings];
489489
const eastings = row[csvColumns.eastings];
@@ -508,9 +508,15 @@ const seedData = async (directory: string) => {
508508
});
509509
};
510510

511-
const files = readdirSync(directory)
511+
const allFiles = readdirSync(directory);
512+
513+
const files = allFiles
512514
.filter((f: string) => f.match(/\.csv$/))
513-
.map((f: string) => `${directory}${f}`);
515+
.map((f: string) => {
516+
// Ensure proper path joining with path separator
517+
const filePath = directory.endsWith('/') ? `${directory}${f}` : `${directory}/${f}`;
518+
return filePath;
519+
});
514520
return methods.csvSeed({ filepath: files, transform, columns });
515521
};
516522

api/config/renderer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const notFoundRenderer = (_: unknown, res: Response) =>
6666
export const rendererConfig = (app: Express) => {
6767
app.use(filter);
6868
app.use(renderer);
69+
//@ts-expect-error
6970
app.use(errorRenderer);
71+
//@ts-expect-error
7072
app.use(notFoundRenderer);
7173
};

bin/exec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { access, F_OK } = require("fs");
1+
const { access, constants: { F_OK } } = require("fs");
22
const { resolve } = require("path");
33

44
const exec = (path) => {

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
services:
32
api:
43
image: idealpostcodes/postcodes.io:latest

docker/dev/docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
---
2-
version: "3"
31
services:
42
db:
53
build:

docker/live-test/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
services:
32
api:
43
build:

0 commit comments

Comments
 (0)