Open cs-balazs opened 7 months ago
I noticed this changed as well (https://github.com/nodejs/node/issues/52382). I assume it's intentional because the new behavior seems more inline with the syntax rules of .gitignore
.
That being said, I think this change could break certain packages without warning.
I noticed this changed as well (https://github.com/nodejs/node/issues/52382). I assume it's intentional because the new behavior seems more inline with the syntax rules of .gitignore.
Yeah, I guess this is indeed the reason. It seems like this might be the related dependency change (not sure): https://github.com/npm/ignore-walk/pull/118
I might have similar issue.
In our package, I have .npmignore
that contains:
# https://docs.npmjs.com/cli/v10/using-npm/developers#keeping-files-out-of-your-package
!.npmrc
Before this change, nom pack
excluded .npmrc
file. After this change when .npmignore
exists, npm pack
includes .npmrc
file. However, we install this package as from git, not from npm registry and .npmrc
is missing in installed module.
Why we need this? We have tooling repo containing our common files and .npmrc
is one of them.
This just broke our production system.
We had the following entry in .npmignore
:
config/
Previously, this meant that /config/**
would be ignored, but /forge/config/**
would be included.
With this change, both are now ignored.
This is definitely related to the ignore-walk
update which has changed its behaviour in a semvar patch updated.
Is there an existing issue for this?
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
Description of Problem
Considering a sample typescript project like this minimal example: https://github.com/cs-balazs/dummy-lib When this repo is used as a git dependency in an npm project, after
npm install
, thebuild
folder is not included innode_modules/dummy-lib
. With version10.2.4
, it does appear in the folder, but with10.5.0
it doesn'tWith either of these changes, it works with
10.5.0
:files: ["./build/**/*"]
inpackage.json
src
from.npmignore
I wanted to understand the reason behind this, but couldn't find the relevant change in the changelog, nor found a reason in the docs. The documentation of the
files
field states, that:Which to me means, that in this case at least
build/src/index.js
should be thereI don't know if this is indeed a problem with the docs, or just my misunderstanding, I'm submitting this issue to find that out, and a reason on why this git dependency behavior changed
Potential Solution
No response
Docs URL
No response