rolldown 1.0.0-beta.9-commit.273d50e → 1.0.0-beta.9-commit.b174110

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 (35) hide show
  1. package/dist/cli.cjs +10 -10
  2. package/dist/cli.mjs +55 -44
  3. package/dist/config.cjs +2 -2
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +4 -4
  7. package/dist/experimental-index.cjs +1 -1
  8. package/dist/experimental-index.d.cts +2 -2
  9. package/dist/experimental-index.d.mts +2 -2
  10. package/dist/experimental-index.mjs +4 -3
  11. package/dist/filter-index.d.cts +2 -2
  12. package/dist/filter-index.d.mts +2 -2
  13. package/dist/filter-index.mjs +2 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.cts +2 -2
  16. package/dist/index.d.mts +2 -2
  17. package/dist/index.mjs +3 -3
  18. package/dist/parallel-plugin-worker.cjs +1 -1
  19. package/dist/parallel-plugin-worker.mjs +3 -3
  20. package/dist/parallel-plugin.d.cts +2 -2
  21. package/dist/parallel-plugin.d.mts +2 -2
  22. package/dist/parse-ast-index.d.cts +1 -1
  23. package/dist/parse-ast-index.d.mts +1 -1
  24. package/dist/parse-ast-index.mjs +1 -1
  25. package/dist/shared/{binding.d-D3r4zbxz.d.mts → binding.d-Dz3qQrbl.d.mts} +20 -2
  26. package/dist/shared/{binding.d-p8euY1Wh.d.cts → binding.d-QXzDcVmm.d.cts} +20 -2
  27. package/dist/shared/{define-config.d-DsyTAkf3.d.cts → define-config.d-CUcDq_vm.d.cts} +2 -2
  28. package/dist/shared/{define-config.d-CPoyfJeO.d.mts → define-config.d-qV1PzX_C.d.mts} +2 -2
  29. package/dist/shared/{load-config-GL1xItfo.cjs → load-config-CVg_Wj3v.cjs} +1 -1
  30. package/dist/shared/{load-config-BK3hMJOe.mjs → load-config-DMJR1pU4.mjs} +1 -1
  31. package/dist/shared/{misc-F8g_dc1D.mjs → misc-DGAe2XOW.mjs} +4 -1
  32. package/dist/shared/{parse-ast-index-Bnh8Dob0.mjs → parse-ast-index-0m6JgGc9.mjs} +13 -3
  33. package/dist/shared/{src-ndIZkCCf.cjs → src-UU-XHmbh.cjs} +8 -8
  34. package/dist/shared/{src-CG2mUfiN.mjs → src-XD6ewjt7.mjs} +193 -976
  35. package/package.json +15 -15
@@ -386,9 +386,6 @@ function spaces(index) {
386
386
  function tabsToSpaces(value) {
387
387
  return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
388
388
  }
389
- const LINE_TRUNCATE_LENGTH = 120;
390
- const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
391
- const ELLIPSIS = "...";
392
389
  function getCodeFrame(source, line, column) {
393
390
  let lines = source.split("\n");
394
391
  if (line > lines.length) return "";
@@ -414,6 +411,12 @@ function getCodeFrame(source, line, column) {
414
411
  return `${lineNumber}: ${displayedLine}`;
415
412
  }).join("\n");
416
413
  }
414
+ var LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS;
415
+ var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
416
+ LINE_TRUNCATE_LENGTH = 120;
417
+ MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
418
+ ELLIPSIS = "...";
419
+ } });
417
420
 
418
421
  //#endregion
419
422
  //#region src/log/locate-character/index.js
@@ -475,6 +478,7 @@ function getLocator(source, options = {}) {
475
478
  function locate(source, search, options) {
476
479
  return getLocator(source, options)(search, options && options.startIndex);
477
480
  }
481
+ var init_locate_character = __esm({ "src/log/locate-character/index.js"() {} });
478
482
 
479
483
  //#endregion
480
484
  //#region src/log/logs.ts
@@ -556,6 +560,8 @@ function augmentCodeLocation(properties, pos, source, id) {
556
560
  }
557
561
  var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
558
562
  var init_logs = __esm({ "src/log/logs.ts"() {
563
+ init_code_frame();
564
+ init_locate_character();
559
565
  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";
560
566
  } });
561
567
 
@@ -595,6 +601,7 @@ function applyFix(program, fixPath) {
595
601
  node.value = RegExp(node.regex.pattern, node.regex.flags);
596
602
  } catch (_err) {}
597
603
  }
604
+ var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.72.0/node_modules/oxc-parser/wrap.mjs"() {} });
598
605
 
599
606
  //#endregion
600
607
  //#region src/parse-ast-index.ts
@@ -634,7 +641,10 @@ async function parseAstAsync(sourceText, options, filename) {
634
641
  var import_binding, defaultParserOptions;
635
642
  var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
636
643
  import_binding = __toESM(require_binding());
644
+ init_locate_character();
637
645
  init_logs();
646
+ init_code_frame();
647
+ init_wrap();
638
648
  defaultParserOptions = {
639
649
  lang: "js",
640
650
  preserveParens: false
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
9
9
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.9-commit.273d50e";
12
+ var version = "1.0.0-beta.9-commit.b174110";
13
13
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -2162,7 +2162,7 @@ var NormalizedInputOptionsImpl = class {
2162
2162
 
2163
2163
  //#endregion
2164
2164
  //#region src/types/sourcemap.ts
2165
- function bindingifySourcemap$1(map) {
2165
+ function bindingifySourcemap(map) {
2166
2166
  if (map == null) return;
2167
2167
  return { inner: typeof map === "string" ? map : {
2168
2168
  file: map.file ?? void 0,
@@ -2708,7 +2708,7 @@ function bindingifyTransform(args$1) {
2708
2708
  });
2709
2709
  return {
2710
2710
  code: ret.code,
2711
- map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, ret.map)),
2711
+ map: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, ret.map)),
2712
2712
  sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects),
2713
2713
  moduleType: ret.moduleType
2714
2714
  };
@@ -2734,7 +2734,7 @@ function bindingifyLoad(args$1) {
2734
2734
  let map = preProcessSourceMap(ret, id);
2735
2735
  return {
2736
2736
  code: ret.code,
2737
- map: bindingifySourcemap$1(map),
2737
+ map: bindingifySourcemap(map),
2738
2738
  moduleType: ret.moduleType,
2739
2739
  sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects)
2740
2740
  };
@@ -2840,7 +2840,7 @@ function bindingifyOutputOptions(outputOptions) {
2840
2840
  format: bindingifyFormat(format),
2841
2841
  exports: exports$1,
2842
2842
  hashCharacters,
2843
- sourcemap: bindingifySourcemap(sourcemap),
2843
+ sourcemap: bindingifySourcemap$1(sourcemap),
2844
2844
  sourcemapDebugIds,
2845
2845
  sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
2846
2846
  sourcemapPathTransform,
@@ -2890,7 +2890,7 @@ function bindingifyFormat(format) {
2890
2890
  default: require_misc.unimplemented(`output.format: ${format}`);
2891
2891
  }
2892
2892
  }
2893
- function bindingifySourcemap(sourcemap) {
2893
+ function bindingifySourcemap$1(sourcemap) {
2894
2894
  switch (sourcemap) {
2895
2895
  case true: return "file";
2896
2896
  case "inline": return "inline";
@@ -3156,7 +3156,7 @@ function collectChangedBundle(changed, bundle) {
3156
3156
  facadeModuleId: item.facadeModuleId || void 0,
3157
3157
  isDynamicEntry: item.isDynamicEntry,
3158
3158
  moduleIds: item.moduleIds,
3159
- map: bindingifySourcemap$1(item.map),
3159
+ map: bindingifySourcemap(item.map),
3160
3160
  sourcemapFilename: item.sourcemapFileName || void 0,
3161
3161
  preliminaryFilename: item.preliminaryFileName
3162
3162
  });
@@ -3194,7 +3194,7 @@ function bindingifyRenderChunk(args$1) {
3194
3194
  if (!ret.map) return { code: ret.code };
3195
3195
  return {
3196
3196
  code: ret.code,
3197
- map: bindingifySourcemap$1(ret.map)
3197
+ map: bindingifySourcemap(ret.map)
3198
3198
  };
3199
3199
  },
3200
3200
  meta: bindingifyPluginHookMeta(meta),