Skip to content

Commit

Permalink
Merge pull request #21 from embroider-build/warn-on-unknown-package
Browse files Browse the repository at this point in the history
don't throw when we encounter an unknown package
  • Loading branch information
mansona authored Nov 24, 2023
2 parents 0a4b31d + fb18800 commit b50f3d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ class Plan {
addConstraint(packageName: string, impact: Impact, reason: string): void {
let pkgConstraints = this.#constraints.get(packageName);
if (!pkgConstraints) {
let err = new Error(`unknown package "${packageName}"`);
(err as any).unknownPackage = true;
throw err;
console.warn(chalk.yellow(`Warning: unknown package "${packageName}"`));
return;
}
if (!pkgConstraints.some(existing => existing.impact === impact && existing.reason === reason)) {
pkgConstraints.push({ impact, reason });
Expand Down

0 comments on commit b50f3d9

Please sign in to comment.