Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm pack is filtering out test directory #18341

Open
3 tasks
slambdin1 opened this issue Aug 29, 2017 · 3 comments
Open
3 tasks

npm pack is filtering out test directory #18341

slambdin1 opened this issue Aug 29, 2017 · 3 comments

Comments

@slambdin1
Copy link

slambdin1 commented Aug 29, 2017

I'm opening this issue because:

What's going wrong?

On previous versions of npm, when running npm pack, the tar file would include all directories (including test). With the most recent version of npm (5.4.0), this is not the case. The test directory is filtered out which is causing issues in our dependencies.

Along with the above described issue, the documentation does not match the actual behavior. If you take a look at https://docs.npmjs.com/misc/developers , you'll notice that the documentation does not call out that test will be ignored. If you take a look at the behavior as well as the specific line of code that caused this (https://github.com/npm/npm-packlist/blob/master/index.js#L36), you'll see that their is a disconnect.

The other issue is that we expected 5.3.0 to be installed when running npm upgrade -g npm isntead of 5.4.0. According to your docs, you say to install 5.4.0 you need to run npm upgrade -g npmc, but it appears that you can install it with just npm as well.

How can the CLI team reproduce the problem?

  • Setup a repo with a test directory
  • with version 5.4.0 of npm, run npm pack
  • run tar zxf
  • examine the contents
    • NOTICE: test is not included
@JakeChampion
Copy link

PR to fix this issue #18625

@BigAB
Copy link

BigAB commented Oct 27, 2017

Why was the PR closed?

@marcbachmann
Copy link

marcbachmann commented Oct 27, 2017

This is fixed in npm v5.5. cd256cb
Referenced in the release notes.

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

No branches or pull requests

4 participants