@rolldown/browser 1.0.0-rc.9 → 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.
Files changed (46) hide show
  1. package/dist/cli.mjs +207 -72
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -7
  4. package/dist/{constructors-BgL_dmUe.js → constructors-BXVEHwHm.js} +8 -2
  5. package/dist/{error-DkAP_6fk.js → error-DMfKBGWU.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 +1 -1
  11. package/dist/index.browser.mjs +4 -4
  12. package/dist/index.d.mts +4 -3
  13. package/dist/index.mjs +4 -8
  14. package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
  15. package/dist/parallel-plugin-worker.mjs +1 -4
  16. package/dist/parallel-plugin.d.mts +2 -2
  17. package/dist/parse-ast-index.d.mts +1 -2
  18. package/dist/parse-ast-index.mjs +1 -1
  19. package/dist/plugins-index.browser.mjs +2 -2
  20. package/dist/plugins-index.d.mts +3 -3
  21. package/dist/plugins-index.mjs +2 -2
  22. package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-eqfrsvjc.js} +28 -5
  23. package/dist/rolldown-binding.wasi-browser.js +6 -0
  24. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  25. package/dist/{rolldown-build-sRmdtwRU.js → rolldown-build-CKS7EawU.js} +211 -197
  26. package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
  27. package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-CboGFdC4.mjs} +125 -57
  28. package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
  29. package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-DO36gIcC.mjs} +8 -2
  30. package/dist/shared/{define-config-B1J71V4c.d.mts → define-config-Bah0mfyR.d.mts} +81 -29
  31. package/dist/shared/{load-config-B6MMusXN.mjs → load-config-BwBgui4p.mjs} +1 -1
  32. package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
  33. package/dist/shared/{parse-DDUnGYGU.mjs → parse-Lc1YQk0q.mjs} +1 -1
  34. package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
  35. package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
  36. package/dist/shared/{rolldown-BDqeiCX1.mjs → rolldown-WowDTCZP.mjs} +1 -1
  37. package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DIb-iqkO.mjs} +89 -143
  38. package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
  39. package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
  40. package/dist/shared/{watch-Cj4uDLQX.mjs → watch-B81_EvN-.mjs} +2 -2
  41. package/dist/utils-index.browser.mjs +5 -5
  42. package/dist/utils-index.d.mts +4 -4
  43. package/dist/utils-index.mjs +5 -6
  44. package/dist/wasi-worker-browser.mjs +8 -0
  45. package/package.json +4 -2
  46. package/dist/shared/types-Cx3HYorz.d.mts +0 -1302
@@ -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.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 };
@@ -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-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.115.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
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.115.0/node_modules/oxc-parser/src-js/visit/visitor.js
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-rc.9",
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
- "@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",