From 7c5162a03a6f461567ac64fd631ead27ae78e96b Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Mon, 24 May 2021 15:13:02 -0700 Subject: [PATCH] chore(sirv): bump `@polka/url` version --- packages/sirv/index.js | 4 ++-- packages/sirv/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sirv/index.js b/packages/sirv/index.js index aac68b7..f3f4015 100644 --- a/packages/sirv/index.js +++ b/packages/sirv/index.js @@ -1,7 +1,7 @@ import * as fs from 'fs'; import { join, normalize, resolve } from 'path'; +import { parse } from '@polka/url'; import list from 'totalist/sync'; -import parser from '@polka/url'; import mime from 'mime/lite'; const noop = () => {}; @@ -160,7 +160,7 @@ export default function (dir, opts={}) { if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots); extns.push(...extensions); // [...br, ...gz, orig, ...exts] - let pathname = req.path || parser(req, true).pathname; + let pathname = req.path || parse(req, true).pathname; let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns); if (!data) return next ? next() : isNotFound(req, res); diff --git a/packages/sirv/package.json b/packages/sirv/package.json index 0307e97..c66f657 100644 --- a/packages/sirv/package.json +++ b/packages/sirv/package.json @@ -20,7 +20,7 @@ "node": ">= 10" }, "dependencies": { - "@polka/url": "^1.0.0-next.9", + "@polka/url": "^1.0.0-next.15", "mime": "^2.3.1", "totalist": "^1.0.0" }