From 26a892aab438c97ef04b8dd280910ec4bc986633 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Fri, 3 May 2024 20:00:16 +0100 Subject: [PATCH] Update packages Signed-off-by: Prabhu Subramanian --- deno.json | 6 +-- docker.js | 4 ++ jsr.json | 2 +- package-lock.json | 128 ++++++++++++++++++++++++++++------------------ package.json | 8 +-- utils.js | 7 +++ utils.test.js | 4 +- 7 files changed, 98 insertions(+), 61 deletions(-) diff --git a/deno.json b/deno.json index 4ed42c464..9bc294963 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "10.5.0", + "version": "10.5.1", "exports": "./index.js", "compilerOptions": { "allowJs": true, @@ -46,8 +46,8 @@ "@appthreat/cdx-proto": "npm:@appthreat/cdx-proto@1.0.1", "@babel/parser": "npm:@babel/parser@^7.24.5", "@babel/traverse": "npm:@babel/traverse@^7.24.5", - "@npmcli/arborist": "npm:@npmcli/arborist@7.5.0", - "ajv": "npm:ajv@^8.12.0", + "@npmcli/arborist": "npm:@npmcli/arborist@7.5.1", + "ajv": "npm:ajv@^8.13.0", "ajv-formats": "npm:ajv-formats@^3.0.1", "cheerio": "npm:cheerio@^1.0.0-rc.12", "edn-data": "npm:edn-data@1.1.1", diff --git a/docker.js b/docker.js index c0f0e33e3..249592305 100644 --- a/docker.js +++ b/docker.js @@ -367,6 +367,10 @@ export const getConnection = async (options, forRegistry) => { "Ensure Docker for Desktop is running as an administrator with 'Exposing daemon on TCP without TLS' setting turned on.", opts, ); + } else if (_platform() === "darwin") { + console.warn( + "Ensure Podman Desktop (open-source) or Docker for Desktop (May require subscription) is running.", + ); } else { console.warn( "Ensure docker/podman service or Docker for Desktop is running.", diff --git a/jsr.json b/jsr.json index e80e57d7a..116e79153 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "10.5.0", + "version": "10.5.1", "exports": "./index.js", "include": ["*.js", "bin/**", "data/**", "types/**"], "exclude": ["test/", "docs/", "contrib/", "ci/", "tools_config/"] diff --git a/package-lock.json b/package-lock.json index d3c84c677..a0e35f758 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "@cyclonedx/cdxgen", - "version": "10.5.0", + "version": "10.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cyclonedx/cdxgen", - "version": "10.5.0", + "version": "10.5.1", "license": "Apache-2.0", "dependencies": { "@babel/parser": "^7.24.5", "@babel/traverse": "^7.24.5", - "@npmcli/arborist": "7.5.0", - "ajv": "^8.12.0", + "@npmcli/arborist": "7.5.1", + "ajv": "^8.13.0", "ajv-formats": "^3.0.1", "cheerio": "^1.0.0-rc.12", "edn-data": "1.1.1", @@ -44,7 +44,7 @@ "obom": "bin/cdxgen.js" }, "devDependencies": { - "@biomejs/biome": "1.7.1", + "@biomejs/biome": "1.7.2", "jest": "^29.7.0", "typescript": "^5.4.5" }, @@ -615,9 +615,9 @@ "dev": true }, "node_modules/@biomejs/biome": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.7.1.tgz", - "integrity": "sha512-wb2UNoFXcgaMdKXKT5ytsYntaogl2FSTjDt20CZynF3v7OXQUcIpTrr+be3XoOGpoZRj3Ytq9TSpmplUREXmeA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.7.2.tgz", + "integrity": "sha512-6Skx9N47inLQzYi9RKgJ7PBnUnaHnMe/imqX43cOcJjZtfMnQLxEvfM2Eyo7gChkwrZlwc+VbA4huFRjw2fsYA==", "dev": true, "hasInstallScript": true, "bin": { @@ -631,20 +631,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "1.7.1", - "@biomejs/cli-darwin-x64": "1.7.1", - "@biomejs/cli-linux-arm64": "1.7.1", - "@biomejs/cli-linux-arm64-musl": "1.7.1", - "@biomejs/cli-linux-x64": "1.7.1", - "@biomejs/cli-linux-x64-musl": "1.7.1", - "@biomejs/cli-win32-arm64": "1.7.1", - "@biomejs/cli-win32-x64": "1.7.1" + "@biomejs/cli-darwin-arm64": "1.7.2", + "@biomejs/cli-darwin-x64": "1.7.2", + "@biomejs/cli-linux-arm64": "1.7.2", + "@biomejs/cli-linux-arm64-musl": "1.7.2", + "@biomejs/cli-linux-x64": "1.7.2", + "@biomejs/cli-linux-x64-musl": "1.7.2", + "@biomejs/cli-win32-arm64": "1.7.2", + "@biomejs/cli-win32-x64": "1.7.2" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.7.1.tgz", - "integrity": "sha512-qfLrIIB58dkgiY/1tgG6fSCBK22PZaSIf6blweZBsG6iMij05mEuJt50ne+zPnNFNUmt8t43NC/qOXT3iFHQBA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.7.2.tgz", + "integrity": "sha512-CrldIueHivWEWmeTkK8bTXajeX53F8i2Rrkkt8cPZyMtzkrwxf8Riq4a/jz3SQBHkxHFT4TqGbSTNMXe3X1ogA==", "cpu": [ "arm64" ], @@ -658,9 +658,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.7.1.tgz", - "integrity": "sha512-OGeyNsEcp5VnKbF9/TBjPCTHNEOm7oHegEve07U3KZmzqfpw2Oe3i9DVW8t6vvj1TYbrwWYCld25H34kBDY7Vg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.7.2.tgz", + "integrity": "sha512-UELnLJuJOsTL9meArvn8BtiXDURyPil2Ej9me2uVpEvee8UQdqd/bssP5we400OWShlL1AAML4fn6d2WX5332g==", "cpu": [ "x64" ], @@ -674,9 +674,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.7.1.tgz", - "integrity": "sha512-MQDf5wErj1iBvlcxCyOa0XqZYN8WJrupVgbNnqhntO3yVATg8GxduVUn1fDSaolznkDRsj7Pz3Xu1esBFwvfmg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.7.2.tgz", + "integrity": "sha512-Z1CSGQE6fHz55gkiFHv9E8wEAaSUd7dHSRaxSCBa7utonHqpIeMbvj3Evm1w0WfGLFDtRXLV1fTfEdM0FMTOhA==", "cpu": [ "arm64" ], @@ -690,9 +690,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.7.1.tgz", - "integrity": "sha512-giH0/CzLOJ+wbxLxd5Shnr5xQf5fGnTRWLDe3lzjaF7IplVydNCEeZJtncB01SvyA6DAFJsvQ4LNxzAOQfEVCg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.7.2.tgz", + "integrity": "sha512-kKYZiem7Sj7wI0dpVxJlK7C+TFQwzO/ctufIGXGJAyEmUe9vEKSzV8CXpv+JIRiTWyqaZJ4K+eHz4SPdPCv05w==", "cpu": [ "arm64" ], @@ -706,9 +706,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.7.1.tgz", - "integrity": "sha512-3wmCsGcC3KZ4pfTknXHfyMMlXPMhgfXVAcG5GlrR+Tq2JGiAw0EUydaLpsSBEbcG7IxH6OiUZEJZ95kAycCHBA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.7.2.tgz", + "integrity": "sha512-vXXyox8/CQijBxAu0+r8FfSO7JlC4tob3PbaFda8gPJFRz2uFJw39HtxVUwbTV1EcU6wSPh4SiRu5sZfP1VHrQ==", "cpu": [ "x64" ], @@ -722,9 +722,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.7.1.tgz", - "integrity": "sha512-ySNDtPhsLxU125IFHHAxfpoHBpkM56s4mEXeO70GZtgZay/o1h8IUPWCWf5Z7gKgc4jwgYN1U1U9xabI3hZVAg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.7.2.tgz", + "integrity": "sha512-x10LpGMepDrLS+h2TZ6/T7egpHjGKtiI4GuShNylmBQJWfTotbFf9eseHggrqJ4WZf9yrGoVYrtbxXftuB95sQ==", "cpu": [ "x64" ], @@ -738,9 +738,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.7.1.tgz", - "integrity": "sha512-8hIDakEqZn0i6+388noYKdZ0ZrovTwnvMU/Qp/oJou0G7EPVdXupOe0oxiQSdRN0W7f6CS/yjPCYuVGzDG6r0g==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.7.2.tgz", + "integrity": "sha512-kRXdlKzcU7INf6/ldu0nVmkOgt7bKqmyXRRCUqqaJfA32+9InTbkD8tGrHZEVYIWr+eTuKcg16qZVDsPSDFZ8g==", "cpu": [ "arm64" ], @@ -754,9 +754,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.7.1.tgz", - "integrity": "sha512-3W9k3uH6Ea6VOpAS9xkkAlS0LTfnGQjmIUCegZ8SDtK2NgJ1gO+qdEkGJb0ltahusFTN1QxJ107dM7ASA9IUEg==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.7.2.tgz", + "integrity": "sha512-qHTtpAs+CNglAAuaTy09htoqUhrQyd3nd0aGTuLNqD10h1llMVi8WFZfoa+e5MuDSfYtMK6nW2Tbf6WgzzR1Qw==", "cpu": [ "x64" ], @@ -1770,9 +1770,9 @@ } }, "node_modules/@npmcli/arborist": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-7.5.0.tgz", - "integrity": "sha512-Uu1hkXEVjz85gJfYqa0d2upTihR+Nw18ozkIuKb5oZXb8+wpCtuRUxP2mV20GYX7ZoWZym6QgC0jxUDLdHaTVQ==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-7.5.1.tgz", + "integrity": "sha512-rjGX1tzn9HVQHv5lIP2wANvJmG5+/aFiVFoTBSzneOaSuBUJOnFRha2DE+cIRRekuGllmYff2/XcXnOWrZOJ/w==", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^3.1.0", @@ -1783,8 +1783,8 @@ "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^5.1.0", "@npmcli/query": "^3.1.0", - "@npmcli/redact": "^1.1.0", - "@npmcli/run-script": "^8.0.0", + "@npmcli/redact": "^2.0.0", + "@npmcli/run-script": "^8.1.0", "bin-links": "^4.0.1", "cacache": "^18.0.0", "common-ancestor-path": "^1.0.1", @@ -1796,7 +1796,7 @@ "npm-install-checks": "^6.2.0", "npm-package-arg": "^11.0.2", "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^16.2.1", + "npm-registry-fetch": "^17.0.0", "pacote": "^18.0.1", "parse-conflict-json": "^3.0.0", "proc-log": "^4.2.0", @@ -1816,6 +1816,32 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/@npmcli/arborist/node_modules/@npmcli/redact": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-2.0.0.tgz", + "integrity": "sha512-SEjCPAVHWYUIQR+Yn03kJmrJjZDtJLYpj300m3HV9OTRZNpC5YpbMsM3eTkECyT4aWj8lDr9WeY6TWefpubtYQ==", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/arborist/node_modules/npm-registry-fetch": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-17.0.1.tgz", + "integrity": "sha512-fLu9MTdZTlJAHUek/VLklE6EpIiP3VZpTiuN7OOMCt2Sd67NCpSEetMaxHHEZiZxllp8ZLsUpvbEszqTFEc+wA==", + "dependencies": { + "@npmcli/redact": "^2.0.0", + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/@npmcli/arborist/node_modules/proc-log": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", @@ -2359,14 +2385,14 @@ } }, "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", diff --git a/package.json b/package.json index f363eac9a..7f8bbd7ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cyclonedx/cdxgen", - "version": "10.5.0", + "version": "10.5.1", "description": "Creates CycloneDX Software Bill of Materials (SBOM) from source or container image", "homepage": "http://github.com/cyclonedx/cdxgen", "author": "Prabhu Subramanian ", @@ -59,8 +59,8 @@ "dependencies": { "@babel/parser": "^7.24.5", "@babel/traverse": "^7.24.5", - "@npmcli/arborist": "7.5.0", - "ajv": "^8.12.0", + "@npmcli/arborist": "7.5.1", + "ajv": "^8.13.0", "ajv-formats": "^3.0.1", "cheerio": "^1.0.0-rc.12", "edn-data": "1.1.1", @@ -102,7 +102,7 @@ }, "files": ["*.js", "bin/", "data/", "types/"], "devDependencies": { - "@biomejs/biome": "1.7.1", + "@biomejs/biome": "1.7.2", "jest": "^29.7.0", "typescript": "^5.4.5" } diff --git a/utils.js b/utils.js index 4d7744ec8..8832ddc7a 100644 --- a/utils.js +++ b/utils.js @@ -206,11 +206,18 @@ if (process.env.SWIFT_CMD) { SWIFT_CMD = process.env.SWIFT_CMD; } +// HTTP cache +const gotHttpCache = new Map(); + // Custom user-agent for cdxgen export const cdxgenAgent = got.extend({ headers: { "user-agent": `@CycloneDX/cdxgen ${_version}`, }, + cache: gotHttpCache, + retry: { + limit: 0, + }, }); /** diff --git a/utils.test.js b/utils.test.js index b5fc713c3..99c338dc9 100644 --- a/utils.test.js +++ b/utils.test.js @@ -2220,8 +2220,8 @@ test("parsePkgLock v3", async () => { projectName: "cdxgen", }); deps = parsedList.pkgList; - expect(deps.length).toEqual(840); - expect(parsedList.dependenciesList.length).toEqual(840); + expect(deps.length).toEqual(842); + expect(parsedList.dependenciesList.length).toEqual(842); }); test("parseBowerJson", async () => {