Skip to content

Commit

Permalink
deps: pacote@13.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored and nlf committed Mar 15, 2022
1 parent fcc6acf commit 6d31450
Show file tree
Hide file tree
Showing 27 changed files with 2,216 additions and 66 deletions.
9 changes: 5 additions & 4 deletions node_modules/npm-packlist/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ process.argv.slice(2).forEach(arg => {
if (arg === '-h' || arg === '--help') {
console.log('usage: npm-packlist [-s --sort] [directory, directory, ...]')
process.exit(0)
} else if (arg === '-s' || arg === '--sort')
} else if (arg === '-s' || arg === '--sort') {
doSort = true
else
} else {
dirs.push(arg)
}
})

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

const packlist = require('../')
if (!dirs.length)
if (!dirs.length) {
console.log(sort(packlist.sync({ path: process.cwd() })).join('\n'))
else {
} else {
dirs.forEach(path => {
console.log(`> ${path}`)
console.log(sort(packlist.sync({ path })).join('\n'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const defaultRules = [
'*.orig',
'/package-lock.json',
'/yarn.lock',
'/pnpm-lock.yaml',
'/archived-packages/**',
]

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

Expand Down
31 changes: 18 additions & 13 deletions node_modules/npm-packlist/package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
{
"name": "npm-packlist",
"version": "3.0.0",
"version": "4.0.0",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
},
"main": "index.js",
"main": "lib",
"dependencies": {
"glob": "^7.1.6",
"glob": "^7.2.0",
"ignore-walk": "^4.0.1",
"npm-bundled": "^1.1.1",
"npm-bundled": "^1.1.2",
"npm-normalize-package-bin": "^1.0.1"
},
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"author": "GitHub Inc.",
"license": "ISC",
"files": [
"bin/index.js",
"index.js"
"bin",
"lib"
],
"devDependencies": {
"@npmcli/lint": "^1.0.2",
"@npmcli/template-oss": "^2.9.2",
"mutate-fs": "^2.1.1",
"tap": "^15.0.6"
"tap": "^15.1.6"
},
"scripts": {
"test": "tap",
"posttest": "npm run lint --",
"posttest": "npm run lint",
"snap": "tap",
"postsnap": "npm run lintfix --",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"eslint": "eslint",
"lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
"lint": "eslint '**/*.js'",
"lintfix": "npm run lint -- --fix",
"npmclilint": "npmcli-lint"
"npmclilint": "npmcli-lint",
"postlint": "npm-template-check",
"template-copy": "npm-template-copy --force"
},
"repository": {
"type": "git",
Expand All @@ -54,6 +56,9 @@
"npm-packlist": "bin/index.js"
},
"engines": {
"node": ">=10"
"node": "^12.13.0 || ^14.15.0 || >=16"
},
"templateOSS": {
"version": "2.9.2"
}
}
16 changes: 16 additions & 0 deletions node_modules/pacote/node_modules/cacache/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ISC License

Copyright (c) npm, Inc.

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
29 changes: 29 additions & 0 deletions node_modules/pacote/node_modules/cacache/lib/content/path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict'

const contentVer = require('../../package.json')['cache-version'].content
const hashToSegments = require('../util/hash-to-segments')
const path = require('path')
const ssri = require('ssri')

// Current format of content file path:
//
// sha512-BaSE64Hex= ->
// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
//
module.exports = contentPath

function contentPath (cache, integrity) {
const sri = ssri.parse(integrity, { single: true })
// contentPath is the *strongest* algo given
return path.join(
contentDir(cache),
sri.algorithm,
...hashToSegments(sri.hexDigest())
)
}

module.exports.contentDir = contentDir

function contentDir (cache) {
return path.join(cache, `content-v${contentVer}`)
}
Loading

0 comments on commit 6d31450

Please sign in to comment.