From a5a9ddd1cabb2f682542e856ed39fe4eac85c903 Mon Sep 17 00:00:00 2001 From: Long Ho Date: Fri, 29 May 2026 10:10:15 -0400 Subject: [PATCH] feat: merge somepath query modes --- ARCHITECTURE.md | 10 +- CONTRIBUTING.md | 2 +- README.md | 41 +++++-- crates/codescythe/analyze/query.rs | 11 +- crates/codescythe/analyze/tests.rs | 68 +++++------ crates/codescythe_cli/main.rs | 4 +- docs/BUILD.bazel | 2 +- .../query/knip-export-basics-allpaths.svg | 1 + .../assets/query/oxc-resolution-folder.svg | 1 + .../assets/query/runfiles-alias-somepath.svg | 1 + .../assets/query/test-file-usage-somepath.svg | 1 + docs/src/render.ts | 114 +++++++++++++----- docs/src/site.css | 20 ++- packages/codescythe/README.md | 2 +- 14 files changed, 183 insertions(+), 95 deletions(-) create mode 100644 docs/src/assets/query/knip-export-basics-allpaths.svg create mode 100644 docs/src/assets/query/oxc-resolution-folder.svg create mode 100644 docs/src/assets/query/runfiles-alias-somepath.svg create mode 100644 docs/src/assets/query/test-file-usage-somepath.svg diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 5fb0853..d2ed0d5 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -329,11 +329,11 @@ Selectors are resolved after graph construction: - Directory selectors match every project file node under that directory. - Export selectors match one exported-symbol node. -`somepath` and `somepaths` run breadth-first search from the resolved source -nodes. They keep one visited bit and one parent edge per node, so dependency -cycles cannot create infinite walks. `somepath` stops after the first matched -target. `somepaths` keeps traversing and reconstructs one shortest path for each -reachable matched target. +`somepath` runs breadth-first search from the resolved source nodes. It keeps +one visited bit and one parent edge per node, so dependency cycles cannot create +infinite walks. It keeps traversing after the first matched target and +reconstructs one shortest path for each reachable matched target. File and +export selectors usually match one target; directory selectors can match many. `allpaths` intentionally does not enumerate every simple path. It computes the set of nodes reachable forward from the sources, the set of nodes that can reach diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c17d6c1..5005abd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ The public Rust API is intentionally narrow: returns a fix report. - `codescythe::doctor(cwd, config_path)` returns config-risk diagnostics. - `codescythe::query(cwd, config_path, request)` returns dependency paths or a - path subgraph for `somepath`, `somepaths`, and `allpaths`. + path subgraph for `somepath` and `allpaths`. - `codescythe::render_query_mermaid(result)` and `codescythe::render_query_svg(result)` render query results as diagrams. diff --git a/README.md b/README.md index 4833dc6..d1c53a0 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Use `query` to inspect dependency paths through the same source graph: ```sh codescythe query somepath src/main.ts src/module.ts -codescythe query somepaths src/main.ts src/features/ +codescythe query somepath src/main.ts src/features/ codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --json codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output mermaid codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output svg > graph.svg @@ -149,10 +149,9 @@ Selectors can point at files, directories, or exported symbols written as `:`. Relative selectors are resolved from the analysis root chosen by `-C` or `--config`. -- `somepath` returns one shortest path from the source selector to any matched - target. -- `somepaths` returns one shortest path per reachable matched target, which is - useful for file-to-folder queries. +- `somepath` returns one shortest path per reachable matched target. File and + export targets usually match one target, while directory targets can match + many. - `allpaths` returns the subgraph of every node and edge that lies on a path from the source selector to the target selector. @@ -161,15 +160,19 @@ file/export nodes and typed import or re-export edges. Mermaid output renders the same query graph as a `flowchart LR` diagram, and SVG output renders that Mermaid source with the pure-Rust `mermaid-rs-renderer` crate. -`somepath` and `somepaths` use breadth-first search with visited nodes, while -`allpaths` intersects forward reachability from the source with reverse -reachability from the target. That makes dependency cycles finite without -enumerating every possible walk through the graph. +`somepath` uses breadth-first search with visited nodes, while `allpaths` +intersects forward reachability from the source with reverse reachability from +the target. That makes dependency cycles finite without enumerating every +possible walk through the graph. Fixture-backed Mermaid examples: ```sh -codescythe query somepath -C tests/fixtures/test-file-usage --output mermaid src/main.ts src/module.ts:used +codescythe query somepath \ + -C tests/fixtures/test-file-usage \ + --output mermaid \ + src/main.ts \ + src/module.ts:used ``` ```mermaid @@ -180,7 +183,11 @@ flowchart LR ``` ```sh -codescythe query somepaths -C tests/fixtures/oxc-resolution --output mermaid app/index.ts app/ +codescythe query somepath \ + -C tests/fixtures/oxc-resolution \ + --output mermaid \ + app/index.ts \ + app/ ``` ```mermaid @@ -201,7 +208,11 @@ flowchart LR ``` ```sh -codescythe query allpaths -C tests/fixtures/knip-export-basics --output mermaid index.ts my-namespace.ts:y +codescythe query allpaths \ + -C tests/fixtures/knip-export-basics \ + --output mermaid \ + index.ts \ + my-namespace.ts:y ``` ```mermaid @@ -216,7 +227,11 @@ flowchart LR ``` ```sh -codescythe query somepath -C tests/fixtures/runfiles-fixture --output mermaid workspace/frontend/apps/client/platform/platformRuntime.ts protobuf/generated/client.ts:client +codescythe query somepath \ + -C tests/fixtures/runfiles-fixture \ + --output mermaid \ + workspace/frontend/apps/client/platform/platformRuntime.ts \ + protobuf/generated/client.ts:client ``` ```mermaid diff --git a/crates/codescythe/analyze/query.rs b/crates/codescythe/analyze/query.rs index 7f462d6..d77e5cf 100644 --- a/crates/codescythe/analyze/query.rs +++ b/crates/codescythe/analyze/query.rs @@ -4,7 +4,6 @@ use super::*; #[serde(rename_all = "camelCase")] pub enum QueryKind { Somepath, - Somepaths, Allpaths, } @@ -256,13 +255,12 @@ pub fn query_path( let target_set = target_indexes.iter().copied().collect::>(); let paths = match request.kind { - QueryKind::Somepath => shortest_paths(&graph, &source_indexes, &target_set, true), - QueryKind::Somepaths => shortest_paths(&graph, &source_indexes, &target_set, false), + QueryKind::Somepath => shortest_paths(&graph, &source_indexes, &target_set), QueryKind::Allpaths => Vec::new(), }; let path_graph = match request.kind { QueryKind::Allpaths => Some(allpaths_graph(&graph, &source_indexes, &target_set)), - QueryKind::Somepath | QueryKind::Somepaths => None, + QueryKind::Somepath => None, }; Ok(QueryResult { @@ -873,7 +871,6 @@ fn shortest_paths( graph: &QueryGraphIndex, sources: &[usize], targets: &HashSet, - stop_after_first: bool, ) -> Vec { let mut queue = VecDeque::new(); let mut seen = vec![false; graph.nodes.len()]; @@ -887,8 +884,8 @@ fn shortest_paths( let mut found = BTreeSet::::new(); while let Some(node) = queue.pop_front() { - if targets.contains(&node) && found.insert(node) && stop_after_first { - break; + if targets.contains(&node) { + found.insert(node); } for edge in &graph.outgoing[node] { diff --git a/crates/codescythe/analyze/tests.rs b/crates/codescythe/analyze/tests.rs index 83f1ec6..750cea7 100644 --- a/crates/codescythe/analyze/tests.rs +++ b/crates/codescythe/analyze/tests.rs @@ -1519,7 +1519,7 @@ fn query_somepath_tracks_named_export_edges() { } #[test] -fn query_somepaths_returns_one_path_per_reachable_directory_file() { +fn query_somepath_returns_one_path_per_reachable_directory_file() { let result = query_inline_project( &[ ( @@ -1531,7 +1531,7 @@ fn query_somepaths_returns_one_path_per_reachable_directory_file() { ("src/deps/dead.ts", "export const dead = 1;\n"), ], QueryRequest { - kind: QueryKind::Somepaths, + kind: QueryKind::Somepath, from: "src/main.ts".to_string(), to: "src/deps/".to_string(), }, @@ -1599,39 +1599,37 @@ fn query_allpaths_returns_path_subgraph_without_dead_edges() { } #[test] -fn query_somepath_variants_handle_circular_dependencies() { - for kind in [QueryKind::Somepath, QueryKind::Somepaths] { - let result = query_inline_project( - cycle_query_files(), - QueryRequest { - kind, - from: "src/root.ts".to_string(), - to: "src/targets/sink.ts".to_string(), - }, - ); - - assert_eq!(result.paths.len(), 1); - assert_eq!( - result.paths[0] - .nodes - .iter() - .map(query_node_label) - .collect::>(), - vec![ - "src/root.ts", - "src/cycle/a.ts:a", - "src/cycle/a.ts", - "src/cycle/b.ts:b", - "src/cycle/b.ts", - "src/targets/sink.ts:sink", - "src/targets/sink.ts", - ] - ); - assert!( - result.paths[0].edges.len() < 10, - "{kind:?} should terminate after a finite acyclic shortest path" - ); - } +fn query_somepath_handles_circular_dependencies() { + let result = query_inline_project( + cycle_query_files(), + QueryRequest { + kind: QueryKind::Somepath, + from: "src/root.ts".to_string(), + to: "src/targets/sink.ts".to_string(), + }, + ); + + assert_eq!(result.paths.len(), 1); + assert_eq!( + result.paths[0] + .nodes + .iter() + .map(query_node_label) + .collect::>(), + vec![ + "src/root.ts", + "src/cycle/a.ts:a", + "src/cycle/a.ts", + "src/cycle/b.ts:b", + "src/cycle/b.ts", + "src/targets/sink.ts:sink", + "src/targets/sink.ts", + ] + ); + assert!( + result.paths[0].edges.len() < 10, + "somepath should terminate after a finite acyclic shortest path" + ); } #[test] diff --git a/crates/codescythe_cli/main.rs b/crates/codescythe_cli/main.rs index 4daca80..c58430b 100644 --- a/crates/codescythe_cli/main.rs +++ b/crates/codescythe_cli/main.rs @@ -68,7 +68,6 @@ struct QueryArgs { #[derive(Debug, Subcommand)] enum QueryCommand { Somepath(QueryPathArgs), - Somepaths(QueryPathArgs), Allpaths(QueryPathArgs), } @@ -214,7 +213,6 @@ fn run_command(command: Command) -> Result { fn run_query_command(args: QueryArgs) -> Result { let (kind, args) = match args.command { QueryCommand::Somepath(args) => (codescythe::QueryKind::Somepath, args), - QueryCommand::Somepaths(args) => (codescythe::QueryKind::Somepaths, args), QueryCommand::Allpaths(args) => (codescythe::QueryKind::Allpaths, args), }; let config = args.config.as_deref(); @@ -433,7 +431,7 @@ fn print_explain_export(analysis: &codescythe::Analysis) { fn print_query_report(result: &codescythe::QueryResult) { match result.kind { - codescythe::QueryKind::Somepath | codescythe::QueryKind::Somepaths => { + codescythe::QueryKind::Somepath => { if result.paths.is_empty() { println!( "No path found from {} to {}", diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index e49e578..91b2370 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -11,7 +11,7 @@ DOCS_TOOL_DATA = [ "//:node_modules/open-props", "//:node_modules/react", "//:node_modules/react-dom", -] +] + glob(["src/assets/query/*.svg"]) js_binary( name = "render_docs", diff --git a/docs/src/assets/query/knip-export-basics-allpaths.svg b/docs/src/assets/query/knip-export-basics-allpaths.svg new file mode 100644 index 0000000..eb259f7 --- /dev/null +++ b/docs/src/assets/query/knip-export-basics-allpaths.svg @@ -0,0 +1 @@ +"defined in file myExport""named import./my-module.js:myExport""namespace member./my-namespace.js:y"index.tsmy-module.tsmy-module.ts:myExportmy-namespace.ts:y \ No newline at end of file diff --git a/docs/src/assets/query/oxc-resolution-folder.svg b/docs/src/assets/query/oxc-resolution-folder.svg new file mode 100644 index 0000000..e3a740c --- /dev/null +++ b/docs/src/assets/query/oxc-resolution-folder.svg @@ -0,0 +1 @@ +"defined in file aliased""defined in file extension""defined in file internal""named import@/aliased:aliased""named import./extension.js:extension""named import#internal:internal"app/aliased.ts:aliasedapp/extension.ts:extensionapp/internal.ts:internalapp/aliased.tsapp/extension.tsapp/index.tsapp/internal.ts \ No newline at end of file diff --git a/docs/src/assets/query/runfiles-alias-somepath.svg b/docs/src/assets/query/runfiles-alias-somepath.svg new file mode 100644 index 0000000..aadfacd --- /dev/null +++ b/docs/src/assets/query/runfiles-alias-somepath.svg @@ -0,0 +1 @@ +"named import#bazel_generated/client:client"protobuf/generated/client.ts:clientworkspace/frontend/apps/client/platform/platformRuntime.ts \ No newline at end of file diff --git a/docs/src/assets/query/test-file-usage-somepath.svg b/docs/src/assets/query/test-file-usage-somepath.svg new file mode 100644 index 0000000..ef59a53 --- /dev/null +++ b/docs/src/assets/query/test-file-usage-somepath.svg @@ -0,0 +1 @@ +"named import./module:used"src/module.ts:usedsrc/main.ts \ No newline at end of file diff --git a/docs/src/render.ts b/docs/src/render.ts index 040d3f1..25fc938 100644 --- a/docs/src/render.ts +++ b/docs/src/render.ts @@ -6,6 +6,7 @@ const { copyFileSync, existsSync, mkdirSync, + readdirSync, readFileSync, rmSync, writeFileSync, @@ -94,7 +95,7 @@ const homeCards: DocLink[] = [ { href: './queries/', title: 'Dependency Queries', - description: 'Trace somepath, somepaths, and allpaths results with text, JSON, Mermaid, or SVG output.', + description: 'Trace somepath and allpaths results with text, JSON, Mermaid, or SVG output.', }, { href: './reports/', @@ -138,11 +139,13 @@ function QueryFixtureSample({ command, description, mermaid, + svgSrc, title, }: { command: string; description: string; mermaid: string; + svgSrc?: string; title: string; }) { return h( @@ -152,6 +155,12 @@ function QueryFixtureSample({ h('p', null, description), h(CodeBlock, null, command), h(CodeBlock, { language: 'mermaid' }, mermaid), + svgSrc && + h( + 'figure', + { className: 'query-svg' }, + h('img', { src: svgSrc, alt: `${title} rendered SVG` }), + ), ); } @@ -678,8 +687,6 @@ const pages: Page[] = [ null, 'Use ', h('code', null, 'query somepath'), - ', ', - h('code', null, 'query somepaths'), ', and ', h('code', null, 'query allpaths'), ' to inspect dependency routes through that graph. Queries can target files, folders, or exported symbols and can render text, JSON, Mermaid, or SVG output. The ', @@ -733,7 +740,7 @@ const pages: Page[] = [ slug: 'queries', title: 'Dependency Queries', eyebrow: 'Path inspection', - description: 'Use somepath, somepaths, and allpaths to explain dependency paths through the same graph Codescythe analyzes.', + description: 'Use somepath and allpaths to explain dependency paths through the same graph Codescythe analyzes.', sections: [ { id: 'commands', title: 'Commands' }, { id: 'selectors', title: 'Selectors' }, @@ -752,24 +759,25 @@ const pages: Page[] = [ null, 'The query command traces dependency paths between two selectors without changing analysis results or editing files. It uses the same parsed import, export, resolver, alias, dynamic import, and glob edges as normal analysis.', ), - h(CodeBlock, null, `npx codescythe query somepath src/main.ts src/module.ts -npx codescythe query somepaths src/main.ts src/features/ -npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime`), + h(CodeBlock, null, `npx codescythe query somepath \\ + src/main.ts \\ + src/module.ts + +npx codescythe query somepath \\ + src/main.ts \\ + src/features/ + +npx codescythe query allpaths \\ + src/main.ts \\ + src/runtime.ts:initRuntime`), h(FieldTable, { rows: [ { field: 'somepath', - purpose: 'One shortest path', - type: 'query verb', - values: 'source selector, target selector', - notes: 'Returns the first shortest dependency path found from any matched source node to any matched target node.', - }, - { - field: 'somepaths', - purpose: 'One path per target', + purpose: 'One shortest path per reachable target', type: 'query verb', values: 'source selector, target selector', - notes: 'Returns one shortest path for each reachable matched target, which is useful when the target selector is a directory.', + notes: 'Returns one shortest dependency path for each reachable matched target. File and export targets usually match one node; directory targets can match many.', }, { field: 'allpaths', @@ -802,10 +810,25 @@ npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime`), PageSection, { id: 'formats', title: 'Output Formats' }, h('p', null, 'Text output is optimized for terminal inspection. JSON is the stable machine-readable surface. Mermaid and SVG render the same query graph as a diagram.'), - h(CodeBlock, null, `npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output text -npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --json -npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output mermaid -npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output svg > graph.svg`), + h(CodeBlock, null, `npx codescythe query allpaths \\ + --output text \\ + src/main.ts \\ + src/runtime.ts:initRuntime + +npx codescythe query allpaths \\ + --json \\ + src/main.ts \\ + src/runtime.ts:initRuntime + +npx codescythe query allpaths \\ + --output mermaid \\ + src/main.ts \\ + src/runtime.ts:initRuntime + +npx codescythe query allpaths \\ + --output svg \\ + src/main.ts \\ + src/runtime.ts:initRuntime > graph.svg`), h( 'p', null, @@ -833,16 +856,26 @@ npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output sv h(QueryFixtureSample, { title: 'test-file-usage: somepath to one export', description: 'A file-to-export query shows a named import edge directly to the exported symbol.', - command: 'codescythe query somepath -C tests/fixtures/test-file-usage --output mermaid src/main.ts src/module.ts:used', + command: `codescythe query somepath \\ + -C tests/fixtures/test-file-usage \\ + --output mermaid \\ + src/main.ts \\ + src/module.ts:used`, + svgSrc: '../assets/query/test-file-usage-somepath.svg', mermaid: `flowchart LR n0["src/module.ts:used"] n1["src/main.ts"] n1 -->|"named import ./module:used"| n0`, }), h(QueryFixtureSample, { - title: 'oxc-resolution: somepaths to a folder', + title: 'oxc-resolution: somepath to a folder', description: 'A file-to-directory query returns one shortest path for each reachable matched target file.', - command: 'codescythe query somepaths -C tests/fixtures/oxc-resolution --output mermaid app/index.ts app/', + command: `codescythe query somepath \\ + -C tests/fixtures/oxc-resolution \\ + --output mermaid \\ + app/index.ts \\ + app/`, + svgSrc: '../assets/query/oxc-resolution-folder.svg', mermaid: `flowchart LR n0["app/aliased.ts:aliased"] n1["app/extension.ts:extension"] @@ -861,7 +894,12 @@ npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output sv h(QueryFixtureSample, { title: 'knip-export-basics: allpaths through namespace use', description: 'An allpaths query keeps every node and edge that can carry the source file to the target export.', - command: 'codescythe query allpaths -C tests/fixtures/knip-export-basics --output mermaid index.ts my-namespace.ts:y', + command: `codescythe query allpaths \\ + -C tests/fixtures/knip-export-basics \\ + --output mermaid \\ + index.ts \\ + my-namespace.ts:y`, + svgSrc: '../assets/query/knip-export-basics-allpaths.svg', mermaid: `flowchart LR n0["index.ts"] n1["my-module.ts"] @@ -874,7 +912,12 @@ npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output sv h(QueryFixtureSample, { title: 'runfiles-fixture: somepath through an alias', description: 'Alias resolution is represented in the edge label, while the target still resolves to the project file export.', - command: 'codescythe query somepath -C tests/fixtures/runfiles-fixture --output mermaid workspace/frontend/apps/client/platform/platformRuntime.ts protobuf/generated/client.ts:client', + command: `codescythe query somepath \\ + -C tests/fixtures/runfiles-fixture \\ + --output mermaid \\ + workspace/frontend/apps/client/platform/platformRuntime.ts \\ + protobuf/generated/client.ts:client`, + svgSrc: '../assets/query/runfiles-alias-somepath.svg', mermaid: `flowchart LR n0["protobuf/generated/client.ts:client"] n1["workspace/frontend/apps/client/platform/platformRuntime.ts"] @@ -890,9 +933,7 @@ npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output sv null, 'Dependency cycles are finite in query output. ', h('code', null, 'somepath'), - ' and ', - h('code', null, 'somepaths'), - ' run breadth-first search with visited nodes and parent edges, so they return shortest acyclic paths. ', + ' runs breadth-first search with visited nodes and parent edges, so it returns shortest acyclic paths. ', h('code', null, 'allpaths'), ' does not enumerate paths; it intersects forward reachability from the source with reverse reachability from the target, then returns the induced path subgraph.', ), @@ -1376,6 +1417,22 @@ function parseBuildArgs(argv = process.argv.slice(2)): BuildOptions { return options; } +function copyQueryAssets(srcDir: string, assetDir: string) { + const queryAssetSrcDir = path.join(srcDir, 'assets', 'query'); + if (!existsSync(queryAssetSrcDir)) { + return; + } + + const queryAssetOutDir = path.join(assetDir, 'query'); + mkdirSync(queryAssetOutDir, { recursive: true }); + + for (const file of readdirSync(queryAssetSrcDir)) { + if (file.endsWith('.svg')) { + copyFileSync(path.join(queryAssetSrcDir, file), path.join(queryAssetOutDir, file)); + } + } +} + function build(options: BuildOptions = {}): BuildPaths { const { assetDir, publicDir, rootDir, srcDir, vendorDir } = resolveBuildPaths(options); const openPropsRoot = path.dirname(require.resolve('open-props/package.json')); @@ -1388,6 +1445,7 @@ function build(options: BuildOptions = {}): BuildPaths { copyFileSync(path.join(srcDir, 'site.css'), path.join(publicDir, 'styles.css')); copyFileSync(path.join(srcDir, 'assets', 'codescythe-logo.png'), path.join(assetDir, 'codescythe-logo.png')); + copyQueryAssets(srcDir, assetDir); copyFileSync(path.join(openPropsRoot, 'open-props.min.css'), path.join(vendorDir, 'open-props.min.css')); copyFileSync(path.join(openPropsRoot, 'normalize.dark.min.css'), path.join(vendorDir, 'normalize.dark.min.css')); writeFileSync(path.join(publicDir, '.nojekyll'), '# Static GitHub Pages site for Codescythe.\n'); diff --git a/docs/src/site.css b/docs/src/site.css index 6921fb4..3eac307 100644 --- a/docs/src/site.css +++ b/docs/src/site.css @@ -608,9 +608,11 @@ li code, .query-samples { display: grid; gap: 1.2rem; + min-width: 0; } .query-sample { + min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; @@ -625,6 +627,22 @@ li code, margin-top: 0.75rem; } +.query-svg { + margin: 0.75rem 0 0; + border: 1px solid var(--line); + border-radius: 8px; + padding: 0.75rem; + background: #ffffff; + overflow-x: auto; +} + +.query-svg img { + display: block; + width: auto; + max-width: none; + height: auto; +} + .steps { margin: 0; padding-left: 1.4rem; @@ -752,7 +770,7 @@ li code, .benchmark-grid, .doc-card-grid, .doc-layout { - grid-template-columns: 1fr; + grid-template-columns: minmax(0, 1fr); } .summary-item { diff --git a/packages/codescythe/README.md b/packages/codescythe/README.md index 70faec9..69e51d1 100644 --- a/packages/codescythe/README.md +++ b/packages/codescythe/README.md @@ -25,7 +25,7 @@ The package bin also exposes dependency-path queries: ```sh npx codescythe query somepath src/main.ts src/module.ts -npx codescythe query somepaths src/main.ts src/features/ --output mermaid +npx codescythe query somepath src/main.ts src/features/ --output mermaid npx codescythe query allpaths src/main.ts src/runtime.ts:initRuntime --output svg > graph.svg ```