From 9e00bd6902a0e36f6dae2743a084df1e9b2b0973 Mon Sep 17 00:00:00 2001 From: dk <2597375+Thesephi@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:03:23 +0100 Subject: [PATCH] v0.14.2 - see CHANGELOG for details --- CHANGELOG.md | 7 +++++++ deno.jsonc | 2 +- src/Controller.ts | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64a976f..3988038 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.14.2] - 2025-03-03 + +### Fixed + +- posix style is enforced when assigning paths in `@Controller` (so it still + works when running on Windows platform) + ## [0.14.1] - 2025-02-23 ### Changed diff --git a/deno.jsonc b/deno.jsonc index ad7a014..bab62e6 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@dklab/oak-routing-ctrl", - "version": "0.14.1", + "version": "0.14.2", "exports": { ".": "./mod.ts", "./mod": "./mod.ts" diff --git a/src/Controller.ts b/src/Controller.ts index 3dcfc7f..7df5cba 100644 --- a/src/Controller.ts +++ b/src/Controller.ts @@ -1,4 +1,4 @@ -import { join } from "@std/path"; +import { join } from "@std/path/posix"; import { debug } from "./utils/logger.ts"; import { store } from "./Store.ts"; import { patchOasPath } from "./oasStore.ts"; @@ -38,7 +38,7 @@ export const Controller = if (!pair) continue; const patchedPair = new Map(); pair.forEach((verb, path) => { - const fullPath = join(pathPrefix, path); + const fullPath = join(pathPrefix, path); // @NOTE **must** be posix style patchedPair.set(fullPath, verb); debug( `[${ctrlClassName}] @Controller: patched [${verb}] ${path} to ${fullPath}`,