@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.
- package/dist/cli.mjs +208 -73
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -7
- package/dist/{constructors-BgL_dmUe.js → constructors-BTLtc_G_.js} +11 -2
- package/dist/{error-DkAP_6fk.js → error-CIj5jXSo.js} +1 -1
- package/dist/experimental-index.browser.mjs +10 -10
- package/dist/experimental-index.d.mts +17 -19
- package/dist/experimental-index.mjs +11 -11
- package/dist/experimental-runtime-types.d.ts +14 -5
- package/dist/filter-index.d.mts +3 -3
- package/dist/filter-index.mjs +3 -3
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +4 -8
- package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
- package/dist/parallel-plugin-worker.mjs +1 -4
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -2
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-uVC8K7GR.js} +28 -5
- package/dist/rolldown-binding.wasi-browser.js +6 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-sRmdtwRU.js → rolldown-build-DCjXbOeh.js} +242 -210
- package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
- package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-C7dl2XLe.mjs} +126 -58
- package/dist/shared/{composable-filters-B2ByPP8y.mjs → composable-filters-DpWB82jk.mjs} +2 -2
- package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
- package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-CI_8FAaP.mjs} +11 -2
- package/dist/shared/{define-config-B1J71V4c.d.mts → define-config-CYgMQYTy.d.mts} +131 -39
- package/dist/shared/{load-config-B6MMusXN.mjs → load-config-BFkorvIR.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
- package/dist/shared/{parse-DDUnGYGU.mjs → parse-Bmk53Le1.mjs} +1 -1
- package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
- package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
- package/dist/shared/{rolldown-BDqeiCX1.mjs → rolldown-Dyy9Y2li.mjs} +1 -1
- package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DYE2Qi6z.mjs} +120 -156
- package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
- package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
- package/dist/shared/{watch-Cj4uDLQX.mjs → watch-DXAEaxPd.mjs} +3 -3
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +4 -4
- package/dist/utils-index.mjs +5 -6
- package/dist/wasi-worker-browser.mjs +8 -0
- package/package.json +4 -2
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
147
|
+
declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): TransformResult;
|
|
131
148
|
//#endregion
|
|
132
|
-
export {
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { o as logMultipleWatcherOption } from "./logs-D80CXhvg.mjs";
|
|
2
|
-
import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-
|
|
3
|
-
import { h as arraify } from "./composable-filters-
|
|
4
|
-
import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-
|
|
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-
|
|
2
|
-
import { a as
|
|
3
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
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.
|
|
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.
|
|
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 = [];
|
package/dist/utils-index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as
|
|
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.
|
|
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 };
|
package/dist/utils-index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import {
|
|
3
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
"@
|
|
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",
|