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

ENHANCEMENT: throw when converting npm install foo to yarn install foo #6966

Merged
merged 1 commit into from Apr 19, 2017

Conversation

pichfl
Copy link
Contributor

@pichfl pichfl commented Apr 19, 2017

This was found while debugging a yarn related issue in Ember Electron. This was not very visible as most authors would probably include either the save or the save-dev flag, but as we had a typo in there in lead to an interesting bug hunt.

npm install foo installs a package without saving it to package.json which is not an option in yarn (at least none that I know of). Therefore yarn install foo is no longer an equivalent command.

This changed rather recently as yarn printed a deprecation warning pointing to yarn add before, but this is no longer the case in 0.23.2.

…n install foo`

- throw when option.packages exists but neither options.save nor options['save-dev']
- test
@kellyselden
Copy link
Member

LGTM. Thanks!

@homu r+

@homu
Copy link
Contributor

homu commented Apr 19, 2017

📌 Commit 7d0ca1e has been approved by kellyselden

@homu
Copy link
Contributor

homu commented Apr 19, 2017

⚡ Test exempted - status

@homu homu merged commit 7d0ca1e into ember-cli:master Apr 19, 2017
homu added a commit that referenced this pull request Apr 19, 2017
ENHANCEMENT: throw when converting `npm install foo` to `yarn install foo`

This was found while debugging a yarn related issue in Ember Electron. This was not very visible as most authors would probably include either the save or the save-dev flag, but as we had a typo in there in lead to an interesting bug hunt.

`npm install foo` installs a package without saving it to package.json which is not an option in yarn (at least none that I know of). Therefore `yarn install foo` is no longer an equivalent command.

This changed rather recently as `yarn` printed a deprecation warning pointing to `yarn add` before, but this is no longer the case in 0.23.2.
@pichfl pichfl deleted the patch-1 branch April 19, 2017 19:32
@Turbo87 Turbo87 added the bug label May 2, 2017
homu added a commit that referenced this pull request May 2, 2017
npmTask should throw when trying to convert `npm install foo` to `yarn install foo`

backport of #6966

/cc @pichfl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants