Do you want to request a feature or report a bug?
bug
What is the current behavior?
When I install a dependency with via file: protocol it contains more files like a normal dependency, because white- and blacklists for publishing (.gitignore, .npmignore, "files" in package.json...) aren't respected.
Now directories like node_modules/ of _this_ one dependency land in the cache, too. This results in a _very long_ Linking dependencies... phase.
The workaround:
file:.If the current behavior is a bug, please provide the steps to reproduce.
package.json in a fresh directory and try to install a new local dependency (which contain a node_modules/ directory for example) via file:.$ yarn cache dir for this dependency and you'll see a node_modules/ directory there. (This isn't the case for other packages in your cache which aren't installed via file:.)E.g.
{
"name": "some-example",
"version": "1.0.0",
"private": true,
"dependencies": {
"some-dependency": "file:../some-dependency/"
}
}
What is the expected behavior?
Respect white- and blacklists for publishing for file: based dependencies, too.
Please mention your node.js, yarn and operating system version.
This is a duplicate of a couple other issues, but I can't seem to find them right now (I feel like GitHub search is totally broken sometimes!).
Yarn currently (v0.24.x) checks the file lists (files in package.json for example) when publishing a package, but not when extracting/installing a package.
If I can find those related issues I'll link them here... but I at least wanted to comment that this is a known issue.
Ah, found them...
Duplicate of #2822 #3385
Cool, Thank you for sharing the issues ❤
Most helpful comment
Cool, Thank you for sharing the issues ❤