Here's a puzzle to noodle on:
Let's say package.json contains this:
{
"files": [
"lib",
"!lib/one",
"lib/two"
]
}
Files in lib/
are: .npmignore
, one
, two
, tre
The file at lib/.npmignore
contains:
two
Which files will be included in the package?
🅰️ :lib/two
,lib/tre
,package.json
🅱️ :lib/tre
,lib/.npmignore
,package.json
(Please don't look it up, the point of the exercise is to gauge expectations.)
I'm somewhat leaning towards🅰️ for a slightly different reason.
I don't publish NPM packages, so I suppose my opinion doesn't matter too much, but I read files array "sequentially" and being processed in the following;