11"use strict" ;
2- export function isSwcError ( error ) {
2+ var __defProp = Object . defineProperty ;
3+ var __getOwnPropDesc = Object . getOwnPropertyDescriptor ;
4+ var __getOwnPropNames = Object . getOwnPropertyNames ;
5+ var __hasOwnProp = Object . prototype . hasOwnProperty ;
6+ var __export = ( target , all ) => {
7+ for ( var name in all )
8+ __defProp ( target , name , { get : all [ name ] , enumerable : true } ) ;
9+ } ;
10+ var __copyProps = ( to , from , except , desc ) => {
11+ if ( from && typeof from === "object" || typeof from === "function" ) {
12+ for ( let key of __getOwnPropNames ( from ) )
13+ if ( ! __hasOwnProp . call ( to , key ) && key !== except )
14+ __defProp ( to , key , { get : ( ) => from [ key ] , enumerable : ! ( desc = __getOwnPropDesc ( from , key ) ) || desc . enumerable } ) ;
15+ }
16+ return to ;
17+ } ;
18+ var __toCommonJS = ( mod ) => __copyProps ( __defProp ( { } , "__esModule" , { value : true } ) , mod ) ;
19+ var errors_exports = { } ;
20+ __export ( errors_exports , {
21+ isSwcError : ( ) => isSwcError ,
22+ wrapAndReThrowSwcError : ( ) => wrapAndReThrowSwcError
23+ } ) ;
24+ module . exports = __toCommonJS ( errors_exports ) ;
25+ function isSwcError ( error ) {
326 return error . code !== void 0 ;
427}
5- export function wrapAndReThrowSwcError ( error ) {
28+ function wrapAndReThrowSwcError ( error ) {
629 const errorHints = `${ error . filename } :${ error . startLine }
730${ error . snippet }
831` ;
@@ -22,3 +45,8 @@ ${error.snippet}
2245 throw new Error ( error . message ) ;
2346 }
2447}
48+ // Annotate the CommonJS export names for ESM import in node:
49+ 0 && ( module . exports = {
50+ isSwcError,
51+ wrapAndReThrowSwcError
52+ } ) ;
0 commit comments