npm-packlist 3.0.0 → 4.0.0

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.
package/bin/index.js CHANGED
@@ -6,18 +6,19 @@ process.argv.slice(2).forEach(arg => {
6
6
  if (arg === '-h' || arg === '--help') {
7
7
  console.log('usage: npm-packlist [-s --sort] [directory, directory, ...]')
8
8
  process.exit(0)
9
- } else if (arg === '-s' || arg === '--sort')
9
+ } else if (arg === '-s' || arg === '--sort') {
10
10
  doSort = true
11
- else
11
+ } else {
12
12
  dirs.push(arg)
13
+ }
13
14
  })
14
15
 
15
16
  const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b, 'en')) : list
16
17
 
17
18
  const packlist = require('../')
18
- if (!dirs.length)
19
+ if (!dirs.length) {
19
20
  console.log(sort(packlist.sync({ path: process.cwd() })).join('\n'))
20
- else {
21
+ } else {
21
22
  dirs.forEach(path => {
22
23
  console.log(`> ${path}`)
23
24
  console.log(sort(packlist.sync({ path })).join('\n'))
@@ -58,6 +58,7 @@ const defaultRules = [
58
58
  '*.orig',
59
59
  '/package-lock.json',
60
60
  '/yarn.lock',
61
+ '/pnpm-lock.yaml',
61
62
  '/archived-packages/**',
62
63
  ]
63
64
 
@@ -248,7 +249,7 @@ const npmWalker = Class => class Walker extends Class {
248
249
  }
249
250
  }
250
251
  const processResults = results => {
251
- for (const {negate, fileList} of results) {
252
+ for (const { negate, fileList } of results) {
252
253
  if (negate) {
253
254
  fileList.forEach(f => {
254
255
  f = f.replace(/\/+$/, '')
@@ -276,7 +277,7 @@ const npmWalker = Class => class Walker extends Class {
276
277
  // maintain the index so that we process them in-order only once all
277
278
  // are completed, otherwise the parallelism messes things up, since a
278
279
  // glob like **/*.js will always be slower than a subsequent !foo.js
279
- patterns.forEach(({pattern, negate}, i) =>
280
+ patterns.forEach(({ pattern, negate }, i) =>
280
281
  this.globFiles(pattern, (er, res) => then(pattern, negate, er, res, i)))
281
282
  }
282
283
 
package/package.json CHANGED
@@ -1,40 +1,42 @@
1
1
  {
2
2
  "name": "npm-packlist",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
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
- "main": "index.js",
8
+ "main": "lib",
9
9
  "dependencies": {
10
- "glob": "^7.1.6",
10
+ "glob": "^7.2.0",
11
11
  "ignore-walk": "^4.0.1",
12
- "npm-bundled": "^1.1.1",
12
+ "npm-bundled": "^1.1.2",
13
13
  "npm-normalize-package-bin": "^1.0.1"
14
14
  },
15
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
15
+ "author": "GitHub Inc.",
16
16
  "license": "ISC",
17
17
  "files": [
18
- "bin/index.js",
19
- "index.js"
18
+ "bin",
19
+ "lib"
20
20
  ],
21
21
  "devDependencies": {
22
- "@npmcli/lint": "^1.0.2",
22
+ "@npmcli/template-oss": "^2.9.2",
23
23
  "mutate-fs": "^2.1.1",
24
- "tap": "^15.0.6"
24
+ "tap": "^15.1.6"
25
25
  },
26
26
  "scripts": {
27
27
  "test": "tap",
28
- "posttest": "npm run lint --",
28
+ "posttest": "npm run lint",
29
29
  "snap": "tap",
30
30
  "postsnap": "npm run lintfix --",
31
31
  "preversion": "npm test",
32
32
  "postversion": "npm publish",
33
33
  "prepublishOnly": "git push origin --follow-tags",
34
34
  "eslint": "eslint",
35
- "lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
35
+ "lint": "eslint '**/*.js'",
36
36
  "lintfix": "npm run lint -- --fix",
37
- "npmclilint": "npmcli-lint"
37
+ "npmclilint": "npmcli-lint",
38
+ "postlint": "npm-template-check",
39
+ "template-copy": "npm-template-copy --force"
38
40
  },
39
41
  "repository": {
40
42
  "type": "git",
@@ -54,6 +56,9 @@
54
56
  "npm-packlist": "bin/index.js"
55
57
  },
56
58
  "engines": {
57
- "node": ">=10"
59
+ "node": "^12.13.0 || ^14.15.0 || >=16"
60
+ },
61
+ "templateOSS": {
62
+ "version": "2.9.2"
58
63
  }
59
64
  }