Skip to content

Commit

Permalink
fix(aggregate-error): upgraded to the latest version
Browse files Browse the repository at this point in the history
BREAKING CHANGE: due to the aggregate-error upgrade, thrown errors are no longer iterable, but instead list the errors under an `errors` property
  • Loading branch information
travi committed Jan 17, 2023
1 parent 1bce937 commit 7285e05
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 141 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function verifyConditions(pluginConfig, context) {
await verifyNpmAuth(npmrc, pkg, context);
}
} catch (error) {
errors.push(...error);
errors.push(...error.errors);
}

if (errors.length > 0) {
Expand All @@ -53,7 +53,7 @@ export async function prepare(pluginConfig, context) {
await verifyNpmAuth(npmrc, pkg, context);
}
} catch (error) {
errors.push(...error);
errors.push(...error.errors);
}

if (errors.length > 0) {
Expand All @@ -75,7 +75,7 @@ export async function publish(pluginConfig, context) {
await verifyNpmAuth(npmrc, pkg, context);
}
} catch (error) {
errors.push(...error);
errors.push(...error.errors);
}

if (errors.length > 0) {
Expand All @@ -100,7 +100,7 @@ export async function addChannel(pluginConfig, context) {
await verifyNpmAuth(npmrc, pkg, context);
}
} catch (error) {
errors.push(...error);
errors.push(...error.errors);
}

if (errors.length > 0) {
Expand Down
Loading

0 comments on commit 7285e05

Please sign in to comment.