From 8450681e25ffa36dc5fb07abdf37e341454b17ec Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Fri, 13 Aug 2021 15:14:32 -0700 Subject: [PATCH] upgrade polka --- packages/adapter-node/package.json | 2 +- packages/adapter-node/src/server.js | 11 +---------- pnpm-lock.yaml | 8 ++++---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json index ffe1617692c9..c360eb88f732 100644 --- a/packages/adapter-node/package.json +++ b/packages/adapter-node/package.json @@ -31,7 +31,7 @@ "c8": "^7.7.2", "compression": "^1.7.4", "node-fetch": "^3.0.0-beta.9", - "polka": "^1.0.0-next.15", + "polka": "^1.0.0-next.16", "rollup": "^2.55.0", "sirv": "^1.0.12", "uvu": "^0.5.1" diff --git a/packages/adapter-node/src/server.js b/packages/adapter-node/src/server.js index 4ad7284aef77..25090b4b3f61 100644 --- a/packages/adapter-node/src/server.js +++ b/packages/adapter-node/src/server.js @@ -57,16 +57,7 @@ export function createServer({ render }) { } : noop_handler; - const server = polka(); - // workaround https://github.com/lukeed/polka/issues/142 - // until https://github.com/lukeed/polka/pull/172 is merged and released - // Polka has a non-standard behavior of decoding the request path - // Disable it so that adapter-node works just like the rest - // SvelteKit will handle decoding URI components into req.params - server.parse = (req) => { - return parse(req, false); - }; - server.use( + const server = polka().use( compression({ threshold: 0 }), sirv_workaround_handler, assets_handler, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81ac37d79b99..e0f039be2806 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,7 +95,7 @@ importers: compression: ^1.7.4 esbuild: ^0.12.5 node-fetch: ^3.0.0-beta.9 - polka: ^1.0.0-next.15 + polka: ^1.0.0-next.16 rollup: ^2.55.0 sirv: ^1.0.12 tiny-glob: ^0.2.9 @@ -110,7 +110,7 @@ importers: c8: 7.7.2 compression: 1.7.4 node-fetch: 3.0.0-beta.9 - polka: 1.0.0-next.15 + polka: 1.0.0-next.16 rollup: 2.55.0 sirv: 1.0.12 uvu: 0.5.1 @@ -3015,8 +3015,8 @@ packages: engines: {node: '>=10.13.0'} dev: true - /polka/1.0.0-next.15: - resolution: {integrity: sha512-zBCZO40+USkSj0GDHMqufthqk4TIRc9xVGd50LbMvYNEwGHK8dZczLBQtw9pPHBM+i/Xg7ed7+c+r6J68XkWLg==} + /polka/1.0.0-next.16: + resolution: {integrity: sha512-oTipKVQSdyugiPpU13pliPkjrycwfiiUf3y9qKCZ2oQlxb1GEkJ3lGqSDFNGF8B2x58bPrW1Lef7IYwE9iu4IQ==} engines: {node: '>=8'} dependencies: '@polka/url': 1.0.0-next.15