diff --git a/.changeset/api-edge-runtime.md b/.changeset/api-edge-runtime.md deleted file mode 100644 index bec028e..0000000 --- a/.changeset/api-edge-runtime.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@neaps/api": minor ---- - -Make the API runnable on edge runtimes (e.g. Cloudflare Workers). - -- Replace the runtime `express-openapi-validator` with lightweight request - validation/coercion in `validate.ts`. The validator relies on Ajv codegen - (`new Function`), which edge runtimes disallow. It's now a dev dependency - mounted in the test suite, so requests and responses are still validated - against the OpenAPI spec — keeping the runtime validators in alignment with it. -- Add a `compress` option to `createApp` (default `true`). The `compression()` - middleware corrupts responses through the `node:http` bridge on Workers, which - compress at the edge anyway — pass `createApp({ compress: false })` there. -- Declare `@neaps/tide-database` as a direct dependency so it's externalized - from the build instead of bundled. Shrinks the published `dist` from ~30 MB to - ~20 KB and avoids the station database being bundled twice by downstream - bundlers. diff --git a/.changeset/cache-control-s-maxage.md b/.changeset/cache-control-s-maxage.md deleted file mode 100644 index a432b56..0000000 --- a/.changeset/cache-control-s-maxage.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@neaps/api": patch ---- - -Add `s-maxage` to the `Cache-Control` header so CDNs and edge caches (e.g. Vercel, Cloudflare) cache responses, not just browsers. Uses the same TTL as `max-age` (`NEAPS_API_MAX_AGE`, default 3600). diff --git a/.changeset/neaps-esm-only.md b/.changeset/neaps-esm-only.md deleted file mode 100644 index 419c569..0000000 --- a/.changeset/neaps-esm-only.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"neaps": minor -"@neaps/tide-predictor": minor -"@neaps/react": minor ---- - -Drop the CommonJS builds; all neaps packages are now ESM-only. The CJS entries -can't survive their dependencies going ESM-only, since they load them with -`require()`. CommonJS consumers on Node 20.19+ / 22.12+ can still `require()` -these packages via Node's `require(esm)` support. diff --git a/.changeset/tide-database-0-9.md b/.changeset/tide-database-0-9.md deleted file mode 100644 index d57bb93..0000000 --- a/.changeset/tide-database-0-9.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"neaps": minor -"@neaps/cli": minor ---- - -Update @neaps/tide-database to 0.9. Station prediction data now lives in an -off-heap pack file read per station instead of being parsed into the JS heap -at import, dropping baseline heap usage from ~118 MB to ~36 MB. diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 71faa01..974e1b0 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,31 @@ # @neaps/api +## 0.7.0 + +### Minor Changes + +- [#293](https://github.com/openwatersio/neaps/pull/293) [`4c57263`](https://github.com/openwatersio/neaps/commit/4c5726334a5a564f80c92d89292cf236eeae3dd5) Thanks [@bkeepers](https://github.com/bkeepers)! - Make the API runnable on edge runtimes (e.g. Cloudflare Workers). + + - Replace the runtime `express-openapi-validator` with lightweight request + validation/coercion in `validate.ts`. The validator relies on Ajv codegen + (`new Function`), which edge runtimes disallow. It's now a dev dependency + mounted in the test suite, so requests and responses are still validated + against the OpenAPI spec — keeping the runtime validators in alignment with it. + - Add a `compress` option to `createApp` (default `true`). The `compression()` + middleware corrupts responses through the `node:http` bridge on Workers, which + compress at the edge anyway — pass `createApp({ compress: false })` there. + - Declare `@neaps/tide-database` as a direct dependency so it's externalized + from the build instead of bundled. Shrinks the published `dist` from ~30 MB to + ~20 KB and avoids the station database being bundled twice by downstream + bundlers. + +### Patch Changes + +- [#292](https://github.com/openwatersio/neaps/pull/292) [`de44633`](https://github.com/openwatersio/neaps/commit/de44633e5d20c11c462bee154aa91ebb0730688b) Thanks [@bkeepers](https://github.com/bkeepers)! - Add `s-maxage` to the `Cache-Control` header so CDNs and edge caches (e.g. Vercel, Cloudflare) cache responses, not just browsers. Uses the same TTL as `max-age` (`NEAPS_API_MAX_AGE`, default 3600). + +- Updated dependencies [[`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db), [`4bf8c60`](https://github.com/openwatersio/neaps/commit/4bf8c60df48fe24433833f1cf7a105e9f63e4b0e)]: + - neaps@0.8.0 + ## 0.6.0 ### Minor Changes diff --git a/packages/api/package.json b/packages/api/package.json index cd63f8e..76a22a0 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@neaps/api", - "version": "0.6.0", + "version": "0.7.0", "description": "HTTP JSON API for tide predictions", "repository": { "type": "git", @@ -33,7 +33,7 @@ "compression": "^1.7.4", "cors": "^2.8.5", "express": "^5.2.1", - "neaps": "^0.7.0" + "neaps": "^0.8.0" }, "devDependencies": { "@types/compression": "^1.7.5", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 568c3ff..44735d7 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,19 @@ # @neaps/cli +## 0.2.0 + +### Minor Changes + +- [#303](https://github.com/openwatersio/neaps/pull/303) [`4bf8c60`](https://github.com/openwatersio/neaps/commit/4bf8c60df48fe24433833f1cf7a105e9f63e4b0e) Thanks [@bkeepers](https://github.com/bkeepers)! - Update @neaps/tide-database to 0.9. Station prediction data now lives in an + off-heap pack file read per station instead of being parsed into the JS heap + at import, dropping baseline heap usage from ~118 MB to ~36 MB. + +### Patch Changes + +- Updated dependencies [[`4c57263`](https://github.com/openwatersio/neaps/commit/4c5726334a5a564f80c92d89292cf236eeae3dd5), [`de44633`](https://github.com/openwatersio/neaps/commit/de44633e5d20c11c462bee154aa91ebb0730688b), [`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db), [`4bf8c60`](https://github.com/openwatersio/neaps/commit/4bf8c60df48fe24433833f1cf7a105e9f63e4b0e)]: + - @neaps/api@0.7.0 + - neaps@0.8.0 + ## 0.1.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index c23a5e5..bf0b625 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@neaps/cli", - "version": "0.1.3", + "version": "0.2.0", "description": "Command line interface for Neaps tide prediction", "keywords": [ "tides", @@ -39,12 +39,12 @@ "test": "vitest" }, "dependencies": { - "@neaps/api": "^0.6.0", + "@neaps/api": "^0.7.0", "@neaps/tide-database": "0.9", "chalk": "^5.6.2", "cli-table3": "^0.6.5", "commander": "^15.0.0", - "neaps": "^0.7.0" + "neaps": "^0.8.0" }, "devDependencies": { "@types/node": "^26.0.1", diff --git a/packages/neaps/CHANGELOG.md b/packages/neaps/CHANGELOG.md index 537aa28..538379f 100644 --- a/packages/neaps/CHANGELOG.md +++ b/packages/neaps/CHANGELOG.md @@ -1,5 +1,23 @@ # neaps +## 0.8.0 + +### Minor Changes + +- [#301](https://github.com/openwatersio/neaps/pull/301) [`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db) Thanks [@bkeepers](https://github.com/bkeepers)! - Drop the CommonJS builds; all neaps packages are now ESM-only. The CJS entries + can't survive their dependencies going ESM-only, since they load them with + `require()`. CommonJS consumers on Node 20.19+ / 22.12+ can still `require()` + these packages via Node's `require(esm)` support. + +- [#303](https://github.com/openwatersio/neaps/pull/303) [`4bf8c60`](https://github.com/openwatersio/neaps/commit/4bf8c60df48fe24433833f1cf7a105e9f63e4b0e) Thanks [@bkeepers](https://github.com/bkeepers)! - Update @neaps/tide-database to 0.9. Station prediction data now lives in an + off-heap pack file read per station instead of being parsed into the JS heap + at import, dropping baseline heap usage from ~118 MB to ~36 MB. + +### Patch Changes + +- Updated dependencies [[`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db)]: + - @neaps/tide-predictor@0.11.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/neaps/package.json b/packages/neaps/package.json index 74bd186..0d2dd2e 100644 --- a/packages/neaps/package.json +++ b/packages/neaps/package.json @@ -1,6 +1,6 @@ { "name": "neaps", - "version": "0.7.0", + "version": "0.8.0", "description": "Tide predictions", "keywords": [ "tides", @@ -34,6 +34,6 @@ }, "dependencies": { "@neaps/tide-database": "0.9", - "@neaps/tide-predictor": "^0.10.0" + "@neaps/tide-predictor": "^0.11.0" } } diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index fc98f05..111c7ba 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,14 @@ # @neaps/react +## 0.2.0 + +### Minor Changes + +- [#301](https://github.com/openwatersio/neaps/pull/301) [`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db) Thanks [@bkeepers](https://github.com/bkeepers)! - Drop the CommonJS builds; all neaps packages are now ESM-only. The CJS entries + can't survive their dependencies going ESM-only, since they load them with + `require()`. CommonJS consumers on Node 20.19+ / 22.12+ can still `require()` + these packages via Node's `require(esm)` support. + ## 0.1.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index f9262ff..bc0f578 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@neaps/react", - "version": "0.1.1", + "version": "0.2.0", "description": "React components for tide predictions", "keywords": [ "tides", diff --git a/packages/tide-predictor/CHANGELOG.md b/packages/tide-predictor/CHANGELOG.md index 49c27dc..df6267b 100644 --- a/packages/tide-predictor/CHANGELOG.md +++ b/packages/tide-predictor/CHANGELOG.md @@ -1,5 +1,14 @@ # @neaps/tide-predictor +## 0.11.0 + +### Minor Changes + +- [#301](https://github.com/openwatersio/neaps/pull/301) [`36a0b23`](https://github.com/openwatersio/neaps/commit/36a0b23a3f9b69fa52efc59cc62b877b0f90c7db) Thanks [@bkeepers](https://github.com/bkeepers)! - Drop the CommonJS builds; all neaps packages are now ESM-only. The CJS entries + can't survive their dependencies going ESM-only, since they load them with + `require()`. CommonJS consumers on Node 20.19+ / 22.12+ can still `require()` + these packages via Node's `require(esm)` support. + ## 0.10.0 ### Minor Changes diff --git a/packages/tide-predictor/package.json b/packages/tide-predictor/package.json index a2fbcc7..afd9bf4 100644 --- a/packages/tide-predictor/package.json +++ b/packages/tide-predictor/package.json @@ -1,6 +1,6 @@ { "name": "@neaps/tide-predictor", - "version": "0.10.0", + "version": "0.11.0", "description": "Tide predictor", "repository": { "type": "git",