npm-packlist 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +7 -0
  2. package/package.json +6 -5
package/lib/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  const { Walker: IgnoreWalker } = require('ignore-walk')
4
4
  const { lstatSync: lstat, readFileSync: readFile } = require('fs')
5
5
  const { basename, dirname, extname, join, relative, resolve, sep } = require('path')
6
+ const { log } = require('proc-log')
6
7
 
7
8
  // symbols used to represent synthetic rule sets
8
9
  const defaultRules = Symbol('npm-packlist.rules.default')
@@ -92,6 +93,7 @@ class PackWalker extends IgnoreWalker {
92
93
  }
93
94
 
94
95
  super(options)
96
+
95
97
  this.isPackage = options.isPackage
96
98
  this.seen = options.seen || new Set()
97
99
  this.tree = tree
@@ -168,6 +170,11 @@ class PackWalker extends IgnoreWalker {
168
170
  } else if (this.ignoreRules['.npmignore']) {
169
171
  // .npmignore means no .gitignore
170
172
  this.ignoreRules['.gitignore'] = null
173
+ } else if (this.ignoreRules['.gitignore'] && !this.ignoreRules['.npmignore']) {
174
+ log.warn(
175
+ 'gitignore-fallback',
176
+ 'No .npmignore file found, using .gitignore for file exclusion. Consider creating a .npmignore file to explicitly control published files.'
177
+ )
171
178
  }
172
179
 
173
180
  return super.filterEntries()
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "npm-packlist",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "description": "Get a list of the files to add from a folder into an npm package",
5
5
  "directories": {
6
6
  "test": "test"
7
7
  },
8
8
  "main": "lib/index.js",
9
9
  "dependencies": {
10
- "ignore-walk": "^7.0.0"
10
+ "ignore-walk": "^8.0.0",
11
+ "proc-log": "^5.0.0"
11
12
  },
12
13
  "author": "GitHub Inc.",
13
14
  "license": "ISC",
@@ -16,9 +17,9 @@
16
17
  "lib/"
17
18
  ],
18
19
  "devDependencies": {
19
- "@npmcli/arborist": "^8.0.0",
20
+ "@npmcli/arborist": "^9.0.0",
20
21
  "@npmcli/eslint-config": "^5.0.1",
21
- "@npmcli/template-oss": "4.23.4",
22
+ "@npmcli/template-oss": "4.25.1",
22
23
  "mutate-fs": "^2.1.1",
23
24
  "tap": "^16.0.1"
24
25
  },
@@ -55,7 +56,7 @@
55
56
  },
56
57
  "templateOSS": {
57
58
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
58
- "version": "4.23.4",
59
+ "version": "4.25.1",
59
60
  "publish": true
60
61
  }
61
62
  }