Skip to content

Commit 59452cf

Browse files
committed
Merge remote-tracking branch 'origin/master' into revamp
2 parents f6c2b02 + 5c6fcb3 commit 59452cf

188 files changed

Lines changed: 21832 additions & 26462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ dist
1717
coverage
1818
.*.csv
1919
.docusaurus
20+
CLAUDE.md
21+
missing.json
22+
.claude

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# [17.4.0](https://github.com/ideal-postcodes/postcodes.io/compare/17.3.2...17.4.0) (2025-06-30)
2+
3+
4+
### Bug Fixes
5+
6+
* downgrade escape-string-regexp to v4 for CommonJS compatibility ([d898bfa](https://github.com/ideal-postcodes/postcodes.io/commit/d898bfadd6c5e4fae761537b26febc2b2d5eca94))
7+
8+
9+
### Features
10+
11+
* **ONSPD:** Update to May 2025 ([e88a8d7](https://github.com/ideal-postcodes/postcodes.io/commit/e88a8d73317c0a2b4d609443599ee6900a5d6e0f))
12+
13+
## [17.3.2](https://github.com/ideal-postcodes/postcodes.io/compare/17.3.1...17.3.2) (2025-06-18)
14+
15+
16+
### Bug Fixes
17+
18+
* correct path formatting for terminated postcodes endpoint ([7762537](https://github.com/ideal-postcodes/postcodes.io/commit/77625379ca027b6403571df531e0432e6c7766ac))
19+
120
## [17.3.1](https://github.com/ideal-postcodes/postcodes.io/compare/17.3.0...17.3.1) (2025-05-15)
221

322

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) => {

build/404.html

Lines changed: 8 additions & 5 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)