-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(essentials): yarn add --peer
and --dev
do not work when used together
#4800
Conversation
… flat arrays easy
…to prevent confusion
--peer
, --dev
not working--peer
and --dev
do not work when used together
c303386
to
721735e
Compare
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.
Thanks for the PR, please add some tests to https://github.com/yarnpkg/berry/blob/15c481dce19f1a7e56b875b96f11c9ef67dc4c2d/packages/acceptance-tests/pkg-tests-specs/sources/commands/add.test.ts to verify that the new behaviour works and to prevent regression.
721735e
to
de54cb6
Compare
Thanks for the quick review! I added a new test to this commit de54cb6 . |
Thanks! |
…together (#4800) * refactor(essentials): replace tuple arrays with object arrays, making flat arrays easy * refactor(essentials): rename `suggestions` to `suggestedDescriptors` to prevent confusion * fix(essentials): yarn add `--peer`, `--dev` not working at the same time * test: add test for `yarn add --dev --peer` usage
What's the problem this PR addresses?
Yarn add
--peer
and--dev
do not work when used togetherResolves #4691
...
How did you fix it?
Let the return value of the
suggestTarget
function of thepackages/plugin-essentials/sources/commands/add.ts
file change fromsuggestUtils.Target
tosuggestUtils.Target[]
, It is possible to add different types of dependencies at once...
Checklist