rolldown 0.15.1-commit.4e41a08 → 0.15.1-commit.f85bcfa
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.
- package/dist/cjs/cli.cjs +1 -1
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +1 -1
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{src-Dw217EaC.cjs → src-DCe3tD4H.cjs} +12 -5
- package/dist/shared/{src-Do1JlyLc.mjs → src-DX2q-tRy.mjs} +12 -5
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -4
- package/dist/types/log/logHandler.d.ts +1 -1
- package/dist/types/log/logger.d.ts +1 -1
- package/dist/types/log/logs.d.ts +2 -1
- package/dist/types/options/normalized-input-options.d.ts +1 -1
- package/dist/types/options/normalized-output-options.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +3 -3
- package/dist/types/plugin/bindingify-plugin.d.ts +1 -1
- package/dist/types/plugin/index.d.ts +6 -6
- package/dist/types/plugin/minimal-plugin-context.d.ts +1 -1
- package/dist/types/plugin/plugin-context.d.ts +1 -1
- package/dist/types/plugin/transform-plugin-context.d.ts +1 -1
- package/dist/types/types/misc.d.ts +40 -0
- package/dist/types/types/output-bundle.d.ts +2 -2
- package/dist/types/types/rolldown-output.d.ts +8 -11
- package/dist/types/utils/bindingify-input-options.d.ts +1 -1
- package/dist/types/utils/create-bundler-option.d.ts +1 -1
- package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
- package/dist/types/utils/transform-rendered-chunk.d.ts +4 -4
- package/dist/types/utils/transform-rendered-module.d.ts +2 -2
- package/package.json +15 -15
- package/dist/types/rollup-types.d.ts +0 -1
- 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-
|
|
3
|
+
const require_src = require('../shared/src-DCe3tD4H.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-
|
|
3
|
+
const require_src = require('../shared/src-DCe3tD4H.cjs');
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
|
|
6
6
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/cjs/index.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-
|
|
3
|
+
const require_src = require('../shared/src-DCe3tD4H.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-
|
|
1
|
+
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } from "../shared/src-DX2q-tRy.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-
|
|
1
|
+
import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DX2q-tRy.mjs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-
|
|
1
|
+
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-DX2q-tRy.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -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(
|
|
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),
|
|
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.
|
|
2820
|
+
var version = "0.15.1-commit.f85bcfa";
|
|
2814
2821
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
2815
2822
|
|
|
2816
2823
|
//#endregion
|
|
@@ -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(
|
|
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),
|
|
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.
|
|
2846
|
+
var version = "0.15.1-commit.f85bcfa";
|
|
2840
2847
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
2841
2848
|
|
|
2842
2849
|
//#endregion
|