Does nx graph always take local project as dependency even it's actually from external npm registry? #30357
Unanswered
JasonPei-Medibank
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By looking through the code at:
nx/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts
Line 56 in 7f1e1cf
It seems always uses local project as the static dependency, even when actually the dependency is installed from external npm registry.
For example, package PkgA depends on PkgB in a monorepo:
nx graph --file ./graph.json
will always take local[email protected]
as the static dependency, but in this case pkgA is actually using[email protected]
which is installed from external npm registryI wonder if it is possible to add version check. For example, in this case version
1.2.3
does not satisfy1.0.0
, so it shouldn't use local project directly.Or it may check if
externalNodeName
exists first https://github.com/nrwl/nx/blob/7f1e1cfa78d6646cba3d9ad92530fcefcaf182a3/packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts#L69C13-L69C29Beta Was this translation helpful? Give feedback.
All reactions