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:
authorGar <gar+gh@danger.computer>2022-04-05 20:47:06 +0300
committerGar <wraithgar@github.com>2022-04-07 00:29:40 +0300
commitad9936063f20829eb9d5358d056593883f17a57b (patch)
tree48605bb76454580d809ea40220bff81e81200420
parent82dc75fe62466714ea59accf245a6f9d6d111e17 (diff)
deps: npm-install-checks@5.0.0
-rw-r--r--node_modules/npm-install-checks/index.js79
-rw-r--r--node_modules/npm-install-checks/lib/index.js (renamed from node_modules/npm-pick-manifest/node_modules/npm-install-checks/lib/index.js)0
-rw-r--r--node_modules/npm-install-checks/package.json29
-rw-r--r--node_modules/npm-pick-manifest/node_modules/npm-install-checks/LICENSE27
-rw-r--r--node_modules/npm-pick-manifest/node_modules/npm-install-checks/package.json48
-rw-r--r--package-lock.json39
-rw-r--r--package.json2
-rw-r--r--workspaces/arborist/package.json2
8 files changed, 34 insertions, 192 deletions
diff --git a/node_modules/npm-install-checks/index.js b/node_modules/npm-install-checks/index.js
deleted file mode 100644
index 732888ef5..000000000
--- a/node_modules/npm-install-checks/index.js
+++ /dev/null
@@ -1,79 +0,0 @@
-const {format} = require('util')
-const semver = require('semver')
-
-const checkEngine = (target, npmVer, nodeVer, force = false) => {
- const nodev = force ? null : nodeVer
- const eng = target.engines
- const opt = { includePrerelease: true }
- if (!eng) {
- return
- }
-
- const nodeFail = nodev && eng.node && !semver.satisfies(nodev, eng.node, opt)
- const npmFail = npmVer && eng.npm && !semver.satisfies(npmVer, eng.npm, opt)
- if (nodeFail || npmFail) {
- throw Object.assign(new Error('Unsupported engine'), {
- pkgid: target._id,
- current: { node: nodeVer, npm: npmVer },
- required: eng,
- code: 'EBADENGINE'
- })
- }
-}
-
-const checkPlatform = (target, force = false) => {
- if (force) {
- return
- }
-
- const platform = process.platform
- const arch = process.arch
- const osOk = target.os ? checkList(platform, target.os) : true
- const cpuOk = target.cpu ? checkList(arch, target.cpu) : true
-
- if (!osOk || !cpuOk) {
- throw Object.assign(new Error('Unsupported platform'), {
- pkgid: target._id,
- current: {
- os: platform,
- cpu: arch
- },
- required: {
- os: target.os,
- cpu: target.cpu
- },
- code: 'EBADPLATFORM'
- })
- }
-}
-
-const checkList = (value, list) => {
- if (typeof list === 'string') {
- list = [list]
- }
- if (list.length === 1 && list[0] === 'any') {
- return true
- }
- // match none of the negated values, and at least one of the
- // non-negated values, if any are present.
- let negated = 0
- let match = false
- for (const entry of list) {
- const negate = entry.charAt(0) === '!'
- const test = negate ? entry.slice(1) : entry
- if (negate) {
- negated ++
- if (value === test) {
- return false
- }
- } else {
- match = match || value === test
- }
- }
- return match || negated === list.length
-}
-
-module.exports = {
- checkEngine,
- checkPlatform
-}
diff --git a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/lib/index.js b/node_modules/npm-install-checks/lib/index.js
index 728e8cf3f..728e8cf3f 100644
--- a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/lib/index.js
+++ b/node_modules/npm-install-checks/lib/index.js
diff --git a/node_modules/npm-install-checks/package.json b/node_modules/npm-install-checks/package.json
index 0eb597ae8..ce3371851 100644
--- a/node_modules/npm-install-checks/package.json
+++ b/node_modules/npm-install-checks/package.json
@@ -1,23 +1,32 @@
{
"name": "npm-install-checks",
- "version": "4.0.0",
+ "version": "5.0.0",
"description": "Check the engines and platform fields in package.json",
- "main": "index.js",
+ "main": "lib/index.js",
"dependencies": {
"semver": "^7.1.1"
},
"devDependencies": {
- "tap": "^14.10.6"
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.2.2",
+ "tap": "^16.0.1"
},
"scripts": {
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
- "postpublish": "git push origin --follow-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"
},
"repository": {
"type": "git",
- "url": "git://github.com/npm/npm-install-checks.git"
+ "url": "https://github.com/npm/npm-install-checks.git"
},
"keywords": [
"npm,",
@@ -25,9 +34,15 @@
],
"license": "BSD-2-Clause",
"files": [
- "index.js"
+ "bin/",
+ "lib/"
],
"engines": {
- "node": ">=10"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "3.2.2"
}
}
diff --git a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/LICENSE b/node_modules/npm-pick-manifest/node_modules/npm-install-checks/LICENSE
deleted file mode 100644
index 3bed8320c..000000000
--- a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Robert Kowalski and Isaac Z. Schlueter ("Authors")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/package.json b/node_modules/npm-pick-manifest/node_modules/npm-install-checks/package.json
deleted file mode 100644
index ce3371851..000000000
--- a/node_modules/npm-pick-manifest/node_modules/npm-install-checks/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "npm-install-checks",
- "version": "5.0.0",
- "description": "Check the engines and platform fields in package.json",
- "main": "lib/index.js",
- "dependencies": {
- "semver": "^7.1.1"
- },
- "devDependencies": {
- "@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.2.2",
- "tap": "^16.0.1"
- },
- "scripts": {
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "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"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/npm/npm-install-checks.git"
- },
- "keywords": [
- "npm,",
- "install"
- ],
- "license": "BSD-2-Clause",
- "files": [
- "bin/",
- "lib/"
- ],
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- },
- "author": "GitHub Inc.",
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.2.2"
- }
-}
diff --git a/package-lock.json b/package-lock.json
index d5b3bd8ef..c96dd6704 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -133,7 +133,7 @@
"node-gyp": "^9.0.0",
"nopt": "^5.0.0",
"npm-audit-report": "^3.0.0",
- "npm-install-checks": "^4.0.0",
+ "npm-install-checks": "^5.0.0",
"npm-package-arg": "^9.0.1",
"npm-pick-manifest": "^7.0.1",
"npm-profile": "^6.0.2",
@@ -4948,14 +4948,15 @@
}
},
"node_modules/npm-install-checks": {
- "version": "4.0.0",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz",
+ "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==",
"inBundle": true,
- "license": "BSD-2-Clause",
"dependencies": {
"semver": "^7.1.1"
},
"engines": {
- "node": ">=10"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/npm-license-corrections": {
@@ -5015,18 +5016,6 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
- "node_modules/npm-pick-manifest/node_modules/npm-install-checks": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz",
- "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==",
- "inBundle": true,
- "dependencies": {
- "semver": "^7.1.1"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
"node_modules/npm-profile": {
"version": "6.0.2",
"inBundle": true,
@@ -9584,7 +9573,7 @@
"mkdirp": "^1.0.4",
"mkdirp-infer-owner": "^2.0.0",
"nopt": "^5.0.0",
- "npm-install-checks": "^4.0.0",
+ "npm-install-checks": "^5.0.0",
"npm-package-arg": "^9.0.0",
"npm-pick-manifest": "^7.0.0",
"npm-registry-fetch": "^13.0.0",
@@ -10261,7 +10250,7 @@
"mkdirp-infer-owner": "^2.0.0",
"nock": "^13.2.0",
"nopt": "^5.0.0",
- "npm-install-checks": "^4.0.0",
+ "npm-install-checks": "5.0.0",
"npm-package-arg": "^9.0.0",
"npm-pick-manifest": "^7.0.0",
"npm-registry-fetch": "^13.0.0",
@@ -12997,7 +12986,9 @@
}
},
"npm-install-checks": {
- "version": "4.0.0",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz",
+ "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==",
"requires": {
"semver": "^7.1.1"
}
@@ -13037,16 +13028,6 @@
"npm-normalize-package-bin": "^1.0.1",
"npm-package-arg": "^9.0.0",
"semver": "^7.3.5"
- },
- "dependencies": {
- "npm-install-checks": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz",
- "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==",
- "requires": {
- "semver": "^7.1.1"
- }
- }
}
},
"npm-profile": {
diff --git a/package.json b/package.json
index ea876ebc7..807df037d 100644
--- a/package.json
+++ b/package.json
@@ -100,7 +100,7 @@
"node-gyp": "^9.0.0",
"nopt": "^5.0.0",
"npm-audit-report": "^3.0.0",
- "npm-install-checks": "^4.0.0",
+ "npm-install-checks": "^5.0.0",
"npm-package-arg": "^9.0.1",
"npm-pick-manifest": "^7.0.1",
"npm-profile": "^6.0.2",
diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json
index 4b12d2ea4..515b2beb7 100644
--- a/workspaces/arborist/package.json
+++ b/workspaces/arborist/package.json
@@ -20,7 +20,7 @@
"mkdirp": "^1.0.4",
"mkdirp-infer-owner": "^2.0.0",
"nopt": "^5.0.0",
- "npm-install-checks": "^4.0.0",
+ "npm-install-checks": "^5.0.0",
"npm-package-arg": "^9.0.0",
"npm-pick-manifest": "^7.0.0",
"npm-registry-fetch": "^13.0.0",