@rolldown/browser 1.0.0-beta.29-commit.fe1bea3 → 1.0.0-beta.31

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 (42) hide show
  1. package/dist/cli.cjs +23 -8
  2. package/dist/cli.mjs +23 -8
  3. package/dist/config.cjs +3 -3
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +3 -3
  7. package/dist/experimental-index.browser.mjs +2 -2
  8. package/dist/experimental-index.cjs +2 -3
  9. package/dist/experimental-index.d.cts +3 -3
  10. package/dist/experimental-index.d.mts +3 -3
  11. package/dist/experimental-index.mjs +3 -3
  12. package/dist/experimental-runtime-types.d.ts +2 -0
  13. package/dist/filter-index.d.cts +2 -2
  14. package/dist/filter-index.d.mts +2 -2
  15. package/dist/index.browser.mjs +1 -1
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.d.cts +3 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +2 -2
  20. package/dist/parallel-plugin-worker.cjs +2 -2
  21. package/dist/parallel-plugin-worker.mjs +2 -2
  22. package/dist/parallel-plugin.d.cts +2 -2
  23. package/dist/parallel-plugin.d.mts +2 -2
  24. package/dist/parse-ast-index.cjs +1 -1
  25. package/dist/parse-ast-index.d.cts +1 -1
  26. package/dist/parse-ast-index.d.mts +1 -1
  27. package/dist/parse-ast-index.mjs +1 -1
  28. package/dist/rolldown-binding.wasi-browser.js +0 -1
  29. package/dist/rolldown-binding.wasi.cjs +0 -1
  30. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  31. package/dist/shared/{binding-BO7hG1pA.d.mts → binding-B2f_h9DF.d.mts} +42 -44
  32. package/dist/shared/{binding-D1lW862e.d.cts → binding-CCkTRaSB.d.cts} +42 -44
  33. package/dist/shared/{define-config-CKxZwWu_.d.mts → define-config-BzVT47Bj.d.cts} +73 -11
  34. package/dist/shared/{define-config-O6TCZLYU.d.cts → define-config-xzVj_WrD.d.mts} +73 -11
  35. package/dist/shared/{load-config-CPJ15pW3.cjs → load-config-9KWiC1Y_.cjs} +2 -2
  36. package/dist/shared/{load-config-C2Df0pqb.mjs → load-config-DCz6MK3j.mjs} +2 -2
  37. package/dist/shared/{parse-ast-index-CLjgl4c8.cjs → parse-ast-index-DZ5uPSgP.cjs} +2 -2
  38. package/dist/shared/{parse-ast-index-rwZvDBjW.mjs → parse-ast-index-r9XO-GhB.mjs} +2 -2
  39. package/dist/shared/{src-BWVOVy_u.mjs → src-BSeUgDdv.mjs} +115 -150
  40. package/dist/shared/{src-BLxfrK6S.cjs → src-gD0LmYxq.cjs} +114 -155
  41. package/dist/{src-CVDDqNxL.js → src-C8_hb_FH.js} +82 -64
  42. package/package.json +2 -2
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
 
28
28
  //#endregion
29
29
  //#region package.json
30
- var version = "1.0.0-beta.29-commit.fe1bea3";
30
+ var version = "1.0.0-beta.31";
31
31
 
32
32
  //#endregion
33
33
  //#region src/utils/normalize-string-or-regex.ts
@@ -105,27 +105,6 @@ function viteResolvePlugin(config) {
105
105
  const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
106
106
  return makeBuiltinPluginCallable(builtinPlugin);
107
107
  }
108
- function moduleFederationPlugin(config) {
109
- return new BuiltinPlugin("builtin:module-federation", {
110
- ...config,
111
- remotes: config.remotes && Object.entries(config.remotes).map(([name, remote]) => {
112
- if (typeof remote === "string") {
113
- const [entryGlobalName] = remote.split("@");
114
- const entry = remote.replace(entryGlobalName + "@", "");
115
- return {
116
- entry,
117
- name,
118
- entryGlobalName
119
- };
120
- }
121
- return {
122
- ...remote,
123
- name: remote.name ?? name
124
- };
125
- }),
126
- manifest: config.manifest === false ? void 0 : config.manifest === true ? {} : config.manifest
127
- });
128
- }
129
108
  function isolatedDeclarationPlugin(config) {
130
109
  return new BuiltinPlugin("builtin:isolated-declaration", config);
131
110
  }
@@ -724,7 +703,7 @@ function locate(source, search, options) {
724
703
 
725
704
  //#endregion
726
705
  //#region src/log/logs.ts
727
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
706
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
728
707
  function logParseError(message) {
729
708
  return {
730
709
  code: PARSE_ERROR,
@@ -761,6 +740,12 @@ function logDuplicateJsxConfig() {
761
740
  message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
762
741
  };
763
742
  }
743
+ function logNoFileSystemInBrowser(method) {
744
+ return {
745
+ code: NO_FS_IN_BROWSER,
746
+ message: `Cannot access the file system (via "${method}") when using the browser build of Rolldown.`
747
+ };
748
+ }
764
749
  function logPluginError(error$1, plugin, { hook, id: id$1 } = {}) {
765
750
  try {
766
751
  const code$1 = error$1.code;
@@ -1110,7 +1095,7 @@ function getSortedPlugins(hookName, plugins) {
1110
1095
  }
1111
1096
 
1112
1097
  //#endregion
1113
- //#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.8.3/node_modules/valibot/dist/index.js
1098
+ //#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.9.2/node_modules/valibot/dist/index.js
1114
1099
  var store;
1115
1100
  /* @__NO_SIDE_EFFECTS__ */
1116
1101
  function getGlobalConfig(config2) {
@@ -2076,7 +2061,7 @@ function safeParse(schema, input, config2) {
2076
2061
 
2077
2062
  //#endregion
2078
2063
  //#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs
2079
- var require_ansis = __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs"(exports, module) {
2064
+ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs": ((exports, module) => {
2080
2065
  let e, t, r, { defineProperty: n, setPrototypeOf: l, create: o, keys: s } = Object, i$1 = "", { round: c, max: a$1 } = Math, p = (e$1) => {
2081
2066
  let t$1 = /([a-f\d]{3,6})/i.exec(e$1)?.[1], r$1 = t$1?.length, n$1 = parseInt(6 ^ r$1 ? 3 ^ r$1 ? "0" : t$1[0] + t$1[0] + t$1[1] + t$1[1] + t$1[2] + t$1[2] : t$1, 16);
2082
2067
  return [
@@ -2177,11 +2162,11 @@ var require_ansis = __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modu
2177
2162
  })), t$1.extend(M);
2178
2163
  }, y = new w();
2179
2164
  module.exports = y, y.default = y;
2180
- } });
2165
+ }) });
2181
2166
 
2182
2167
  //#endregion
2183
2168
  //#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
2184
- var import_ansis = __toESM(require_ansis(), 1);
2169
+ var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
2185
2170
  var ansis_default = import_ansis.default;
2186
2171
  const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
2187
2172
 
@@ -2292,7 +2277,9 @@ const WatchOptionsSchema = strictObject({
2292
2277
  pollInterval: optional(number())
2293
2278
  })), description("Notify options")),
2294
2279
  skipWrite: pipe(optional(boolean()), description("Skip the bundle.write() step")),
2295
- buildDelay: pipe(optional(number()), description("Throttle watch rebuilds"))
2280
+ buildDelay: pipe(optional(number()), description("Throttle watch rebuilds")),
2281
+ clearScreen: pipe(optional(boolean()), description("Whether to clear the screen when a rebuild is triggered")),
2282
+ onInvalidate: pipe(optional(pipe(function_(), args(tuple([string()])))), description("An optional function that will be called immediately every time a module changes that is part of the build."))
2296
2283
  });
2297
2284
  const ChecksOptionsSchema = strictObject({
2298
2285
  circularDependency: pipe(optional(boolean()), description("Whether to emit warning when detecting circular dependency")),
@@ -2333,7 +2320,10 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
2333
2320
  unknownGlobalSideEffects: optional(boolean()),
2334
2321
  commonjs: optional(boolean())
2335
2322
  })]);
2336
- const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
2323
+ const OptimizationOptionsSchema = strictObject({
2324
+ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")),
2325
+ pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
2326
+ });
2337
2327
  const OnLogSchema = pipe(function_(), args(tuple([
2338
2328
  LogLevelSchema,
2339
2329
  RollupLogSchema,
@@ -2488,6 +2478,7 @@ const OutputOptionsSchema = strictObject({
2488
2478
  literal("inline"),
2489
2479
  literal("hidden")
2490
2480
  ])), description(`Generate sourcemap (\`-s inline\` for inline, or ${ansis_default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
2481
+ sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
2491
2482
  sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
2492
2483
  sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
2493
2484
  sourcemapPathTransform: optional(custom(() => true)),
@@ -2777,7 +2768,7 @@ function exclude(expr) {
2777
2768
  }
2778
2769
 
2779
2770
  //#endregion
2780
- //#region ../../node_modules/.pnpm/remeda@2.26.1/node_modules/remeda/dist/chunk-D6FCK2GA.js
2771
+ //#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-D6FCK2GA.js
2781
2772
  function u$1(o$1, n$1, a$2) {
2782
2773
  let t$1 = (r$1) => o$1(r$1, ...n$1);
2783
2774
  return a$2 === void 0 ? t$1 : Object.assign(t$1, {
@@ -2787,7 +2778,7 @@ function u$1(o$1, n$1, a$2) {
2787
2778
  }
2788
2779
 
2789
2780
  //#endregion
2790
- //#region ../../node_modules/.pnpm/remeda@2.26.1/node_modules/remeda/dist/chunk-WIMGWYZL.js
2781
+ //#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-WIMGWYZL.js
2791
2782
  function u(r$1, n$1, o$1) {
2792
2783
  let a$2 = r$1.length - n$1.length;
2793
2784
  if (a$2 === 0) return r$1(...n$1);
@@ -2796,7 +2787,7 @@ function u(r$1, n$1, o$1) {
2796
2787
  }
2797
2788
 
2798
2789
  //#endregion
2799
- //#region ../../node_modules/.pnpm/remeda@2.26.1/node_modules/remeda/dist/chunk-3IFJP4R5.js
2790
+ //#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-3IFJP4R5.js
2800
2791
  function d(...r$1) {
2801
2792
  return u(i, r$1);
2802
2793
  }
@@ -2873,44 +2864,38 @@ function bindingifyFilterExprImpl(expr, list) {
2873
2864
  });
2874
2865
  break;
2875
2866
  }
2876
- case "not": {
2867
+ case "not":
2877
2868
  bindingifyFilterExprImpl(expr.expr, list);
2878
2869
  list.push({ kind: "Not" });
2879
2870
  break;
2880
- }
2881
- case "id": {
2871
+ case "id":
2882
2872
  list.push({
2883
2873
  kind: "Id",
2884
2874
  payload: expr.pattern
2885
2875
  });
2886
2876
  if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
2887
2877
  break;
2888
- }
2889
- case "moduleType": {
2878
+ case "moduleType":
2890
2879
  list.push({
2891
2880
  kind: "ModuleType",
2892
2881
  payload: expr.pattern
2893
2882
  });
2894
2883
  break;
2895
- }
2896
- case "code": {
2884
+ case "code":
2897
2885
  list.push({
2898
2886
  kind: "Code",
2899
2887
  payload: expr.pattern
2900
2888
  });
2901
2889
  break;
2902
- }
2903
- case "include": {
2890
+ case "include":
2904
2891
  bindingifyFilterExprImpl(expr.expr, list);
2905
2892
  list.push({ kind: "Include" });
2906
2893
  break;
2907
- }
2908
- case "exclude": {
2894
+ case "exclude":
2909
2895
  bindingifyFilterExprImpl(expr.expr, list);
2910
2896
  list.push({ kind: "Exclude" });
2911
2897
  break;
2912
- }
2913
- case "query": {
2898
+ case "query":
2914
2899
  list.push({
2915
2900
  kind: "QueryKey",
2916
2901
  payload: expr.key
@@ -2920,7 +2905,6 @@ function bindingifyFilterExprImpl(expr, list) {
2920
2905
  payload: expr.pattern
2921
2906
  });
2922
2907
  break;
2923
- }
2924
2908
  default: throw new Error(`Unknown filter expression: ${expr}`);
2925
2909
  }
2926
2910
  }
@@ -2963,7 +2947,7 @@ function bindingPluginOrder(order) {
2963
2947
  }
2964
2948
 
2965
2949
  //#endregion
2966
- //#region ../../node_modules/.pnpm/oxc-parser@0.77.3/node_modules/oxc-parser/wrap.mjs
2950
+ //#region ../../node_modules/.pnpm/oxc-parser@0.80.0/node_modules/oxc-parser/wrap.mjs
2967
2951
  function wrap$1(result) {
2968
2952
  let program, module$1, comments, errors;
2969
2953
  return {
@@ -3042,9 +3026,33 @@ function bindingAssetSource(source) {
3042
3026
  return { inner: source };
3043
3027
  }
3044
3028
 
3029
+ //#endregion
3030
+ //#region src/plugin/fs.ts
3031
+ const fsModule = {
3032
+ appendFile: throwNoFileSystemError("fs.appendFile"),
3033
+ copyFile: throwNoFileSystemError("fs.copyFile"),
3034
+ mkdir: throwNoFileSystemError("fs.mkdir"),
3035
+ mkdtemp: throwNoFileSystemError("fs.mkdtemp"),
3036
+ readdir: throwNoFileSystemError("fs.readdir"),
3037
+ readFile: throwNoFileSystemError("fs.readFile"),
3038
+ realpath: throwNoFileSystemError("fs.realpath"),
3039
+ rename: throwNoFileSystemError("fs.rename"),
3040
+ rmdir: throwNoFileSystemError("fs.rmdir"),
3041
+ stat: throwNoFileSystemError("fs.stat"),
3042
+ lstat: throwNoFileSystemError("fs.lstat"),
3043
+ unlink: throwNoFileSystemError("fs.unlink"),
3044
+ writeFile: throwNoFileSystemError("fs.writeFile")
3045
+ };
3046
+ function throwNoFileSystemError(method) {
3047
+ return () => {
3048
+ error(logNoFileSystemInBrowser(method));
3049
+ };
3050
+ }
3051
+
3045
3052
  //#endregion
3046
3053
  //#region src/plugin/plugin-context.ts
3047
3054
  var PluginContextImpl = class extends MinimalPluginContextImpl {
3055
+ fs = fsModule;
3048
3056
  getModuleInfo;
3049
3057
  constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
3050
3058
  super(onLog, logLevel, plugin.name, watchMode);
@@ -3124,10 +3132,12 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
3124
3132
  };
3125
3133
  getAssetFileNames(file) {
3126
3134
  if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
3135
+ type: "asset",
3136
+ name: file.name,
3127
3137
  names: file.name ? [file.name] : [],
3138
+ originalFileName: file.originalFileName,
3128
3139
  originalFileNames: file.originalFileName ? [file.originalFileName] : [],
3129
- source: file.source,
3130
- type: "asset"
3140
+ source: file.source
3131
3141
  });
3132
3142
  }
3133
3143
  getFileName(referenceId) {
@@ -3455,7 +3465,7 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
3455
3465
  cache[p$1] = value;
3456
3466
  return value;
3457
3467
  },
3458
- set(target, p$1, newValue) {
3468
+ set(_target, p$1, newValue) {
3459
3469
  cache[p$1] = newValue;
3460
3470
  changed?.updated.add(bindingChunk.fileName);
3461
3471
  return true;
@@ -3486,7 +3496,7 @@ function transformToRollupOutputAsset(bindingAsset, changed) {
3486
3496
  cache[p$1] = value;
3487
3497
  return value;
3488
3498
  },
3489
- set(target, p$1, newValue) {
3499
+ set(_target, p$1, newValue) {
3490
3500
  cache[p$1] = newValue;
3491
3501
  changed?.updated.add(bindingAsset.fileName);
3492
3502
  return true;
@@ -3524,18 +3534,17 @@ function transformToOutputBundle(context, output, changed) {
3524
3534
  });
3525
3535
  }
3526
3536
  function collectChangedBundle(changed, bundle) {
3527
- const assets = [];
3528
- const chunks = [];
3537
+ const changes = {};
3529
3538
  for (const key in bundle) {
3530
3539
  if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
3531
3540
  const item = bundle[key];
3532
- if (item.type === "asset") assets.push({
3541
+ if (item.type === "asset") changes[key] = {
3533
3542
  filename: item.fileName,
3534
3543
  originalFileNames: item.originalFileNames,
3535
3544
  source: bindingAssetSource(item.source),
3536
3545
  names: item.names
3537
- });
3538
- else chunks.push({
3546
+ };
3547
+ else changes[key] = {
3539
3548
  code: item.code,
3540
3549
  filename: item.fileName,
3541
3550
  name: item.name,
@@ -3550,12 +3559,11 @@ function collectChangedBundle(changed, bundle) {
3550
3559
  map: bindingifySourcemap$1(item.map),
3551
3560
  sourcemapFilename: item.sourcemapFileName || void 0,
3552
3561
  preliminaryFilename: item.preliminaryFileName
3553
- });
3562
+ };
3554
3563
  }
3555
3564
  return {
3556
- assets,
3557
- chunks,
3558
- deleted: Array.from(changed.deleted)
3565
+ changes,
3566
+ deleted: changed.deleted
3559
3567
  };
3560
3568
  }
3561
3569
 
@@ -3962,7 +3970,7 @@ var ChunkingContextImpl = class {
3962
3970
  //#endregion
3963
3971
  //#region src/utils/bindingify-output-options.ts
3964
3972
  function bindingifyOutputOptions(outputOptions) {
3965
- const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
3973
+ const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
3966
3974
  const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
3967
3975
  return {
3968
3976
  dir,
@@ -3971,6 +3979,7 @@ function bindingifyOutputOptions(outputOptions) {
3971
3979
  exports,
3972
3980
  hashCharacters,
3973
3981
  sourcemap: bindingifySourcemap(sourcemap),
3982
+ sourcemapBaseUrl,
3974
3983
  sourcemapDebugIds,
3975
3984
  sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
3976
3985
  sourcemapPathTransform,
@@ -4037,7 +4046,9 @@ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
4037
4046
  function bindingifyAssetFilenames(assetFileNames) {
4038
4047
  if (typeof assetFileNames === "function") return (asset) => {
4039
4048
  return assetFileNames({
4049
+ name: asset.name,
4040
4050
  names: asset.names,
4051
+ originalFileName: asset.originalFileName,
4041
4052
  originalFileNames: asset.originalFileNames,
4042
4053
  source: transformAssetSource(asset.source),
4043
4054
  type: "asset"
@@ -4093,6 +4104,9 @@ var NormalizedOutputOptionsImpl = class {
4093
4104
  get sourcemap() {
4094
4105
  return this.inner.sourcemap;
4095
4106
  }
4107
+ get sourcemapBaseUrl() {
4108
+ return this.inner.sourcemapBaseUrl ?? void 0;
4109
+ }
4096
4110
  get cssEntryFileNames() {
4097
4111
  return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
4098
4112
  }
@@ -4643,8 +4657,12 @@ var RolldownBuild = class {
4643
4657
  await this.close();
4644
4658
  }
4645
4659
  async generateHmrPatch(changedFiles) {
4646
- const output = await this.#bundlerImpl.impl.generateHmrPatch(changedFiles);
4647
- return transformHmrPatchOutput(output);
4660
+ const ret = await this.#bundlerImpl.impl.generateHmrPatch(changedFiles);
4661
+ switch (ret.type) {
4662
+ case "Ok": return ret.field0;
4663
+ case "Error": throw normalizeErrors(ret.field0);
4664
+ default: throw new Error("Unknown error");
4665
+ }
4648
4666
  }
4649
4667
  async hmrInvalidate(file, firstInvalidatedBy) {
4650
4668
  const output = await this.#bundlerImpl.impl.hmrInvalidate(file, firstInvalidatedBy);
@@ -4822,4 +4840,4 @@ function defineConfig(config) {
4822
4840
  const VERSION = version;
4823
4841
 
4824
4842
  //#endregion
4825
- export { BuiltinPlugin, PluginDriver, VERSION, assetPlugin, build, buildImportAnalysisPlugin, createBundlerImpl, defineConfig, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
4843
+ export { BuiltinPlugin, PluginDriver, VERSION, assetPlugin, build, buildImportAnalysisPlugin, createBundlerImpl, defineConfig, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.29-commit.fe1bea3",
3
+ "version": "1.0.0-beta.31",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@napi-rs/wasm-runtime": "^1.0.0",
59
- "@oxc-project/runtime": "=0.77.3"
59
+ "@oxc-project/runtime": "=0.80.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "pnpm run build:debug",