@rolldown/browser 1.0.0-rc.8 → 1.0.0
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 +225 -74
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -7
- package/dist/{constructors-BgL_dmUe.js → constructors-BXVEHwHm.js} +8 -2
- package/dist/{error-DkAP_6fk.js → error-DMfKBGWU.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 +1 -1
- package/dist/index.browser.mjs +5 -5
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +5 -9
- 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-eqfrsvjc.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-Clh1p2eh.js → rolldown-build-CKS7EawU.js} +221 -199
- package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
- package/dist/shared/{bindingify-input-options-CxjTlvCV.mjs → bindingify-input-options-CboGFdC4.mjs} +132 -56
- package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
- package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-DO36gIcC.mjs} +8 -2
- package/dist/shared/{define-config-TEoV5q6D.d.mts → define-config-Bah0mfyR.d.mts} +88 -26
- package/dist/shared/{load-config-Cs9h9aXF.mjs → load-config-BwBgui4p.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-Lc1YQk0q.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-D2p2QuF1.mjs → rolldown-WowDTCZP.mjs} +1 -1
- package/dist/shared/{rolldown-build-D_FXM8pA.mjs → rolldown-build-DIb-iqkO.mjs} +92 -146
- 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-BMFUc4Au.mjs → watch-B81_EvN-.mjs} +2 -2
- 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,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-DMfKBGWU.js";
|
|
2
|
+
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-eqfrsvjc.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.129.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.129.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.129.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.129.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-Lc1YQk0q.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.129.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.129.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.129.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
|
|
3
|
+
"version": "1.0.0",
|
|
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",
|