rolldown 0.10.4 → 0.10.5

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 (44) hide show
  1. package/dist/cjs/cli.cjs +8 -8
  2. package/dist/cjs/index.cjs +3 -2
  3. package/dist/cjs/parallel-plugin-worker.cjs +1 -1
  4. package/dist/esm/cli.mjs +8 -8
  5. package/dist/esm/index.mjs +3 -3
  6. package/dist/esm/parallel-plugin-worker.mjs +1 -1
  7. package/dist/shared/{utils_index-ywWHgCJG.mjs → bindingify_plugin-gPrr_HPR.mjs} +474 -827
  8. package/dist/shared/{utils_index-D-jBnBMP.cjs → bindingify_plugin-sRZqfDBJ.cjs} +484 -827
  9. package/dist/shared/rolldown-1SJPa4fg.cjs +547 -0
  10. package/dist/shared/rolldown-bgokD9pg.mjs +544 -0
  11. package/dist/shared/rolldown-binding.wasi.cjs +46 -25
  12. package/dist/types/binding.d.ts +256 -0
  13. package/dist/types/index.d.ts +21 -7
  14. package/dist/types/options/bindingify-input-options.d.ts +1 -1
  15. package/dist/types/options/bindingify-output-options.d.ts +1 -0
  16. package/dist/types/options/input-options.d.ts +31 -6
  17. package/dist/types/options/normalized-input-options.d.ts +4 -2
  18. package/dist/types/options/normalized-output-options.d.ts +2 -1
  19. package/dist/types/options/output-options.d.ts +10 -5
  20. package/dist/types/plugin/bindingify-builtin-plugin.d.ts +10 -0
  21. package/dist/types/plugin/bindingify-output-hooks.d.ts +1 -1
  22. package/dist/types/plugin/bindingify-plugin.d.ts +1 -1
  23. package/dist/types/plugin/index.d.ts +49 -29
  24. package/dist/types/plugin/plugin-context.d.ts +14 -0
  25. package/dist/types/plugin/plugin-driver.d.ts +5 -1
  26. package/dist/types/plugin/transfrom-plugin-context.d.ts +9 -5
  27. package/dist/types/rollup.d.ts +1113 -0
  28. package/dist/types/treeshake/index.d.ts +14 -0
  29. package/dist/types/treeshake/module-side-effects.d.ts +15 -0
  30. package/dist/types/types/rolldown-output.d.ts +3 -1
  31. package/dist/types/types/sourcemap.d.ts +7 -4
  32. package/dist/types/types/utils.d.ts +3 -0
  33. package/dist/types/utils/asset-source.d.ts +4 -0
  34. package/dist/types/utils/index.d.ts +1 -5
  35. package/dist/types/utils/initialize-parallel-plugins.d.ts +2 -1
  36. package/dist/types/utils/misc.d.ts +5 -0
  37. package/dist/types/utils/normalize-hook.d.ts +2 -2
  38. package/dist/types/utils/normalize-output-options.d.ts +2 -2
  39. package/dist/types/utils/normalize-plugin-option.d.ts +2 -2
  40. package/dist/types/utils/normalize-tree-shake.d.ts +3 -0
  41. package/dist/types/utils/transform-side-effects.d.ts +1 -1
  42. package/package.json +20 -21
  43. package/dist/shared/rolldown-ftFKbC6A.mjs +0 -51
  44. package/dist/shared/rolldown-l_Cw2GW3.cjs +0 -52
package/dist/cjs/cli.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const { __export, __toCommonJS, __toESM } = require("../shared/chunk-eib2uzZZ.cjs");
4
- const { arraify } = require("../shared/utils_index-D-jBnBMP.cjs");
5
- const { rolldown } = require("../shared/rolldown-l_Cw2GW3.cjs");
4
+ const { rolldown } = require("../shared/rolldown-1SJPa4fg.cjs");
5
+ const { arraify } = require("../shared/bindingify_plugin-sRZqfDBJ.cjs");
6
6
  const { pathToFileURL } = __toESM(require("node:url"));
7
7
  const { default: nodePath } = __toESM(require("node:path"));
8
8
  const { default: process$1, env } = __toESM(require("node:process"));
@@ -58,8 +58,8 @@ async function bundle(configPath) {
58
58
  process.exit(1);
59
59
  }
60
60
  const configList = arraify(config);
61
- for (const config2 of configList) {
62
- await bundleInner(config2);
61
+ for (const config$1 of configList) {
62
+ await bundleInner(config$1);
63
63
  }
64
64
  }
65
65
  async function bundleInner(options) {
@@ -106,7 +106,7 @@ const numberFormatter = new Intl.NumberFormat('en', {
106
106
  minimumFractionDigits:2
107
107
  });
108
108
  function displaySize(bytes) {
109
- return `${numberFormatter.format(bytes / 1e3)} kB`;
109
+ return `${numberFormatter.format(bytes / 1000)} kB`;
110
110
  }
111
111
  const CHUNK_GROUPS = [{
112
112
  type:'asset',
@@ -114,7 +114,7 @@ const CHUNK_GROUPS = [{
114
114
  }, {
115
115
  type:'chunk',
116
116
  color:'cyan'
117
- }];
117
+ },];
118
118
  function printOutputEntries(entries, sizeAdjustment, distPath) {
119
119
  for (const group of CHUNK_GROUPS) {
120
120
  const filtered = entries.filter(e => e.type === group.type);
@@ -125,7 +125,7 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
125
125
  let log = colors_ns.dim(withTrailingSlash(distPath));
126
126
  log += colors_ns[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
127
127
  log += colors_ns.dim(entry.type);
128
- log += colors_ns.dim(` \u2502 size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
128
+ log += colors_ns.dim(` size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
129
129
  logger.log(log);
130
130
  }
131
131
  }
@@ -139,7 +139,7 @@ function withTrailingSlash(path) {
139
139
 
140
140
  //#endregion
141
141
  //#region package.json
142
- const version = '0.10.4';
142
+ const version = '0.10.5';
143
143
  const description = 'Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.';
144
144
  const keywords = ['webpack', 'parcel', 'esbuild', 'rollup', 'bundler', 'rolldown'];
145
145
  const files = ['bin', 'cli', 'dist', '!dist/*.node'];
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const { __export, __toCommonJS, __toESM } = require("../shared/chunk-eib2uzZZ.cjs");
4
- require("../shared/utils_index-D-jBnBMP.cjs");
5
- const { experimental_scan, rolldown } = require("../shared/rolldown-l_Cw2GW3.cjs");
4
+ const { BuiltinWasmPlugin, experimental_scan, rolldown } = require("../shared/rolldown-1SJPa4fg.cjs");
5
+ require("../shared/bindingify_plugin-sRZqfDBJ.cjs");
6
6
  const { pathToFileURL } = __toESM(require("node:url"));
7
7
 
8
8
  //#region src/plugin/index.ts
@@ -27,6 +27,7 @@ function defineConfig(config) {
27
27
  //#region src/index.ts
28
28
  var src_index_ns = {};
29
29
  __export(src_index_ns, {
30
+ BuiltinWasmPlugin:() => BuiltinWasmPlugin,
30
31
  defineConfig:() => defineConfig,
31
32
  defineParallelPlugin:() => defineParallelPlugin,
32
33
  experimental_scan:() => experimental_scan,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  const { __toCommonJS, __toESM } = require("../shared/chunk-eib2uzZZ.cjs");
4
- const { bindingifyPlugin, require_binding } = require("../shared/utils_index-D-jBnBMP.cjs");
4
+ const { bindingifyPlugin, require_binding } = require("../shared/bindingify_plugin-sRZqfDBJ.cjs");
5
5
  const { parentPort, workerData } = __toESM(require("node:worker_threads"));
6
6
 
7
7
  //#region src/parallel-plugin-worker.ts
package/dist/esm/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import { __export, arraify } from "../shared/utils_index-ywWHgCJG.mjs";
4
- import { rolldown } from "../shared/rolldown-ftFKbC6A.mjs";
3
+ import { __export, arraify } from "../shared/bindingify_plugin-gPrr_HPR.mjs";
4
+ import { rolldown } from "../shared/rolldown-bgokD9pg.mjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
  import { default as nodePath } from "node:path";
7
7
  import { default as process$1, env } from "node:process";
@@ -57,8 +57,8 @@ async function bundle(configPath) {
57
57
  process.exit(1);
58
58
  }
59
59
  const configList = arraify(config);
60
- for (const config2 of configList) {
61
- await bundleInner(config2);
60
+ for (const config$1 of configList) {
61
+ await bundleInner(config$1);
62
62
  }
63
63
  }
64
64
  async function bundleInner(options) {
@@ -105,7 +105,7 @@ const numberFormatter = new Intl.NumberFormat('en', {
105
105
  minimumFractionDigits:2
106
106
  });
107
107
  function displaySize(bytes) {
108
- return `${numberFormatter.format(bytes / 1e3)} kB`;
108
+ return `${numberFormatter.format(bytes / 1000)} kB`;
109
109
  }
110
110
  const CHUNK_GROUPS = [{
111
111
  type:'asset',
@@ -113,7 +113,7 @@ const CHUNK_GROUPS = [{
113
113
  }, {
114
114
  type:'chunk',
115
115
  color:'cyan'
116
- }];
116
+ },];
117
117
  function printOutputEntries(entries, sizeAdjustment, distPath) {
118
118
  for (const group of CHUNK_GROUPS) {
119
119
  const filtered = entries.filter(e => e.type === group.type);
@@ -124,7 +124,7 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
124
124
  let log = colors_ns.dim(withTrailingSlash(distPath));
125
125
  log += colors_ns[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
126
126
  log += colors_ns.dim(entry.type);
127
- log += colors_ns.dim(` \u2502 size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
127
+ log += colors_ns.dim(` size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
128
128
  logger.log(log);
129
129
  }
130
130
  }
@@ -138,7 +138,7 @@ function withTrailingSlash(path) {
138
138
 
139
139
  //#endregion
140
140
  //#region package.json
141
- const version = '0.10.4';
141
+ const version = '0.10.5';
142
142
  const description = 'Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.';
143
143
  const keywords = ['webpack', 'parcel', 'esbuild', 'rollup', 'bundler', 'rolldown'];
144
144
  const files = ['bin', 'cli', 'dist', '!dist/*.node'];
@@ -1,7 +1,7 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import "../shared/utils_index-ywWHgCJG.mjs";
4
- import { experimental_scan, rolldown } from "../shared/rolldown-ftFKbC6A.mjs";
3
+ import "../shared/bindingify_plugin-gPrr_HPR.mjs";
4
+ import { BuiltinWasmPlugin, experimental_scan, rolldown } from "../shared/rolldown-bgokD9pg.mjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
7
7
  //#region src/plugin/index.ts
@@ -23,4 +23,4 @@ function defineConfig(config) {
23
23
  }
24
24
 
25
25
  //#endregion
26
- export { defineConfig, defineParallelPlugin, experimental_scan, rolldown };
26
+ export { BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown };
@@ -1,6 +1,6 @@
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-ywWHgCJG.mjs";
3
+ import { __toESM, bindingifyPlugin, require_binding } from "../shared/bindingify_plugin-gPrr_HPR.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts