Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replacing compression with modern version #6557

Merged
merged 2 commits into from Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -91,5 +91,8 @@
"vite": "workspace:*",
"@vitejs/plugin-vue": "workspace:*"
}
},
"dependencies": {
"compress": "^0.99.0"
}
Niputi marked this conversation as resolved.
Show resolved Hide resolved
}
247 changes: 0 additions & 247 deletions packages/vite/LICENSE.md
Expand Up @@ -570,37 +570,6 @@ Repository: git+https://github.com/vuejs/core.git

---------------------------------------

## accepts
License: MIT
By: Douglas Christopher Wilson, Jonathan Ong
Repository: jshttp/accepts

> (The MIT License)
>
> Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
> Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## acorn
License: MIT
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
Expand Down Expand Up @@ -774,37 +743,6 @@ Repository: micromatch/braces

---------------------------------------

## bytes
License: MIT
By: TJ Holowaychuk, Jed Watson, Théo FIDRY
Repository: visionmedia/bytes.js

> (The MIT License)
>
> Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
> Copyright (c) 2015 Jed Watson <jed.watson@me.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## cac
License: MIT
By: egoist
Expand Down Expand Up @@ -895,69 +833,6 @@ Repository: http://github.com/substack/node-commondir.git

---------------------------------------

## compressible
License: MIT
By: Douglas Christopher Wilson, Jonathan Ong, Jeremiah Senkpiel
Repository: jshttp/compressible

> (The MIT License)
>
> Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
> Copyright (c) 2014 Jeremiah Senkpiel <fishrock123@rocketmail.com>
> Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## compression
License: MIT
By: Douglas Christopher Wilson, Jonathan Ong
Repository: expressjs/compression

> (The MIT License)
>
> Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
> Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## concat-map
License: MIT
By: James Halliday
Expand Down Expand Up @@ -2188,66 +2063,6 @@ Repository: micromatch/micromatch

---------------------------------------

## mime-db
License: MIT
By: Douglas Christopher Wilson, Jonathan Ong, Robert Kieffer
Repository: jshttp/mime-db

> The MIT License (MIT)
>
> Copyright (c) 2014 Jonathan Ong me@jongleberry.com
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.

---------------------------------------

## mime-types
License: MIT
By: Douglas Christopher Wilson, Jeremiah Senkpiel, Jonathan Ong
Repository: jshttp/mime-types

> (The MIT License)
>
> Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
> Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## minimatch
License: ISC
By: Isaac Z. Schlueter
Expand Down Expand Up @@ -2328,38 +2143,6 @@ Repository: zeit/ms

---------------------------------------

## negotiator
License: MIT
By: Douglas Christopher Wilson, Federico Romero, Isaac Z. Schlueter
Repository: jshttp/negotiator

> (The MIT License)
>
> Copyright (c) 2012-2014 Federico Romero
> Copyright (c) 2012-2014 Isaac Z. Schlueter
> Copyright (c) 2014-2015 Douglas Christopher Wilson
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## node-forge
License: (BSD-3-Clause OR GPL-2.0)
By: Digital Bazaar, Inc., Dave Longley, David I. Lehn, Stefan Siegl, Christoph Dorn
Expand Down Expand Up @@ -2816,36 +2599,6 @@ Repository: jshttp/on-finished

---------------------------------------

## on-headers
License: MIT
By: Douglas Christopher Wilson
Repository: jshttp/on-headers

> (The MIT License)
>
> Copyright (c) 2014 Douglas Christopher Wilson
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> 'Software'), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------

## once
License: ISC
By: Isaac Z. Schlueter
Expand Down
1 change: 0 additions & 1 deletion packages/vite/package.json
Expand Up @@ -79,7 +79,6 @@
"acorn": "^8.7.0",
"cac": "6.7.9",
"chokidar": "^3.5.3",
"compression": "^1.7.4",
"connect": "^3.7.0",
"connect-history-api-fallback": "^1.6.0",
"convert-source-map": "^1.8.0",
Expand Down
8 changes: 0 additions & 8 deletions packages/vite/src/node/http.ts
Expand Up @@ -94,14 +94,6 @@ export async function resolveHttpServer(
app: Connect.Server,
httpsOptions?: HttpsServerOptions
): Promise<HttpServer> {
/*
* Some Node.js packages are known to be using this undocumented function,
* notably "compression" middleware.
*/
app.prototype._implicitHeader = function _implicitHeader() {
this.writeHead(this.statusCode)
}

if (!httpsOptions) {
return require('http').createServer(app)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/preview.ts
@@ -1,7 +1,7 @@
import path from 'path'
import sirv from 'sirv'
import connect from 'connect'
import compression from 'compression'
import compression from './server/middlewares/compression'
import type { Server } from 'http'
import type { InlineConfig, ResolvedConfig } from '.'
import { resolveConfig } from '.'
Expand Down