rolldown 0.14.0-snapshot-ab438c3-20241121003459 → 0.14.0-snapshot-db4090b-20241123003628
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 +9 -5
- 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 +9 -5
- 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/rolldown-binding.wasi.cjs +6 -8
- package/dist/shared/{src_index-Yt-qn7mE.cjs → src_index-WgTHG2Z9.cjs} +613 -649
- package/dist/shared/{src_index-k_6h6jvv.mjs → src_index-wJBYWP9G.mjs} +613 -649
- package/dist/types/binding.d.ts +10 -14
- package/dist/types/cli/arguments/schema.d.ts +60 -56
- package/dist/types/log/logger.d.ts +3 -3
- package/dist/types/options/bindingify-input-options.d.ts +3 -2
- package/dist/types/options/input-options.d.ts +128 -120
- package/dist/types/options/normalized-input-options.d.ts +1 -10
- package/dist/types/options/normalized-output-options.d.ts +1 -15
- package/dist/types/options/output-options.d.ts +12 -11
- package/dist/types/plugin/plugin-driver.d.ts +2 -3
- package/dist/types/treeshake/index.d.ts +0 -4
- package/dist/types/treeshake/module-side-effects.d.ts +23 -21
- package/dist/types/types/input-options.d.ts +8 -0
- package/dist/types/types/output-options.d.ts +12 -1
- package/dist/types/utils/error.d.ts +1 -0
- package/dist/types/utils/normalize-plugin-option.d.ts +2 -2
- package/dist/types/watcher.d.ts +2 -3
- package/package.json +15 -15
- package/dist/types/utils/normalize-input-options.d.ts +0 -3
- package/dist/types/utils/normalize-output-options.d.ts +0 -3
- package/dist/types/utils/normalize-tree-shake.d.ts +0 -3
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __export, __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } = require("../shared/src_index-
|
|
4
|
+
const { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } = require("../shared/src_index-WgTHG2Z9.cjs");
|
|
5
5
|
const { createConsola } = require("../shared/consola.36c0034f-HcmWcfPe.cjs");
|
|
6
|
-
const { default: nodePath, default: path } = __toESM(require("node:path"));
|
|
7
6
|
const { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$2, z, z: z$1, z: z$2, z: z$3 } = __toESM(require("zod"));
|
|
7
|
+
const { default: nodePath, default: path } = __toESM(require("node:path"));
|
|
8
8
|
const { default: process$1, env } = __toESM(require("node:process"));
|
|
9
9
|
const { performance } = __toESM(require("node:perf_hooks"));
|
|
10
10
|
const { pathToFileURL } = __toESM(require("node:url"));
|
|
@@ -371,14 +371,16 @@ async function watchInner(options$1, cliOptions) {
|
|
|
371
371
|
watcher.on("event", (event) => {
|
|
372
372
|
switch (event.code) {
|
|
373
373
|
case "BUNDLE_START":
|
|
374
|
-
|
|
374
|
+
if (changedFile.length > 0) {
|
|
375
|
+
logger.log(`Found ${bold((changedFile.map(relativeId)).join(", "))} changed, rebuilding...`);
|
|
376
|
+
}
|
|
375
377
|
changedFile.length = 0;
|
|
376
378
|
break;
|
|
377
379
|
case "BUNDLE_END":
|
|
378
380
|
logger.success(`Rebuilt ${bold(relativeId(event.output[0]))} in ${bold(ms(event.duration))}.`);
|
|
379
381
|
break;
|
|
380
382
|
case "ERROR":
|
|
381
|
-
logger.error(event.error
|
|
383
|
+
logger.error(event.error);
|
|
382
384
|
break;
|
|
383
385
|
default: break;
|
|
384
386
|
}
|
|
@@ -1636,6 +1638,7 @@ const inputCliOptionsSchema = (inputOptionsSchema.extend({
|
|
|
1636
1638
|
const ModuleFormatSchema = (((((((z$1.literal("es")).or(z$1.literal("cjs"))).or(z$1.literal("esm"))).or(z$1.literal("module"))).or(z$1.literal("commonjs"))).or(z$1.literal("iife"))).or(z$1.literal("umd"))).describe(`Output format of the generated bundle (supports ${underline("esm")}, cjs, and iife)`);
|
|
1637
1639
|
const addonFunctionSchema = ((z$1.function()).args(phantom())).returns((z$1.string()).or(z$1.promise(z$1.string())));
|
|
1638
1640
|
const chunkFileNamesFunctionSchema = ((z$1.function()).args(phantom())).returns(z$1.string());
|
|
1641
|
+
const GlobalsFunctionSchema = ((z$1.function()).args(z$1.string())).returns(z$1.string());
|
|
1639
1642
|
const outputOptionsSchema = z$1.strictObject({
|
|
1640
1643
|
dir: ((z$1.string()).describe("Output directory, defaults to `dist` if `file` is not set")).optional(),
|
|
1641
1644
|
file: ((z$1.string()).describe("Single output file")).optional(),
|
|
@@ -1658,7 +1661,7 @@ const outputOptionsSchema = z$1.strictObject({
|
|
|
1658
1661
|
cssChunkFileNames: (((z$1.string()).or(chunkFileNamesFunctionSchema)).describe("Name pattern for emitted css secondary chunks")).optional(),
|
|
1659
1662
|
minify: ((z$1.boolean()).describe("Minify the bundled file.")).optional(),
|
|
1660
1663
|
name: ((z$1.string()).describe("Name for UMD / IIFE format outputs")).optional(),
|
|
1661
|
-
globals: ((z$1.record(z$1.string())).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1664
|
+
globals: (((z$1.record(z$1.string())).or(GlobalsFunctionSchema)).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1662
1665
|
externalLiveBindings: (((z$1.boolean()).describe("external live bindings")).default(true)).optional(),
|
|
1663
1666
|
inlineDynamicImports: (((z$1.boolean()).describe("Inline dynamic imports")).default(false)).optional(),
|
|
1664
1667
|
advancedChunks: (z$1.strictObject({
|
|
@@ -1683,6 +1686,7 @@ const outputCliOptionsSchema = (outputOptionsSchema.extend({
|
|
|
1683
1686
|
intro: ((z$1.string()).describe(getAddonDescription("top", "inside"))).optional(),
|
|
1684
1687
|
outro: ((z$1.string()).describe(getAddonDescription("bottom", "inside"))).optional(),
|
|
1685
1688
|
esModule: ((z$1.boolean()).describe("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")).optional(),
|
|
1689
|
+
globals: ((z$1.record(z$1.string())).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1686
1690
|
advancedChunks: (z$1.strictObject({
|
|
1687
1691
|
minSize: ((z$1.number()).describe("Minimum size of the chunk")).optional(),
|
|
1688
1692
|
minShareCount: ((z$1.number()).describe("Minimum share count of the chunk")).optional()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, isCallableBuiltinPlugin, isCallableCompatibleBuiltinPlugin, jsonPlugin, loadFallbackPlugin, makeBuiltinPluginCallable, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/src_index-
|
|
4
|
+
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, isCallableBuiltinPlugin, isCallableCompatibleBuiltinPlugin, jsonPlugin, loadFallbackPlugin, makeBuiltinPluginCallable, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/src_index-WgTHG2Z9.cjs");
|
|
5
5
|
const { pathToFileURL } = __toESM(require("node:url"));
|
|
6
6
|
|
|
7
7
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { VERSION, defineConfig, rolldown, watch } = require("../shared/src_index-
|
|
3
|
+
const { VERSION, defineConfig, rolldown, watch } = require("../shared/src_index-WgTHG2Z9.cjs");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
6
|
exports.VERSION = VERSION;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/src_index-
|
|
4
|
+
const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/src_index-WgTHG2Z9.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,9 +1,9 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src_index-
|
|
3
|
+
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src_index-wJBYWP9G.mjs";
|
|
4
4
|
import { createConsola } from "../shared/consola.36c0034f-Xyw7SC_7.mjs";
|
|
5
|
-
import { default as nodePath, default as path } from "node:path";
|
|
6
5
|
import { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$2, z, z as z$1, z as z$2, z as z$3 } from "zod";
|
|
6
|
+
import { default as nodePath, default as path } from "node:path";
|
|
7
7
|
import { default as process$1, env } from "node:process";
|
|
8
8
|
import { performance } from "node:perf_hooks";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
@@ -370,14 +370,16 @@ async function watchInner(options$1, cliOptions) {
|
|
|
370
370
|
watcher.on("event", (event) => {
|
|
371
371
|
switch (event.code) {
|
|
372
372
|
case "BUNDLE_START":
|
|
373
|
-
|
|
373
|
+
if (changedFile.length > 0) {
|
|
374
|
+
logger.log(`Found ${bold((changedFile.map(relativeId)).join(", "))} changed, rebuilding...`);
|
|
375
|
+
}
|
|
374
376
|
changedFile.length = 0;
|
|
375
377
|
break;
|
|
376
378
|
case "BUNDLE_END":
|
|
377
379
|
logger.success(`Rebuilt ${bold(relativeId(event.output[0]))} in ${bold(ms(event.duration))}.`);
|
|
378
380
|
break;
|
|
379
381
|
case "ERROR":
|
|
380
|
-
logger.error(event.error
|
|
382
|
+
logger.error(event.error);
|
|
381
383
|
break;
|
|
382
384
|
default: break;
|
|
383
385
|
}
|
|
@@ -1635,6 +1637,7 @@ const inputCliOptionsSchema = (inputOptionsSchema.extend({
|
|
|
1635
1637
|
const ModuleFormatSchema = (((((((z$1.literal("es")).or(z$1.literal("cjs"))).or(z$1.literal("esm"))).or(z$1.literal("module"))).or(z$1.literal("commonjs"))).or(z$1.literal("iife"))).or(z$1.literal("umd"))).describe(`Output format of the generated bundle (supports ${underline("esm")}, cjs, and iife)`);
|
|
1636
1638
|
const addonFunctionSchema = ((z$1.function()).args(phantom())).returns((z$1.string()).or(z$1.promise(z$1.string())));
|
|
1637
1639
|
const chunkFileNamesFunctionSchema = ((z$1.function()).args(phantom())).returns(z$1.string());
|
|
1640
|
+
const GlobalsFunctionSchema = ((z$1.function()).args(z$1.string())).returns(z$1.string());
|
|
1638
1641
|
const outputOptionsSchema = z$1.strictObject({
|
|
1639
1642
|
dir: ((z$1.string()).describe("Output directory, defaults to `dist` if `file` is not set")).optional(),
|
|
1640
1643
|
file: ((z$1.string()).describe("Single output file")).optional(),
|
|
@@ -1657,7 +1660,7 @@ const outputOptionsSchema = z$1.strictObject({
|
|
|
1657
1660
|
cssChunkFileNames: (((z$1.string()).or(chunkFileNamesFunctionSchema)).describe("Name pattern for emitted css secondary chunks")).optional(),
|
|
1658
1661
|
minify: ((z$1.boolean()).describe("Minify the bundled file.")).optional(),
|
|
1659
1662
|
name: ((z$1.string()).describe("Name for UMD / IIFE format outputs")).optional(),
|
|
1660
|
-
globals: ((z$1.record(z$1.string())).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1663
|
+
globals: (((z$1.record(z$1.string())).or(GlobalsFunctionSchema)).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1661
1664
|
externalLiveBindings: (((z$1.boolean()).describe("external live bindings")).default(true)).optional(),
|
|
1662
1665
|
inlineDynamicImports: (((z$1.boolean()).describe("Inline dynamic imports")).default(false)).optional(),
|
|
1663
1666
|
advancedChunks: (z$1.strictObject({
|
|
@@ -1682,6 +1685,7 @@ const outputCliOptionsSchema = (outputOptionsSchema.extend({
|
|
|
1682
1685
|
intro: ((z$1.string()).describe(getAddonDescription("top", "inside"))).optional(),
|
|
1683
1686
|
outro: ((z$1.string()).describe(getAddonDescription("bottom", "inside"))).optional(),
|
|
1684
1687
|
esModule: ((z$1.boolean()).describe("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")).optional(),
|
|
1688
|
+
globals: ((z$1.record(z$1.string())).describe("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")).optional(),
|
|
1685
1689
|
advancedChunks: (z$1.strictObject({
|
|
1686
1690
|
minSize: ((z$1.number()).describe("Minimum size of the chunk")).optional(),
|
|
1687
1691
|
minShareCount: ((z$1.number()).describe("Minimum share count of the chunk")).optional()
|
|
@@ -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, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, isCallableBuiltinPlugin, isCallableCompatibleBuiltinPlugin, jsonPlugin, loadFallbackPlugin, makeBuiltinPluginCallable, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src_index-
|
|
3
|
+
import { __toESM, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, isCallableBuiltinPlugin, isCallableCompatibleBuiltinPlugin, jsonPlugin, loadFallbackPlugin, makeBuiltinPluginCallable, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src_index-wJBYWP9G.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
6
6
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { VERSION, defineConfig, rolldown, watch } from "../shared/src_index-
|
|
3
|
+
import { VERSION, defineConfig, rolldown, watch } from "../shared/src_index-wJBYWP9G.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src_index-
|
|
3
|
+
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src_index-wJBYWP9G.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
6
6
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -175,12 +175,11 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
|
175
175
|
__napiInstance.exports['__napi_register__BindingSourcemap_struct_121']?.()
|
|
176
176
|
__napiInstance.exports['__napi_register__BindingJsonSourcemap_struct_122']?.()
|
|
177
177
|
__napiInstance.exports['__napi_register__BindingWatcher_struct_123']?.()
|
|
178
|
-
__napiInstance.exports['
|
|
179
|
-
__napiInstance.exports['
|
|
180
|
-
__napiInstance.exports['
|
|
181
|
-
__napiInstance.exports['
|
|
182
|
-
__napiInstance.exports['
|
|
183
|
-
__napiInstance.exports['__napi_register__BindingBundleEndEventData_struct_136']?.()
|
|
178
|
+
__napiInstance.exports['__napi_register__BindingWatcher_impl_126']?.()
|
|
179
|
+
__napiInstance.exports['__napi_register__BindingWatcherEvent_struct_127']?.()
|
|
180
|
+
__napiInstance.exports['__napi_register__BindingWatcherEvent_impl_133']?.()
|
|
181
|
+
__napiInstance.exports['__napi_register__BindingWatcherChangeData_struct_134']?.()
|
|
182
|
+
__napiInstance.exports['__napi_register__BindingBundleEndEventData_struct_135']?.()
|
|
184
183
|
}
|
|
185
184
|
module.exports.BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
|
|
186
185
|
module.exports.BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
@@ -194,14 +193,13 @@ module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModul
|
|
|
194
193
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
195
194
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
196
195
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
197
|
-
module.exports.
|
|
196
|
+
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
198
197
|
module.exports.Bundler = __napiModule.exports.Bundler
|
|
199
198
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
200
199
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
201
200
|
module.exports.BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
202
201
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
203
202
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
204
|
-
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
205
203
|
module.exports.isCallableCompatibleBuiltinPlugin = __napiModule.exports.isCallableCompatibleBuiltinPlugin
|
|
206
204
|
module.exports.isolatedDeclaration = __napiModule.exports.isolatedDeclaration
|
|
207
205
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|