diff --git a/.tool-versions b/.tool-versions index 1741efc..97d4701 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -deno 2.9.3 +deno 2.9.5 diff --git a/AGENTS.md b/AGENTS.md index 61045cd..1bfa6f3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,13 +49,14 @@ Follow the order below to publish a new `oak-routing-ctrl` library version: - the release version must match the most recent value found in `CHANGELOG.md` - if unsure which release version to use, you must ask the user - if the release branch is not yet created, create & switch to it +- Ensure that `CHANGELOG.md` mentions the latest changes (as per git diff) - Commit current code & create a release PR on GitHub - the release commit always has this format: `vx.x.x - see CHANGELOG for details` -- Once the PR is approved & merged to `master`, switch to `master` +- Once the PR is approved & merged to `main`, switch to `main` - Run `deno publish --dry-run` to ensure everything is appropriate, e.g. the value of the field `version` in `deno.jsonc` and the git tag, and the corresponding release note in CHANGELOG.md, all must be consistent with one another -- Create a new git tag on `master` branch following the format `vx.x.x`. This - will trigger the library publishing GitHub workflow +- Create a new git tag on `main` branch following the format `vx.x.x`. This will + trigger the library publishing GitHub workflow diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c7efb..fb9e849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.1.1] - 2026-08-08 + +### Changed + +- upgraded dependencies: `npm:@asteasolutions/zod-to-openapi@^9.1.0`, + `jsr:@std/path@^1.1.6`, `jsr:@std/testing@^1.0.20` +- upgraded runtime from Deno v2.9.3 to v2.9.5 + ## [1.1.0] - 2026-07-01 ### Added diff --git a/deno.jsonc b/deno.jsonc index d492675..46afdf7 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@dklab/oak-routing-ctrl", - "version": "1.1.0", + "version": "1.1.1", "exports": { ".": "./mod.ts", "./mod": "./mod.ts" @@ -22,12 +22,12 @@ "e2e-test": "cd e2e_tests && deno test --allow-import --allow-env=DEBUG --allow-net=0.0.0.0,127.0.0.1" }, "imports": { - "@asteasolutions/zod-to-openapi": "npm:@asteasolutions/zod-to-openapi@^8.5.0", + "@asteasolutions/zod-to-openapi": "npm:@asteasolutions/zod-to-openapi@^9.1.0", "@oak/oak": "jsr:@oak/oak@^17.2.0", "@std/assert": "jsr:@std/assert@^1.0.19", "@std/io": "jsr:@std/io@^0.225.3", - "@std/path": "jsr:@std/path@^1.1.5", - "@std/testing": "jsr:@std/testing@^1.0.19", + "@std/path": "jsr:@std/path@^1.1.6", + "@std/testing": "jsr:@std/testing@^1.0.20", "zod": "npm:zod@^4.4.3", "superoak": "https://deno.land/x/superoak@5.0.0/mod.ts" }, diff --git a/deno.lock b/deno.lock index b8ddbc5..6306736 100644 --- a/deno.lock +++ b/deno.lock @@ -8,26 +8,27 @@ "jsr:@std/assert@^1.0.19": "1.0.19", "jsr:@std/bytes@1": "1.0.6", "jsr:@std/bytes@^1.0.6": "1.0.6", - "jsr:@std/cli@^1.0.30": "1.0.30", + "jsr:@std/cli@^1.0.31": "1.0.32", "jsr:@std/crypto@1": "1.1.0", - "jsr:@std/encoding@1": "1.0.10", - "jsr:@std/encoding@^1.0.10": "1.0.10", + "jsr:@std/encoding@1": "1.0.11", + "jsr:@std/encoding@^1.0.11": "1.0.11", "jsr:@std/fmt@^1.0.10": "1.0.10", "jsr:@std/fs@^1.0.24": "1.0.24", "jsr:@std/html@^1.0.7": "1.0.7", - "jsr:@std/http@1": "1.1.1", - "jsr:@std/http@^1.0.16": "1.1.1", + "jsr:@std/http@1": "1.1.2", + "jsr:@std/http@^1.0.16": "1.1.2", "jsr:@std/internal@^1.0.12": "1.0.14", "jsr:@std/internal@^1.0.14": "1.0.14", "jsr:@std/io@~0.225.3": "0.225.3", "jsr:@std/media-types@1": "1.1.0", "jsr:@std/media-types@^1.1.0": "1.1.0", "jsr:@std/net@^1.0.6": "1.0.6", - "jsr:@std/path@1": "1.1.5", - "jsr:@std/path@^1.1.5": "1.1.5", + "jsr:@std/path@1": "1.1.6", + "jsr:@std/path@^1.1.5": "1.1.6", + "jsr:@std/path@^1.1.6": "1.1.6", "jsr:@std/streams@^1.1.1": "1.1.1", - "jsr:@std/testing@^1.0.19": "1.0.19", - "npm:@asteasolutions/zod-to-openapi@^8.5.0": "8.5.0_zod@4.4.3", + "jsr:@std/testing@^1.0.20": "1.0.20", + "npm:@asteasolutions/zod-to-openapi@^9.1.0": "9.1.0_zod@4.4.3", "npm:path-to-regexp@^6.3.0": "6.3.0", "npm:zod@^4.4.3": "4.4.3" }, @@ -64,14 +65,14 @@ "@std/bytes@1.0.6": { "integrity": "f6ac6adbd8ccd99314045f5703e23af0a68d7f7e58364b47d2c7f408aeb5820a" }, - "@std/cli@1.0.30": { - "integrity": "769446536522d0417d7127ebcabcafac1ab0ce6766d0eb3fca1d36326fe98d13" + "@std/cli@1.0.32": { + "integrity": "188b3a100d6202d64e3f5bd3d799c7fa4f6d77f92cc65eb7f641c1fa0aa92a66" }, "@std/crypto@1.1.0": { "integrity": "b8d6d0a6377a32b213af2661ed7bf1062d94feac0c57def5526a8e74a95c3ec8" }, - "@std/encoding@1.0.10": { - "integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1" + "@std/encoding@1.0.11": { + "integrity": "e7cef2f0b3153bccc17431e7c864a1de03a4b6d9647389c43e08aaa775d37385" }, "@std/fmt@1.0.10": { "integrity": "90dfba288802ac6de82fb31d0917eb9e4450b9925b954d5e51fc29ac07419db5" @@ -85,17 +86,17 @@ "@std/html@1.0.7": { "integrity": "175c818905a6e75743c69c251395e273d82698e58cfe7dd76268d70e28b8d8fe" }, - "@std/http@1.1.1": { - "integrity": "e343a9a80aea07c716b91be5c79df764144430ad2dd7c9121ed7443f08dc74f7", + "@std/http@1.1.2": { + "integrity": "1c0473590d5e5b75b30b2be4833c08047dd799aeea35624fd34ec58d67fc9240", "dependencies": [ "jsr:@std/cli", - "jsr:@std/encoding@^1.0.10", + "jsr:@std/encoding@^1.0.11", "jsr:@std/fmt", "jsr:@std/fs", "jsr:@std/html", "jsr:@std/media-types@^1.1.0", "jsr:@std/net", - "jsr:@std/path@^1.1.5", + "jsr:@std/path@^1.1.6", "jsr:@std/streams" ] }, @@ -114,8 +115,8 @@ "@std/net@1.0.6": { "integrity": "110735f93e95bb9feb95790a8b1d1bf69ec0dc74f3f97a00a76ea5efea25500c" }, - "@std/path@1.1.5": { - "integrity": "ccea00982ea28c36becaf6e62f855406c76a8c32d462f66f415bbb7d83a271bc", + "@std/path@1.1.6": { + "integrity": "c68485c2a4dfbb5ae3cc74fae4e8c4e5d874cf8a8ed12927917235c758b46cbe", "dependencies": [ "jsr:@std/internal@^1.0.14" ] @@ -123,26 +124,26 @@ "@std/streams@1.1.1": { "integrity": "92556d350e537e9dce527a6d08f6f15be3ff65e656079dea69d15252187c7613" }, - "@std/testing@1.0.19": { - "integrity": "f4236172365b216728dc3cc8b5e80a9f4c33083d1e4ede7613d5b25b4014898e", + "@std/testing@1.0.20": { + "integrity": "21380ed438672762e4ec549cbf4fe41c5b68f5598773a30b64abe7375513e721", "dependencies": [ "jsr:@std/assert@^1.0.19", "jsr:@std/fs", "jsr:@std/internal@^1.0.14", - "jsr:@std/path@^1.1.5" + "jsr:@std/path@^1.1.6" ] } }, "npm": { - "@asteasolutions/zod-to-openapi@8.5.0_zod@4.4.3": { - "integrity": "sha512-SABbKiObg5dLRiTFnqiW1WWwGcg1BJfmHtT2asIBnBHg6Smy/Ms2KHc650+JI4Hw7lSkdiNebEGXpwoxfben8Q==", + "@asteasolutions/zod-to-openapi@9.1.0_zod@4.4.3": { + "integrity": "sha512-pLMeRgRYS7/vZIgAAkOe2P6+XGTifR1MT9pqDoxZ11EmcJJ+DPmdPqLN8ZZF4U8R9KHCCQCS9c2wtuE8wSrfkw==", "dependencies": [ "openapi3-ts", "zod" ] }, - "openapi3-ts@4.6.0": { - "integrity": "sha512-a4sfn6L2sIShhtzJqmjGrARvxAW/3F2BJDdyRVvNF9VhAsZSh5hSyI3a9TNvmzBxXmq66nY5LNT5bQcBxYAZZg==", + "openapi3-ts@4.6.1": { + "integrity": "sha512-XW9MOldkhoICNeXVzzmXzmOW5G73ppOEGmh7fLCqHjgfdEYCGGN+00MlVCeUZgovjjfC56j9tvtDt1zGabNjjA==", "dependencies": [ "yaml" ] @@ -224,9 +225,9 @@ "jsr:@oak/oak@^17.2.0", "jsr:@std/assert@^1.0.19", "jsr:@std/io@~0.225.3", - "jsr:@std/path@^1.1.5", - "jsr:@std/testing@^1.0.19", - "npm:@asteasolutions/zod-to-openapi@^8.5.0", + "jsr:@std/path@^1.1.6", + "jsr:@std/testing@^1.0.20", + "npm:@asteasolutions/zod-to-openapi@^9.1.0", "npm:zod@^4.4.3" ] } diff --git a/src/oasStore_test.ts b/src/oasStore_test.ts index 99dcb5a..d1a696e 100644 --- a/src/oasStore_test.ts +++ b/src/oasStore_test.ts @@ -1,6 +1,7 @@ import { z } from "./utils/schema_utils.ts"; import { assertEquals, assertInstanceOf } from "@std/assert"; import { ZodObject } from "zod"; +import type { ZodMediaTypeObject } from "@asteasolutions/zod-to-openapi"; import { oasStore, patchOasPath, updateOas } from "./oasStore.ts"; import { _internal } from "./oasStore.ts"; @@ -41,11 +42,13 @@ Deno.test("store entry creation & update", () => { }, }); - const record = oasStore.get(getRouteId("FILLED_LATER", fnName, method, path)); + const entryPath = getRouteId("FILLED_LATER", fnName, method, path); + const record = oasStore.get(entryPath); assertEquals(record?.method, method); assertEquals(record?.path, getOasCompatPath(path)); assertInstanceOf( - record?.request?.body?.content?.["application/json"]?.schema, + (record?.request?.body?.content?.["application/json"] as ZodMediaTypeObject) + ?.schema, ZodObject, ); @@ -56,7 +59,8 @@ Deno.test("store entry creation & update", () => { assertEquals(patchedRecord?.method, method); assertEquals(patchedRecord?.path, getOasCompatPath(patchedPath)); assertInstanceOf( - record?.request?.body?.content?.["application/json"]?.schema, + (patchedRecord?.request?.body?.content + ?.["application/json"] as ZodMediaTypeObject)?.schema, ZodObject, ); });