-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update @npmcli/[email protected]
- Loading branch information
Showing
19 changed files
with
243 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
node_modules/@npmcli/metavuln-calculator/node_modules/npm-bundled/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "npm-bundled", | ||
"version": "3.0.1", | ||
"description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof", | ||
"main": "lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/npm/npm-bundled.git" | ||
}, | ||
"author": "GitHub Inc.", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.22.0", | ||
"mutate-fs": "^2.1.1", | ||
"tap": "^16.3.0" | ||
}, | ||
"scripts": { | ||
"test": "tap", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"postlint": "template-oss-check", | ||
"template-oss-apply": "template-oss-apply --force", | ||
"lintfix": "npm run lint -- --fix", | ||
"snap": "tap", | ||
"posttest": "npm run lint" | ||
}, | ||
"files": [ | ||
"bin/", | ||
"lib/" | ||
], | ||
"dependencies": { | ||
"npm-normalize-package-bin": "^3.0.0" | ||
}, | ||
"engines": { | ||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0" | ||
}, | ||
"templateOSS": { | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.22.0", | ||
"publish": true | ||
}, | ||
"tap": { | ||
"nyc-arg": [ | ||
"--exclude", | ||
"tap-snapshots/**" | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The 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 AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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. |
64 changes: 64 additions & 0 deletions
64
node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// pass in a manifest with a 'bin' field here, and it'll turn it | ||
// into a properly santized bin object | ||
const { join, basename } = require('path') | ||
|
||
const normalize = pkg => | ||
!pkg.bin ? removeBin(pkg) | ||
: typeof pkg.bin === 'string' ? normalizeString(pkg) | ||
: Array.isArray(pkg.bin) ? normalizeArray(pkg) | ||
: typeof pkg.bin === 'object' ? normalizeObject(pkg) | ||
: removeBin(pkg) | ||
|
||
const normalizeString = pkg => { | ||
if (!pkg.name) { | ||
return removeBin(pkg) | ||
} | ||
pkg.bin = { [pkg.name]: pkg.bin } | ||
return normalizeObject(pkg) | ||
} | ||
|
||
const normalizeArray = pkg => { | ||
pkg.bin = pkg.bin.reduce((acc, k) => { | ||
acc[basename(k)] = k | ||
return acc | ||
}, {}) | ||
return normalizeObject(pkg) | ||
} | ||
|
||
const removeBin = pkg => { | ||
delete pkg.bin | ||
return pkg | ||
} | ||
|
||
const normalizeObject = pkg => { | ||
const orig = pkg.bin | ||
const clean = {} | ||
let hasBins = false | ||
Object.keys(orig).forEach(binKey => { | ||
const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) | ||
|
||
if (typeof orig[binKey] !== 'string' || !base) { | ||
return | ||
} | ||
|
||
const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) | ||
.replace(/\\/g, '/').slice(1) | ||
|
||
if (!binTarget) { | ||
return | ||
} | ||
|
||
clean[base] = binTarget | ||
hasBins = true | ||
}) | ||
|
||
if (hasBins) { | ||
pkg.bin = clean | ||
} else { | ||
delete pkg.bin | ||
} | ||
|
||
return pkg | ||
} | ||
|
||
module.exports = normalize |
24 changes: 10 additions & 14 deletions
24
...ote/node_modules/npm-bundled/package.json → ...es/npm-normalize-package-bin/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.