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

bundledDependencies don't get packed as of >= v0.19.0 #2636

Closed
selkhateeb opened this issue Feb 5, 2017 · 4 comments
Closed

bundledDependencies don't get packed as of >= v0.19.0 #2636

selkhateeb opened this issue Feb 5, 2017 · 4 comments

Comments

@selkhateeb
Copy link

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

What is the current behavior?
yarn pack does not package bundledDependecies in v0.19.0, v0.19.1 and v0.20.0

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

{
  "name": "test-bundled-deps",
  "version": "0.0.0",
  "dependencies": {
    "bcryptjs": "^2.0.0",
  },
  "bundledDependencies": [
    "bcryptjs",
  ]
}

then run yarn followed by yarn pack
check the tgz file. It will not contain the node_modules folder.

What is the expected behavior?
to work as in version 0.18.1
Please mention your node.js, yarn and operating system version.

$ node -v
v7.4.0

OS X El Capitan 10.11.6

@kmdm
Copy link

kmdm commented May 16, 2017

Would seem to at least be caused by:-

  • 'node_modules' being added to FOLDERS_IGNORE d1d5343
  • Accessing of bundledDependencies incorrect in commands/pack.js:-
    • src/cli/commands/pack.js: const {bundledDependencies, main, files: onlyFiles} = pkg;
    • src/util/normalize-manifest/fix.js: info.bundleDependencies = info.bundledDependencies;
    • src/util/normalize-manifest/fix.js: delete info.bundledDependencies;

Resolving those gives me node_modules/module in the packed .tgz but no subdirectories/files.

@bestander
Copy link
Member

A PR with a test is welcome

@cameronhunter
Copy link
Contributor

cameronhunter commented Sep 30, 2017

@bestander: I've added a PR with a failing test case (#4598).

With a project setup specified in the test fixture, running npm install and npm pack the resulting archive will contain a node_modules directory containing the bundled dependencies. Performing the same commands using yarn the archive does not contain the bundled dependencies.

BYK pushed a commit that referenced this issue Oct 3, 2017
**Summary**
This is a failing test-case for issue #2636. It tests that bundled dependencies are not correctly being included in the archive created by `yarn pack`.

**Test plan**
Changing the behavior of `pack` to include the bundled dependencies should make this failing test-case pass.
joaolucasl pushed a commit to joaolucasl/yarn that referenced this issue Oct 27, 2017
)

**Summary**
This is a failing test-case for issue yarnpkg#2636. It tests that bundled dependencies are not correctly being included in the archive created by `yarn pack`.

**Test plan**
Changing the behavior of `pack` to include the bundled dependencies should make this failing test-case pass.
@paul-soporan
Copy link
Member

Closed in #5966.

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

No branches or pull requests

7 participants