Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

feat: edge.explain - include bundled flag #240

Closed
wants to merge 1 commit into from

Conversation

kumavis
Copy link
Contributor

@kumavis kumavis commented Feb 22, 2021

when analyzing a dep graph its useful to see if an Edge is a bundledDependencies edge. this is especially useful when trying to understand the provenance of a package's content.

This PR adds a bundled flag to the Edge.prototype.explain result to indicate if his dependency linkage is a bundled dependency.

Alternate Implementation

instead of just adding this to the Edge.prototype.explain result, it could be added (e.g. as a getter) on the Edge.prototype itself, allowing for the package consumer to inspect if an edge is a bundledDependencies edge or not.

References

Related to npm/cli#2750

@kumavis
Copy link
Contributor Author

kumavis commented Feb 22, 2021

cant get tests to pass locally due to some anomalous error https://gist.github.com/kumavis/ab6db08a4ab7231e406beeab5815acea

@kumavis
Copy link
Contributor Author

kumavis commented Feb 22, 2021

the anomalous error is preventing me from properly updating the snapshots

@kumavis
Copy link
Contributor Author

kumavis commented Feb 22, 2021

also-- is this normal?

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	test/arborist/build-ideal-tree-peer-dep-override-with-dep-sets-being-replaced/
	test/arborist/build-ideal-tree/
	test/arborist/reify-reify-properly-with-all-deps-when-lockfile-is-ancient/
	test/arborist/reify/

@kumavis
Copy link
Contributor Author

kumavis commented Feb 22, 2021

the tests pass when i run them individually e.g.: npx tap test/arborist/build-ideal-tree.js

@kumavis
Copy link
Contributor Author

kumavis commented Feb 22, 2021

closing in favor of #241

@kumavis kumavis closed this Feb 22, 2021
@kumavis kumavis deleted the feat/edge-explain-bundled branch February 22, 2021 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant