Skip to content

Commit

Permalink
fix(addDependency): compare name from resolved package.json (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Nov 28, 2024
1 parent a5f8971 commit 47b1c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function addDependency(
const pkg = await readPackageJSON(pkgName, {
url: resolvedOptions.cwd,
}).catch(() => ({}) as Record<string, undefined>);
if (!pkg.peerDependencies || name !== pkgName) {
if (!pkg.peerDependencies || pkg.name !== pkgName) {
continue;
}
for (const [peerDependency, version] of Object.entries(
Expand Down

0 comments on commit 47b1c04

Please sign in to comment.