Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion test/api-territories.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]}'
);
});
});
6 changes: 3 additions & 3 deletions test/package-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Loading