Skip to content
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

✨ new nesting level for folders with several packages #89

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

mbthiam88
Copy link
Collaborator

Add new nesting levels for folders that contains several packages

Before:
Screenshot 2024-01-02 at 10 13 48

After:
Screenshot 2024-01-02 at 10 14 36

@mbthiam88 mbthiam88 force-pushed the feat/nesting-level branch 2 times, most recently from 26832fa to e881622 Compare January 2, 2024 13:19
Comment on lines 43 to 48
var packages = data.reduce((acc, curr) => {
const name = curr.name.split('@')[0];
acc[name] = acc[name] ? [...acc[name], curr] : [curr];
return acc;
}, {});
return Object.keys(packages || []).length > 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var packages = data.reduce((acc, curr) => {
const name = curr.name.split('@')[0];
acc[name] = acc[name] ? [...acc[name], curr] : [curr];
return acc;
}, {});
return Object.keys(packages || []).length > 1;
return Array.from(new Set(data.map((p) => p.name.split('@')[0])));

@mbthiam88 mbthiam88 merged commit 3170898 into main Jan 8, 2024
4 checks passed
@mbthiam88 mbthiam88 deleted the feat/nesting-level branch January 8, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants