Skip to content

Commit 3756398

Browse files
authored
chore(): Fix dependencies (medusajs#13932)
1 parent 990691e commit 3756398

File tree

23 files changed

+862
-516
lines changed

23 files changed

+862
-516
lines changed

.changeset/tame-eels-cover.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@medusajs/medusa": patch
3+
"@medusajs/test-utils": patch
4+
"@medusajs/analytics-posthog": patch
5+
"@medusajs/file-s3": patch
6+
"@medusajs/notification-sendgrid": patch
7+
"@medusajs/draft-order": patch
8+
"@medusajs/framework": patch
9+
"@medusajs/utils": patch
10+
"create-medusa-app": patch
11+
"@medusajs/telemetry": patch
12+
"@medusajs/admin-bundler": patch
13+
"@medusajs/admin-vite-plugin": patch
14+
"@medusajs/icons": patch
15+
"@medusajs/toolbox": patch
16+
"@medusajs/ui": patch
17+
---
18+
19+
chore(): Fix dependencies vulnerabilities

integration-tests/http/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@medusajs/user": "workspace:^",
3434
"@medusajs/utils": "workspace:^",
3535
"@medusajs/workflow-engine-inmemory": "workspace:*",
36-
"form-data": "^4.0.0",
36+
"form-data": "^4.0.4",
3737
"jsonwebtoken": "^9.0.2",
3838
"pg": "^8.11.3"
3939
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@types/node": "^20.12.11",
2424
"@typescript-eslint/eslint-plugin": "^6.19.0",
2525
"@typescript-eslint/parser": "^6.19.0",
26-
"axios": "^1.12.0",
26+
"axios": "^1.13.1",
2727
"axios-mock-adapter": "^1.19.0",
2828
"cross-env": "^7.0.3",
2929
"eslint": "^8.23.0",

packages/admin/admin-bundler/src/commands/serve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function serve(options: ServeOptions) {
4242
res.setHeader("Vary", "Origin, Cache-Control")
4343
}
4444

45-
router.use(compression())
45+
router.use(compression() as any)
4646

4747
router.get("/", sendHtml)
4848
router.use(

packages/admin/admin-vite-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@babel/traverse": "7.25.6",
4242
"@babel/types": "7.25.6",
4343
"@medusajs/admin-shared": "2.11.2",
44-
"chokidar": "3.5.3",
44+
"chokidar": "^3.5.3",
4545
"fdir": "6.1.1",
4646
"magic-string": "0.30.5",
4747
"outdent": "^0.8.0",

packages/cli/create-medusa-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"slugify": "^1.6.6",
2828
"uuid": "^9.0.0",
2929
"validator": "^13.15.20",
30-
"wait-on": "^7.0.1",
30+
"wait-on": "^9.0.1",
3131
"winston": "^3.9.0"
3232
},
3333
"devDependencies": {

packages/cli/create-medusa-app/src/utils/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import winston from "winston"
22

33
const consoleTransport = new winston.transports.Console({
4-
format: winston.format.printf((log) => log.message),
4+
format: winston.format.printf((log) => log.message as string),
55
})
66
const options = {
77
transports: [consoleTransport],

packages/core/framework/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"ioredis": "^5.4.1",
7878
"jest": "^29.7.0",
7979
"rimraf": "^5.0.1",
80-
"supertest": "^4.0.2",
80+
"supertest": "^7.1.4",
8181
"typescript": "^5.6.2",
8282
"vite": "^5.4.14"
8383
},
@@ -102,7 +102,7 @@
102102
"jsonwebtoken": "^9.0.2",
103103
"lodash.memoize": "^4.1.2",
104104
"morgan": "^1.9.1",
105-
"path-to-regexp": "^0.1.12",
105+
"path-to-regexp": "^8.2.0",
106106
"tsconfig-paths": "^4.2.0",
107107
"zod": "3.25.76",
108108
"zod-validation-error": "3.5.1"

packages/core/framework/src/http/routes-finder.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import pathToRegexp from "path-to-regexp"
1+
import { pathToRegexp } from "path-to-regexp"
22
import type { MiddlewareVerb, RouteVerb } from "./types"
3+
import { isString } from "@medusajs/utils"
34

45
export class RoutesFinder<
56
T extends
@@ -35,9 +36,17 @@ export class RoutesFinder<
3536
* Register route for lookup
3637
*/
3738
add(route: T) {
39+
// Doing a replacement for backwards compatibility with the old path-to-regexp with express 4
40+
let normalizedPath = route.matcher
41+
if (isString(route.matcher)) {
42+
// Replace /* with {*splat} (wildcard matches zero or more path segments)
43+
normalizedPath = normalizedPath.replace(/\/\*/g, "{*splat}")
44+
// Replace /path* (no slash before asterisk) with /path{*splat}
45+
normalizedPath = normalizedPath.replace(/(\w)\*/g, "$1{*splat}")
46+
}
3847
this.#routes.push({
3948
...route,
40-
matchRegex: pathToRegexp(route.matcher),
49+
matchRegex: pathToRegexp(normalizedPath).regexp,
4150
})
4251
}
4352

packages/core/framework/src/http/utils/http-compression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function shouldCompressResponse(
2424
}
2525

2626
// fallback to standard filter function
27-
return compression.filter(req, res)
27+
return compression.filter(req as any, res as any)
2828
}
2929

3030
export function compressionOptions(

0 commit comments

Comments
 (0)