-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(deps): add webpack-cli to peers #2191
Conversation
@@ -114,7 +114,13 @@ | |||
"webpack-cli": "^3.3.6" | |||
}, | |||
"peerDependencies": { | |||
"webpack": "^4.0.0" | |||
"webpack": "^4.0.0", | |||
"webpack-cli": "^3.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove webpack-cli
from here, this line break CFA, vue-cli, angular-cli and etc big boilerplates
/cc @arcanis it is require what |
Codecov Report
@@ Coverage Diff @@
## master #2191 +/- ##
=======================================
Coverage 93.91% 93.91%
=======================================
Files 34 34
Lines 1282 1282
Branches 370 370
=======================================
Hits 1204 1204
Misses 71 71
Partials 7 7
Continue to review full report at Codecov.
|
Yes. The
Again, if you can't only because it would cause warnings to appear for npm's users then I'd say it's too bad because omitting the peer dependencies will cause both npm and Yarn to silently generate invalid dependency trees, whereas warnings will only cause a slight temporary discomfort at worst. Does it actually break something? As in, a consumer stops working altogether? |
@arcanis do you know other developers, they starts create a lot of issues and send PRs with removing this, we want remove bin for webpack-dev-server@4 so i think better avoid this right now for webpack-dev-server@3 |
Optional peer dependencies work for Yarn 1, Yarn 2, pnpm 3.2+, and (planned for) npm 6.11+.
I sympathise, however note that the same is also true for us - we get issues telling us that Yarn is installing dependencies the wrong way etc, and after digging we notice it's caused by undeclared dependencies like this. Plus I guess you still get PRs to add it, in the end 😄 |
@arcanis but here not |
They are; that's how optional peer dependencies work. It's not a Instead, the The peer dependencies still have to be declared in |
@arcanis thansk for clarify, maybe we should wait npm/cli#224 before merge and release this |
Make webpack-cli optional peer
@evilebottnawi I don't know how to make the checks pass though. Failures seem unrelated. |
We need to wait for npm to be updated in Node.js. |
It seems to be the case. Any news on this? |
@evilebottnawi @hiroppy I've opened another PR (#2396) that uses a smoother pattern and doesn't print any warnings even on older package managers. Can one of you give it a look and tell me how it looks? We plan to release Yarn 2 next week, it would be nice to sort this out before then if possible 😀 |
Fixed for yarn v2, feel free to feedback |
Follow-up on #2188 according to #2188 (comment)
For Bugs and Features; did you add new tests?
Can publish a package with this PR and see if it actually works but these kind of fixes have been done multiple times to make yarn v2 happy. Considering
webpack-dev-server
throws at runtime anyway ifwebpack-cli
is missing this shouldn't bother anyoneMotivation / Use-Case
yarn v2 throws currently with
Breaking Changes
I guess this new warning might be annoying if you don't run the
webpack-dev-server
cli. If this is a blocker I can try and see if https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-optional-peer-dependencies.md works for yarn v2.Additional Info
https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-optional-peer-dependencies.md