Distinguish between dev and non dev NPM package dependencies#547
Conversation
ce667f2 to
2b572bb
Compare
There was a problem hiding this comment.
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:Packagenodes as:NpmDevPackageor: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.
483fb70 to
9655545
Compare
There was a problem hiding this comment.
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
NpmNonDevPackageonly, but there is no correspondingNpmDevPackagecentrality 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.
393adc1 to
002713e
Compare
002713e to
e69d69f
Compare
There was a problem hiding this comment.
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.
e69d69f to
eead6c8
Compare
🚀 Feature
⚙️ Optimization
XOException: Expected exactly one result, but got CompositeRowObject ... fileName=./package.json..., where jqassistant-typescript-plugin creates multiple:Filenodes with the samefileNameproperty, which leads to an exception in the jqassistant-npm-plugin, that seems to expect no duplicate (package.json) file names.