diff --git a/README.md b/README.md index 49dea14..3a4e449 100644 --- a/README.md +++ b/README.md @@ -324,3 +324,89 @@ test/ vitest suite (per-endpoint ports + parity sweep) ## License Apache-2.0. + +## Release Notes + +### 2.11.3 + +* Updated `mapcode-ts` to 1.0.2, which renames 5 territories: COK to + "Cook Islands", FJI to "Republic of Fiji", PSE to "Palestine", CA-NL to + "Newfoundland and Labrador" and RU-IN to "Republic of Ingushetia". The + `fullName` field of the territory endpoints returns the new names. + +### 2.11.2 + +* Updated dependencies, including TypeScript 7, vitest 5 and flatgeobuf 4. + +### 2.11.1 + +* Fixed the anonymisation backfill, which flagged failed calls as anonymised. +* A Postgres restart no longer crashes the service. +* `Accept` ranges are weighed by specificity, `q=0` is honoured, `q` values + are clamped to 0..1 and ties go to JSON. +* Error responses keep their 4xx status, and a 405 response carries an + `Allow` header. +* An unknown territory context is reported as a bad `parent`. +* Doubles outside [1e-3, 1e7) are formatted in E notation, and distances wrap + longitudes, both matching the Java service. +* Added CI that runs the tests against Postgres 16 and typechecks the tests. + +### 2.11.0 + +* Anonymised rows are marked, and replay and replay stats expose them. + +### 2.10.0 + +* Calls with `allowLog=false` are recorded anonymised, with only their kind + and country. + +### 2.9.2 + +* Documented that the `web` client tag is deprecated. + +### 2.9.1 + +* Corrected the README on `client` and `allowLog`. + +### 2.9.0 + +* Recognize `demo` as a client tag. + +### 2.8.1 + +* Lowered the replay row cap to 200k. + +### 2.8.0 + +* Raised the replay row cap from 500k to 1M. + +### 2.7.1 + +* The stats cache is rebuilt hourly, with a catch-up right after boot. + +### 2.7.0 + +* Widened replay to a 365-day window and 500k rows. +* `/mapcode/replay/stats` is served from an incremental cache and answers 503 + while the cache warms up. +* Added a btree index on `mapcode_request.ts` and a statement timeout on the + Postgres pool. + +### 2.6.0 + +* Successful calls to API endpoints are recorded in Postgres. +* Added token-protected `/mapcode/replay` to read recorded calls back, with + CORS. +* Added `/mapcode/replay/stats` with usage counters per window and endpoint + kind, the storage footprint and the burn rate. +* Postgres connections support verified TLS. + +### 2.5.1 + +* Added request logging. + +### 2.5.0 + +* First official TypeScript web service release. +* The versioning scheme changed to `major.minor.patch`, dropping the last + digit. diff --git a/package-lock.json b/package-lock.json index 70cfbce..f2a39a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "mapcode-rest-service-ts", - "version": "2.11.2", + "version": "2.11.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mapcode-rest-service-ts", - "version": "2.11.2", + "version": "2.11.3", "license": "Apache-2.0", "dependencies": { "@fastify/compress": "^9.2.2", "fastify": "^5.12.7", "flatbush": "^4.6.2", "flatgeobuf": "^4.6.1", - "mapcode-ts": "1.0.1", + "mapcode-ts": "1.0.2", "pg": "^8.23.1" }, "devDependencies": { @@ -1776,9 +1776,9 @@ } }, "node_modules/mapcode-ts": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mapcode-ts/-/mapcode-ts-1.0.1.tgz", - "integrity": "sha512-Ye2flunH8fRVYQLAmRlOKoJ00QPxJ+1nzkuOWwVLbta/lUJt51m2XAfjnMNLBXdqZJeL6IPjqOBFUgoMaY50SA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mapcode-ts/-/mapcode-ts-1.0.2.tgz", + "integrity": "sha512-t+PMgTtF18ZqC0M27BZe+enZTlf9LxK3sNG9rSv4tisbidkyJNEvtx/OUXBzBClwL17tE3oTSfv51G1s6b7hKA==", "license": "Apache-2.0", "engines": { "node": ">=20" diff --git a/package.json b/package.json index 9ad2ff6..1a7577a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcode-rest-service-ts", - "version": "2.11.2", + "version": "2.11.3", "description": "TypeScript port of the Mapcode REST API service.", "private": true, "type": "module", @@ -22,7 +22,7 @@ "fastify": "^5.12.7", "flatbush": "^4.6.2", "flatgeobuf": "^4.6.1", - "mapcode-ts": "1.0.1", + "mapcode-ts": "1.0.2", "pg": "^8.23.1" }, "devDependencies": { diff --git a/test/api-territories.test.ts b/test/api-territories.test.ts index 23a0f4b..eff72a4 100644 --- a/test/api-territories.test.ts +++ b/test/api-territories.test.ts @@ -325,7 +325,7 @@ describe("checkTerritoryStateJson", () => { const res = await getJson("/mapcode/territories/in?context=ru"); expect(res.statusCode).toBe(200); expect(res.body).toBe( - '{"alphaCode":"RU-IN","alphaCodeMinimalUnambiguous":"RU-IN","alphaCodeMinimal":"IN","fullName":"Ingushetia Republic","parentTerritory":"RUS","alphabets":[{"name":"CYRILLIC"},{"name":"ROMAN"}]}' + '{"alphaCode":"RU-IN","alphaCodeMinimalUnambiguous":"RU-IN","alphaCodeMinimal":"IN","fullName":"Republic of Ingushetia","parentTerritory":"RUS","alphabets":[{"name":"CYRILLIC"},{"name":"ROMAN"}]}' ); }); }); diff --git a/test/package-config.test.ts b/test/package-config.test.ts index b813044..c42366f 100644 --- a/test/package-config.test.ts +++ b/test/package-config.test.ts @@ -20,9 +20,9 @@ const packageLock = JSON.parse(readFileSync(new URL("../package-lock.json", impo describe("package dependency configuration", () => { it("keeps package metadata at the release version", () => { - expect(packageJson.version).toBe("2.11.2"); - expect(packageLock.version).toBe("2.11.2"); - expect(packageLock.packages[""].version).toBe("2.11.2"); + expect(packageJson.version).toBe("2.11.3"); + expect(packageLock.version).toBe("2.11.3"); + expect(packageLock.packages[""].version).toBe("2.11.3"); }); it("uses a registry-resolvable mapcode-ts dependency", () => {