Yarn: `yarn pack` includes files from `node_modules`

Created on 27 Nov 2016  路  1Comment  路  Source: yarnpkg/yarn

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

Bug

What is the current behavior?
Using yarn pack includes readme, changelog and package.json from node_modules. Probably the files forcibly included: https://github.com/yarnpkg/yarn/blob/1e7249966890c22df0c1564660a21a54ce17370b/src/cli/commands/pack.js#L44-L47.

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

See https://github.com/yarnpkg/yarn/issues/761#issuecomment-263112301.

mkdir some-dir && cd some-dir && yarn init -y && yarn add object.entries && yarn pack && tar -ztvf some-dir-v1.0.0.tgz

What is the expected behavior?
That node_modules is ignored entirely

Please mention your node.js, yarn and operating system version.
[email protected], [email protected], macOS Sierra

cat-bug

Most helpful comment

Yarn should probably drop the entire node_modules unless bundledDependencies is activated, to avoid walking a (potentially) huge file tree.

>All comments

Yarn should probably drop the entire node_modules unless bundledDependencies is activated, to avoid walking a (potentially) huge file tree.

Was this page helpful?
0 / 5 - 0 ratings