Skip to content

Commit

Permalink
deps: update amaro to 0.3.0
Browse files Browse the repository at this point in the history
PR-URL: #56568
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
  • Loading branch information
nodejs-github-bot authored and aduh95 committed Jan 31, 2025
1 parent c37df07 commit e55b3ba
Show file tree
Hide file tree
Showing 7 changed files with 309 additions and 284 deletions.
17 changes: 17 additions & 0 deletions deps/amaro/dist/errors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";
export function isSwcError(error) {
return error.code !== void 0;
}
export function wrapAndReThrowSwcError(error) {
switch (error.code) {
case "UnsupportedSyntax": {
const unsupportedSyntaxError = new Error(error.message);
unsupportedSyntaxError.name = "UnsupportedSyntaxError";
throw unsupportedSyntaxError;
}
case "InvalidSyntax":
throw new SyntaxError(error.message);
default:
throw new Error(error.message);
}
}
Loading

0 comments on commit e55b3ba

Please sign in to comment.