Skip to content

Commit

Permalink
deps: update npm-pick-manifest@10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
reggi committed Oct 2, 2024
1 parent 50a7bc8 commit 092f41f
Show file tree
Hide file tree
Showing 29 changed files with 609 additions and 102 deletions.
12 changes: 7 additions & 5 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
!/@npmcli/git/node_modules/@npmcli/
/@npmcli/git/node_modules/@npmcli/*
!/@npmcli/git/node_modules/@npmcli/promise-spawn
!/@npmcli/git/node_modules/hosted-git-info
!/@npmcli/git/node_modules/ini
!/@npmcli/git/node_modules/npm-install-checks
!/@npmcli/git/node_modules/npm-package-arg
!/@npmcli/git/node_modules/npm-pick-manifest
!/@npmcli/installed-package-contents
!/@npmcli/map-workspaces
!/@npmcli/map-workspaces/node_modules/
Expand All @@ -51,8 +55,6 @@
/@npmcli/package-json/node_modules/@npmcli/*
!/@npmcli/package-json/node_modules/@npmcli/git
!/@npmcli/package-json/node_modules/isexe
!/@npmcli/package-json/node_modules/npm-normalize-package-bin
!/@npmcli/package-json/node_modules/npm-pick-manifest
!/@npmcli/package-json/node_modules/proc-log
!/@npmcli/package-json/node_modules/which
!/@npmcli/promise-spawn
Expand Down Expand Up @@ -239,9 +241,7 @@
!/npm-pick-manifest
!/npm-pick-manifest/node_modules/
/npm-pick-manifest/node_modules/*
!/npm-pick-manifest/node_modules/hosted-git-info
!/npm-pick-manifest/node_modules/npm-install-checks
!/npm-pick-manifest/node_modules/npm-package-arg
!/npm-pick-manifest/node_modules/npm-normalize-package-bin
!/npm-profile
!/npm-registry-fetch
!/npm-registry-fetch/node_modules/
Expand Down Expand Up @@ -273,7 +273,9 @@
!/pacote/node_modules/hosted-git-info
!/pacote/node_modules/json-parse-even-better-errors
!/pacote/node_modules/normalize-package-data
!/pacote/node_modules/npm-install-checks
!/pacote/node_modules/npm-package-arg
!/pacote/node_modules/npm-pick-manifest
!/pacote/node_modules/unique-filename
!/pacote/node_modules/unique-slug
!/parse-conflict-json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-pick-manifest",
"version": "10.0.0",
"version": "9.1.0",
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
"main": "./lib",
"files": [
Expand All @@ -9,14 +9,13 @@
],
"scripts": {
"coverage": "tap",
"lint": "npm run eslint",
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"test": "tap",
"posttest": "npm run lint",
"postlint": "template-oss-check",
"lintfix": "npm run eslint -- --fix",
"lintfix": "npm run lint -- --fix",
"snap": "tap",
"template-oss-apply": "template-oss-apply --force",
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
"template-oss-apply": "template-oss-apply --force"
},
"repository": {
"type": "git",
Expand All @@ -30,14 +29,14 @@
"author": "GitHub Inc.",
"license": "ISC",
"dependencies": {
"npm-install-checks": "^7.1.0",
"npm-normalize-package-bin": "^4.0.0",
"npm-package-arg": "^12.0.0",
"npm-install-checks": "^6.0.0",
"npm-normalize-package-bin": "^3.0.0",
"npm-package-arg": "^11.0.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.22.0",
"tap": "^16.0.1"
},
"tap": {
Expand All @@ -48,11 +47,11 @@
]
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
"node": "^16.14.0 || >=18.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.23.3",
"version": "4.22.0",
"publish": true
}
}
23 changes: 12 additions & 11 deletions node_modules/npm-pick-manifest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-pick-manifest",
"version": "9.1.0",
"version": "10.0.0",
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
"main": "./lib",
"files": [
Expand All @@ -9,13 +9,14 @@
],
"scripts": {
"coverage": "tap",
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"lint": "npm run eslint",
"test": "tap",
"posttest": "npm run lint",
"postlint": "template-oss-check",
"lintfix": "npm run lint -- --fix",
"lintfix": "npm run eslint -- --fix",
"snap": "tap",
"template-oss-apply": "template-oss-apply --force"
"template-oss-apply": "template-oss-apply --force",
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
},
"repository": {
"type": "git",
Expand All @@ -29,14 +30,14 @@
"author": "GitHub Inc.",
"license": "ISC",
"dependencies": {
"npm-install-checks": "^6.0.0",
"npm-normalize-package-bin": "^3.0.0",
"npm-package-arg": "^11.0.0",
"npm-install-checks": "^7.1.0",
"npm-normalize-package-bin": "^4.0.0",
"npm-package-arg": "^12.0.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.22.0",
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"tap": "^16.0.1"
},
"tap": {
Expand All @@ -47,11 +48,11 @@
]
},
"engines": {
"node": "^16.14.0 || >=18.0.0"
"node": "^18.17.0 || >=20.5.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.22.0",
"version": "4.23.3",
"publish": true
}
}
27 changes: 27 additions & 0 deletions node_modules/pacote/node_modules/npm-install-checks/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.
101 changes: 101 additions & 0 deletions node_modules/pacote/node_modules/npm-install-checks/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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 isMusl = (file) => file.includes('libc.musl-') || file.includes('ld-musl-')

const checkPlatform = (target, force = false, environment = {}) => {
if (force) {
return
}

const platform = environment.os || process.platform
const arch = environment.cpu || process.arch
const osOk = target.os ? checkList(platform, target.os) : true
const cpuOk = target.cpu ? checkList(arch, target.cpu) : true

let libcOk = true
let libcFamily = null
if (target.libc) {
// libc checks only work in linux, any value is a failure if we aren't
if (environment.libc) {
libcOk = checkList(environment.libc, target.libc)
} else if (platform !== 'linux') {
libcOk = false
} else {
const report = process.report.getReport()
if (report.header?.glibcVersionRuntime) {
libcFamily = 'glibc'
} else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
libcFamily = 'musl'
}
libcOk = libcFamily ? checkList(libcFamily, target.libc) : false
}
}

if (!osOk || !cpuOk || !libcOk) {
throw Object.assign(new Error('Unsupported platform'), {
pkgid: target._id,
current: {
os: platform,
cpu: arch,
libc: libcFamily,
},
required: {
os: target.os,
cpu: target.cpu,
libc: target.libc,
},
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,
}
51 changes: 51 additions & 0 deletions node_modules/pacote/node_modules/npm-install-checks/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "npm-install-checks",
"version": "6.3.0",
"description": "Check the engines and platform fields in package.json",
"main": "lib/index.js",
"dependencies": {
"semver": "^7.1.1"
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.19.0",
"tap": "^16.0.1"
},
"scripts": {
"test": "tap",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"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": "^14.17.0 || ^16.13.0 || >=18.0.0"
},
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.19.0",
"publish": "true"
},
"tap": {
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
}
}
16 changes: 16 additions & 0 deletions node_modules/pacote/node_modules/npm-pick-manifest/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.
Loading

0 comments on commit 092f41f

Please sign in to comment.