From 8ec230fea31b9c48ef02a70e4626d29f9743d109 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 18 Jun 2024 13:38:08 +0900 Subject: [PATCH] chore: fix dependency graph (#5069) --- .github/dependency_graph.svg | 370 +++++++++--------- _tools/check_circular_package_dependencies.ts | 4 +- 2 files changed, 181 insertions(+), 193 deletions(-) diff --git a/.github/dependency_graph.svg b/.github/dependency_graph.svg index 63682de2c..70aae7dea 100644 --- a/.github/dependency_graph.svg +++ b/.github/dependency_graph.svg @@ -4,469 +4,457 @@ - + std_deps - + archive - -archive + +archive io - -io + +io archive->io - - + + bytes - -bytes + +bytes io->bytes - - + + assert - -assert + +assert internal - -internal + +internal assert->internal - - + + async - -async + +async cli - -cli + +cli collections - -collections + +collections crypto - -crypto + +crypto csv - -csv + +csv streams - -streams + +streams csv->streams - - + + streams->bytes - - + + - + -data_\nstructures - -data_ -structures +data-\nstructures + +data- +structures datetime - -datetime + +datetime dotenv - -dotenv + +dotenv encoding - -encoding + +encoding expect - -expect + +expect expect->assert - - + + expect->internal - - + + fmt - -fmt + +fmt - + -front_\nmatter - -front_ -matter +front-\nmatter + +front- +matter toml - -toml + +toml - + -front_\nmatter->toml - - +front-\nmatter->toml + + yaml - -yaml + +yaml - + -front_\nmatter->yaml - - +front-\nmatter->yaml + + toml->collections - - + + fs - -fs + +fs path - -path + +path fs->path - - + + html - -html + +html http - -http + +http http->async - - + + http->cli - - + + http->streams - - + + http->encoding - - + + http->fmt - - + + http->path - - + + - + -media_types - -media_types +media-\ntypes + +media- +types - + -http->media_types - - +http->media-\ntypes + + net - -net + +net http->net - - + + ini - -ini + +ini json - -json + +json json->streams - - + + jsonc - -jsonc + +jsonc jsonc->json - - + + log - -log + +log log->io - - + + log->fmt - - + + log->fs - - - - - -media_\ntypes - -media_ -types + + - + msgpack - -msgpack + +msgpack msgpack->bytes - - + + - + regexp - -regexp + +regexp - + semver - -semver + +semver - + testing - -testing + +testing testing->assert - - + + testing->internal - - + + testing->async - - + + + + + +testing->data-\nstructures + + testing->fmt - - + + testing->fs - - + + testing->path - - - - - -data_structures - -data_structures - - - -testing->data_structures - - + + - + text - -text + +text - + ulid - -ulid + +ulid - + url - -url + +url url->path - - + + - + uuid - -uuid + +uuid uuid->bytes - - + + uuid->crypto - - + + - + webgpu - -webgpu + +webgpu diff --git a/_tools/check_circular_package_dependencies.ts b/_tools/check_circular_package_dependencies.ts index 9ce173c3f..79bb26cf6 100644 --- a/_tools/check_circular_package_dependencies.ts +++ b/_tools/check_circular_package_dependencies.ts @@ -218,7 +218,7 @@ function checkCircularDeps( /** Formats label for diagram */ function formatLabel(mod: string) { - return '"' + mod.replace(/_/g, "_\\n") + '"'; + return '"' + mod.replace(/_/g, "-\\n") + '"'; } /** Returns node style (in DOT language) for each state */ @@ -238,7 +238,7 @@ if (Deno.args.includes("--graph")) { const info = deps[mod]!; lines.push(` ${formatLabel(mod)} ${stateToNodeStyle(info.state)};`); for (const dep of info.set) { - lines.push(` ${formatLabel(mod)} -> ${dep};`); + lines.push(` ${formatLabel(mod)} -> ${formatLabel(dep)};`); } } lines.push("}");