Skip to content

Commit

Permalink
chore: bump sirv version, remove decoded url reset
Browse files Browse the repository at this point in the history
  • Loading branch information
hannoeru committed Aug 27, 2021
1 parent 501bd03 commit 49f1c52
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -51,7 +51,7 @@
"prompts": "^2.4.1",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"sirv": "^1.0.16",
"sirv": "^1.0.17",
"ts-jest": "^27.0.4",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Expand Up @@ -113,7 +113,7 @@
"resolve.exports": "^1.0.2",
"rollup-plugin-license": "^2.5.0",
"selfsigned": "^1.10.11",
"sirv": "^1.0.16",
"sirv": "^1.0.17",
"source-map": "^0.6.1",
"source-map-support": "^0.5.19",
"strip-ansi": "^6.0.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/vite/src/node/server/middlewares/static.ts
Expand Up @@ -80,8 +80,6 @@ export function serveStaticMiddleware(
redirected = redirected.slice(dir.length)
}
req.url = redirected
// reset sirv decoded url
delete req._decoded
}

serve(req, res, next)
Expand All @@ -107,8 +105,6 @@ export function serveRawFsMiddleware(
if (isWindows) url = url.replace(/^[A-Z]:/i, '')

req.url = url
// reset sirv decoded url
delete req._decoded
serveFromRoot(req, res, next)
} else {
next()
Expand Down
1 change: 0 additions & 1 deletion packages/vite/types/connect.d.ts
Expand Up @@ -15,7 +15,6 @@ export namespace Connect {

export class IncomingMessage extends http.IncomingMessage {
originalUrl?: http.IncomingMessage['url']
_decoded?: string
}

export type NextFunction = (err?: any) => void
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Expand Up @@ -877,10 +877,10 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.17.tgz#25fdbdfd282c2f86ddf3fcefbd98be99cd2627e2"
integrity sha512-0p1rCgM3LLbAdwBnc7gqgnvjHg9KpbhcSphergHShlkWz8EdPawoMJ3/VbezI0mGC5eKCDzMaPgF9Yca6cKvrg==

"@polka/url@^1.0.0-next.19":
version "1.0.0-next.19"
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.19.tgz#2c94db828794aa53e7a420809dac870348819233"
integrity sha512-kHR9OHwP9WLpyC0i/WCAQCgf5hXkR9C+/21qxmrn+YwRlDRnBlqrcrFpXxhJTA9LDHJWa/FjoO2LJ12q8iWlEQ==
"@polka/url@^1.0.0-next.20":
version "1.0.0-next.20"
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.20.tgz#111b5db0f501aa89b05076fa31f0ea0e0c292cd3"
integrity sha512-88p7+M0QGxKpmnkfXjS4V26AnoC/eiqZutE8GLdaI5X12NY75bXSdTY9NkmYb2Xyk1O+MmkuO6Frmsj84V6I8Q==

"@rollup/plugin-alias@^3.1.5":
version "3.1.5"
Expand Down Expand Up @@ -6986,12 +6986,12 @@ sirv@^1.0.12:
mime "^2.3.1"
totalist "^1.0.0"

sirv@^1.0.16:
version "1.0.16"
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.16.tgz#9caadfc46c264a38ad1c38c99259692fbf76ed10"
integrity sha512-x56DISeIgSUGVJrQS3mwu+UvtnzHenKDFBQL+UlAswxwk9b2Cpc0KGVvftoIJZgweOOXbMZzyXFYgVElOuSI1Q==
sirv@^1.0.17:
version "1.0.17"
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.17.tgz#86e2c63c612da5a1dace1c16c46f524aaa26ac45"
integrity sha512-qx9go5yraB7ekT7bCMqUHJ5jEaOC/GXBxUWv+jeWnb7WzHUFdcQPGWk7YmAwFBaQBrogpuSqd/azbC2lZRqqmw==
dependencies:
"@polka/url" "^1.0.0-next.19"
"@polka/url" "^1.0.0-next.20"
mime "^2.3.1"
totalist "^1.0.0"

Expand Down

0 comments on commit 49f1c52

Please sign in to comment.