Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more v10 deps updates #7931

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion node_modules/hosted-git-info/lib/hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : ''
const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : ''
const formatHashFragment = (f) => f.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
const formatHashFragment = (f) => f.toLowerCase()
.replace(/^\W+/g, '') // strip leading non-characters
.replace(/(?<!\W)\W+$/, '') // strip trailing non-characters
.replace(/\//g, '') // strip all slashes
.replace(/\W+/g, '-') // replace remaining non-characters with '-'

const defaults = {
sshtemplate: ({ domain, user, project, committish }) =>
Expand Down
6 changes: 3 additions & 3 deletions node_modules/hosted-git-info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hosted-git-info",
"version": "8.0.0",
"version": "8.0.2",
"description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"@npmcli/template-oss": "4.23.4",
"tap": "^16.0.1"
},
"files": [
Expand All @@ -55,7 +55,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.23.3",
"version": "4.23.4",
"publish": "true"
}
}
36 changes: 32 additions & 4 deletions node_modules/npm-install-checks/lib/current-env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const process = require('node:process')
const nodeOs = require('node:os')
const fs = require('node:fs')

function isMusl (file) {
return file.includes('libc.musl-') || file.includes('ld-musl-')
Expand All @@ -13,12 +14,23 @@ function cpu () {
return process.arch
}

function libc (osName) {
// this is to make it faster on non linux machines
if (osName !== 'linux') {
const LDD_PATH = '/usr/bin/ldd'
function getFamilyFromFilesystem () {
try {
const content = fs.readFileSync(LDD_PATH, 'utf-8')
if (content.includes('musl')) {
return 'musl'
}
if (content.includes('GNU C Library')) {
return 'glibc'
}
return null
} catch {
return undefined
}
let family
}

function getFamilyFromReport () {
const originalExclude = process.report.excludeNetwork
process.report.excludeNetwork = true
const report = process.report.getReport()
Expand All @@ -27,6 +39,22 @@ function libc (osName) {
family = 'glibc'
} else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
family = 'musl'
} else {
family = null
}
return family
}

let family
function libc (osName) {
if (osName !== 'linux') {
return undefined
}
if (family === undefined) {
family = getFamilyFromFilesystem()
if (family === undefined) {
family = getFamilyFromReport()
}
}
return family
}
Expand Down
6 changes: 3 additions & 3 deletions node_modules/npm-install-checks/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "npm-install-checks",
"version": "7.1.0",
"version": "7.1.1",
"description": "Check the engines and platform fields in package.json",
"main": "lib/index.js",
"dependencies": {
"semver": "^7.1.1"
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"@npmcli/template-oss": "4.23.4",
"tap": "^16.0.1"
},
"scripts": {
Expand Down Expand Up @@ -40,7 +40,7 @@
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.23.3",
"version": "4.23.4",
"publish": "true"
},
"tap": {
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"fs-minipass": "^3.0.3",
"glob": "^10.4.5",
"graceful-fs": "^4.2.11",
"hosted-git-info": "^8.0.0",
"hosted-git-info": "^8.0.2",
"ini": "^5.0.0",
"init-package-json": "^7.0.1",
"is-cidr": "^5.1.0",
Expand All @@ -131,7 +131,7 @@
"nopt": "^8.0.0",
"normalize-package-data": "^7.0.0",
"npm-audit-report": "^6.0.0",
"npm-install-checks": "^7.1.0",
"npm-install-checks": "^7.1.1",
"npm-package-arg": "^12.0.0",
"npm-pick-manifest": "^10.0.0",
"npm-profile": "^11.0.1",
Expand Down Expand Up @@ -7385,9 +7385,9 @@
}
},
"node_modules/hosted-git-info": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.0.0.tgz",
"integrity": "sha512-4nw3vOVR+vHUOT8+U4giwe2tcGv+R3pwwRidUe67DoMBTjhrfr6rZYJVVwdkBE+Um050SG+X9tf0Jo4fOpn01w==",
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.0.2.tgz",
"integrity": "sha512-sYKnA7eGln5ov8T8gnYlkSOxFJvywzEx9BueN6xo/GKO8PGiI6uK6xx+DIGe45T3bdVjLAQDQW1aicT8z8JwQg==",
"inBundle": true,
"license": "ISC",
"dependencies": {
Expand Down Expand Up @@ -10707,9 +10707,9 @@
}
},
"node_modules/npm-install-checks": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.0.tgz",
"integrity": "sha512-bkTildVlofeMX7wiOaWk3PlW7YcBXAuEc7TWpOxwUgalG5ZvgT/ms+6OX9zt7iGLv4+VhKbRZhpOfgQJzk1YAw==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.1.tgz",
"integrity": "sha512-u6DCwbow5ynAX5BdiHQ9qvexme4U3qHW3MWe5NqH+NeBm0LbiH6zvGjNNew1fY+AZZUtVHbOPF3j7mJxbUzpXg==",
"inBundle": true,
"license": "BSD-2-Clause",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"fs-minipass": "^3.0.3",
"glob": "^10.4.5",
"graceful-fs": "^4.2.11",
"hosted-git-info": "^8.0.0",
"hosted-git-info": "^8.0.2",
"ini": "^5.0.0",
"init-package-json": "^7.0.1",
"is-cidr": "^5.1.0",
Expand All @@ -96,7 +96,7 @@
"nopt": "^8.0.0",
"normalize-package-data": "^7.0.0",
"npm-audit-report": "^6.0.0",
"npm-install-checks": "^7.1.0",
"npm-install-checks": "^7.1.1",
"npm-package-arg": "^12.0.0",
"npm-pick-manifest": "^10.0.0",
"npm-profile": "^11.0.1",
Expand Down
Loading