This repository has been archived by the owner. It is now read-only.

Npm regression between 5.1 and 5.5.1: no longer filtering out the .git file in submodules #18870

Open
SimonWoolf opened this Issue Oct 17, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@SimonWoolf

SimonWoolf commented Oct 17, 2017

I'm opening this issue because:

  • npm is generating an incorrect package

What's going wrong?

Background: Git submodules contain a .git file, which is a text file with a link to the gitdir (typically inside .git/modules of the parent repo, e.g. gitdir: ../../../.git/modules/spec/common/ably-common).

A package published with npm v5.1 (and, as far as I know, all previous versions) includes in the generated package neither the .git folder for the repo itself nor the .git file for submodules.

A package published with npm v5.5.1 still does not include the .git folder for the repo itself, but now incorrectly includes the .git file for submodules.

How can the CLI team reproduce the problem?

For the same packages with and without the issue, see the following two packages:

ably@1.0.7-test-npm-git-dir-5 - published with npm 5.1
ably@1.0.7-test-npm-git-dir-5-5 - published widh npm 5.5.1

The one published with npm 5.5.1 includes the file node_modules/ably/spec/common/ably-common/.git.
The one published with npm 5.1.0 does not.

To reproduce, create a repo with a submodule and publish to npm.

supporting information:

  • npm -v prints: 5.5.1 has the bug, 5.1.0 does not.
  • node -v prints: v6.10.2
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Linux
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@SimonWoolf

This comment has been minimized.

Show comment
Hide comment
@SimonWoolf

SimonWoolf Dec 11, 2017

This is still an issue with npm 5.6.

SimonWoolf commented Dec 11, 2017

This is still an issue with npm 5.6.

@SimonWoolf

This comment has been minimized.

Show comment
Hide comment
@SimonWoolf

SimonWoolf Mar 5, 2018

This is still an issue with npm 5.7...

SimonWoolf commented Mar 5, 2018

This is still an issue with npm 5.7...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.