From 06c8a85069a4907e27acb3c7a0d2febea91681fd Mon Sep 17 00:00:00 2001 From: Reggi Date: Wed, 9 Oct 2024 11:26:32 -0400 Subject: [PATCH 1/6] chore: add creation of a DEPENDENCIES.json file --- scripts/dependency-graph.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dependency-graph.js b/scripts/dependency-graph.js index 4d80f5207d8c1..5fc478163d717 100644 --- a/scripts/dependency-graph.js +++ b/scripts/dependency-graph.js @@ -114,6 +114,10 @@ const main = async function () { ` - ${hierarchyOurs.reverse().join(`${EOL} - `)}`, ] + fs.writeFile(join(CWD, 'DEPENDENCIES.json'), + JSON.stringify(hierarchyOurs.map(v => v.split(', ')), null, 2) + ) + return fs.writeFile(join(CWD, 'DEPENDENCIES.md'), out.join(EOL)) } From 8e6a746f51040ad603410ec0bafb6ac44bec1935 Mon Sep 17 00:00:00 2001 From: reggi Date: Wed, 9 Oct 2024 11:41:56 -0400 Subject: [PATCH 2/6] chore: fix lint --- scripts/dependency-graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dependency-graph.js b/scripts/dependency-graph.js index 5fc478163d717..95c313f5838ed 100644 --- a/scripts/dependency-graph.js +++ b/scripts/dependency-graph.js @@ -117,7 +117,7 @@ const main = async function () { fs.writeFile(join(CWD, 'DEPENDENCIES.json'), JSON.stringify(hierarchyOurs.map(v => v.split(', ')), null, 2) ) - + return fs.writeFile(join(CWD, 'DEPENDENCIES.md'), out.join(EOL)) } From 02880151c2153377998b1c0fb304e942109a54d1 Mon Sep 17 00:00:00 2001 From: reggi Date: Wed, 9 Oct 2024 14:03:05 -0400 Subject: [PATCH 3/6] chore: allow DEPENDENCIES.json --- scripts/template-oss/root.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/template-oss/root.js b/scripts/template-oss/root.js index fb2d964a3f993..58a8c66e077e8 100644 --- a/scripts/template-oss/root.js +++ b/scripts/template-oss/root.js @@ -60,6 +60,7 @@ module.exports = { '/node_modules/', '/index.js', '/DEPENDENCIES.md', + '/DEPENDENCIES.json', '/CONTRIBUTING.md', '/configure', '/AUTHORS', From d0ed55aaf4947380e6a2ba64a68fb5d27600d8a5 Mon Sep 17 00:00:00 2001 From: reggi Date: Fri, 11 Oct 2024 10:32:01 -0400 Subject: [PATCH 4/6] add file --- DEPENDENCIES.json | 99 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 DEPENDENCIES.json diff --git a/DEPENDENCIES.json b/DEPENDENCIES.json new file mode 100644 index 0000000000000..d2dbb4c78b2b7 --- /dev/null +++ b/DEPENDENCIES.json @@ -0,0 +1,99 @@ +[ + [ + "npm" + ], + [ + "@npmcli/smoke-tests", + "libnpmaccess", + "libnpmexec", + "libnpmpublish" + ], + [ + "@npmcli/mock-registry", + "libnpmdiff", + "libnpmfund", + "libnpmpack" + ], + [ + "@npmcli/arborist" + ], + [ + "@npmcli/metavuln-calculator" + ], + [ + "pacote", + "@npmcli/config", + "libnpmversion" + ], + [ + "@npmcli/run-script", + "@npmcli/map-workspaces", + "libnpmhook", + "libnpmorg", + "libnpmsearch", + "libnpmteam", + "init-package-json", + "npm-profile" + ], + [ + "@npmcli/package-json", + "npm-registry-fetch" + ], + [ + "@npmcli/git", + "make-fetch-happen" + ], + [ + "npm-pick-manifest", + "@npmcli/installed-package-contents", + "cacache", + "promzard" + ], + [ + "@npmcli/docs", + "npm-package-arg", + "npm-install-checks", + "npm-bundled", + "normalize-package-data", + "@npmcli/fs", + "unique-filename", + "npm-packlist", + "@npmcli/mock-globals", + "bin-links", + "nopt", + "parse-conflict-json", + "read-package-json-fast", + "read" + ], + [ + "@npmcli/eslint-config", + "@npmcli/template-oss", + "ignore-walk", + "semver", + "hosted-git-info", + "proc-log", + "validate-npm-package-name", + "@npmcli/promise-spawn", + "ini", + "npm-normalize-package-bin", + "json-parse-even-better-errors", + "@npmcli/node-gyp", + "fs-minipass", + "ssri", + "unique-slug", + "@npmcli/redact", + "@npmcli/agent", + "minipass-fetch", + "@npmcli/name-from-folder", + "@npmcli/query", + "cmd-shim", + "read-cmd-shim", + "write-file-atomic", + "abbrev", + "proggy", + "minify-registry-metadata", + "mute-stream", + "npm-audit-report", + "npm-user-validate" + ] +] From ed2149a0dcddbc3480674a528b7711aabedbaa94 Mon Sep 17 00:00:00 2001 From: reggi Date: Fri, 11 Oct 2024 10:44:28 -0400 Subject: [PATCH 5/6] add to ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cf767636080ce..9d9d69178ed10 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ !/CODE_OF_CONDUCT.md !/configure !/CONTRIBUTING.md +!/DEPENDENCIES.json !/DEPENDENCIES.md !/docs/ !/index.js From 2808f7b206c0ea6cb660e8c55b16cc725165bcf8 Mon Sep 17 00:00:00 2001 From: reggi Date: Mon, 14 Oct 2024 12:55:25 -0400 Subject: [PATCH 6/6] fix lf crlf deps json issue --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 5d3dbc3b3ac65..c70f4d0bcee0a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,6 +16,7 @@ /node_modules/.gitignore text eol=lf /workspaces/arborist/test/fixtures/.gitignore text eol=lf /DEPENDENCIES.md text eol=lf +/DEPENDENCIES.json text eol=lf /AUTHORS text eol=lf # fixture tarballs should be treated as binary