Skip to content

Analyze npm package dependencies#539

Merged
JohT merged 4 commits intomainfrom
feature/analyze-npm-package-dependencies
Mar 22, 2026
Merged

Analyze npm package dependencies#539
JohT merged 4 commits intomainfrom
feature/analyze-npm-package-dependencies

Conversation

@JohT
Copy link
Copy Markdown
Owner

@JohT JohT commented Mar 21, 2026

🚀 Feature

⚙️ Optimization

🛠 Fix

@JohT JohT self-assigned this Mar 21, 2026
@JohT JohT force-pushed the feature/analyze-npm-package-dependencies branch 2 times, most recently from 239c09a to 8d8fa72 Compare March 21, 2026 21:12
@JohT JohT marked this pull request as ready for review March 22, 2026 08:25
@JohT JohT requested a review from Copilot March 22, 2026 09:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds NPM package dependency analysis and visualizations to the reporting pipeline, extends longest-path GraphViz output with additional TypeScript project context, and improves Neo4j write stability via transaction batching.

Changes:

  • Add NPM package projections and reporting (topological sort, centrality, path finding, and GraphViz visualizations).
  • Enhance longest-path GraphViz output to include optional project info + level info (and ensure topological-sort properties exist before rendering).
  • Add IN TRANSACTIONS OF <n> ROWS batching to multiple write-heavy Cypher scripts and prevent self-loops in CHANGED_TOGETHER_WITH.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/reports/TopologicalSortCsv.sh Adds NPM package topological sort report generation.
scripts/reports/PathFindingVisualization.sh Adds NPM longest-path visualizations and triggers topological-sort property computation when needed.
scripts/reports/PathFindingCsv.sh Adds NPM package path-finding algorithms run.
scripts/reports/InternalDependenciesVisualization.sh Adds NPM package build-level GraphViz visualization run.
scripts/reports/CentralityCsv.sh Adds NPM package directed/undirected centrality reports.
scripts/prepareAnalysis.sh Extends TypeScript enrichment pipeline with NPM package-to-package dependency enrichment and counts.
cypher/Typescript_Enrichment/Link_npm_packages_with_depends_on_relationships.cypher New: creates package-to-package DEPENDS_ON relationships with a computed weight.
cypher/Typescript_Enrichment/Link_npm_dependencies_to_npm_packages.cypher Batches MERGE and filters template-like package names.
cypher/Typescript_Enrichment/Link_external_modules_to_corresponding_npm_dependency.cypher Adds transactional batching for relationship creation.
cypher/Typescript_Enrichment/Enrich_npm_packages_with_dependency_counts.cypher New: computes incoming/outgoing dependency counts on NPM:Package nodes.
cypher/Typescript_Enrichment/Add_IS_IMPLEMENTED_IN_relationship_for_matching_modules.cypher Adds transactional batching.
cypher/Typescript_Enrichment/Add_IS_IMPLEMENTED_IN_relationship_for_matching_declarations.cypher Adds transactional batching.
cypher/Typescript_Enrichment/Add_DEPENDS_ON_relationship_to_resolved_modules.cypher Adds transactional batching.
cypher/Topological_Sort/Topological_Sort_Exists.cypher New: check query used to decide whether to run topological sort write.
cypher/Path_Finding/Set_Parameters_Typescript_Module.cypher New: example parameter set for TS module path finding.
cypher/Path_Finding/Set_Parameters_NPM.cypher New: example parameter set for NPM package path finding.
cypher/Path_Finding/Path_Finding_6_Longest_paths_for_graphviz.cypher Adds optional project + level info to node labels; documents topological-sort prerequisite.
cypher/Path_Finding/Path_Finding_6_Longest_paths_contributors_for_graphviz.cypher Same visualization enrichment as above.
cypher/Internal_Dependencies/Typescript_Module_build_levels_for_graphviz.cypher Refactors label construction for clearer level info formatting.
cypher/Internal_Dependencies/NPM_Package_build_levels_for_graphviz.cypher New: GraphViz edges for NPM package build levels.
cypher/GitLog/Add_RESOLVES_TO_relationships_to_git_files_for_Typescript.cypher Adds transactional batching.
cypher/GitLog/Add_RESOLVES_TO_relationships_to_git_files_for_Java.cypher Adds transactional batching.
cypher/GitLog/Add_CHANGED_TOGETHER_WITH_relationships_to_git_files.cypher Prevents self-loop edges when building file pairs.
cypher/GitLog/Add_CHANGED_TOGETHER_WITH_relationships_to_code_files.cypher Prevents self-loop edges and adds transactional batching.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cypher/Topological_Sort/Topological_Sort_Exists.cypher Outdated
Comment thread cypher/Typescript_Enrichment/Enrich_npm_packages_with_dependency_counts.cypher Outdated
Comment thread cypher/Path_Finding/Set_Parameters_NPM.cypher Outdated
Comment thread cypher/Internal_Dependencies/NPM_Package_build_levels_for_graphviz.cypher Outdated
Comment thread scripts/prepareAnalysis.sh
@JohT JohT force-pushed the feature/analyze-npm-package-dependencies branch from 1bf3f1f to be44681 Compare March 22, 2026 12:36
@JohT JohT requested a review from Copilot March 22, 2026 12:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cypher/Internal_Dependencies/NPM_Package_build_levels_for_graphviz.cypher Outdated
Comment thread scripts/prepareAnalysis.sh Outdated
@JohT JohT force-pushed the feature/analyze-npm-package-dependencies branch from be44681 to d32fbe6 Compare March 22, 2026 12:54
@JohT JohT merged commit 6a3f2ae into main Mar 22, 2026
10 checks passed
@JohT JohT deleted the feature/analyze-npm-package-dependencies branch March 22, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants