Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2022-08-25 23:44:10 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-08-26 01:02:40 +0300
commite401a81c784556393bad57283337283a46bd57c5 (patch)
treee3281f017102328d7a5808512c169c8065c01581 /node_modules
parent6e2d6b45150793141f8aa1676cf08f41b149c003 (diff)
deps: npm-bundled@2.0.1
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/LICENSE (renamed from node_modules/npm-packlist/node_modules/npm-bundled/LICENSE)0
-rw-r--r--node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js (renamed from node_modules/npm-bundled/index.js)0
-rw-r--r--node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json30
-rw-r--r--node_modules/npm-bundled/lib/index.js (renamed from node_modules/npm-packlist/node_modules/npm-bundled/lib/index.js)0
-rw-r--r--node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE (renamed from node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE)0
-rw-r--r--node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js (renamed from node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/index.js)20
-rw-r--r--node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json (renamed from node_modules/npm-packlist/node_modules/npm-bundled/package.json)26
-rw-r--r--node_modules/npm-bundled/package.json41
-rw-r--r--node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json21
-rw-r--r--node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/array.js37
-rw-r--r--node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/nobin.js35
-rw-r--r--node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/object.js141
-rw-r--r--node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/string.js37
13 files changed, 81 insertions, 307 deletions
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/LICENSE b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/LICENSE
index 20a476254..20a476254 100644
--- a/node_modules/npm-packlist/node_modules/npm-bundled/LICENSE
+++ b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/LICENSE
diff --git a/node_modules/npm-bundled/index.js b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js
index 378ddc4c5..378ddc4c5 100644
--- a/node_modules/npm-bundled/index.js
+++ b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js
diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json
new file mode 100644
index 000000000..cf20e297b
--- /dev/null
+++ b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "npm-bundled",
+ "version": "1.1.2",
+ "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/npm-bundled.git"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC",
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "mutate-fs": "^1.1.0",
+ "rimraf": "^2.6.1",
+ "tap": "^12.0.1"
+ },
+ "scripts": {
+ "test": "tap test/*.js -J --100",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {
+ "npm-normalize-package-bin": "^1.0.1"
+ }
+}
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/lib/index.js b/node_modules/npm-bundled/lib/index.js
index 4f54ca647..4f54ca647 100644
--- a/node_modules/npm-packlist/node_modules/npm-bundled/lib/index.js
+++ b/node_modules/npm-bundled/lib/index.js
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE
index 19cec97b1..19cec97b1 100644
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE
+++ b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/index.js b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js
index 5a738ff82..d6f0a581b 100644
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/index.js
+++ b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js
@@ -1,6 +1,6 @@
// 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 { join, basename } = require('path')
const normalize = pkg =>
!pkg.bin ? removeBin(pkg)
@@ -10,8 +10,9 @@ const normalize = pkg =>
: removeBin(pkg)
const normalizeString = pkg => {
- if (!pkg.name)
+ if (!pkg.name) {
return removeBin(pkg)
+ }
pkg.bin = { [pkg.name]: pkg.bin }
return normalizeObject(pkg)
}
@@ -34,25 +35,28 @@ const normalizeObject = pkg => {
const clean = {}
let hasBins = false
Object.keys(orig).forEach(binKey => {
- const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).substr(1)
+ const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1)
- if (typeof orig[binKey] !== 'string' || !base)
+ if (typeof orig[binKey] !== 'string' || !base) {
return
+ }
const binTarget = join('/', orig[binKey])
- .replace(/\\/g, '/').substr(1)
+ .replace(/\\/g, '/').slice(1)
- if (!binTarget)
+ if (!binTarget) {
return
+ }
clean[base] = binTarget
hasBins = true
})
- if (hasBins)
+ if (hasBins) {
pkg.bin = clean
- else
+ } else {
delete pkg.bin
+ }
return pkg
}
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/package.json b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json
index 36b63fbdd..02de808d9 100644
--- a/node_modules/npm-packlist/node_modules/npm-bundled/package.json
+++ b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json
@@ -1,42 +1,36 @@
{
- "name": "npm-bundled",
+ "name": "npm-normalize-package-bin",
"version": "2.0.0",
- "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
+ "description": "Turn any flavor of allowable package.json bin into a normalized object",
"main": "lib/index.js",
"repository": {
"type": "git",
- "url": "https://github.com/npm/npm-bundled.git"
+ "url": "https://github.com/npm/npm-normalize-package-bin.git"
},
"author": "GitHub Inc.",
"license": "ISC",
- "devDependencies": {
- "@npmcli/eslint-config": "^3.1.0",
- "@npmcli/template-oss": "3.5.0",
- "mkdirp": "^1.0.4",
- "mutate-fs": "^2.1.1",
- "rimraf": "^3.0.2",
- "tap": "^16.3.0"
- },
"scripts": {
"test": "tap",
+ "snap": "tap",
"preversion": "npm test",
"postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags",
+ "postpublish": "git push origin --follow-tags",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"prepublishOnly": "git push origin --follow-tags",
- "snap": "tap",
"posttest": "npm run lint"
},
+ "devDependencies": {
+ "@npmcli/eslint-config": "^3.1.0",
+ "@npmcli/template-oss": "3.5.0",
+ "tap": "^16.3.0"
+ },
"files": [
"bin/",
"lib/"
],
- "dependencies": {
- "npm-normalize-package-bin": "^1.0.1"
- },
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
diff --git a/node_modules/npm-bundled/package.json b/node_modules/npm-bundled/package.json
index cf20e297b..e4c0106c2 100644
--- a/node_modules/npm-bundled/package.json
+++ b/node_modules/npm-bundled/package.json
@@ -1,30 +1,47 @@
{
"name": "npm-bundled",
- "version": "1.1.2",
+ "version": "2.0.1",
"description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
- "main": "index.js",
+ "main": "lib/index.js",
"repository": {
"type": "git",
- "url": "git+https://github.com/npm/npm-bundled.git"
+ "url": "https://github.com/npm/npm-bundled.git"
},
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "author": "GitHub Inc.",
"license": "ISC",
"devDependencies": {
- "mkdirp": "^0.5.1",
- "mutate-fs": "^1.1.0",
- "rimraf": "^2.6.1",
- "tap": "^12.0.1"
+ "@npmcli/eslint-config": "^3.1.0",
+ "@npmcli/template-oss": "3.5.0",
+ "mkdirp": "^1.0.4",
+ "mutate-fs": "^2.1.1",
+ "rimraf": "^3.0.2",
+ "tap": "^16.3.0"
},
"scripts": {
- "test": "tap test/*.js -J --100",
+ "test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags"
+ "postpublish": "git push origin --all; git push origin --tags",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
+ "template-oss-apply": "template-oss-apply --force",
+ "lintfix": "npm run lint -- --fix",
+ "prepublishOnly": "git push origin --follow-tags",
+ "snap": "tap",
+ "posttest": "npm run lint"
},
"files": [
- "index.js"
+ "bin/",
+ "lib/"
],
"dependencies": {
- "npm-normalize-package-bin": "^1.0.1"
+ "npm-normalize-package-bin": "^2.0.0"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ },
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "3.5.0"
}
}
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json
deleted file mode 100644
index a331a682e..000000000
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "npm-normalize-package-bin",
- "version": "1.0.1",
- "description": "Turn any flavor of allowable package.json bin into a normalized object",
- "repository": "git+https://github.com/npm/npm-normalize-package-bin",
- "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
- "license": "ISC",
- "scripts": {
- "test": "tap",
- "snap": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "postpublish": "git push origin --follow-tags"
- },
- "tap": {
- "check-coverage": true
- },
- "devDependencies": {
- "tap": "^14.10.2"
- }
-}
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/array.js b/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/array.js
deleted file mode 100644
index 63dafa891..000000000
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/array.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const normalize = require('../')
-const t = require('tap')
-
-t.test('benign array', async t => {
- const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'y/z', './a'] }
- const expect = { name: 'hello', version: 'world', bin: {
- y: 'x/y',
- z: 'y/z',
- a: 'a',
- } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('conflicting array', async t => {
- const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'z/y', './a'] }
- const expect = { name: 'hello', version: 'world', bin: {
- y: 'z/y',
- a: 'a',
- } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('slashy array', async t => {
- const pkg = { name: 'hello', version: 'world', bin: [ '/etc/passwd' ] }
- const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('dotty array', async t => {
- const pkg = { name: 'hello', version: 'world', bin: ['../../../../etc/passwd'] }
- const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/nobin.js b/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/nobin.js
deleted file mode 100644
index 536d7eb22..000000000
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/nobin.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const normalize = require('../')
-const t = require('tap')
-
-// all of these just delete the bins, so expect the same value
-const expect = { name: 'hello', version: 'world' }
-
-t.test('no bin in object', async t => {
- const pkg = { name: 'hello', version: 'world' }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('empty string bin in object', async t => {
- const pkg = { name: 'hello', version: 'world', bin: '' }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('false bin in object', async t => {
- const pkg = { name: 'hello', version: 'world', bin: false }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('null bin in object', async t => {
- const pkg = { name: 'hello', version: 'world', bin: null }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('number bin', async t => {
- const pkg = { name: 'hello', version: 'world', bin: 42069 }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/object.js b/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/object.js
deleted file mode 100644
index 00d23684f..000000000
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/object.js
+++ /dev/null
@@ -1,141 +0,0 @@
-const normalize = require('../')
-const t = require('tap')
-
-t.test('benign object', async t => {
- // just clean up the ./ in the targets and remove anything weird
- const pkg = { name: 'hello', version: 'world', bin: {
- y: './x/y',
- z: './y/z',
- a: './a',
- } }
- const expect = { name: 'hello', version: 'world', bin: {
- y: 'x/y',
- z: 'y/z',
- a: 'a',
- } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('empty and non-string targets', async t => {
- // just clean up the ./ in the targets and remove anything weird
- const pkg = { name: 'hello', version: 'world', bin: {
- z: './././',
- y: '',
- './x': 'x.js',
- re: /asdf/,
- foo: { bar: 'baz' },
- false: false,
- null: null,
- array: [1,2,3],
- func: function () {},
- } }
- const expect = { name: 'hello', version: 'world', bin: {
- x: 'x.js',
- } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('slashy object', async t => {
- const pkg = { name: 'hello', version: 'world', bin: {
- '/path/foo': '/etc/passwd',
- 'bar': '/etc/passwd',
- '/etc/glorb/baz': '/etc/passwd',
- '/etc/passwd:/bin/usr/exec': '/etc/passwd',
- } }
- const expect = {
- name: 'hello',
- version: 'world',
- bin: {
- foo: 'etc/passwd',
- bar: 'etc/passwd',
- baz: 'etc/passwd',
- exec: 'etc/passwd',
- }
- }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('dotty object', async t => {
- const pkg = {
- name: 'hello',
- version: 'world',
- bin: {
- 'nodots': '../../../../etc/passwd',
- '../../../../../../dots': '../../../../etc/passwd',
- '.././../\\./..//C:\\./': 'this is removed',
- '.././../\\./..//C:\\/': 'super safe programming language',
- '.././../\\./..//C:\\x\\y\\z/': 'xyz',
- } }
- const expect = { name: 'hello', version: 'world', bin: {
- nodots: 'etc/passwd',
- dots: 'etc/passwd',
- C: 'super safe programming language',
- z: 'xyz',
- } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('weird object', async t => {
- const pkg = { name: 'hello', version: 'world', bin: /asdf/ }
- const expect = { name: 'hello', version: 'world' }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('oddball keys', async t => {
- const pkg = {
- bin: {
- '~': 'target',
- '£': 'target',
- 'ζ': 'target',
- 'ぎ': 'target',
- '操': 'target',
- '🎱': 'target',
- '💎': 'target',
- '💸': 'target',
- '🦉': 'target',
- 'сheck-dom': 'target',
- 'Ωpm': 'target',
- 'ζλ': 'target',
- 'мга': 'target',
- 'пше': 'target',
- 'тзч': 'target',
- 'тзь': 'target',
- 'нфкт': 'target',
- 'ссср': 'target',
- '君の名は': 'target',
- '君の名は': 'target',
- }
- }
-
- const expect = {
- bin: {
- '~': 'target',
- '£': 'target',
- 'ζ': 'target',
- 'ぎ': 'target',
- '操': 'target',
- '🎱': 'target',
- '💎': 'target',
- '💸': 'target',
- '🦉': 'target',
- 'сheck-dom': 'target',
- 'Ωpm': 'target',
- 'ζλ': 'target',
- 'мга': 'target',
- 'пше': 'target',
- 'тзч': 'target',
- 'тзь': 'target',
- 'нфкт': 'target',
- 'ссср': 'target',
- '君の名は': 'target',
- },
- }
-
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
diff --git a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/string.js b/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/string.js
deleted file mode 100644
index b6de8f8f5..000000000
--- a/node_modules/npm-packlist/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/test/string.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const normalize = require('../')
-const t = require('tap')
-
-t.test('benign string', async t => {
- const pkg = { name: 'hello', version: 'world', bin: 'hello.js' }
- const expect = { name: 'hello', version: 'world', bin: { hello: 'hello.js' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('slashy string', async t => {
- const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd' }
- const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('dotty string', async t => {
- const pkg = { name: 'hello', version: 'world', bin: '../../../../etc/passwd' }
- const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('double path', async t => {
- const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd:/bin/usr/exec' }
- const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd:/bin/usr/exec' } }
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})
-
-t.test('string with no name', async t => {
- const pkg = { bin: 'foobar.js' }
- const expect = {}
- t.strictSame(normalize(pkg), expect)
- t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok')
-})