chore(): Fix dependencies (#13932)

This commit is contained in:
Adrien de Peretti authored and GitHub committed 2025-11-02 17:46:46 +01:00
1 parent 990691e78a
commit 37563987b8
23 files changed
+854 -508

No files matched your search

+2 -2
View File
@@ -77,7 +77,7 @@
"ioredis": "^5.4.1",
"jest": "^29.7.0",
"rimraf": "^5.0.1",
"supertest": "^4.0.2",
"supertest": "^7.1.4",
"typescript": "^5.6.2",
"vite": "^5.4.14"
},
@@ -102,7 +102,7 @@
"jsonwebtoken": "^9.0.2",
"lodash.memoize": "^4.1.2",
"morgan": "^1.9.1",
"path-to-regexp": "^0.1.12",
"path-to-regexp": "^8.2.0",
"tsconfig-paths": "^4.2.0",
"zod": "3.25.76",
"zod-validation-error": "3.5.1"
@@ -1,5 +1,6 @@
import pathToRegexp from "path-to-regexp"
import { pathToRegexp } from "path-to-regexp"
import type { MiddlewareVerb, RouteVerb } from "./types"
import { isString } from "@medusajs/utils"
export class RoutesFinder<
T extends
@@ -35,9 +36,17 @@ export class RoutesFinder<
* Register route for lookup
*/
add(route: T) {
// Doing a replacement for backwards compatibility with the old path-to-regexp with express 4
let normalizedPath = route.matcher
if (isString(route.matcher)) {
// Replace /* with {*splat} (wildcard matches zero or more path segments)
normalizedPath = normalizedPath.replace(/\/\*/g, "{*splat}")
// Replace /path* (no slash before asterisk) with /path{*splat}
normalizedPath = normalizedPath.replace(/(\w)\*/g, "$1{*splat}")
}
this.#routes.push({
...route,
matchRegex: pathToRegexp(route.matcher),
matchRegex: pathToRegexp(normalizedPath).regexp,
})
}
@@ -24,7 +24,7 @@ export function shouldCompressResponse(
}
// fallback to standard filter function
return compression.filter(req, res)
return compression.filter(req as any, res as any)
}
export function compressionOptions(