Do you want to request a feature or report a bug?
I guess a bug.
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
Say you have the following project structure:
component-foo/
└── package.json
└── index.js
yarn-test/
└── package.json
With the following files:
component-foo/package.json:
{
"name": "component-foo",
"version": "1.0.0",
"private": true,
"main": "index.js"
}
component-foo/index.js:
yarn-test/package.json:
{
"name": "yarn-test",
"version": "1.0.0",
"private": true,
"dependencies": {
"component-foo": "file:../component-foo"
}
}
Now you run $ yarn install inside yarn-test/ and yarn-test/node_modules/component-foo/index.js is:
Now remove yarn-test/node_modules/ and yarn-test/yarn.lock and change component-foo/index.js to this:
Now you run $ yarn install inside yarn-test/ again and yarn-test/node_modules/component-foo/index.js will be:
It uses the cached version of component-foo, but component-foo/index.js has changed.
What is the expected behavior?
I'd expect that yarn-test/node_modules/component-foo/index.js should be this at the end:
Maybe packages installed with local paths like file:../ shouldn't be cached at all, if we can't figure out, if they have changed.
(FYI: It looks like npm doesn't cache them.)
Please mention your node.js, yarn and operating system version.
$ node -v
v6.9.1
$ yarn -V
0.18.0
macOS 10.12.1
Do you want to request a feature or report a bug?
I guess a bug.
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
Say you have the following project structure:
With the following files:
component-foo/package.json:component-foo/index.js:yarn-test/package.json:Now you run
$ yarn installinsideyarn-test/andyarn-test/node_modules/component-foo/index.jsis:Now remove
yarn-test/node_modules/andyarn-test/yarn.lockand changecomponent-foo/index.jsto this:Now you run
$ yarn installinsideyarn-test/again andyarn-test/node_modules/component-foo/index.jswill be:It uses the cached version of
component-foo, butcomponent-foo/index.jshas changed.What is the expected behavior?
I'd expect that
yarn-test/node_modules/component-foo/index.jsshould be this at the end:Maybe packages installed with local paths like
file:../shouldn't be cached at all, if we can't figure out, if they have changed.(FYI: It looks like npm doesn't cache them.)
Please mention your node.js, yarn and operating system version.