All-in-one devtool to automatically analyze, search and visualize project modules and dependencies from JavaScript, TypeScript (JSX/TSX) and Node.js (ES6, CommonJS)
As was discussed in the issue, there is a single groupBy function, which assigns module to a group based on its node.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 into skott/README.md
[x] Changesets were generated using 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.
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.