-
Notifications
You must be signed in to change notification settings - Fork 858
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
[2.0.2] peerDependency warning with the new release #703
Comments
Hi thanks for your report. Those types provide a better developer experience in your IDE with autocompletion; Also in non-typescript projects. Perhaps the yarn warning can suppressed by marking as optional: "peerDependenciesMeta": {
"@types/express": {
"optional": true
}
}, https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependenciesmeta
I have to double check if this will solve the issue. |
Specifying the |
We are utilizing "http-proxy-middleware" (and "express") in a custom package which is meant to be used by other packages. It only provides a command in its package.json ("bin") which can be executed (no "js" / "typescript" coding involved). Since the last change we now get the warning for every usage of our custom package. Does it really make sense to require adding "@types/express" to every usage of our package to resolve the warning? Seems contra intuitive to me. We could add "@types/express" to the normal dependencies of our custom package to avoid the warning but this feels weird as types are usually added as "devDependency"... In addition to this I think it is not the job of "http-proxy-middleware" to enforce / require adding "@types/express". If it is anyones job "express" should do that (but I wouldn't encourage that either)... Can you please revert this change? |
fixed in |
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
Latest version requires
@types/express
as a peerDependency, printing warnings for non-typescript projects as well.Step-by-step reproduction instructions
Expected behavior (be clear and concise)
No warnings when installing package. Don't require users to install
@types
packages as if everyone is using typescript.How is http-proxy-middleware used in your project?
via `webpack-dev-server`, like half the web.
What http-proxy-middleware configuration are you using?
Irrelevant
What OS/version and node/version are you seeing the problem?
Additional context (optional)
Regressed by #700
The text was updated successfully, but these errors were encountered: