Skip to content

Commit 6d31450

Browse files
wraithgarnlf
authored andcommitted
deps: pacote@13.0.4
1 parent fcc6acf commit 6d31450

27 files changed

+2216
-66
lines changed

node_modules/npm-packlist/bin/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ process.argv.slice(2).forEach(arg => {
66
if (arg === '-h' || arg === '--help') {
77
console.log('usage: npm-packlist [-s --sort] [directory, directory, ...]')
88
process.exit(0)
9-
} else if (arg === '-s' || arg === '--sort')
9+
} else if (arg === '-s' || arg === '--sort') {
1010
doSort = true
11-
else
11+
} else {
1212
dirs.push(arg)
13+
}
1314
})
1415

1516
const sort = list => doSort ? list.sort((a, b) => a.localeCompare(b, 'en')) : list
1617

1718
const packlist = require('../')
18-
if (!dirs.length)
19+
if (!dirs.length) {
1920
console.log(sort(packlist.sync({ path: process.cwd() })).join('\n'))
20-
else {
21+
} else {
2122
dirs.forEach(path => {
2223
console.log(`> ${path}`)
2324
console.log(sort(packlist.sync({ path })).join('\n'))

node_modules/npm-packlist/index.js node_modules/npm-packlist/lib/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const defaultRules = [
5858
'*.orig',
5959
'/package-lock.json',
6060
'/yarn.lock',
61+
'/pnpm-lock.yaml',
6162
'/archived-packages/**',
6263
]
6364

@@ -248,7 +249,7 @@ const npmWalker = Class => class Walker extends Class {
248249
}
249250
}
250251
const processResults = results => {
251-
for (const {negate, fileList} of results) {
252+
for (const { negate, fileList } of results) {
252253
if (negate) {
253254
fileList.forEach(f => {
254255
f = f.replace(/\/+$/, '')
@@ -276,7 +277,7 @@ const npmWalker = Class => class Walker extends Class {
276277
// maintain the index so that we process them in-order only once all
277278
// are completed, otherwise the parallelism messes things up, since a
278279
// glob like **/*.js will always be slower than a subsequent !foo.js
279-
patterns.forEach(({pattern, negate}, i) =>
280+
patterns.forEach(({ pattern, negate }, i) =>
280281
this.globFiles(pattern, (er, res) => then(pattern, negate, er, res, i)))
281282
}
282283

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
{
22
"name": "npm-packlist",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "Get a list of the files to add from a folder into an npm package",
55
"directories": {
66
"test": "test"
77
},
8-
"main": "index.js",
8+
"main": "lib",
99
"dependencies": {
10-
"glob": "^7.1.6",
10+
"glob": "^7.2.0",
1111
"ignore-walk": "^4.0.1",
12-
"npm-bundled": "^1.1.1",
12+
"npm-bundled": "^1.1.2",
1313
"npm-normalize-package-bin": "^1.0.1"
1414
},
15-
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
15+
"author": "GitHub Inc.",
1616
"license": "ISC",
1717
"files": [
18-
"bin/index.js",
19-
"index.js"
18+
"bin",
19+
"lib"
2020
],
2121
"devDependencies": {
22-
"@npmcli/lint": "^1.0.2",
22+
"@npmcli/template-oss": "^2.9.2",
2323
"mutate-fs": "^2.1.1",
24-
"tap": "^15.0.6"
24+
"tap": "^15.1.6"
2525
},
2626
"scripts": {
2727
"test": "tap",
28-
"posttest": "npm run lint --",
28+
"posttest": "npm run lint",
2929
"snap": "tap",
3030
"postsnap": "npm run lintfix --",
3131
"preversion": "npm test",
3232
"postversion": "npm publish",
3333
"prepublishOnly": "git push origin --follow-tags",
3434
"eslint": "eslint",
35-
"lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
35+
"lint": "eslint '**/*.js'",
3636
"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"
3840
},
3941
"repository": {
4042
"type": "git",
@@ -54,6 +56,9 @@
5456
"npm-packlist": "bin/index.js"
5557
},
5658
"engines": {
57-
"node": ">=10"
59+
"node": "^12.13.0 || ^14.15.0 || >=16"
60+
},
61+
"templateOSS": {
62+
"version": "2.9.2"
5863
}
5964
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ISC License
2+
3+
Copyright (c) npm, Inc.
4+
5+
Permission to use, copy, modify, and/or distribute this software for
6+
any purpose with or without fee is hereby granted, provided that the
7+
above copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
10+
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12+
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
13+
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
16+
USE OR PERFORMANCE OF THIS SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict'
2+
3+
const contentVer = require('../../package.json')['cache-version'].content
4+
const hashToSegments = require('../util/hash-to-segments')
5+
const path = require('path')
6+
const ssri = require('ssri')
7+
8+
// Current format of content file path:
9+
//
10+
// sha512-BaSE64Hex= ->
11+
// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
12+
//
13+
module.exports = contentPath
14+
15+
function contentPath (cache, integrity) {
16+
const sri = ssri.parse(integrity, { single: true })
17+
// contentPath is the *strongest* algo given
18+
return path.join(
19+
contentDir(cache),
20+
sri.algorithm,
21+
...hashToSegments(sri.hexDigest())
22+
)
23+
}
24+
25+
module.exports.contentDir = contentDir
26+
27+
function contentDir (cache) {
28+
return path.join(cache, `content-v${contentVer}`)
29+
}

0 commit comments

Comments
 (0)