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

upgrade-interactive makes confusion with dependency versions #1875

Open
daltones opened this issue Nov 16, 2016 · 5 comments
Open

upgrade-interactive makes confusion with dependency versions #1875

daltones opened this issue Nov 16, 2016 · 5 comments
Labels

Comments

@daltones
Copy link

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
Command upgrade-interactive leads to a yarn.lock file with dependency versions that don't make sense. After another upgrade, version resolution is fixed.

If the current behavior is a bug, please provide the steps to reproduce.

Say you have this package.json:

{
  "name": "test",
  "devDependencies": {
    "gulp-sass": "^2.3.2",
    "node-sass": "3.12.0"
  }
}

Notice that gulp-sass has a dependency "node-sass": "^3.4.2".

yarn install resolves to a yarn.lock with this:

[email protected], node-sass@^3.4.2:
  version "3.12.0"
  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.12.0.tgz#9221320f1fae1c98de0467ed3d755c10be1f928d"
  dependencies:
    [...]

The latest version of node-sass is v3.13.0. So if I proceed with the suggested in yarn upgrade-interactive, it leads to:
package.json

{
  "name": "test",
  "devDependencies": {
    "gulp-sass": "^2.3.2",
    "node-sass": "^3.13.0"
  }
}

yarn.lock


node-sass@^3.13.0:
  version "3.13.0"
  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.13.0.tgz#d08b95bdebf40941571bd2c16a9334b980f8924f"
  dependencies:

[...]

node-sass@^3.4.2:
  version "3.12.0"
  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.12.0.tgz#9221320f1fae1c98de0467ed3d755c10be1f928d"
  dependencies:

This two entries of node-sass sounds confused whereas both ^3.13.0 and ^3.4.2 would resolve to v3.13.0.

What is the expected behavior?

The version resolution right after yarn upgrade-interactive leading to a yarn.lock like this:

node-sass@^3.13.0, node-sass@^3.4.2:
  version "3.13.0"
  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.13.0.tgz#d08b95bdebf40941571bd2c16a9334b980f8924f"
  dependencies:
    [...]

Actually this is what happens after a yarn upgrade. But sounds weird the need of this correction, right? I am inferring that a yarn upgrade-interactive should lead to a deterministic yarn.lock.

Please mention your node.js, yarn and operating system version.
node.js: v7.1.0
yarn: v0.17.2
OS: Arch Linux

@Daniel15
Copy link
Member

cc @torifat

@torifat
Copy link
Member

torifat commented Nov 16, 2016

@daltones thanks for pointing it out. I'm on it.

@torifat
Copy link
Member

torifat commented Nov 16, 2016

It's a problem within Add.

yarn upgrade --dev node-sass or yarn add --dev [email protected] produces the same unexpected result. If I run yarn install afterward then it fixes it.

Any pointers? cc @kittens

@wyze wyze added the cat-bug label Nov 16, 2016
@torifat
Copy link
Member

torifat commented Nov 16, 2016

Working on a test case for this scenario.

@torifat
Copy link
Member

torifat commented Nov 16, 2016

During writing test for this. I found #79

cc @bestander

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

No branches or pull requests

4 participants