-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: store dependencies graph in component model #9214
base: master
Are you sure you want to change the base?
Conversation
scopes/component/component-writer/component-writer.main.runtime.ts
Outdated
Show resolved
Hide resolved
scopes/component/component-writer/component-writer.main.runtime.ts
Outdated
Show resolved
Hide resolved
consumerComponents: ConsumerComponent[], | ||
components: Component[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe switch the args order here so it will be same as the order in tagModelComponent
args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tagModelComponent
has a single options argument.
src/scope/models/version.ts
Outdated
|
||
export type DependenciesGraph = { | ||
schemaVersion: string; | ||
directDependencies: DirectDependency[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the direct deps represent? like the policy of the workspace.jsonc?
nodeId: string; | ||
}; | ||
|
||
export type DependenciesGraph = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider making this a class and not just a type, so you can make an API for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe make it an instance of clear graph? or a composition of cleargraph (so you will put the node and edges inside on a cleargraph instance, then you can make APIs that calls cleargraph internally)
Proposed Changes
Example of the dependencies graph object: https://gist.github.com/zkochan/1ef61728cf8605d7e9e6832a684d5b2f
TODO:
don't write node_modules in e2e tests. We only need the lockfile.no way to skip install as next steps failin e2e tests skip preview in tagged componentspreviews are disabled in e2e tests by default