rolldown 0.12.2 → 0.13.0-snapshot-514fd69-20240905003110

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,23 @@
1
+ import __node_module__ from 'node:module';
2
+ const require = __node_module__.createRequire(import.meta.url)
3
+ import { __toESM, require_binding } from "../shared/plugin-context-data-AMG1kfMv.mjs";
4
+ import { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/rolldown-NGdGAW73.mjs";
5
+ import { pathToFileURL } from "node:url";
6
+
7
+ //#region src/plugin/parallel-plugin.ts
8
+ function defineParallelPlugin(pluginPath) {
9
+ return (options) => {
10
+ return {_parallel: {
11
+ fileUrl: (pathToFileURL(pluginPath)).href,
12
+ options
13
+ }};
14
+ };
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/experimental-index.ts
19
+ var import_binding = __toESM(require_binding());
20
+
21
+ //#endregion
22
+ var transform = import_binding.transform;
23
+ export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, experimental_scan as scan, transform, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin };
@@ -1,20 +1,9 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import { BuiltinGlobImportPlugin, BuiltinWasmPlugin, __toESM, require_binding } from "../shared/utils_index-_DFpKlu1.mjs";
4
- import { experimental_scan, rolldown } from "../shared/rolldown-kYz4BvAA.mjs";
5
- import { pathToFileURL } from "node:url";
3
+ import "../shared/plugin-context-data-AMG1kfMv.mjs";
4
+ import { rolldown } from "../shared/rolldown-NGdGAW73.mjs";
5
+ import { version } from "../shared/package-3VR4tEG7.mjs";
6
6
 
7
- //#region src/plugin/parallel-plugin.ts
8
- function defineParallelPlugin(pluginPath) {
9
- return (options) => {
10
- return {_parallel: {
11
- fileUrl: pathToFileURL(pluginPath).href,
12
- options
13
- }};
14
- };
15
- }
16
-
17
- //#endregion
18
7
  //#region src/utils/define-config.ts
19
8
  function defineConfig(config) {
20
9
  return config;
@@ -22,8 +11,7 @@ function defineConfig(config) {
22
11
 
23
12
  //#endregion
24
13
  //#region src/index.ts
25
- var import_binding = __toESM(require_binding());
14
+ const VERSION = version;
26
15
 
27
16
  //#endregion
28
- var transform = import_binding.transform;
29
- export { BuiltinGlobImportPlugin, BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown, transform };
17
+ export { VERSION, defineConfig, rolldown };
@@ -1,11 +1,11 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import { __toESM, bindingifyPlugin, require_binding } from "../shared/utils_index-_DFpKlu1.mjs";
3
+ import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/plugin-context-data-AMG1kfMv.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts
7
7
  var import_binding = __toESM(require_binding());
8
- const { registryId, pluginInfos, threadNumber } = workerData;
8
+ const { registryId: registryId, pluginInfos: pluginInfos, threadNumber: threadNumber } = workerData;
9
9
  (async () => {
10
10
  try {
11
11
  const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
@@ -14,14 +14,14 @@ const { registryId, pluginInfos, threadNumber } = workerData;
14
14
  const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
15
15
  return {
16
16
  index: pluginInfo.index,
17
- plugin: bindingifyPlugin(plugin, {}, {})
17
+ plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData())
18
18
  };
19
19
  }));
20
20
  (0, import_binding.registerPlugins)(registryId, plugins);
21
- parentPort.postMessage({type: 'success'});
21
+ parentPort.postMessage({type: "success"});
22
22
  } catch (error) {
23
23
  parentPort.postMessage({
24
- type: 'error',
24
+ type: "error",
25
25
  error
26
26
  });
27
27
  }
@@ -30,4 +30,4 @@ const { registryId, pluginInfos, threadNumber } = workerData;
30
30
  }
31
31
  })();
32
32
 
33
- //#endregion
33
+ //#endregion
@@ -7,4 +7,4 @@ function defineParallelPluginImplementation(plugin) {
7
7
  }
8
8
 
9
9
  //#endregion
10
- export { defineParallelPluginImplementation };
10
+ export { defineParallelPluginImplementation };
@@ -15,7 +15,7 @@ var __export = (target, all) => {
15
15
  });
16
16
  };
17
17
  var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === 'object' || typeof from === 'function') for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
19
  key = keys[i];
20
20
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
21
  get: ((k) => from[k]).bind(null, key),
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
24
24
  }
25
25
  return to;
26
26
  };
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
28
  value: mod,
29
29
  enumerable: true
30
30
  }) : target, mod));
@@ -34,3 +34,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  exports.__commonJSMin = __commonJSMin;
35
35
  exports.__export = __export;
36
36
  exports.__toESM = __toESM;
37
+