8000 chore: simplify adder interface by manuel3108 · Pull Request #89 · sveltejs/cli · GitHub
[go: up one dir, main page]

Skip to content

chore: simplify adder interface #89

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

Merged
merged 10 commits into from
Oct 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
manuel3108 committed Oct 11, 2024
commit 9ea98bf2e2f1cd7c6c3bf6c611608c823affe4e5
4 changes: 2 additions & 2 deletions packages/adders/_config/official.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const adderCategories: AdderCategories = getCategoriesById();
function getCategoriesById(): AdderCategories {
const adderCategories: any = {};
for (const [key, adders] of Object.entries(categories)) {
adderCategories[key] = adders.map((a) => a.name);
adderCategories[key] = adders.map((a) => a.id);
}
return adderCategories;
}
Expand All @@ -37,7 +37,7 @@ export const adderIds: string[] = Object.values(adderCategories).flatMap((x) =>
const adderDetails = Object.values(categories).flat();

export function getAdderDetails(name: string): AdderWithoutExplicitArgs {
const details = adderDetails.find((a) => a.name === name);
const details = adderDetails.find((a) => a.id === name);
if (!details) {
throw new Error(`Invalid adder name: ${name}`);
}
Expand Down
0