Skip to content

Commit 6a70902

Browse files
committed
fix: code rabbit
1 parent 7d79e03 commit 6a70902

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/composables/npm/useReplacementDependencies.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import type { ModuleReplacement } from 'module-replacements'
2+
import { parseDepValue } from '~/utils/npm/outdated-dependencies'
23

34
async function fetchReplacements(
45
deps: Record<string, string>,
56
): Promise<Record<string, ModuleReplacement>> {
6-
const names = Object.keys(deps)
7+
const names = [...new Set(
8+
Object.entries(deps).map(([key, value]) => parseDepValue(value).name ?? key),
9+
)]
710

811
const results = await Promise.all(
912
names.map(async name => {

0 commit comments

Comments
 (0)