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

chore: add creation of a DEPENDENCIES.json file #7824

Merged
merged 6 commits into from
Oct 14, 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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
!/CODE_OF_CONDUCT.md
!/configure
!/CONTRIBUTING.md
!/DEPENDENCIES.json
!/DEPENDENCIES.md
!/docs/
!/index.js
Expand Down
99 changes: 99 additions & 0 deletions DEPENDENCIES.json
Original file line number Diff line number Diff line change
@@ -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"
]
]
4 changes: 4 additions & 0 deletions scripts/dependency-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
1 change: 1 addition & 0 deletions scripts/template-oss/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
'/node_modules/',
'/index.js',
'/DEPENDENCIES.md',
'/DEPENDENCIES.json',
'/CONTRIBUTING.md',
'/configure',
'/AUTHORS',
Expand Down
Loading