From c1b16c8c630c2b7ff71deddf1ec2a8668be5e3b8 Mon Sep 17 00:00:00 2001 From: KaKa <23028015+climba03003@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:35:29 +0800 Subject: [PATCH] chore(8.x): bump path-to-regexp to 8.1.0 (#213) --- lib/engine.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/engine.js b/lib/engine.js index 0599222..a697d6e 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -20,10 +20,10 @@ function middie (complete) { let regexp if (url) { - regexp = pathToRegexp(sanitizePrefixUrl(url), [], { - end: false, - strict: false + const pathRegExp = pathToRegexp(sanitizePrefixUrl(url), { + end: false }) + regexp = pathRegExp.regexp } if (Array.isArray(f)) { diff --git a/package.json b/package.json index 7c5ceee..92ff830 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@fastify/error": "^3.2.0", "fastify-plugin": "^4.0.0", - "path-to-regexp": "^6.1.0", + "path-to-regexp": "^8.1.0", "reusify": "^1.0.4" }, "publishConfig": {