Skip to content

Commit

Permalink
fix: check if upgrade ignored due to engines fails due to usage of ra…
Browse files Browse the repository at this point in the history
…nges
  • Loading branch information
rbnayax committed Aug 11, 2024
1 parent 472db67 commit 6d7d9f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/package-managers/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,7 @@ export const greatest: GetVersion = async (
export const getPeerDependencies = async (packageName: string, version: Version): Promise<Index<Version>> => {
const args = ['view', `${packageName}@${version}`, 'peerDependencies']
const result = await spawnNpm(args, {}, { rejectOnError: false })
const parsed = result ? parseJson(result, { command: [...args, '--json'].join(' ') }) : {}
return Array.isArray(parsed) ? parsed.at(-1) : parsed
return result ? parseJson(result, { command: [...args, '--json'].join(' ') }) : {}
}

/**
Expand Down

0 comments on commit 6d7d9f6

Please sign in to comment.