Skip to content

[BUG] npm pack with bundledDependencies ignores files in package.json of dependencies #1689

Closed
@nsainaney

Description

@nsainaney

Current Behavior:

When untaring a module that has bundledDependencies generated using npm pack, the node_modules/module-a folder (where module-a is a bundledDependency) contains files that are not in module-a/package.json's files list

Expected Behavior:

node_modules/module-a should only contain files that are in the files section of module-a/package.json

Steps To Reproduce:

  1. Set up a project with Module A and Module B
  2. Make Module A a bundled dependency of Module B (using npm/yarn link)
  3. run npm pack
  4. untar the generated tar file

Environment:

  • OS: MacOS: 10.15.5
  • Node: v12.16.2
  • NPM: 6.14.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 6.xwork is associated with a specific npm 6 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions