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
cc @torifat
@daltones thanks for pointing it out. I'm on it.
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
Working on a test case for this scenario.
During writing test for this. I found #79
cc @bestander
Most helpful comment
During writing test for this. I found #79
cc @bestander