rolldown 0.14.0-snapshot-f1bd92f-20241126015006 → 0.14.0-snapshot-3009016-20241127042951

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 (36) hide show
  1. package/dist/cjs/cli.cjs +768 -860
  2. package/dist/cjs/experimental-index.cjs +35 -35
  3. package/dist/cjs/index.cjs +5 -8
  4. package/dist/cjs/parallel-plugin-worker.cjs +20 -14
  5. package/dist/cjs/parallel-plugin.cjs +1 -3
  6. package/dist/esm/cli.mjs +707 -801
  7. package/dist/esm/experimental-index.mjs +6 -10
  8. package/dist/esm/index.mjs +2 -4
  9. package/dist/esm/parallel-plugin-worker.mjs +15 -10
  10. package/dist/esm/parallel-plugin.mjs +1 -3
  11. package/dist/shared/{chunk-JoMxl5V2.cjs → chunk-BK2Ye-xa.cjs} +19 -6
  12. package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f--b2gQiI0.cjs} +247 -295
  13. package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-DWsVjwtA.mjs} +218 -283
  14. package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DGW8ZJmn.mjs} +125 -174
  15. package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-RFvZMmjc.cjs} +157 -204
  16. package/dist/shared/rolldown-binding.linux-x64-gnu.node +0 -0
  17. package/dist/shared/rolldown-binding.wasi.cjs +24 -24
  18. package/dist/shared/{src_index-jsZ3BLsy.mjs → src-BvC6D2iq.mjs} +860 -1052
  19. package/dist/shared/{src_index-EDDIS90J.cjs → src-lKR2W-tO.cjs} +1019 -1093
  20. package/dist/types/binding.d.ts +32 -2
  21. package/dist/types/cli/arguments/schema.d.ts +5 -5
  22. package/dist/types/constants/plugin.d.ts +2 -1
  23. package/dist/types/log/locate-character/index.d.ts +13 -0
  24. package/dist/types/log/logs.d.ts +2 -0
  25. package/dist/types/options/input-options-schema.d.ts +11 -11
  26. package/dist/types/options/input-options.d.ts +2 -2
  27. package/dist/types/options/normalized-input-options.d.ts +7 -2
  28. package/dist/types/options/normalized-output-options.d.ts +30 -3
  29. package/dist/types/options/output-options-schema.d.ts +2 -2
  30. package/dist/types/plugin/index.d.ts +2 -3
  31. package/dist/types/plugin/plugin-context.d.ts +1 -1
  32. package/dist/types/plugin/plugin-driver.d.ts +2 -2
  33. package/dist/types/utils/bindingify-input-options.d.ts +3 -1
  34. package/dist/types/utils/normalize-plugin-option.d.ts +5 -0
  35. package/dist/types/utils/transform-sourcemap.d.ts +2 -0
  36. package/package.json +27 -17
@@ -1,41 +1,38 @@
1
1
  "use strict";
2
-
3
- const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
4
- const { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/src_index-EDDIS90J.cjs");
5
- const { pathToFileURL } = __toESM(require("node:url"));
2
+ const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
3
+ const require_src = require('../shared/src-lKR2W-tO.cjs');
4
+ const node_url = require_chunk.__toESM(require("node:url"));
6
5
 
7
6
  //#region src/plugin/parallel-plugin.ts
8
7
  function defineParallelPlugin(pluginPath) {
9
8
  return (options) => {
10
- return {_parallel: {
11
- fileUrl: (pathToFileURL(pluginPath)).href,
9
+ return { _parallel: {
10
+ fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
12
11
  options
13
- }};
12
+ } };
14
13
  };
15
14
  }
16
15
 
17
16
  //#endregion
18
17
  //#region src/builtin-plugin/transform-plugin.ts
19
18
  function normalizeEcmaTransformPluginConfig(config) {
20
- if (!config) {
21
- return undefined;
22
- }
19
+ if (!config) return undefined;
23
20
  let normalizedConfig = {
24
21
  jsxInject: config?.jsxInject,
25
- exclude: normalizedStringOrRegex(config.exclude),
26
- include: normalizedStringOrRegex(config.include),
22
+ exclude: require_src.normalizedStringOrRegex(config.exclude),
23
+ include: require_src.normalizedStringOrRegex(config.include),
27
24
  targets: config.targets
28
25
  };
29
26
  return normalizedConfig;
30
27
  }
31
28
  function transformPlugin(config) {
32
- return new BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
29
+ return new require_src.BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
33
30
  }
34
31
 
35
32
  //#endregion
36
33
  //#region src/builtin-plugin/replace-plugin.ts
37
34
  function replacePlugin(values = {}, options = {}) {
38
- return new BuiltinPlugin("builtin:replace", {
35
+ return new require_src.BuiltinPlugin("builtin:replace", {
39
36
  ...options,
40
37
  values
41
38
  });
@@ -44,30 +41,33 @@ function replacePlugin(values = {}, options = {}) {
44
41
  //#endregion
45
42
  //#region src/builtin-plugin/alias-plugin.ts
46
43
  function aliasPlugin(config) {
47
- return new BuiltinPlugin("builtin:alias", config);
44
+ return new require_src.BuiltinPlugin("builtin:alias", config);
48
45
  }
49
46
 
50
47
  //#endregion
51
48
  //#region src/experimental-index.ts
52
- var import_binding = __toESM(require_binding());
49
+ var import_binding = require_chunk.__toESM(require_binding());
53
50
 
54
51
  //#endregion
55
- Object.defineProperty(exports, '__esModule', { value: true });
56
- var transform = import_binding.transform;
57
- exports.aliasPlugin = aliasPlugin;
58
- exports.buildImportAnalysisPlugin = buildImportAnalysisPlugin;
59
- exports.composePlugins = composeJsPlugins;
60
- exports.defineParallelPlugin = defineParallelPlugin;
61
- exports.dynamicImportVarsPlugin = dynamicImportVarsPlugin;
62
- exports.importGlobPlugin = importGlobPlugin;
63
- exports.jsonPlugin = jsonPlugin;
64
- exports.loadFallbackPlugin = loadFallbackPlugin;
65
- exports.manifestPlugin = manifestPlugin;
66
- exports.modulePreloadPolyfillPlugin = modulePreloadPolyfillPlugin;
67
- exports.replacePlugin = replacePlugin;
68
- exports.scan = experimental_scan;
69
- exports.transform = transform;
70
- exports.transformPlugin = transformPlugin;
71
- exports.viteResolvePlugin = viteResolvePlugin;
72
- exports.wasmFallbackPlugin = wasmFallbackPlugin;
73
- exports.wasmHelperPlugin = wasmHelperPlugin;
52
+ exports.aliasPlugin = aliasPlugin
53
+ exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
54
+ exports.composePlugins = require_src.composeJsPlugins
55
+ exports.defineParallelPlugin = defineParallelPlugin
56
+ exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin
57
+ exports.importGlobPlugin = require_src.importGlobPlugin
58
+ exports.jsonPlugin = require_src.jsonPlugin
59
+ exports.loadFallbackPlugin = require_src.loadFallbackPlugin
60
+ exports.manifestPlugin = require_src.manifestPlugin
61
+ exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin
62
+ exports.replacePlugin = replacePlugin
63
+ exports.scan = require_src.experimental_scan
64
+ Object.defineProperty(exports, 'transform', {
65
+ enumerable: true,
66
+ get: function () {
67
+ return import_binding.transform;
68
+ }
69
+ });
70
+ exports.transformPlugin = transformPlugin
71
+ exports.viteResolvePlugin = require_src.viteResolvePlugin
72
+ exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin
73
+ exports.wasmHelperPlugin = require_src.wasmHelperPlugin
@@ -1,9 +1,6 @@
1
- "use strict";
1
+ const require_src = require('../shared/src-lKR2W-tO.cjs');
2
2
 
3
- const { VERSION, defineConfig, rolldown, watch } = require("../shared/src_index-EDDIS90J.cjs");
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
- exports.VERSION = VERSION;
7
- exports.defineConfig = defineConfig;
8
- exports.rolldown = rolldown;
9
- exports.watch = watch;
3
+ exports.VERSION = require_src.VERSION
4
+ exports.defineConfig = require_src.defineConfig
5
+ exports.rolldown = require_src.rolldown
6
+ exports.watch = require_src.watch
@@ -1,34 +1,40 @@
1
1
  "use strict";
2
-
3
- const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
4
- const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/src_index-EDDIS90J.cjs");
5
- const { parentPort, workerData } = __toESM(require("node:worker_threads"));
2
+ const require_chunk = require('../shared/chunk-BK2Ye-xa.cjs');
3
+ const require_src = require('../shared/src-lKR2W-tO.cjs');
4
+ const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
5
 
7
6
  //#region src/parallel-plugin-worker.ts
8
- var import_binding = __toESM(require_binding());
9
- const { registryId: registryId, pluginInfos: pluginInfos, threadNumber: threadNumber } = workerData;
7
+ var import_binding = require_chunk.__toESM(require_binding());
8
+ const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
10
9
  (async () => {
11
10
  try {
12
11
  const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
13
12
  const pluginModule = await import(pluginInfo.fileUrl);
14
13
  const definePluginImpl = pluginModule.default;
15
- const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
14
+ const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
16
15
  return {
17
16
  index: pluginInfo.index,
18
- plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(), () => {}, "info")
17
+ plugin: require_src.bindingifyPlugin(
18
+ plugin,
19
+ {},
20
+ {},
21
+ // TODO need to find a way to share pluginContextData
22
+ new require_src.PluginContextData(),
23
+ () => {},
24
+ "info"
25
+ )
19
26
  };
20
27
  }));
21
28
  (0, import_binding.registerPlugins)(registryId, plugins);
22
- parentPort.postMessage({type: "success"});
29
+ node_worker_threads.parentPort.postMessage({ type: "success" });
23
30
  } catch (error) {
24
- parentPort.postMessage({
31
+ node_worker_threads.parentPort.postMessage({
25
32
  type: "error",
26
33
  error
27
34
  });
28
- }
29
- finally {
30
- parentPort.unref();
35
+ } finally {
36
+ node_worker_threads.parentPort.unref();
31
37
  }
32
38
  })();
33
39
 
34
- //#endregion
40
+ //#endregion
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  //#region src/plugin/parallel-plugin-implementation.ts
5
4
  function defineParallelPluginImplementation(plugin) {
6
5
  return plugin;
7
6
  }
8
7
 
9
8
  //#endregion
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
- exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
9
+ exports.defineParallelPluginImplementation = defineParallelPluginImplementation