@rolldown/browser 1.0.0-rc.9 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cli.mjs +208 -73
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -7
  4. package/dist/{constructors-BgL_dmUe.js → constructors-BTLtc_G_.js} +11 -2
  5. package/dist/{error-DkAP_6fk.js → error-CIj5jXSo.js} +1 -1
  6. package/dist/experimental-index.browser.mjs +10 -10
  7. package/dist/experimental-index.d.mts +17 -19
  8. package/dist/experimental-index.mjs +11 -11
  9. package/dist/experimental-runtime-types.d.ts +14 -5
  10. package/dist/filter-index.d.mts +3 -3
  11. package/dist/filter-index.mjs +3 -3
  12. package/dist/index.browser.mjs +4 -4
  13. package/dist/index.d.mts +4 -3
  14. package/dist/index.mjs +4 -8
  15. package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
  16. package/dist/parallel-plugin-worker.mjs +1 -4
  17. package/dist/parallel-plugin.d.mts +2 -2
  18. package/dist/parse-ast-index.d.mts +1 -2
  19. package/dist/parse-ast-index.mjs +1 -1
  20. package/dist/plugins-index.browser.mjs +2 -2
  21. package/dist/plugins-index.d.mts +3 -3
  22. package/dist/plugins-index.mjs +2 -2
  23. package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-uVC8K7GR.js} +28 -5
  24. package/dist/rolldown-binding.wasi-browser.js +6 -0
  25. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  26. package/dist/{rolldown-build-sRmdtwRU.js → rolldown-build-DCjXbOeh.js} +242 -210
  27. package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
  28. package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-C7dl2XLe.mjs} +126 -58
  29. package/dist/shared/{composable-filters-B2ByPP8y.mjs → composable-filters-DpWB82jk.mjs} +2 -2
  30. package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
  31. package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-CI_8FAaP.mjs} +11 -2
  32. package/dist/shared/{define-config-B1J71V4c.d.mts → define-config-CYgMQYTy.d.mts} +131 -39
  33. package/dist/shared/{load-config-B6MMusXN.mjs → load-config-BFkorvIR.mjs} +1 -1
  34. package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
  35. package/dist/shared/{parse-DDUnGYGU.mjs → parse-Bmk53Le1.mjs} +1 -1
  36. package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
  37. package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
  38. package/dist/shared/{rolldown-BDqeiCX1.mjs → rolldown-Dyy9Y2li.mjs} +1 -1
  39. package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DYE2Qi6z.mjs} +120 -156
  40. package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
  41. package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
  42. package/dist/shared/{watch-Cj4uDLQX.mjs → watch-DXAEaxPd.mjs} +3 -3
  43. package/dist/utils-index.browser.mjs +5 -5
  44. package/dist/utils-index.d.mts +4 -4
  45. package/dist/utils-index.mjs +5 -6
  46. package/dist/wasi-worker-browser.mjs +8 -0
  47. package/package.json +4 -2
  48. package/dist/shared/types-Cx3HYorz.d.mts +0 -1302
@@ -1,19 +1,36 @@
1
+ import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-CaVxb0SV.mjs";
1
2
  import { a as RolldownLog } from "./logging-C6h4g8dA.mjs";
2
- import { BindingEnhancedTransformOptions, BindingEnhancedTransformResult, BindingTsconfigCompilerOptions as TsconfigCompilerOptions, BindingTsconfigRawOptions as TsconfigRawOptions, MinifyOptions, MinifyResult, ParseResult, ParserOptions, SourceMap, TsconfigCache } from "../binding.cjs";
3
3
 
4
+ //#region src/utils/resolve-tsconfig.d.ts
5
+ /**
6
+ * Cache for tsconfig resolution to avoid redundant file system operations.
7
+ *
8
+ * The cache stores resolved tsconfig configurations keyed by their file paths.
9
+ * When transforming multiple files in the same project, tsconfig lookups are
10
+ * deduplicated, improving performance.
11
+ *
12
+ * @category Utilities
13
+ * @experimental
14
+ */
15
+ declare class TsconfigCache extends TsconfigCache$1 {
16
+ constructor();
17
+ }
18
+ /** @hidden This is only expected to be used by Vite */
19
+ declare function resolveTsconfig(filename: string, cache?: TsconfigCache | null): BindingTsconfigResult | null;
20
+ //#endregion
4
21
  //#region src/utils/parse.d.ts
5
22
  /**
6
23
  * Result of parsing a code
7
24
  *
8
25
  * @category Utilities
9
26
  */
10
- interface ParseResult$1 extends ParseResult {}
27
+ interface ParseResult extends ParseResult$1 {}
11
28
  /**
12
29
  * Options for parsing a code
13
30
  *
14
31
  * @category Utilities
15
32
  */
16
- interface ParserOptions$1 extends ParserOptions {}
33
+ interface ParserOptions extends ParserOptions$1 {}
17
34
  /**
18
35
  * Parse JS/TS source asynchronously on a separate thread.
19
36
  *
@@ -29,7 +46,7 @@ interface ParserOptions$1 extends ParserOptions {}
29
46
  *
30
47
  * @category Utilities
31
48
  */
32
- declare function parse(filename: string, sourceText: string, options?: ParserOptions$1 | null): Promise<ParseResult$1>;
49
+ declare function parse(filename: string, sourceText: string, options?: ParserOptions | null): Promise<ParseResult>;
33
50
  /**
34
51
  * Parse JS/TS source synchronously on current thread.
35
52
  *
@@ -42,7 +59,7 @@ declare function parse(filename: string, sourceText: string, options?: ParserOpt
42
59
  *
43
60
  * @category Utilities
44
61
  */
45
- declare function parseSync(filename: string, sourceText: string, options?: ParserOptions$1 | null): ParseResult$1;
62
+ declare function parseSync(filename: string, sourceText: string, options?: ParserOptions | null): ParseResult;
46
63
  //#endregion
47
64
  //#region src/utils/minify.d.ts
48
65
  /**
@@ -50,7 +67,7 @@ declare function parseSync(filename: string, sourceText: string, options?: Parse
50
67
  *
51
68
  * @category Utilities
52
69
  */
53
- interface MinifyOptions$1 extends MinifyOptions {
70
+ interface MinifyOptions extends MinifyOptions$1 {
54
71
  inputMap?: SourceMap;
55
72
  }
56
73
  /**
@@ -58,7 +75,7 @@ interface MinifyOptions$1 extends MinifyOptions {
58
75
  *
59
76
  * @category Utilities
60
77
  */
61
- interface MinifyResult$1 extends MinifyResult {}
78
+ interface MinifyResult extends MinifyResult$1 {}
62
79
  /**
63
80
  * Minify asynchronously.
64
81
  *
@@ -67,14 +84,14 @@ interface MinifyResult$1 extends MinifyResult {}
67
84
  * @category Utilities
68
85
  * @experimental
69
86
  */
70
- declare function minify(filename: string, sourceText: string, options?: MinifyOptions$1 | null): Promise<MinifyResult$1>;
87
+ declare function minify(filename: string, sourceText: string, options?: MinifyOptions | null): Promise<MinifyResult>;
71
88
  /**
72
89
  * Minify synchronously.
73
90
  *
74
91
  * @category Utilities
75
92
  * @experimental
76
93
  */
77
- declare function minifySync(filename: string, sourceText: string, options?: MinifyOptions$1 | null): MinifyResult$1;
94
+ declare function minifySync(filename: string, sourceText: string, options?: MinifyOptions | null): MinifyResult;
78
95
  //#endregion
79
96
  //#region src/utils/transform.d.ts
80
97
  /**
@@ -82,7 +99,7 @@ declare function minifySync(filename: string, sourceText: string, options?: Mini
82
99
  *
83
100
  * @category Utilities
84
101
  */
85
- interface TransformOptions$1 extends BindingEnhancedTransformOptions {}
102
+ interface TransformOptions extends BindingEnhancedTransformOptions {}
86
103
  /**
87
104
  * Result of transforming a code.
88
105
  *
@@ -110,7 +127,7 @@ type TransformResult = Omit<BindingEnhancedTransformResult, "errors" | "warnings
110
127
  * @category Utilities
111
128
  * @experimental
112
129
  */
113
- declare function transform(filename: string, sourceText: string, options?: TransformOptions$1 | null, cache?: TsconfigCache | null): Promise<TransformResult>;
130
+ declare function transform(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): Promise<TransformResult>;
114
131
  /**
115
132
  * Transpile a JavaScript or TypeScript into a target ECMAScript version.
116
133
  *
@@ -127,6 +144,6 @@ declare function transform(filename: string, sourceText: string, options?: Trans
127
144
  * @category Utilities
128
145
  * @experimental
129
146
  */
130
- declare function transformSync(filename: string, sourceText: string, options?: TransformOptions$1 | null, cache?: TsconfigCache | null): TransformResult;
147
+ declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): TransformResult;
131
148
  //#endregion
132
- export { TsconfigRawOptions as a, MinifyOptions$1 as c, minifySync as d, ParseResult$1 as f, parseSync as h, TsconfigCompilerOptions as i, MinifyResult$1 as l, parse as m, TransformResult as n, transform as o, ParserOptions$1 as p, TsconfigCache as r, transformSync as s, TransformOptions$1 as t, minify as u };
149
+ export { MinifyOptions as a, minifySync as c, parse as d, parseSync as f, transformSync as i, ParseResult as l, resolveTsconfig as m, TransformResult as n, MinifyResult as o, TsconfigCache as p, transform as r, minify as s, TransformOptions as t, ParserOptions as u };
@@ -1,4 +1,4 @@
1
- import { BindingBuiltinPluginName } from "../binding.cjs";
1
+ import { t as BindingBuiltinPluginName } from "./binding-CaVxb0SV.mjs";
2
2
 
3
3
  //#region src/types/utils.d.ts
4
4
  type MaybePromise<T> = T | Promise<T>;
@@ -1,7 +1,7 @@
1
1
  import { o as logMultipleWatcherOption } from "./logs-D80CXhvg.mjs";
2
- import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-Cfptl9gw.mjs";
3
- import { h as arraify } from "./composable-filters-B2ByPP8y.mjs";
4
- import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-DZ7tJkeQ.mjs";
2
+ import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-C7dl2XLe.mjs";
3
+ import { h as arraify } from "./composable-filters-DpWB82jk.mjs";
4
+ import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-DYE2Qi6z.mjs";
5
5
  import { t as aggregateBindingErrorsIntoJsError } from "./error-CQ6njWsV.mjs";
6
6
  import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
@@ -1,6 +1,6 @@
1
- import { a as parse, o as parseSync } from "./error-DkAP_6fk.js";
2
- import { a as minifySync, i as minify, n as transform, r as transformSync, t as TsconfigCache } from "./transform-UkHb5h4g.js";
3
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { a as parse, o as parseSync } from "./error-CIj5jXSo.js";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-uVC8K7GR.js";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
4
4
  function walkNode(node, visitors) {
5
5
  if (node == null) return;
6
6
  if (Array.isArray(node)) {
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
2010
2010
  exit !== null && exit(node);
2011
2011
  }
2012
2012
  //#endregion
2013
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2013
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2014
2014
  /** Mapping from node type name to node type ID */
2015
2015
  const NODE_TYPE_IDS_MAP = new Map([
2016
2016
  ["DebuggerStatement", 0],
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2180
2180
  ["TSUnionType", 164]
2181
2181
  ]);
2182
2182
  //#endregion
2183
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/visit/visitor.js
2183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/visit/visitor.js
2184
2184
  let compiledVisitor;
2185
2185
  function createCompiledVisitor() {
2186
2186
  compiledVisitor = [];
@@ -1,7 +1,7 @@
1
- import { $ as JSXClosingElement, $n as TaggedTemplateExpression, $t as TSFunctionType, A as ExportAllDeclaration, An as TSRestType, At as ReturnStatement, B as IdentifierName, Bn as TSTypeAssertion, Bt as TSAsExpression, C as ClassBody, Cn as TSNumberKeyword, Ct as ObjectPattern, D as Decorator, Dn as TSParenthesizedType, Dt as Program, E as DebuggerStatement, En as TSParameterProperty, Et as PrivateIdentifier, F as ForInStatement, Fn as TSThisParameter, Ft as Super, G as ImportDefaultSpecifier, Gn as TSTypeParameterInstantiation, Gt as TSConditionalType, H as IfStatement, Hn as TSTypeOperator, Ht as TSBooleanKeyword, I as ForOfStatement, In as TSThisType, It as SwitchCase, J as ImportSpecifier, Jn as TSTypeReference, Jt as TSEnumBody, K as ImportExpression, Kn as TSTypePredicate, Kt as TSConstructSignatureDeclaration, L as ForStatement, Ln as TSTupleType, Lt as SwitchStatement, M as ExportNamedDeclaration, Mn as TSStringKeyword, Mt as SpreadElement, N as ExportSpecifier, Nn as TSSymbolKeyword, Nt as StaticBlock, O as DoWhileStatement, On as TSPropertySignature, Ot as PropertyDefinition, P as ExpressionStatement, Pn as TSTemplateLiteralType, Pt as StringLiteral, Q as JSXAttribute, Qn as TSVoidKeyword, Qt as TSExternalModuleReference, R as FormalParameterRest, Rn as TSTypeAliasDeclaration, Rt as TSAnyKeyword, S as Class, Sn as TSNullKeyword, St as ObjectExpression, T as ContinueStatement, Tn as TSOptionalType, Tt as ParenthesizedExpression, U as ImportAttribute, Un as TSTypeParameter, Ut as TSCallSignatureDeclaration, V as IdentifierReference, Vn as TSTypeLiteral, Vt as TSBigIntKeyword, W as ImportDeclaration, Wn as TSTypeParameterDeclaration, Wt as TSClassImplements, X as JSDocNullableType, Xn as TSUnionType, Xt as TSEnumMember, Y as JSDocNonNullableType, Yn as TSUndefinedKeyword, Yt as TSEnumDeclaration, Z as JSDocUnknownType, Zn as TSUnknownKeyword, Zt as TSExportAssignment, _ as BooleanLiteral, _n as TSModuleDeclaration, _t as MetaProperty, a as AssignmentExpression, an as TSIndexedAccessType, ar as UnaryExpression, at as JSXIdentifier, b as CatchClause, bn as TSNeverKeyword, bt as NullLiteral, c as AssignmentTargetPropertyProperty, cn as TSInterfaceBody, cr as VariableDeclaration, ct as JSXOpeningElement, d as BigIntLiteral, dn as TSIntersectionType, dr as WithStatement, dt as JSXSpreadChild, en as TSGlobalDeclaration, er as TemplateElement, et as JSXClosingFragment, f as BinaryExpression, fn as TSIntrinsicKeyword, fr as YieldExpression, ft as JSXText, g as BlockStatement, gn as TSModuleBlock, gt as MemberExpression, h as BindingRestElement, hn as TSMethodSignature, ht as LogicalExpression, i as ArrowFunctionExpression, in as TSIndexSignatureName, ir as TryStatement, it as JSXFragment, j as ExportDefaultDeclaration, jn as TSSatisfiesExpression, jt as SequenceExpression, k as EmptyStatement, kn as TSQualifiedName, kt as RegExpLiteral, l as AssignmentTargetRest, ln as TSInterfaceDeclaration, lr as VariableDeclarator, lt as JSXOpeningFragment, m as BindingProperty, mn as TSMappedType, mt as LabeledStatement, n as ArrayExpression, nn as TSImportType, nr as ThisExpression, nt as JSXEmptyExpression, o as AssignmentPattern, on as TSInferType, or as UpdateExpression, ot as JSXMemberExpression, p as BindingIdentifier, pn as TSLiteralType, pr as types_d_exports, pt as LabelIdentifier, q as ImportNamespaceSpecifier, qn as TSTypeQuery, qt as TSConstructorType, r as ArrayPattern, rn as TSIndexSignature, rr as ThrowStatement, rt as JSXExpressionContainer, s as AssignmentTargetProperty, sn as TSInstantiationExpression, sr as V8IntrinsicExpression, st as JSXNamespacedName, t as AccessorProperty, tn as TSImportEqualsDeclaration, tr as TemplateLiteral, tt as JSXElement, u as AwaitExpression, un as TSInterfaceHeritage, ur as WhileStatement, ut as JSXSpreadAttribute, v as BreakStatement, vn as TSNamedTupleMember, vt as MethodDefinition, w as ConditionalExpression, wn as TSObjectKeyword, wt as ObjectProperty, x as ChainExpression, xn as TSNonNullExpression, xt as NumericLiteral, y as CallExpression, yn as TSNamespaceExportDeclaration, yt as NewExpression, z as Function, zn as TSTypeAnnotation, zt as TSArrayType } from "./shared/types-Cx3HYorz.mjs";
2
- import { a as TsconfigRawOptions, c as MinifyOptions, d as minifySync, f as ParseResult, h as parseSync, i as TsconfigCompilerOptions, l as MinifyResult, m as parse, n as TransformResult, o as transform, p as ParserOptions, r as TsconfigCache, s as transformSync, t as TransformOptions, u as minify } from "./shared/transform-BSAGL1b_.mjs";
1
+ import { $ as AssignmentPattern, $n as TSInferType, $r as UpdateExpression, $t as JSXMemberExpression, An as SwitchStatement, Ar as TSTupleType, At as ForStatement, Bn as TSConstructorType, Br as TSTypeQuery, Bt as ImportNamespaceSpecifier, Cn as ReturnStatement, Cr as TSRestType, Ct as ExportAllDeclaration, Dn as StringLiteral, Dr as TSTemplateLiteralType, Dt as ExpressionStatement, En as StaticBlock, Er as TSSymbolKeyword, Et as ExportSpecifier, Fn as TSBooleanKeyword, Fr as TSTypeOperator, Ft as IfStatement, Gn as TSExternalModuleReference, Gr as TSVoidKeyword, Gt as JSXAttribute, Hn as TSEnumDeclaration, Hr as TSUndefinedKeyword, Ht as JSDocNonNullableType, In as TSCallSignatureDeclaration, Ir as TSTypeParameter, It as ImportAttribute, J as AccessorProperty, Jn as TSImportEqualsDeclaration, Jr as TemplateLiteral, Jt as JSXElement, Kn as TSFunctionType, Kr as TaggedTemplateExpression, Kt as JSXClosingElement, Ln as TSClassImplements, Lr as TSTypeParameterDeclaration, Lt as ImportDeclaration, Mn as TSArrayType, Mr as TSTypeAnnotation, Mt as Function, Nn as TSAsExpression, Nr as TSTypeAssertion, Nt as IdentifierName, On as Super, Or as TSThisParameter, Ot as ForInStatement, Pn as TSBigIntKeyword, Pr as TSTypeLiteral, Pt as IdentifierReference, Q as AssignmentExpression, Qn as TSIndexedAccessType, Qr as UnaryExpression, Qt as JSXIdentifier, Rn as TSConditionalType, Rr as TSTypeParameterInstantiation, Rt as ImportDefaultSpecifier, Sn as RegExpLiteral, Sr as TSQualifiedName, St as EmptyStatement, Tn as SpreadElement, Tr as TSStringKeyword, Tt as ExportNamedDeclaration, Un as TSEnumMember, Ur as TSUnionType, Ut as JSDocNullableType, Vn as TSEnumBody, Vr as TSTypeReference, Vt as ImportSpecifier, Wn as TSExportAssignment, Wr as TSUnknownKeyword, Wt as JSDocUnknownType, X as ArrayPattern, Xn as TSIndexSignature, Xr as ThrowStatement, Xt as JSXExpressionContainer, Y as ArrayExpression, Yn as TSImportType, Yr as ThisExpression, Yt as JSXEmptyExpression, Z as ArrowFunctionExpression, Zn as TSIndexSignatureName, Zr as TryStatement, Zt as JSXFragment, _ as BindingTsconfigRawOptions, _n as ObjectProperty, _r as TSObjectKeyword, _t as ConditionalExpression, ai as YieldExpression, an as JSXText, ar as TSIntrinsicKeyword, at as BinaryExpression, bn as Program, br as TSParenthesizedType, bt as Decorator, cn as LogicalExpression, cr as TSMethodSignature, ct as BindingRestElement, dn as MethodDefinition, dr as TSNamedTupleMember, dt as BreakStatement, ei as V8IntrinsicExpression, en as JSXNamespacedName, er as TSInstantiationExpression, et as AssignmentTargetProperty, fn as NewExpression, fr as TSNamespaceExportDeclaration, ft as CallExpression, g as BindingTsconfigCompilerOptions, gn as ObjectPattern, gr as TSNumberKeyword, gt as ClassBody, hn as ObjectExpression, hr as TSNullKeyword, ht as Class, ii as WithStatement, in as JSXSpreadChild, ir as TSIntersectionType, it as BigIntLiteral, jn as TSAnyKeyword, jr as TSTypeAliasDeclaration, jt as FormalParameterRest, kn as SwitchCase, kr as TSThisType, kt as ForOfStatement, ln as MemberExpression, lr as TSModuleBlock, lt as BlockStatement, mn as NumericLiteral, mr as TSNonNullExpression, mt as ChainExpression, ni as VariableDeclarator, nn as JSXOpeningFragment, nr as TSInterfaceDeclaration, nt as AssignmentTargetRest, oi as types_d_exports, on as LabelIdentifier, or as TSLiteralType, ot as BindingIdentifier, pn as NullLiteral, pr as TSNeverKeyword, pt as CatchClause, qn as TSGlobalDeclaration, qr as TemplateElement, qt as JSXClosingFragment, ri as WhileStatement, rn as JSXSpreadAttribute, rr as TSInterfaceHeritage, rt as AwaitExpression, sn as LabeledStatement, sr as TSMappedType, st as BindingProperty, ti as VariableDeclaration, tn as JSXOpeningElement, tr as TSInterfaceBody, tt as AssignmentTargetPropertyProperty, un as MetaProperty, ur as TSModuleDeclaration, ut as BooleanLiteral, vn as ParenthesizedExpression, vr as TSOptionalType, vt as ContinueStatement, wn as SequenceExpression, wr as TSSatisfiesExpression, wt as ExportDefaultDeclaration, xn as PropertyDefinition, xr as TSPropertySignature, xt as DoWhileStatement, yn as PrivateIdentifier, yr as TSParameterProperty, yt as DebuggerStatement, zn as TSConstructSignatureDeclaration, zr as TSTypePredicate, zt as ImportExpression } from "./shared/binding-CaVxb0SV.mjs";
2
+ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-kP3ISMFT.mjs";
3
3
 
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
4
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
5
5
  interface VisitorObject$1 {
6
6
  DebuggerStatement?: (node: DebuggerStatement) => void;
7
7
  "DebuggerStatement:exit"?: (node: DebuggerStatement) => void;
@@ -371,4 +371,4 @@ declare class Visitor {
371
371
  visit(program: Program): void;
372
372
  }
373
373
  //#endregion
374
- export { type types_d_exports as ESTree, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type TransformOptions, type TransformResult, TsconfigCache, type TsconfigCompilerOptions, type TsconfigRawOptions, Visitor, type VisitorObject, minify, minifySync, parse, parseSync, transform, transformSync };
374
+ export { type types_d_exports as ESTree, type MinifyOptions, type MinifyResult, type ParseResult, type ParserOptions, type TransformOptions, type TransformResult, TsconfigCache, type BindingTsconfigCompilerOptions as TsconfigCompilerOptions, type BindingTsconfigRawOptions as TsconfigRawOptions, Visitor, type VisitorObject, minify, minifySync, parse, parseSync, transform, transformSync };
@@ -1,7 +1,6 @@
1
- import "./shared/error-CQ6njWsV.mjs";
2
- import { n as parseSync, t as parse } from "./shared/parse-DDUnGYGU.mjs";
3
- import { a as minifySync, i as minify, n as transform, r as transformSync, t as TsconfigCache } from "./shared/transform-B_n5An0U.mjs";
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-Bmk53Le1.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-Cwoo4h_o.mjs";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
5
4
  function walkNode(node, visitors) {
6
5
  if (node == null) return;
7
6
  if (Array.isArray(node)) {
@@ -2011,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
2011
2010
  exit !== null && exit(node);
2012
2011
  }
2013
2012
  //#endregion
2014
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2013
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2015
2014
  /** Mapping from node type name to node type ID */
2016
2015
  const NODE_TYPE_IDS_MAP = new Map([
2017
2016
  ["DebuggerStatement", 0],
@@ -2181,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2181
2180
  ["TSUnionType", 164]
2182
2181
  ]);
2183
2182
  //#endregion
2184
- //#region ../../node_modules/.pnpm/oxc-parser@0.115.0/node_modules/oxc-parser/src-js/visit/visitor.js
2183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.130.0/node_modules/oxc-parser/src-js/visit/visitor.js
2185
2184
  let compiledVisitor;
2186
2185
  function createCompiledVisitor() {
2187
2186
  compiledVisitor = [];
@@ -3,6 +3,8 @@ import { memfsExported as __memfsExported } from '@napi-rs/wasm-runtime/fs'
3
3
 
4
4
  const fs = createFsProxy(__memfsExported)
5
5
 
6
+ const errorOutputs = []
7
+
6
8
  const handler = new MessageHandler({
7
9
  onLoad({ wasmModule, wasmMemory }) {
8
10
  const wasi = new WASI({
@@ -17,6 +19,8 @@ const handler = new MessageHandler({
17
19
  printErr: function() {
18
20
  // eslint-disable-next-line no-console
19
21
  console.error.apply(console, arguments)
22
+
23
+ errorOutputs.push([...arguments])
20
24
  },
21
25
  })
22
26
  return instantiateNapiModuleSync(wasmModule, {
@@ -32,6 +36,10 @@ const handler = new MessageHandler({
32
36
  },
33
37
  })
34
38
  },
39
+ onError(error) {
40
+ postMessage({ type: 'error', error, errorOutputs })
41
+ errorOutputs.length = 0
42
+ }
35
43
  })
36
44
 
37
45
  globalThis.onmessage = function (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-rc.9",
3
+ "version": "1.0.1",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -53,7 +53,9 @@
53
53
  "registry": "https://registry.npmjs.org/"
54
54
  },
55
55
  "dependencies": {
56
- "@napi-rs/wasm-runtime": "^1.0.0"
56
+ "@emnapi/core": "1.10.0",
57
+ "@emnapi/runtime": "1.10.0",
58
+ "@napi-rs/wasm-runtime": "^1.1.4"
57
59
  },
58
60
  "scripts": {
59
61
  "build": "pnpm run build:debug",