Skip to content

Distinguish between dev and non dev NPM package dependencies#547

Merged
JohT merged 3 commits intomainfrom
feature/separate-npm-dev-dependencies
Mar 29, 2026
Merged

Distinguish between dev and non dev NPM package dependencies#547
JohT merged 3 commits intomainfrom
feature/separate-npm-dev-dependencies

Conversation

@JohT
Copy link
Copy Markdown
Owner

@JohT JohT commented Mar 26, 2026

🚀 Feature

⚙️ Optimization

@JohT JohT self-assigned this Mar 26, 2026
@JohT JohT force-pushed the feature/separate-npm-dev-dependencies branch 2 times, most recently from ce667f2 to 2b572bb Compare March 27, 2026 07:03
@JohT JohT marked this pull request as ready for review March 27, 2026 07:05
@JohT JohT requested a review from Copilot March 27, 2026 07:06
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

Updates the NPM dependency analysis pipeline to separate NPM packages into “dev” vs “non-dev” categories (via labels) and to run/report algorithms against those categories.

Changes:

  • Add a TypeScript enrichment Cypher step to label NPM:Package nodes as :NpmDevPackage or :NpmNonDevPackage.
  • Update report scripts (topological sort, centrality, path-finding CSV + visualization) to use the non-dev label and add a dev path-finding variant.
  • Enhance NPM GraphViz build-level output to annotate dev packages.

Reviewed changes

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

Show a summary per file
File Description
scripts/reports/TopologicalSortCsv.sh Switch NPM topology projection to NpmNonDevPackage.
scripts/reports/PathFindingVisualization.sh Split NPM longest-path visualizations into non-dev vs dev projections/outputs.
scripts/reports/PathFindingCsv.sh Split NPM path-finding CSV generation into non-dev vs dev projections.
scripts/reports/CentralityCsv.sh Switch NPM centrality projections to NpmNonDevPackage.
scripts/prepareAnalysis.sh Run new enrichment step to label NPM packages by dependency type.
cypher/Typescript_Enrichment/Label_npm_packages_by_dep_type.cypher New query that assigns :NpmDevPackage / :NpmNonDevPackage labels based on weightByDependencyType.
cypher/Path_Finding/Set_Parameters_NonDevNpmPackage.cypher Update example parameters to use the non-dev projection + node label.
cypher/Internal_Dependencies/NPM_Package_build_levels_for_graphviz.cypher Annotate dev packages in GraphViz node labels and relax maxDistance filtering.

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

Comment thread scripts/reports/PathFindingCsv.sh Outdated
Comment thread scripts/reports/CentralityCsv.sh Outdated
Comment thread scripts/reports/TopologicalSortCsv.sh Outdated
Comment thread cypher/Typescript_Enrichment/Label_npm_packages_by_dep_type.cypher
Comment thread scripts/reports/PathFindingVisualization.sh Outdated
@JohT JohT force-pushed the feature/separate-npm-dev-dependencies branch 3 times, most recently from 483fb70 to 9655545 Compare March 29, 2026 08:04
@JohT JohT requested a review from Copilot March 29, 2026 08:23
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 12 out of 12 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

scripts/reports/CentralityCsv.sh:455

  • CentralityCsv was switched to NpmNonDevPackage only, but there is no corresponding NpmDevPackage centrality run. If the intent of this PR is to distinguish dev vs non-dev dependencies in reports, consider adding a dev centrality projection as well (with distinct projection names), otherwise centrality results for dev-only packages will no longer be generated.
# -- Non Dev NPM Package Centrality ---------------------------------------

NPM_LANGUAGE="dependencies_projection_language=NPM"
NPM_PROJECTION="dependencies_projection=npm-non-dev-package-centrality" 
NPM_PROJECTION_UNDIRECTED="dependencies_projection=npm-non-dev-package-centrality-undirected" 
NPM_NODE="dependencies_projection_node=NpmNonDevPackage" 
NPM_WEIGHT="dependencies_projection_weight_property=weightByDependencyType" 

if createDirectedDependencyProjection "${NPM_LANGUAGE}" "${NPM_PROJECTION}" "${NPM_NODE}" "${NPM_WEIGHT}"; then
    runCentralityAlgorithms "${NPM_PROJECTION}" "${NPM_NODE}" "${NPM_WEIGHT}"
fi
if createUndirectedDependencyProjection "${NPM_LANGUAGE}" "${NPM_PROJECTION_UNDIRECTED}" "${NPM_NODE}" "${NPM_WEIGHT}"; then
    runUndirectedCentralityAlgorithms "${NPM_PROJECTION_UNDIRECTED}" "${NPM_NODE}"
fi

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

Comment thread COMMANDS.md Outdated
Comment thread scripts/reports/TopologicalSortCsv.sh
@JohT JohT force-pushed the feature/separate-npm-dev-dependencies branch 2 times, most recently from 393adc1 to 002713e Compare March 29, 2026 09:00
@JohT JohT force-pushed the feature/separate-npm-dev-dependencies branch from 002713e to e69d69f Compare March 29, 2026 19:06
@JohT JohT requested a review from Copilot March 29, 2026 19:13
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 12 out of 12 changed files in this pull request and generated 2 comments.


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

Comment thread cypher/Typescript_Enrichment/Label_npm_packages_by_dep_type.cypher
Comment thread scripts/findPathsToScan.sh Outdated
@JohT JohT force-pushed the feature/separate-npm-dev-dependencies branch from e69d69f to eead6c8 Compare March 29, 2026 19:40
@JohT JohT merged commit 91b7647 into main Mar 29, 2026
11 checks passed
@JohT JohT deleted the feature/separate-npm-dev-dependencies branch March 29, 2026 20:05
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