rolldown 0.12.2 → 0.13.0-snapshot-d24c337-20240904003206

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 (67) hide show
  1. package/dist/cjs/cli.cjs +1552 -584
  2. package/dist/cjs/experimental-index.cjs +40 -0
  3. package/dist/cjs/index.cjs +5 -22
  4. package/dist/cjs/parallel-plugin-worker.cjs +7 -7
  5. package/dist/cjs/parallel-plugin.cjs +1 -1
  6. package/dist/esm/cli.mjs +1549 -583
  7. package/dist/esm/experimental-index.mjs +23 -0
  8. package/dist/esm/index.mjs +5 -17
  9. package/dist/esm/parallel-plugin-worker.mjs +6 -6
  10. package/dist/esm/parallel-plugin.mjs +1 -1
  11. package/dist/shared/{chunk-1xb6WR3y.cjs → chunk-gQ4GMlVi.cjs} +3 -2
  12. package/dist/shared/{consola.36c0034f-N8xiTrv3.cjs → consola.36c0034f-eps_ogJv.cjs} +188 -188
  13. package/dist/shared/{consola.36c0034f-jtHhMkSX.mjs → consola.36c0034f-m5cABVv4.mjs} +187 -187
  14. package/dist/shared/package-3VR4tEG7.mjs +9 -0
  15. package/dist/shared/package-OJCNSbf0.cjs +11 -0
  16. package/dist/shared/plugin-context-data-AMG1kfMv.mjs +1443 -0
  17. package/dist/shared/plugin-context-data-S1bXhfAf.cjs +1436 -0
  18. package/dist/shared/{prompt-pjyLzLci.mjs → prompt-9VjtYvi_.mjs} +182 -182
  19. package/dist/shared/{prompt-1K6oCkIU.cjs → prompt-Ah5G71p-.cjs} +183 -183
  20. package/dist/shared/rolldown-NGdGAW73.mjs +1069 -0
  21. package/dist/shared/rolldown-binding.wasi.cjs +70 -51
  22. package/dist/shared/rolldown-z62CIhEW.cjs +1085 -0
  23. package/dist/types/binding.d.ts +329 -14
  24. package/dist/types/cli/arguments/alias.d.ts +8 -0
  25. package/dist/types/cli/arguments/index.d.ts +13 -0
  26. package/dist/types/cli/arguments/normalize.d.ts +15 -0
  27. package/dist/types/cli/arguments/schema.d.ts +161 -0
  28. package/dist/types/cli/arguments/utils.d.ts +6 -0
  29. package/dist/types/cli/commands/bundle.d.ts +3 -1
  30. package/dist/types/cli/commands/help.d.ts +1 -0
  31. package/dist/types/cli/utils.d.ts +1 -1
  32. package/dist/types/constants/plugin-context.d.ts +7 -0
  33. package/dist/types/constants/plugin.d.ts +36 -0
  34. package/dist/types/experimental-index.d.ts +5 -0
  35. package/dist/types/index.d.ts +8 -8
  36. package/dist/types/options/input-options.d.ts +139 -27
  37. package/dist/types/options/normalized-alias-plugin-config.d.ts +10 -0
  38. package/dist/types/options/normalized-ecma-transform-plugin-config.d.ts +8 -0
  39. package/dist/types/options/normalized-output-options.d.ts +8 -3
  40. package/dist/types/options/output-options.d.ts +102 -11
  41. package/dist/types/options/utils.d.ts +2 -0
  42. package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -8
  43. package/dist/types/plugin/bindingify-hook-filter.d.ts +5 -0
  44. package/dist/types/plugin/bindingify-output-hooks.d.ts +11 -7
  45. package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +8 -0
  46. package/dist/types/plugin/bindingify-plugin.d.ts +2 -1
  47. package/dist/types/plugin/builtin-plugin.d.ts +75 -7
  48. package/dist/types/plugin/index.d.ts +68 -28
  49. package/dist/types/plugin/plugin-context-data.d.ts +6 -0
  50. package/dist/types/plugin/plugin-context.d.ts +18 -8
  51. package/dist/types/plugin/plugin-driver.d.ts +2 -2
  52. package/dist/types/rollup.d.ts +1 -0
  53. package/dist/types/types/rolldown-output.d.ts +1 -0
  54. package/dist/types/utils/compose-js-plugins.d.ts +2 -0
  55. package/dist/types/utils/misc.d.ts +1 -0
  56. package/dist/types/utils/normalize-hook.d.ts +7 -5
  57. package/dist/types/utils/plugin/index.d.ts +2 -0
  58. package/dist/types/utils/type-assert.d.ts +1 -0
  59. package/package.json +30 -22
  60. package/dist/shared/rolldown-SCF5NBN_.cjs +0 -49
  61. package/dist/shared/rolldown-kYz4BvAA.mjs +0 -48
  62. package/dist/shared/utils_index-_DFpKlu1.mjs +0 -1582
  63. package/dist/shared/utils_index-xb2NoRNm.cjs +0 -1557
  64. package/dist/types/cli/constants.d.ts +0 -1
  65. package/dist/types/utils/ensure-array.d.ts +0 -1
  66. package/dist/types/utils/index.d.ts +0 -9
  67. /package/dist/types/plugin/{transfrom-plugin-context.d.ts → transform-plugin-context.d.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ const { __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
4
+ const { require_binding } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
5
+ const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/rolldown-z62CIhEW.cjs");
6
+ const { pathToFileURL } = __toESM(require("node:url"));
7
+
8
+ //#region src/plugin/parallel-plugin.ts
9
+ function defineParallelPlugin(pluginPath) {
10
+ return (options) => {
11
+ return {_parallel: {
12
+ fileUrl: (pathToFileURL(pluginPath)).href,
13
+ options
14
+ }};
15
+ };
16
+ }
17
+
18
+ //#endregion
19
+ //#region src/experimental-index.ts
20
+ var import_binding = __toESM(require_binding());
21
+
22
+ //#endregion
23
+ Object.defineProperty(exports, '__esModule', { value: true });
24
+ var transform = import_binding.transform;
25
+ exports.aliasPlugin = aliasPlugin;
26
+ exports.buildImportAnalysisPlugin = buildImportAnalysisPlugin;
27
+ exports.composePlugins = composeJsPlugins;
28
+ exports.defineParallelPlugin = defineParallelPlugin;
29
+ exports.dynamicImportVarsPlugin = dynamicImportVarsPlugin;
30
+ exports.importGlobPlugin = importGlobPlugin;
31
+ exports.jsonPlugin = jsonPlugin;
32
+ exports.loadFallbackPlugin = loadFallbackPlugin;
33
+ exports.manifestPlugin = manifestPlugin;
34
+ exports.modulePreloadPolyfillPlugin = modulePreloadPolyfillPlugin;
35
+ exports.replacePlugin = replacePlugin;
36
+ exports.scan = experimental_scan;
37
+ exports.transform = transform;
38
+ exports.transformPlugin = transformPlugin;
39
+ exports.wasmFallbackPlugin = wasmFallbackPlugin;
40
+ exports.wasmHelperPlugin = wasmHelperPlugin;
@@ -1,21 +1,9 @@
1
1
  "use strict";
2
2
 
3
- const { __toESM } = require("../shared/chunk-1xb6WR3y.cjs");
4
- const { BuiltinGlobImportPlugin, BuiltinWasmPlugin, require_binding } = require("../shared/utils_index-xb2NoRNm.cjs");
5
- const { experimental_scan, rolldown } = require("../shared/rolldown-SCF5NBN_.cjs");
6
- const { pathToFileURL } = __toESM(require("node:url"));
3
+ require("../shared/plugin-context-data-S1bXhfAf.cjs");
4
+ const { rolldown } = require("../shared/rolldown-z62CIhEW.cjs");
5
+ const { version } = require("../shared/package-OJCNSbf0.cjs");
7
6
 
8
- //#region src/plugin/parallel-plugin.ts
9
- function defineParallelPlugin(pluginPath) {
10
- return (options) => {
11
- return {_parallel: {
12
- fileUrl: pathToFileURL(pluginPath).href,
13
- options
14
- }};
15
- };
16
- }
17
-
18
- //#endregion
19
7
  //#region src/utils/define-config.ts
20
8
  function defineConfig(config) {
21
9
  return config;
@@ -23,15 +11,10 @@ function defineConfig(config) {
23
11
 
24
12
  //#endregion
25
13
  //#region src/index.ts
26
- var import_binding = __toESM(require_binding());
14
+ const VERSION = version;
27
15
 
28
16
  //#endregion
29
17
  Object.defineProperty(exports, '__esModule', { value: true });
30
- var transform = import_binding.transform;
31
- exports.BuiltinGlobImportPlugin = BuiltinGlobImportPlugin;
32
- exports.BuiltinWasmPlugin = BuiltinWasmPlugin;
18
+ exports.VERSION = VERSION;
33
19
  exports.defineConfig = defineConfig;
34
- exports.defineParallelPlugin = defineParallelPlugin;
35
- exports.experimental_scan = experimental_scan;
36
20
  exports.rolldown = rolldown;
37
- exports.transform = transform;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- const { __toESM } = require("../shared/chunk-1xb6WR3y.cjs");
4
- const { bindingifyPlugin, require_binding } = require("../shared/utils_index-xb2NoRNm.cjs");
3
+ const { __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
4
+ const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
5
5
  const { parentPort, workerData } = __toESM(require("node:worker_threads"));
6
6
 
7
7
  //#region src/parallel-plugin-worker.ts
8
8
  var import_binding = __toESM(require_binding());
9
- const { registryId, pluginInfos, threadNumber } = workerData;
9
+ const { registryId: registryId, pluginInfos: pluginInfos, threadNumber: threadNumber } = workerData;
10
10
  (async () => {
11
11
  try {
12
12
  const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
@@ -15,14 +15,14 @@ const { registryId, pluginInfos, threadNumber } = workerData;
15
15
  const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
16
16
  return {
17
17
  index: pluginInfo.index,
18
- plugin: bindingifyPlugin(plugin, {}, {})
18
+ plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData())
19
19
  };
20
20
  }));
21
21
  (0, import_binding.registerPlugins)(registryId, plugins);
22
- parentPort.postMessage({type: 'success'});
22
+ parentPort.postMessage({type: "success"});
23
23
  } catch (error) {
24
24
  parentPort.postMessage({
25
- type: 'error',
25
+ type: "error",
26
26
  error
27
27
  });
28
28
  }
@@ -31,4 +31,4 @@ const { registryId, pluginInfos, threadNumber } = workerData;
31
31
  }
32
32
  })();
33
33
 
34
- //#endregion
34
+ //#endregion
@@ -8,4 +8,4 @@ function defineParallelPluginImplementation(plugin) {
8
8
 
9
9
  //#endregion
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
- exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
11
+ exports.defineParallelPluginImplementation = defineParallelPluginImplementation;