rolldown 1.0.0-beta.23 → 1.0.0-beta.24
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/cli.cjs +7 -7
- package/dist/cli.mjs +7 -7
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +2 -2
- package/dist/experimental-runtime-types.d.ts +1 -2
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/shared/{binding-CMKStSph.d.cts → binding-DG3bbtXG.d.cts} +0 -8
- package/dist/shared/{binding-DB58iXP8.d.mts → binding-cECB-Ts3.d.mts} +0 -8
- package/dist/shared/{define-config-BRkYSF9E.d.cts → define-config-BnlWQIlM.d.cts} +11 -3
- package/dist/shared/{define-config-CyRbZDRR.d.mts → define-config-DLGGYzTV.d.mts} +11 -3
- package/dist/shared/{load-config-CTdjFUJH.mjs → load-config-CciutN6Q.mjs} +1 -1
- package/dist/shared/{load-config-n-iiDvYj.cjs → load-config-xHhudbSQ.cjs} +1 -1
- package/dist/shared/{parse-ast-index-DDMiEgyY.cjs → parse-ast-index-BzYd1T7N.cjs} +15 -3
- package/dist/shared/{parse-ast-index-DmWy-n6o.mjs → parse-ast-index-D-D8UIRn.mjs} +10 -4
- package/dist/shared/{src-DgdMNl-3.mjs → src-CVZ9JbCC.mjs} +52 -25
- package/dist/shared/{src-D6QrbVqq.cjs → src-DJtUlfyl.cjs} +52 -25
- package/package.json +18 -18
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-DJtUlfyl.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
4
4
|
const require_misc = require('./shared/misc-DksvspN4.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
5
|
+
const require_load_config = require('./shared/load-config-xHhudbSQ.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
8
8
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -1424,8 +1424,8 @@ const process$2 = globalThis.process;
|
|
|
1424
1424
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
1425
1425
|
|
|
1426
1426
|
//#endregion
|
|
1427
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
1428
|
-
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
1427
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1428
|
+
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1429
1429
|
function _usingCtx() {
|
|
1430
1430
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1431
1431
|
var n$2 = Error();
|
|
@@ -1559,7 +1559,7 @@ async function watchInner(config, cliOptions) {
|
|
|
1559
1559
|
break;
|
|
1560
1560
|
case "BUNDLE_END":
|
|
1561
1561
|
await event.result.close();
|
|
1562
|
-
logger.success(`Rebuilt ${ansis.default.bold(relativeId(event.output[0]))} in ${ansis.default.
|
|
1562
|
+
logger.success(`Rebuilt ${ansis.default.bold(relativeId(event.output[0]))} in ${ansis.default.green(ms(event.duration))}.`);
|
|
1563
1563
|
break;
|
|
1564
1564
|
case "ERROR":
|
|
1565
1565
|
await event.result.close();
|
|
@@ -1593,7 +1593,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1593
1593
|
logger.log(``);
|
|
1594
1594
|
const endTime = node_perf_hooks.performance.now();
|
|
1595
1595
|
const duration = endTime - startTime;
|
|
1596
|
-
logger.success(`Finished in ${ansis.default.
|
|
1596
|
+
logger.success(`rolldown v${require_src.version} Finished in ${ansis.default.green(ms(duration))}`);
|
|
1597
1597
|
}
|
|
1598
1598
|
function printBundleOutputPretty(output) {
|
|
1599
1599
|
const outputEntries = collectOutputEntries(output.output);
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM } from "./shared/parse-ast-index-
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
1
|
+
import { __commonJS, __toESM } from "./shared/parse-ast-index-D-D8UIRn.mjs";
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-CVZ9JbCC.mjs";
|
|
3
3
|
import { arraify } from "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CciutN6Q.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import colors from "ansis";
|
|
7
7
|
import process$1 from "node:process";
|
|
@@ -1423,8 +1423,8 @@ const process$2 = globalThis.process;
|
|
|
1423
1423
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
1424
1424
|
|
|
1425
1425
|
//#endregion
|
|
1426
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
1427
|
-
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
|
1426
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1427
|
+
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1428
1428
|
function _usingCtx() {
|
|
1429
1429
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1430
1430
|
var n$2 = Error();
|
|
@@ -1558,7 +1558,7 @@ async function watchInner(config, cliOptions) {
|
|
|
1558
1558
|
break;
|
|
1559
1559
|
case "BUNDLE_END":
|
|
1560
1560
|
await event.result.close();
|
|
1561
|
-
logger.success(`Rebuilt ${colors.bold(relativeId(event.output[0]))} in ${colors.
|
|
1561
|
+
logger.success(`Rebuilt ${colors.bold(relativeId(event.output[0]))} in ${colors.green(ms(event.duration))}.`);
|
|
1562
1562
|
break;
|
|
1563
1563
|
case "ERROR":
|
|
1564
1564
|
await event.result.close();
|
|
@@ -1592,7 +1592,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1592
1592
|
logger.log(``);
|
|
1593
1593
|
const endTime = performance.now();
|
|
1594
1594
|
const duration = endTime - startTime;
|
|
1595
|
-
logger.success(`Finished in ${colors.
|
|
1595
|
+
logger.success(`rolldown v${version} Finished in ${colors.green(ms(duration))}`);
|
|
1596
1596
|
}
|
|
1597
1597
|
function printBundleOutputPretty(output) {
|
|
1598
1598
|
const outputEntries = collectOutputEntries(output.output);
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-DJtUlfyl.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
3
3
|
require('./shared/misc-DksvspN4.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-xHhudbSQ.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DG3bbtXG.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-BnlWQIlM.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-cECB-Ts3.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DLGGYzTV.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./shared/parse-ast-index-
|
|
2
|
-
import { defineConfig, version } from "./shared/src-
|
|
1
|
+
import "./shared/parse-ast-index-D-D8UIRn.mjs";
|
|
2
|
+
import { defineConfig, version } from "./shared/src-CVZ9JbCC.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CciutN6Q.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-DJtUlfyl.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
4
4
|
require('./shared/misc-DksvspN4.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-DG3bbtXG.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-BnlWQIlM.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-cECB-Ts3.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DLGGYzTV.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-
|
|
2
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
1
|
+
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-D-D8UIRn.mjs";
|
|
2
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CVZ9JbCC.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export class DevRuntime {
|
|
2
2
|
/**
|
|
3
3
|
* @type {Record<string, { exports: any }>}
|
|
4
4
|
*/
|
|
@@ -10,7 +10,6 @@ declare class DevRuntime {
|
|
|
10
10
|
*/
|
|
11
11
|
createModuleHotContext(_moduleId: string): void;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
13
|
* @param {string[]} _boundaries
|
|
15
14
|
*/
|
|
16
15
|
applyUpdates(_boundaries: string[]): void;
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DG3bbtXG.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-BnlWQIlM.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-cECB-Ts3.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DLGGYzTV.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-DJtUlfyl.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
3
3
|
require('./shared/misc-DksvspN4.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
3
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-DG3bbtXG.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BnlWQIlM.cjs";
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
3
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-cECB-Ts3.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DLGGYzTV.mjs";
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/parse-ast-index-
|
|
2
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
1
|
+
import "./shared/parse-ast-index-D-D8UIRn.mjs";
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-CVZ9JbCC.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-DJtUlfyl.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
4
4
|
require('./shared/misc-DksvspN4.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerPlugins } from "./shared/parse-ast-index-
|
|
2
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
1
|
+
import { registerPlugins } from "./shared/parse-ast-index-D-D8UIRn.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-CVZ9JbCC.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DG3bbtXG.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-BnlWQIlM.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-cECB-Ts3.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DLGGYzTV.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BzYd1T7N.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -87,14 +87,6 @@ type ExportLocalNameKind = /** `export { name } */
|
|
|
87
87
|
* `export default function () {}`
|
|
88
88
|
*/
|
|
89
89
|
'None';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Get offset within a `Uint8Array` which is aligned on 4 GiB.
|
|
93
|
-
*
|
|
94
|
-
* Does not check that the offset is within bounds of `buffer`.
|
|
95
|
-
* To ensure it always is, provide a `Uint8Array` of at least 4 GiB size.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
90
|
interface ImportName {
|
|
99
91
|
kind: ImportNameKind;
|
|
100
92
|
name?: string;
|
|
@@ -87,14 +87,6 @@ type ExportLocalNameKind = /** `export { name } */
|
|
|
87
87
|
* `export default function () {}`
|
|
88
88
|
*/
|
|
89
89
|
'None';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Get offset within a `Uint8Array` which is aligned on 4 GiB.
|
|
93
|
-
*
|
|
94
|
-
* Does not check that the offset is within bounds of `buffer`.
|
|
95
|
-
* To ensure it always is, provide a `Uint8Array` of at least 4 GiB size.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
90
|
interface ImportName {
|
|
99
91
|
kind: ImportNameKind;
|
|
100
92
|
name?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-DG3bbtXG.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -731,7 +731,11 @@ declare class BuiltinPlugin {
|
|
|
731
731
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
732
732
|
}
|
|
733
733
|
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
734
|
-
|
|
734
|
+
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
735
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
736
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
737
|
+
};
|
|
738
|
+
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
735
739
|
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
736
740
|
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
737
741
|
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
@@ -1002,6 +1006,9 @@ type HmrOptions = boolean | {
|
|
|
1002
1006
|
port?: number;
|
|
1003
1007
|
implement?: string;
|
|
1004
1008
|
};
|
|
1009
|
+
type OptimizationOptions = {
|
|
1010
|
+
inlineConst?: boolean;
|
|
1011
|
+
};
|
|
1005
1012
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
1006
1013
|
interface RollupJsxOptions {
|
|
1007
1014
|
mode?: "classic" | "automatic" | "preserve";
|
|
@@ -1183,6 +1190,7 @@ interface InputOptions {
|
|
|
1183
1190
|
sessionId?: string;
|
|
1184
1191
|
};
|
|
1185
1192
|
preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
|
|
1193
|
+
optimization?: OptimizationOptions;
|
|
1186
1194
|
}
|
|
1187
1195
|
//#endregion
|
|
1188
1196
|
//#region src/types/rolldown-options.d.ts
|
|
@@ -1201,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
|
1201
1209
|
declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
1202
1210
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1203
1211
|
//#endregion
|
|
1204
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|
|
1212
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-cECB-Ts3.mjs";
|
|
2
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
3
|
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
@@ -731,7 +731,11 @@ declare class BuiltinPlugin {
|
|
|
731
731
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
732
732
|
}
|
|
733
733
|
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
734
|
-
|
|
734
|
+
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
735
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
736
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
737
|
+
};
|
|
738
|
+
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
735
739
|
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
736
740
|
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
737
741
|
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
@@ -1002,6 +1006,9 @@ type HmrOptions = boolean | {
|
|
|
1002
1006
|
port?: number;
|
|
1003
1007
|
implement?: string;
|
|
1004
1008
|
};
|
|
1009
|
+
type OptimizationOptions = {
|
|
1010
|
+
inlineConst?: boolean;
|
|
1011
|
+
};
|
|
1005
1012
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
1006
1013
|
interface RollupJsxOptions {
|
|
1007
1014
|
mode?: "classic" | "automatic" | "preserve";
|
|
@@ -1183,6 +1190,7 @@ interface InputOptions {
|
|
|
1183
1190
|
sessionId?: string;
|
|
1184
1191
|
};
|
|
1185
1192
|
preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
|
|
1193
|
+
optimization?: OptimizationOptions;
|
|
1186
1194
|
}
|
|
1187
1195
|
//#endregion
|
|
1188
1196
|
//#region src/types/rolldown-options.d.ts
|
|
@@ -1201,4 +1209,4 @@ declare function defineConfig(config: RolldownOptions): RolldownOptions;
|
|
|
1201
1209
|
declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
1202
1210
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1203
1211
|
//#endregion
|
|
1204
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|
|
1212
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DJtUlfyl.cjs');
|
|
3
3
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -326,7 +326,7 @@ if (!nativeBinding) {
|
|
|
326
326
|
if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
|
|
327
327
|
throw new Error(`Failed to load native binding`);
|
|
328
328
|
}
|
|
329
|
-
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind,
|
|
329
|
+
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
|
|
330
330
|
|
|
331
331
|
//#endregion
|
|
332
332
|
//#region src/utils/code-frame.ts
|
|
@@ -430,7 +430,7 @@ function locate(source, search, options) {
|
|
|
430
430
|
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region src/log/logs.ts
|
|
433
|
-
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", PARSE_ERROR = "PARSE_ERROR";
|
|
433
|
+
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", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
|
|
434
434
|
function logParseError(message) {
|
|
435
435
|
return {
|
|
436
436
|
code: PARSE_ERROR,
|
|
@@ -461,6 +461,12 @@ function logMultiplyNotifyOption() {
|
|
|
461
461
|
message: `Found multiply notify option at watch options, using first one to start notify watcher.`
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
+
function logDuplicateJsxConfig() {
|
|
465
|
+
return {
|
|
466
|
+
code: DUPLICATE_JSX_CONFIG,
|
|
467
|
+
message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
|
|
468
|
+
};
|
|
469
|
+
}
|
|
464
470
|
function logPluginError(error$1, plugin, { hook, id } = {}) {
|
|
465
471
|
try {
|
|
466
472
|
const code = error$1.code;
|
|
@@ -509,7 +515,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
509
515
|
}
|
|
510
516
|
|
|
511
517
|
//#endregion
|
|
512
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.75.
|
|
518
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
|
|
513
519
|
function wrap$1(result) {
|
|
514
520
|
let program, module$1, comments, errors;
|
|
515
521
|
return {
|
|
@@ -670,6 +676,12 @@ Object.defineProperty(exports, 'logCycleLoading', {
|
|
|
670
676
|
return logCycleLoading;
|
|
671
677
|
}
|
|
672
678
|
});
|
|
679
|
+
Object.defineProperty(exports, 'logDuplicateJsxConfig', {
|
|
680
|
+
enumerable: true,
|
|
681
|
+
get: function () {
|
|
682
|
+
return logDuplicateJsxConfig;
|
|
683
|
+
}
|
|
684
|
+
});
|
|
673
685
|
Object.defineProperty(exports, 'logInputHookInOutputPlugin', {
|
|
674
686
|
enumerable: true,
|
|
675
687
|
get: function () {
|
|
@@ -353,7 +353,7 @@ if (!nativeBinding) {
|
|
|
353
353
|
if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
|
|
354
354
|
throw new Error(`Failed to load native binding`);
|
|
355
355
|
}
|
|
356
|
-
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind,
|
|
356
|
+
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingError, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
|
|
357
357
|
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/utils/code-frame.ts
|
|
@@ -457,7 +457,7 @@ function locate(source, search, options) {
|
|
|
457
457
|
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/log/logs.ts
|
|
460
|
-
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", PARSE_ERROR = "PARSE_ERROR";
|
|
460
|
+
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", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG";
|
|
461
461
|
function logParseError(message) {
|
|
462
462
|
return {
|
|
463
463
|
code: PARSE_ERROR,
|
|
@@ -488,6 +488,12 @@ function logMultiplyNotifyOption() {
|
|
|
488
488
|
message: `Found multiply notify option at watch options, using first one to start notify watcher.`
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
+
function logDuplicateJsxConfig() {
|
|
492
|
+
return {
|
|
493
|
+
code: DUPLICATE_JSX_CONFIG,
|
|
494
|
+
message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
|
|
495
|
+
};
|
|
496
|
+
}
|
|
491
497
|
function logPluginError(error$1, plugin, { hook, id } = {}) {
|
|
492
498
|
try {
|
|
493
499
|
const code = error$1.code;
|
|
@@ -536,7 +542,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
536
542
|
}
|
|
537
543
|
|
|
538
544
|
//#endregion
|
|
539
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.75.
|
|
545
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.75.1/node_modules/oxc-parser/wrap.mjs
|
|
540
546
|
function wrap$1(result) {
|
|
541
547
|
let program, module$1, comments, errors;
|
|
542
548
|
return {
|
|
@@ -613,4 +619,4 @@ async function parseAstAsync(sourceText, options, filename) {
|
|
|
613
619
|
}
|
|
614
620
|
|
|
615
621
|
//#endregion
|
|
616
|
-
export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
|
|
622
|
+
export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, augmentCodeLocation, error, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, shutdownAsyncRuntime, startAsyncRuntime } from "./parse-ast-index-
|
|
1
|
+
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, shutdownAsyncRuntime, startAsyncRuntime } from "./parse-ast-index-D-D8UIRn.mjs";
|
|
2
2
|
import { arraify, noop, unimplemented, unreachable, unsupported } from "./misc-CQeo-AFx.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -8,9 +8,20 @@ import os from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.
|
|
11
|
+
var version = "1.0.0-beta.24";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/utils/normalize-string-or-regex.ts
|
|
16
|
+
function normalizedStringOrRegex(pattern) {
|
|
17
|
+
if (!pattern) return void 0;
|
|
18
|
+
if (!isReadonlyArray(pattern)) return [pattern];
|
|
19
|
+
return pattern;
|
|
20
|
+
}
|
|
21
|
+
function isReadonlyArray(input) {
|
|
22
|
+
return Array.isArray(input);
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
//#endregion
|
|
15
26
|
//#region src/builtin-plugin/utils.ts
|
|
16
27
|
function makeBuiltinPluginCallable(plugin) {
|
|
@@ -40,6 +51,10 @@ function modulePreloadPolyfillPlugin(config) {
|
|
|
40
51
|
return new BuiltinPlugin("builtin:module-preload-polyfill", config);
|
|
41
52
|
}
|
|
42
53
|
function dynamicImportVarsPlugin(config) {
|
|
54
|
+
if (config) {
|
|
55
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
56
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
57
|
+
}
|
|
43
58
|
return new BuiltinPlugin("builtin:dynamic-import-vars", config);
|
|
44
59
|
}
|
|
45
60
|
function importGlobPlugin(config) {
|
|
@@ -1991,6 +2006,7 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
1991
2006
|
unknownGlobalSideEffects: optional(boolean()),
|
|
1992
2007
|
commonjs: optional(boolean())
|
|
1993
2008
|
})]);
|
|
2009
|
+
const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
|
|
1994
2010
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
1995
2011
|
LogLevelSchema,
|
|
1996
2012
|
RollupLogSchema,
|
|
@@ -2016,6 +2032,7 @@ const InputOptionsSchema = strictObject({
|
|
|
2016
2032
|
])), description(`Platform for which the code should be generated (node, ${colors.underline("browser")}, neutral)`)),
|
|
2017
2033
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2018
2034
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2035
|
+
optimization: optional(OptimizationOptionsSchema),
|
|
2019
2036
|
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${colors.dim("silent")}, ${colors.underline(colors.gray("info"))}, debug, ${colors.yellow("warn")})`)),
|
|
2020
2037
|
onLog: optional(OnLogSchema),
|
|
2021
2038
|
onwarn: optional(OnwarnSchema),
|
|
@@ -3796,17 +3813,6 @@ var PluginContextData = class {
|
|
|
3796
3813
|
}
|
|
3797
3814
|
};
|
|
3798
3815
|
|
|
3799
|
-
//#endregion
|
|
3800
|
-
//#region src/utils/normalize-string-or-regex.ts
|
|
3801
|
-
function normalizedStringOrRegex(pattern) {
|
|
3802
|
-
if (!pattern) return void 0;
|
|
3803
|
-
if (!isReadonlyArray(pattern)) return [pattern];
|
|
3804
|
-
return pattern;
|
|
3805
|
-
}
|
|
3806
|
-
function isReadonlyArray(input) {
|
|
3807
|
-
return Array.isArray(input);
|
|
3808
|
-
}
|
|
3809
|
-
|
|
3810
3816
|
//#endregion
|
|
3811
3817
|
//#region src/utils/bindingify-input-options.ts
|
|
3812
3818
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
@@ -3816,8 +3822,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3816
3822
|
if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
|
|
3817
3823
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
|
|
3818
3824
|
});
|
|
3819
|
-
const { jsx,
|
|
3820
|
-
const transform = inputOptions.transform || jsxTransform;
|
|
3825
|
+
const { jsx, transform } = bindingifyJsx(onLog, inputOptions.jsx, inputOptions.transform);
|
|
3821
3826
|
return {
|
|
3822
3827
|
input: bindingifyInput(inputOptions.input),
|
|
3823
3828
|
plugins,
|
|
@@ -3861,7 +3866,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3861
3866
|
debug: inputOptions.debug,
|
|
3862
3867
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
3863
3868
|
markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
|
|
3864
|
-
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures)
|
|
3869
|
+
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
3870
|
+
optimization: inputOptions.optimization
|
|
3865
3871
|
};
|
|
3866
3872
|
}
|
|
3867
3873
|
function bindingifyHmr(hmr) {
|
|
@@ -3951,24 +3957,45 @@ function bindingifyInput(input) {
|
|
|
3951
3957
|
};
|
|
3952
3958
|
});
|
|
3953
3959
|
}
|
|
3954
|
-
function bindingifyJsx(input) {
|
|
3960
|
+
function bindingifyJsx(onLog, input, transform) {
|
|
3961
|
+
if (transform?.jsx) {
|
|
3962
|
+
if (input !== void 0) onLog(LOG_LEVEL_WARN, logDuplicateJsxConfig());
|
|
3963
|
+
return { transform };
|
|
3964
|
+
}
|
|
3955
3965
|
if (typeof input === "object") {
|
|
3956
|
-
if (input.mode === "preserve") return {
|
|
3966
|
+
if (input.mode === "preserve") return {
|
|
3967
|
+
jsx: BindingJsx.Preserve,
|
|
3968
|
+
transform
|
|
3969
|
+
};
|
|
3957
3970
|
const mode = input.mode ?? "automatic";
|
|
3958
|
-
|
|
3971
|
+
transform ??= {};
|
|
3972
|
+
transform.jsx = {
|
|
3959
3973
|
runtime: mode,
|
|
3960
3974
|
pragma: input.factory,
|
|
3961
3975
|
pragmaFrag: input.fragment,
|
|
3962
3976
|
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
|
|
3963
|
-
}
|
|
3977
|
+
};
|
|
3978
|
+
return { transform };
|
|
3964
3979
|
}
|
|
3980
|
+
let jsx;
|
|
3965
3981
|
switch (input) {
|
|
3966
|
-
case false:
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
case "
|
|
3970
|
-
|
|
3982
|
+
case false:
|
|
3983
|
+
jsx = BindingJsx.Disable;
|
|
3984
|
+
break;
|
|
3985
|
+
case "react":
|
|
3986
|
+
jsx = BindingJsx.React;
|
|
3987
|
+
break;
|
|
3988
|
+
case "react-jsx":
|
|
3989
|
+
jsx = BindingJsx.ReactJsx;
|
|
3990
|
+
break;
|
|
3991
|
+
case "preserve":
|
|
3992
|
+
jsx = BindingJsx.Preserve;
|
|
3993
|
+
break;
|
|
3971
3994
|
}
|
|
3995
|
+
return {
|
|
3996
|
+
jsx,
|
|
3997
|
+
transform
|
|
3998
|
+
};
|
|
3972
3999
|
}
|
|
3973
4000
|
function bindingifyWatch(watch$1) {
|
|
3974
4001
|
if (watch$1) return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
2
|
+
const require_parse_ast_index = require('./parse-ast-index-BzYd1T7N.cjs');
|
|
3
3
|
const require_misc = require('./misc-DksvspN4.cjs');
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -9,9 +9,20 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.24";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/utils/normalize-string-or-regex.ts
|
|
17
|
+
function normalizedStringOrRegex(pattern) {
|
|
18
|
+
if (!pattern) return void 0;
|
|
19
|
+
if (!isReadonlyArray(pattern)) return [pattern];
|
|
20
|
+
return pattern;
|
|
21
|
+
}
|
|
22
|
+
function isReadonlyArray(input) {
|
|
23
|
+
return Array.isArray(input);
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
//#endregion
|
|
16
27
|
//#region src/builtin-plugin/utils.ts
|
|
17
28
|
function makeBuiltinPluginCallable(plugin) {
|
|
@@ -41,6 +52,10 @@ function modulePreloadPolyfillPlugin(config) {
|
|
|
41
52
|
return new BuiltinPlugin("builtin:module-preload-polyfill", config);
|
|
42
53
|
}
|
|
43
54
|
function dynamicImportVarsPlugin(config) {
|
|
55
|
+
if (config) {
|
|
56
|
+
config.include = normalizedStringOrRegex(config.include);
|
|
57
|
+
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
58
|
+
}
|
|
44
59
|
return new BuiltinPlugin("builtin:dynamic-import-vars", config);
|
|
45
60
|
}
|
|
46
61
|
function importGlobPlugin(config) {
|
|
@@ -1992,6 +2007,7 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
1992
2007
|
unknownGlobalSideEffects: optional(boolean()),
|
|
1993
2008
|
commonjs: optional(boolean())
|
|
1994
2009
|
})]);
|
|
2010
|
+
const OptimizationOptionsSchema = strictObject({ inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")) });
|
|
1995
2011
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
1996
2012
|
LogLevelSchema,
|
|
1997
2013
|
RollupLogSchema,
|
|
@@ -2017,6 +2033,7 @@ const InputOptionsSchema = strictObject({
|
|
|
2017
2033
|
])), description(`Platform for which the code should be generated (node, ${ansis.default.underline("browser")}, neutral)`)),
|
|
2018
2034
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2019
2035
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2036
|
+
optimization: optional(OptimizationOptionsSchema),
|
|
2020
2037
|
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${ansis.default.dim("silent")}, ${ansis.default.underline(ansis.default.gray("info"))}, debug, ${ansis.default.yellow("warn")})`)),
|
|
2021
2038
|
onLog: optional(OnLogSchema),
|
|
2022
2039
|
onwarn: optional(OnwarnSchema),
|
|
@@ -3797,17 +3814,6 @@ var PluginContextData = class {
|
|
|
3797
3814
|
}
|
|
3798
3815
|
};
|
|
3799
3816
|
|
|
3800
|
-
//#endregion
|
|
3801
|
-
//#region src/utils/normalize-string-or-regex.ts
|
|
3802
|
-
function normalizedStringOrRegex(pattern) {
|
|
3803
|
-
if (!pattern) return void 0;
|
|
3804
|
-
if (!isReadonlyArray(pattern)) return [pattern];
|
|
3805
|
-
return pattern;
|
|
3806
|
-
}
|
|
3807
|
-
function isReadonlyArray(input) {
|
|
3808
|
-
return Array.isArray(input);
|
|
3809
|
-
}
|
|
3810
|
-
|
|
3811
3817
|
//#endregion
|
|
3812
3818
|
//#region src/utils/bindingify-input-options.ts
|
|
3813
3819
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
@@ -3817,8 +3823,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3817
3823
|
if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
|
|
3818
3824
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
|
|
3819
3825
|
});
|
|
3820
|
-
const { jsx,
|
|
3821
|
-
const transform = inputOptions.transform || jsxTransform;
|
|
3826
|
+
const { jsx, transform } = bindingifyJsx(onLog, inputOptions.jsx, inputOptions.transform);
|
|
3822
3827
|
return {
|
|
3823
3828
|
input: bindingifyInput(inputOptions.input),
|
|
3824
3829
|
plugins,
|
|
@@ -3862,7 +3867,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3862
3867
|
debug: inputOptions.debug,
|
|
3863
3868
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
3864
3869
|
markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
|
|
3865
|
-
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures)
|
|
3870
|
+
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
3871
|
+
optimization: inputOptions.optimization
|
|
3866
3872
|
};
|
|
3867
3873
|
}
|
|
3868
3874
|
function bindingifyHmr(hmr) {
|
|
@@ -3952,24 +3958,45 @@ function bindingifyInput(input) {
|
|
|
3952
3958
|
};
|
|
3953
3959
|
});
|
|
3954
3960
|
}
|
|
3955
|
-
function bindingifyJsx(input) {
|
|
3961
|
+
function bindingifyJsx(onLog, input, transform) {
|
|
3962
|
+
if (transform?.jsx) {
|
|
3963
|
+
if (input !== void 0) onLog(LOG_LEVEL_WARN, require_parse_ast_index.logDuplicateJsxConfig());
|
|
3964
|
+
return { transform };
|
|
3965
|
+
}
|
|
3956
3966
|
if (typeof input === "object") {
|
|
3957
|
-
if (input.mode === "preserve") return {
|
|
3967
|
+
if (input.mode === "preserve") return {
|
|
3968
|
+
jsx: require_parse_ast_index.BindingJsx.Preserve,
|
|
3969
|
+
transform
|
|
3970
|
+
};
|
|
3958
3971
|
const mode = input.mode ?? "automatic";
|
|
3959
|
-
|
|
3972
|
+
transform ??= {};
|
|
3973
|
+
transform.jsx = {
|
|
3960
3974
|
runtime: mode,
|
|
3961
3975
|
pragma: input.factory,
|
|
3962
3976
|
pragmaFrag: input.fragment,
|
|
3963
3977
|
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
|
|
3964
|
-
}
|
|
3978
|
+
};
|
|
3979
|
+
return { transform };
|
|
3965
3980
|
}
|
|
3981
|
+
let jsx;
|
|
3966
3982
|
switch (input) {
|
|
3967
|
-
case false:
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
case "
|
|
3971
|
-
|
|
3983
|
+
case false:
|
|
3984
|
+
jsx = require_parse_ast_index.BindingJsx.Disable;
|
|
3985
|
+
break;
|
|
3986
|
+
case "react":
|
|
3987
|
+
jsx = require_parse_ast_index.BindingJsx.React;
|
|
3988
|
+
break;
|
|
3989
|
+
case "react-jsx":
|
|
3990
|
+
jsx = require_parse_ast_index.BindingJsx.ReactJsx;
|
|
3991
|
+
break;
|
|
3992
|
+
case "preserve":
|
|
3993
|
+
jsx = require_parse_ast_index.BindingJsx.Preserve;
|
|
3994
|
+
break;
|
|
3972
3995
|
}
|
|
3996
|
+
return {
|
|
3997
|
+
jsx,
|
|
3998
|
+
transform
|
|
3999
|
+
};
|
|
3973
4000
|
}
|
|
3974
4001
|
function bindingifyWatch(watch$1) {
|
|
3975
4002
|
if (watch$1) return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.24",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@oxc-project/runtime": "=0.75.
|
|
94
|
-
"@oxc-project/types": "=0.75.
|
|
93
|
+
"@oxc-project/runtime": "=0.75.1",
|
|
94
|
+
"@oxc-project/types": "=0.75.1",
|
|
95
95
|
"ansis": "^4.0.0",
|
|
96
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
96
|
+
"@rolldown/pluginutils": "1.0.0-beta.24"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@napi-rs/cli": "3.0.0-alpha.91",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"emnapi": "^1.2.0",
|
|
107
107
|
"execa": "^9.2.0",
|
|
108
108
|
"glob": "^11.0.0",
|
|
109
|
-
"oxc-parser": "=0.75.
|
|
109
|
+
"oxc-parser": "=0.75.1",
|
|
110
110
|
"pathe": "^2.0.3",
|
|
111
111
|
"remeda": "^2.10.0",
|
|
112
112
|
"rolldown-plugin-dts": "^0.13.6",
|
|
@@ -118,21 +118,21 @@
|
|
|
118
118
|
"typescript": "^5.7.3",
|
|
119
119
|
"valibot": "1.1.0",
|
|
120
120
|
"@rolldown/testing": "0.0.1",
|
|
121
|
-
"rolldown": "1.0.0-beta.
|
|
121
|
+
"rolldown": "1.0.0-beta.24"
|
|
122
122
|
},
|
|
123
123
|
"optionalDependencies": {
|
|
124
|
-
"@rolldown/binding-darwin-
|
|
125
|
-
"@rolldown/binding-freebsd-x64": "1.0.0-beta.
|
|
126
|
-
"@rolldown/binding-darwin-
|
|
127
|
-
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.
|
|
128
|
-
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.
|
|
129
|
-
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.
|
|
130
|
-
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.
|
|
131
|
-
"@rolldown/binding-
|
|
132
|
-
"@rolldown/binding-
|
|
133
|
-
"@rolldown/binding-
|
|
134
|
-
"@rolldown/binding-
|
|
135
|
-
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.
|
|
124
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.24",
|
|
125
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.24",
|
|
126
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.24",
|
|
127
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.24",
|
|
128
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.24",
|
|
129
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.24",
|
|
130
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.24",
|
|
131
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.24",
|
|
132
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.24",
|
|
133
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.24",
|
|
134
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.24",
|
|
135
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.24"
|
|
136
136
|
},
|
|
137
137
|
"scripts": {
|
|
138
138
|
"# Scrips for binding #": "_",
|