-
Notifications
You must be signed in to change notification settings - Fork 24
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
The groupBy
feature
#146
The groupBy
feature
#146
Conversation
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.
Great work @AlexandrHoroshih, it seems to work pretty well!
I published few comments regarding the PR, but overall looks good 👍
Such group should be discarded
Co-authored-by: Antoine Coulon <43391199+antoine-coulon@users.noreply.github.com>
It is a more honest name
6f25d3a
to
c0f0a3d
Compare
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.
LGTM
@all-contributors please add @AlexandrHoroshih for code |
I've put up a pull request to add @AlexandrHoroshih! 🎉 |
Summary
This PR adds the first part for "grouped graph" feature, as discussed in #125 :
groupBy
configuration is added - it is a function of(path: string) => string | undefined
typegroupBy
is provided, thengroupedGraph
will be emitted ongetStructure
callExample
Implementation
As was discussed in the issue, there is a single
groupBy
function, which assigns module to a group based on itsnode.id
(which is the path of the module location).Under the hood it is the separate graph, which is built in the moment of
getStructure
call, using the original graph of project structure as a source of truth.Testing
Integration tests in the
integration/api.spec.ts
Impacted documentation
The changeset is generated and the JSDoc comment is added to the
groupBy
field, also documentation is added intoskott/README.md
pnpm changeset
at the root of the workspace, affected packages are being bumped (either patch/minor) and a clear description for each of the affected packages was added.