Skip to content

Commit

Permalink
upgrade polka
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 13, 2021
1 parent 7b1d40d commit 8450681
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 1 addition & 10 deletions packages/adapter-node/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8450681

Please sign in to comment.