rolldown 0.15.1-commit.4e41a08 → 0.15.1-commit.7a360ce

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 (34) hide show
  1. package/dist/cjs/cli.cjs +1 -1
  2. package/dist/cjs/experimental-index.cjs +1 -1
  3. package/dist/cjs/index.cjs +1 -1
  4. package/dist/cjs/parallel-plugin-worker.cjs +1 -1
  5. package/dist/esm/cli.mjs +1 -1
  6. package/dist/esm/experimental-index.mjs +1 -1
  7. package/dist/esm/index.mjs +1 -1
  8. package/dist/esm/parallel-plugin-worker.mjs +1 -1
  9. package/dist/shared/{src-Do1JlyLc.mjs → src-BO8uZKXS.mjs} +12 -5
  10. package/dist/shared/{src-Dw217EaC.cjs → src-COjNsAoF.cjs} +12 -5
  11. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  12. package/dist/types/index.d.ts +3 -4
  13. package/dist/types/log/logHandler.d.ts +1 -1
  14. package/dist/types/log/logger.d.ts +1 -1
  15. package/dist/types/log/logs.d.ts +2 -1
  16. package/dist/types/options/normalized-input-options.d.ts +1 -1
  17. package/dist/types/options/normalized-output-options.d.ts +1 -1
  18. package/dist/types/options/output-options.d.ts +3 -3
  19. package/dist/types/plugin/bindingify-plugin.d.ts +1 -1
  20. package/dist/types/plugin/index.d.ts +6 -6
  21. package/dist/types/plugin/minimal-plugin-context.d.ts +1 -1
  22. package/dist/types/plugin/plugin-context.d.ts +1 -1
  23. package/dist/types/plugin/transform-plugin-context.d.ts +1 -1
  24. package/dist/types/types/misc.d.ts +40 -0
  25. package/dist/types/types/output-bundle.d.ts +2 -2
  26. package/dist/types/types/rolldown-output.d.ts +8 -11
  27. package/dist/types/utils/bindingify-input-options.d.ts +1 -1
  28. package/dist/types/utils/create-bundler-option.d.ts +1 -1
  29. package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
  30. package/dist/types/utils/transform-rendered-chunk.d.ts +4 -4
  31. package/dist/types/utils/transform-rendered-module.d.ts +2 -2
  32. package/package.json +15 -15
  33. package/dist/types/rollup-types.d.ts +0 -1
  34. package/dist/types/rollup.d.ts +0 -1118
package/dist/cjs/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-BFvIen8E.cjs');
3
- const require_src = require('../shared/src-Dw217EaC.cjs');
3
+ const require_src = require('../shared/src-COjNsAoF.cjs');
4
4
  const require_consola_36c0034f = require('../shared/consola_36c0034f-B7L-radJ.cjs');
5
5
  const node_fs = require_chunk.__toESM(require("node:fs"));
6
6
  const zod = require_chunk.__toESM(require("zod"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-BFvIen8E.cjs');
3
- const require_src = require('../shared/src-Dw217EaC.cjs');
3
+ const require_src = require('../shared/src-COjNsAoF.cjs');
4
4
  const node_url = require_chunk.__toESM(require("node:url"));
5
5
 
6
6
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-Dw217EaC.cjs');
1
+ const require_src = require('../shared/src-COjNsAoF.cjs');
2
2
 
3
3
  exports.VERSION = require_src.VERSION
4
4
  exports.build = require_src.build
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-BFvIen8E.cjs');
3
- const require_src = require('../shared/src-Dw217EaC.cjs');
3
+ const require_src = require('../shared/src-COjNsAoF.cjs');
4
4
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts
package/dist/esm/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } from "../shared/src-Do1JlyLc.mjs";
1
+ import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } from "../shared/src-BO8uZKXS.mjs";
2
2
  import { createConsola } from "../shared/consola_36c0034f-D9ce-831.mjs";
3
3
  import fs from "node:fs";
4
4
  import { ZodFirstPartyTypeKind, z } from "zod";
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-Do1JlyLc.mjs";
1
+ import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BO8uZKXS.mjs";
2
2
  import { pathToFileURL } from "node:url";
3
3
 
4
4
  //#region src/plugin/parallel-plugin.ts
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-Do1JlyLc.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-BO8uZKXS.mjs";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,4 +1,4 @@
1
- import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-Do1JlyLc.mjs";
1
+ import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-BO8uZKXS.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
 
4
4
  //#region src/parallel-plugin-worker.ts
@@ -721,7 +721,13 @@ function locate(source, search, options) {
721
721
 
722
722
  //#endregion
723
723
  //#region src/log/logs.ts
724
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION";
724
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING";
725
+ function logMinifyWarning() {
726
+ return {
727
+ code: MINIFY_WARNING,
728
+ message: "The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use."
729
+ };
730
+ }
725
731
  function logInvalidLogPosition(pluginName) {
726
732
  return {
727
733
  code: INVALID_LOG_POSITION,
@@ -1229,7 +1235,7 @@ var PluginContext = class extends MinimalPluginContext {
1229
1235
  }
1230
1236
  async load(options) {
1231
1237
  const id = options.id;
1232
- if (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(super.pluginName, this.currentLoadingModule));
1238
+ if (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(this.pluginName, this.currentLoadingModule));
1233
1239
  const moduleInfo = this.data.getModuleInfo(id, this.context);
1234
1240
  if (moduleInfo && moduleInfo.code !== null) return moduleInfo;
1235
1241
  const rawOptions = {
@@ -1322,7 +1328,7 @@ var TransformPluginContext = class extends PluginContext {
1322
1328
  if (pos) augmentCodeLocation(e, pos, this.moduleSource, this.moduleId);
1323
1329
  e.id = this.moduleId;
1324
1330
  e.hook = "transform";
1325
- return error(logPluginError(normalizeLog(e), super.pluginName));
1331
+ return error(logPluginError(normalizeLog(e), this.pluginName));
1326
1332
  }
1327
1333
  getCombinedSourcemap() {
1328
1334
  return JSON.parse(this.inner.getCombinedSourcemap());
@@ -2631,9 +2637,10 @@ async function createBundlerOptions(inputOptions, outputOptions) {
2631
2637
  if (inputOptions.treeshake !== undefined) TreeshakingOptionsSchema.parse(inputOptions.treeshake);
2632
2638
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
2633
2639
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
2634
- outputOptions = pluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2635
2640
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2636
2641
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel);
2642
+ outputOptions = pluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2643
+ if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
2637
2644
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(await normalizePluginOption(outputOptions.plugins), ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
2638
2645
  if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
2639
2646
  const parallelPluginInitResult = await initializeParallelPlugins(plugins);
@@ -2836,7 +2843,7 @@ const watch = (input) => {
2836
2843
 
2837
2844
  //#endregion
2838
2845
  //#region package.json
2839
- var version = "0.15.1-commit.4e41a08";
2846
+ var version = "0.15.1-commit.7a360ce";
2840
2847
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2841
2848
 
2842
2849
  //#endregion
@@ -695,7 +695,13 @@ function locate(source, search, options) {
695
695
 
696
696
  //#endregion
697
697
  //#region src/log/logs.ts
698
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION";
698
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING";
699
+ function logMinifyWarning() {
700
+ return {
701
+ code: MINIFY_WARNING,
702
+ message: "The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use."
703
+ };
704
+ }
699
705
  function logInvalidLogPosition(pluginName) {
700
706
  return {
701
707
  code: INVALID_LOG_POSITION,
@@ -1203,7 +1209,7 @@ var PluginContext = class extends MinimalPluginContext {
1203
1209
  }
1204
1210
  async load(options) {
1205
1211
  const id = options.id;
1206
- if (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(super.pluginName, this.currentLoadingModule));
1212
+ if (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(this.pluginName, this.currentLoadingModule));
1207
1213
  const moduleInfo = this.data.getModuleInfo(id, this.context);
1208
1214
  if (moduleInfo && moduleInfo.code !== null) return moduleInfo;
1209
1215
  const rawOptions = {
@@ -1296,7 +1302,7 @@ var TransformPluginContext = class extends PluginContext {
1296
1302
  if (pos) augmentCodeLocation(e, pos, this.moduleSource, this.moduleId);
1297
1303
  e.id = this.moduleId;
1298
1304
  e.hook = "transform";
1299
- return error(logPluginError(normalizeLog(e), super.pluginName));
1305
+ return error(logPluginError(normalizeLog(e), this.pluginName));
1300
1306
  }
1301
1307
  getCombinedSourcemap() {
1302
1308
  return JSON.parse(this.inner.getCombinedSourcemap());
@@ -2605,9 +2611,10 @@ async function createBundlerOptions(inputOptions, outputOptions) {
2605
2611
  if (inputOptions.treeshake !== undefined) TreeshakingOptionsSchema.parse(inputOptions.treeshake);
2606
2612
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
2607
2613
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
2608
- outputOptions = pluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2609
2614
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2610
2615
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel);
2616
+ outputOptions = pluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2617
+ if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
2611
2618
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(await normalizePluginOption(outputOptions.plugins), ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
2612
2619
  if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
2613
2620
  const parallelPluginInitResult = await initializeParallelPlugins(plugins);
@@ -2810,7 +2817,7 @@ const watch = (input) => {
2810
2817
 
2811
2818
  //#endregion
2812
2819
  //#region package.json
2813
- var version = "0.15.1-commit.4e41a08";
2820
+ var version = "0.15.1-commit.7a360ce";
2814
2821
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2815
2822
 
2816
2823
  //#endregion