rolldown 1.0.0-beta.9-commit.8371a90 → 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 +11 -11
  2. package/dist/cli.mjs +3 -3
  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 -4
  7. package/dist/experimental-index.cjs +2 -2
  8. package/dist/experimental-index.d.cts +2 -2
  9. package/dist/experimental-index.d.mts +2 -2
  10. package/dist/experimental-index.mjs +2 -2
  11. package/dist/filter-index.d.cts +2 -2
  12. package/dist/filter-index.d.mts +2 -2
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.mts +3 -3
  16. package/dist/index.mjs +2 -2
  17. package/dist/parallel-plugin-worker.cjs +2 -2
  18. package/dist/parallel-plugin-worker.mjs +2 -2
  19. package/dist/parallel-plugin.d.cts +2 -2
  20. package/dist/parallel-plugin.d.mts +2 -2
  21. package/dist/parse-ast-index.cjs +1 -1
  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-B9SSHAER.d.mts → binding.d-Dz3qQrbl.d.mts} +26 -11
  26. package/dist/shared/{binding.d-CrH1UT-g.d.cts → binding.d-QXzDcVmm.d.cts} +26 -11
  27. package/dist/shared/{define-config.d-2mCqGCzl.d.cts → define-config.d-CUcDq_vm.d.cts} +6 -16
  28. package/dist/shared/{define-config.d-CUCXQ5Qr.d.mts → define-config.d-qV1PzX_C.d.mts} +6 -16
  29. package/dist/shared/{load-config-B2LkbAmK.cjs → load-config-CVg_Wj3v.cjs} +1 -1
  30. package/dist/shared/{load-config-DaTbe02e.mjs → load-config-DMJR1pU4.mjs} +1 -1
  31. package/dist/shared/{parse-ast-index-Bye5_Vy8.mjs → parse-ast-index-0m6JgGc9.mjs} +1 -0
  32. package/dist/shared/{parse-ast-index-qKChTJzE.cjs → parse-ast-index-Cn_efzjO.cjs} +1 -0
  33. package/dist/shared/{src-BwuVByD5.cjs → src-UU-XHmbh.cjs} +29 -48
  34. package/dist/shared/{src-CEJMSju3.mjs → src-XD6ewjt7.mjs} +330 -1506
  35. package/package.json +15 -15
@@ -351,6 +351,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
351
351
  module.exports.ResolverFactory = nativeBinding.ResolverFactory;
352
352
  module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
353
353
  module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
354
+ module.exports.BindingJsx = nativeBinding.BindingJsx;
354
355
  module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
355
356
  module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
356
357
  module.exports.EnforceExtension = nativeBinding.EnforceExtension;
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_parse_ast_index = require('./parse-ast-index-qKChTJzE.cjs');
2
+ const require_parse_ast_index = require('./parse-ast-index-Cn_efzjO.cjs');
3
3
  const require_misc = require('./misc-BKp5iIef.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -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.8371a90";
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
@@ -1797,17 +1797,13 @@ const ModuleTypesSchema = record(string(), union([
1797
1797
  literal("tsx")
1798
1798
  ]));
1799
1799
  const JsxOptionsSchema = strictObject({
1800
+ runtime: pipe(optional(union([literal("classic"), literal("automatic")])), description("Which runtime to use")),
1800
1801
  development: pipe(optional(boolean()), description("Development specific information")),
1801
- factory: pipe(optional(string()), description("Jsx element transformation")),
1802
- fragment: pipe(optional(string()), description("Jsx fragment transformation")),
1802
+ throwIfNamespace: pipe(optional(string()), description("Toggles whether to throw an error when a tag name uses an XML namespace")),
1803
1803
  importSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is classic")),
1804
- jsxImportSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is automatic")),
1805
- mode: pipe(optional(union([
1806
- literal("classic"),
1807
- literal("automatic"),
1808
- literal("preserve")
1809
- ])), description("Jsx transformation mode")),
1810
- refresh: pipe(optional(boolean()), description("React refresh transformation"))
1804
+ pragma: pipe(optional(string()), description("Jsx element transformation")),
1805
+ pragmaFlag: pipe(optional(string()), description("Jsx fragment transformation")),
1806
+ refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
1811
1807
  });
1812
1808
  const HelperModeSchema = union([literal("Runtime"), literal("External")]);
1813
1809
  const DecoratorOptionSchema = object({
@@ -1843,7 +1839,9 @@ const TransformOptionsSchema = object({
1843
1839
  assumptions: optional(AssumptionsSchema),
1844
1840
  typescript: optional(TypescriptSchema),
1845
1841
  helpers: optional(HelpersSchema),
1846
- decorators: optional(DecoratorOptionSchema)
1842
+ decorators: optional(DecoratorOptionSchema),
1843
+ jsx: optional(JsxOptionsSchema),
1844
+ target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment"))
1847
1845
  });
1848
1846
  const WatchOptionsSchema = strictObject({
1849
1847
  chokidar: optional(never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
@@ -1931,13 +1929,12 @@ const InputOptionsSchema = strictObject({
1931
1929
  define: pipe(optional(record(string(), string())), description("Define global variables")),
1932
1930
  inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
1933
1931
  profilerNames: optional(boolean()),
1934
- jsx: optional(union([
1935
- boolean(),
1936
- JsxOptionsSchema,
1937
- string("react"),
1938
- string("react-jsx"),
1939
- string("preserve")
1940
- ])),
1932
+ jsx: pipe(optional(union([
1933
+ literal(false),
1934
+ literal("react"),
1935
+ literal("react-jsx"),
1936
+ literal("preserve")
1937
+ ])), description("Jsx options preset")),
1941
1938
  transform: optional(TransformOptionsSchema),
1942
1939
  watch: optional(union([WatchOptionsSchema, literal(false)])),
1943
1940
  dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
@@ -1949,8 +1946,7 @@ const InputCliOverrideSchema = strictObject({
1949
1946
  input: pipe(optional(array(string())), description("Entry file")),
1950
1947
  external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
1951
1948
  inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
1952
- treeshake: pipe(optional(boolean()), description("enable treeshaking")),
1953
- jsx: pipe(optional(JsxOptionsSchema), description("enable jsx"))
1949
+ treeshake: pipe(optional(boolean()), description("enable treeshaking"))
1954
1950
  });
1955
1951
  const InputCliOptionsSchema = omit(strictObject({
1956
1952
  ...InputOptionsSchema.entries,
@@ -2044,7 +2040,6 @@ const OutputOptionsSchema = strictObject({
2044
2040
  legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
2045
2041
  plugins: optional(custom(() => true)),
2046
2042
  polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
2047
- target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
2048
2043
  hoistTransitiveImports: optional(custom((input) => {
2049
2044
  if (input) return false;
2050
2045
  return true;
@@ -2167,7 +2162,7 @@ var NormalizedInputOptionsImpl = class {
2167
2162
 
2168
2163
  //#endregion
2169
2164
  //#region src/types/sourcemap.ts
2170
- function bindingifySourcemap$1(map) {
2165
+ function bindingifySourcemap(map) {
2171
2166
  if (map == null) return;
2172
2167
  return { inner: typeof map === "string" ? map : {
2173
2168
  file: map.file ?? void 0,
@@ -2713,7 +2708,7 @@ function bindingifyTransform(args$1) {
2713
2708
  });
2714
2709
  return {
2715
2710
  code: ret.code,
2716
- map: bindingifySourcemap$1(normalizeTransformHookSourcemap(id, code, ret.map)),
2711
+ map: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, ret.map)),
2717
2712
  sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects),
2718
2713
  moduleType: ret.moduleType
2719
2714
  };
@@ -2739,7 +2734,7 @@ function bindingifyLoad(args$1) {
2739
2734
  let map = preProcessSourceMap(ret, id);
2740
2735
  return {
2741
2736
  code: ret.code,
2742
- map: bindingifySourcemap$1(map),
2737
+ map: bindingifySourcemap(map),
2743
2738
  moduleType: ret.moduleType,
2744
2739
  sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects)
2745
2740
  };
@@ -2845,7 +2840,7 @@ function bindingifyOutputOptions(outputOptions) {
2845
2840
  format: bindingifyFormat(format),
2846
2841
  exports: exports$1,
2847
2842
  hashCharacters,
2848
- sourcemap: bindingifySourcemap(sourcemap),
2843
+ sourcemap: bindingifySourcemap$1(sourcemap),
2849
2844
  sourcemapDebugIds,
2850
2845
  sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
2851
2846
  sourcemapPathTransform,
@@ -2868,7 +2863,6 @@ function bindingifyOutputOptions(outputOptions) {
2868
2863
  inlineDynamicImports: outputOptions.inlineDynamicImports,
2869
2864
  advancedChunks: outputOptions.advancedChunks,
2870
2865
  polyfillRequire: outputOptions.polyfillRequire,
2871
- target: outputOptions.target,
2872
2866
  sanitizeFileName,
2873
2867
  preserveModules,
2874
2868
  virtualDirname,
@@ -2896,7 +2890,7 @@ function bindingifyFormat(format) {
2896
2890
  default: require_misc.unimplemented(`output.format: ${format}`);
2897
2891
  }
2898
2892
  }
2899
- function bindingifySourcemap(sourcemap) {
2893
+ function bindingifySourcemap$1(sourcemap) {
2900
2894
  switch (sourcemap) {
2901
2895
  case true: return "file";
2902
2896
  case "inline": return "inline";
@@ -3162,7 +3156,7 @@ function collectChangedBundle(changed, bundle) {
3162
3156
  facadeModuleId: item.facadeModuleId || void 0,
3163
3157
  isDynamicEntry: item.isDynamicEntry,
3164
3158
  moduleIds: item.moduleIds,
3165
- map: bindingifySourcemap$1(item.map),
3159
+ map: bindingifySourcemap(item.map),
3166
3160
  sourcemapFilename: item.sourcemapFileName || void 0,
3167
3161
  preliminaryFilename: item.preliminaryFileName
3168
3162
  });
@@ -3200,7 +3194,7 @@ function bindingifyRenderChunk(args$1) {
3200
3194
  if (!ret.map) return { code: ret.code };
3201
3195
  return {
3202
3196
  code: ret.code,
3203
- map: bindingifySourcemap$1(ret.map)
3197
+ map: bindingifySourcemap(ret.map)
3204
3198
  };
3205
3199
  },
3206
3200
  meta: bindingifyPluginHookMeta(meta),
@@ -3767,25 +3761,12 @@ function bindingifyInput(input) {
3767
3761
  }
3768
3762
  function bindingifyJsx(input) {
3769
3763
  switch (input) {
3770
- case false: return { type: "Disable" };
3771
- case "react": return { type: "React" };
3772
- case "react-jsx": return { type: "ReactJsx" };
3773
- case "preserve": return { type: "Preserve" };
3774
- case void 0: return void 0;
3764
+ case false: return import_binding$3.BindingJsx.Disable;
3765
+ case "react": return import_binding$3.BindingJsx.React;
3766
+ case "react-jsx": return import_binding$3.BindingJsx.ReactJsx;
3767
+ case "preserve": return import_binding$3.BindingJsx.Preserve;
3768
+ default: return void 0;
3775
3769
  }
3776
- if (input.mode === "preserve") return { type: "Preserve" };
3777
- const mode = input.mode ?? "automatic";
3778
- return {
3779
- type: "Enable",
3780
- field0: {
3781
- runtime: mode,
3782
- importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0,
3783
- pragma: input.factory,
3784
- pragmaFrag: input.fragment,
3785
- development: input.development,
3786
- refresh: input.refresh
3787
- }
3788
- };
3789
3770
  }
3790
3771
  function bindingifyWatch(watch$1) {
3791
3772
  if (watch$1) return {