Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

export function yarnv1ToOutdatedResult(output: string): OutdatedResult {
const yarnv1Outdated = fromJsonLines<Yarnv1OutdatedResultJson>(output);
const fields = yarnv1Outdated[1].data.head;
const dependencies = yarnv1Outdated[1].data.body;
const fields = yarnv1Outdated[1]?.data.head ?? [];

Check failure on line 23 in packages/plugin-js-packages/src/lib/package-managers/yarn-classic/outdated-result.ts

View workflow job for this annotation

GitHub Actions / Code PushUp

<✓> Code coverage | Branch coverage

1st branch is not taken in any test case.
const dependencies = yarnv1Outdated[1]?.data.body ?? [];

Check failure on line 24 in packages/plugin-js-packages/src/lib/package-managers/yarn-classic/outdated-result.ts

View workflow job for this annotation

GitHub Actions / Code PushUp

<✓> Code coverage | Branch coverage

1st branch is not taken in any test case.

// no outdated dependencies
if (dependencies.length === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ type Yarnv1Table = {
};
};

export type Yarnv1OutdatedResultJson = [Yarnv1Info, Yarnv1Table];
export type Yarnv1OutdatedResultJson = [Yarnv1Info, Yarnv1Table] | [];