rolldown 1.0.0-beta.20 → 1.0.0-beta.22
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 +3 -3
- package/dist/cli.mjs +3 -3
- 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/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 +2 -2
- package/dist/index.d.mts +2 -2
- 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-5O9lFYtz.d.mts → binding-B8kHDLfO.d.mts} +46 -1
- package/dist/shared/{binding-BvKFOCZr.d.cts → binding-CbR_BHh9.d.cts} +46 -1
- package/dist/shared/{define-config-BOD4oRSZ.d.cts → define-config-Czc3unFy.d.mts} +32 -22
- package/dist/shared/{define-config-DdVYel_V.d.mts → define-config-DZVEpUTF.d.cts} +32 -22
- package/dist/shared/{load-config-BdY850xq.cjs → load-config-DPnW1OC0.cjs} +1 -1
- package/dist/shared/{load-config-B_hPIyxu.mjs → load-config-gtAGhZYG.mjs} +1 -1
- package/dist/shared/{parse-ast-index-CVVmsBjK.cjs → parse-ast-index-DDMiEgyY.cjs} +1 -1
- package/dist/shared/{parse-ast-index-DW8kbzjr.mjs → parse-ast-index-DmWy-n6o.mjs} +1 -1
- package/dist/shared/{src-CZ0tgOug.cjs → src-9_Ra3A9D.cjs} +50 -10
- package/dist/shared/{src-DHXNdTPA.mjs → src-CJvC869N.mjs} +50 -10
- package/package.json +18 -16
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-9_Ra3A9D.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-DDMiEgyY.cjs');
|
|
4
4
|
const require_misc = require('./shared/misc-BKp5iIef.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
5
|
+
const require_load_config = require('./shared/load-config-DPnW1OC0.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"));
|
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-DmWy-n6o.mjs";
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-CJvC869N.mjs";
|
|
3
3
|
import { arraify } from "./shared/misc-BN0nse6C.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-gtAGhZYG.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import colors from "ansis";
|
|
7
7
|
import process$1 from "node:process";
|
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-9_Ra3A9D.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-DDMiEgyY.cjs');
|
|
3
3
|
require('./shared/misc-BKp5iIef.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-DPnW1OC0.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-CbR_BHh9.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DZVEpUTF.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-B8kHDLfO.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-Czc3unFy.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-DmWy-n6o.mjs";
|
|
2
|
+
import { defineConfig, version } from "./shared/src-CJvC869N.mjs";
|
|
3
3
|
import "./shared/misc-BN0nse6C.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-gtAGhZYG.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-9_Ra3A9D.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-DDMiEgyY.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.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, RolldownPlugin, 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-CbR_BHh9.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DZVEpUTF.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, RolldownPlugin, 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-B8kHDLfO.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-Czc3unFy.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, composeJsPlugins, 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-DmWy-n6o.mjs";
|
|
2
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CJvC869N.mjs";
|
|
3
3
|
import "./shared/misc-BN0nse6C.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
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-CbR_BHh9.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DZVEpUTF.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-B8kHDLfO.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-Czc3unFy.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-9_Ra3A9D.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-DDMiEgyY.cjs');
|
|
3
3
|
require('./shared/misc-BKp5iIef.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, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-CbR_BHh9.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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-DZVEpUTF.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-B8kHDLfO.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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-Czc3unFy.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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 };
|
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-DmWy-n6o.mjs";
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-CJvC869N.mjs";
|
|
3
3
|
import "./shared/misc-BN0nse6C.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-9_Ra3A9D.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-DDMiEgyY.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.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-DmWy-n6o.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-CJvC869N.mjs";
|
|
3
3
|
import "./shared/misc-BN0nse6C.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-CbR_BHh9.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DZVEpUTF.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-B8kHDLfO.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-Czc3unFy.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-DDMiEgyY.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
|
@@ -260,6 +260,22 @@ declare class ResolverFactory {
|
|
|
260
260
|
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
261
261
|
async(directory: string, request: string): Promise<ResolveResult>;
|
|
262
262
|
}
|
|
263
|
+
|
|
264
|
+
/** Node.js builtin module when `Options::builtin_modules` is enabled. */
|
|
265
|
+
interface Builtin {
|
|
266
|
+
/**
|
|
267
|
+
* Resolved module.
|
|
268
|
+
*
|
|
269
|
+
* Always prefixed with "node:" in compliance with the ESM specification.
|
|
270
|
+
*/
|
|
271
|
+
resolved: string;
|
|
272
|
+
/**
|
|
273
|
+
* Whether the request was prefixed with `node:` or not.
|
|
274
|
+
* `fs` -> `false`.
|
|
275
|
+
* `node:fs` returns `true`.
|
|
276
|
+
*/
|
|
277
|
+
isRuntimeModule: boolean;
|
|
278
|
+
}
|
|
263
279
|
declare enum EnforceExtension {
|
|
264
280
|
Auto = 0,
|
|
265
281
|
Enabled = 1,
|
|
@@ -281,6 +297,8 @@ interface NapiResolveOptions {
|
|
|
281
297
|
* Default `None`
|
|
282
298
|
*/
|
|
283
299
|
tsconfig?: TsconfigOptions;
|
|
300
|
+
/** Enable Yarn Plug'n'Play */
|
|
301
|
+
yarnPnp?: boolean;
|
|
284
302
|
/**
|
|
285
303
|
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
286
304
|
*
|
|
@@ -431,10 +449,22 @@ interface NapiResolveOptions {
|
|
|
431
449
|
* Default `false`
|
|
432
450
|
*/
|
|
433
451
|
moduleType?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Allow `exports` field in `require('../directory')`.
|
|
454
|
+
*
|
|
455
|
+
* This is not part of the spec but some vite projects rely on this behavior.
|
|
456
|
+
* See
|
|
457
|
+
* * <https://github.com/vitejs/vite/pull/20252>
|
|
458
|
+
* * <https://github.com/nodejs/node/issues/58827>
|
|
459
|
+
*
|
|
460
|
+
* Default: `false`
|
|
461
|
+
*/
|
|
462
|
+
allowPackageExportsInDirectoryResolve?: boolean;
|
|
434
463
|
}
|
|
435
464
|
interface ResolveResult {
|
|
436
465
|
path?: string;
|
|
437
466
|
error?: string;
|
|
467
|
+
builtin?: Builtin;
|
|
438
468
|
/**
|
|
439
469
|
* Module type for this path.
|
|
440
470
|
*
|
|
@@ -975,6 +1005,9 @@ declare class BindingBundlerImpl {
|
|
|
975
1005
|
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
976
1006
|
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
977
1007
|
}
|
|
1008
|
+
declare class BindingChunkingContext {
|
|
1009
|
+
getModuleInfo(moduleId: string): BindingModuleInfo | null;
|
|
1010
|
+
}
|
|
978
1011
|
declare class BindingError {
|
|
979
1012
|
kind: string;
|
|
980
1013
|
message: string;
|
|
@@ -983,6 +1016,16 @@ declare class BindingHmrOutput {
|
|
|
983
1016
|
get patch(): BindingHmrOutputPatch | null;
|
|
984
1017
|
get errors(): Array<Error | BindingError>;
|
|
985
1018
|
}
|
|
1019
|
+
declare class BindingModuleInfo {
|
|
1020
|
+
id: string;
|
|
1021
|
+
importers: Array<string>;
|
|
1022
|
+
dynamicImporters: Array<string>;
|
|
1023
|
+
importedIds: Array<string>;
|
|
1024
|
+
dynamicallyImportedIds: Array<string>;
|
|
1025
|
+
exports: Array<string>;
|
|
1026
|
+
isEntry: boolean;
|
|
1027
|
+
get code(): string | null;
|
|
1028
|
+
}
|
|
986
1029
|
declare class BindingOutputAsset {
|
|
987
1030
|
get fileName(): string;
|
|
988
1031
|
get originalFileName(): string | null;
|
|
@@ -1186,6 +1229,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1186
1229
|
dedupe: Array<string>;
|
|
1187
1230
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1188
1231
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1232
|
+
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
1189
1233
|
}
|
|
1190
1234
|
interface BindingViteResolvePluginResolveOptions {
|
|
1191
1235
|
isBuild: boolean;
|
|
@@ -1202,6 +1246,7 @@ interface BindingViteResolvePluginResolveOptions {
|
|
|
1202
1246
|
tryIndex: boolean;
|
|
1203
1247
|
tryPrefix?: string;
|
|
1204
1248
|
preserveSymlinks: boolean;
|
|
1249
|
+
tsconfigPaths: boolean;
|
|
1205
1250
|
}
|
|
1206
1251
|
interface PreRenderedChunk {
|
|
1207
1252
|
name: string;
|
|
@@ -1212,4 +1257,4 @@ interface PreRenderedChunk {
|
|
|
1212
1257
|
exports: Array<string>;
|
|
1213
1258
|
}
|
|
1214
1259
|
//#endregion
|
|
1215
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1260
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -260,6 +260,22 @@ declare class ResolverFactory {
|
|
|
260
260
|
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
261
261
|
async(directory: string, request: string): Promise<ResolveResult>;
|
|
262
262
|
}
|
|
263
|
+
|
|
264
|
+
/** Node.js builtin module when `Options::builtin_modules` is enabled. */
|
|
265
|
+
interface Builtin {
|
|
266
|
+
/**
|
|
267
|
+
* Resolved module.
|
|
268
|
+
*
|
|
269
|
+
* Always prefixed with "node:" in compliance with the ESM specification.
|
|
270
|
+
*/
|
|
271
|
+
resolved: string;
|
|
272
|
+
/**
|
|
273
|
+
* Whether the request was prefixed with `node:` or not.
|
|
274
|
+
* `fs` -> `false`.
|
|
275
|
+
* `node:fs` returns `true`.
|
|
276
|
+
*/
|
|
277
|
+
isRuntimeModule: boolean;
|
|
278
|
+
}
|
|
263
279
|
declare enum EnforceExtension {
|
|
264
280
|
Auto = 0,
|
|
265
281
|
Enabled = 1,
|
|
@@ -281,6 +297,8 @@ interface NapiResolveOptions {
|
|
|
281
297
|
* Default `None`
|
|
282
298
|
*/
|
|
283
299
|
tsconfig?: TsconfigOptions;
|
|
300
|
+
/** Enable Yarn Plug'n'Play */
|
|
301
|
+
yarnPnp?: boolean;
|
|
284
302
|
/**
|
|
285
303
|
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
286
304
|
*
|
|
@@ -431,10 +449,22 @@ interface NapiResolveOptions {
|
|
|
431
449
|
* Default `false`
|
|
432
450
|
*/
|
|
433
451
|
moduleType?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Allow `exports` field in `require('../directory')`.
|
|
454
|
+
*
|
|
455
|
+
* This is not part of the spec but some vite projects rely on this behavior.
|
|
456
|
+
* See
|
|
457
|
+
* * <https://github.com/vitejs/vite/pull/20252>
|
|
458
|
+
* * <https://github.com/nodejs/node/issues/58827>
|
|
459
|
+
*
|
|
460
|
+
* Default: `false`
|
|
461
|
+
*/
|
|
462
|
+
allowPackageExportsInDirectoryResolve?: boolean;
|
|
434
463
|
}
|
|
435
464
|
interface ResolveResult {
|
|
436
465
|
path?: string;
|
|
437
466
|
error?: string;
|
|
467
|
+
builtin?: Builtin;
|
|
438
468
|
/**
|
|
439
469
|
* Module type for this path.
|
|
440
470
|
*
|
|
@@ -975,6 +1005,9 @@ declare class BindingBundlerImpl {
|
|
|
975
1005
|
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
976
1006
|
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
977
1007
|
}
|
|
1008
|
+
declare class BindingChunkingContext {
|
|
1009
|
+
getModuleInfo(moduleId: string): BindingModuleInfo | null;
|
|
1010
|
+
}
|
|
978
1011
|
declare class BindingError {
|
|
979
1012
|
kind: string;
|
|
980
1013
|
message: string;
|
|
@@ -983,6 +1016,16 @@ declare class BindingHmrOutput {
|
|
|
983
1016
|
get patch(): BindingHmrOutputPatch | null;
|
|
984
1017
|
get errors(): Array<Error | BindingError>;
|
|
985
1018
|
}
|
|
1019
|
+
declare class BindingModuleInfo {
|
|
1020
|
+
id: string;
|
|
1021
|
+
importers: Array<string>;
|
|
1022
|
+
dynamicImporters: Array<string>;
|
|
1023
|
+
importedIds: Array<string>;
|
|
1024
|
+
dynamicallyImportedIds: Array<string>;
|
|
1025
|
+
exports: Array<string>;
|
|
1026
|
+
isEntry: boolean;
|
|
1027
|
+
get code(): string | null;
|
|
1028
|
+
}
|
|
986
1029
|
declare class BindingOutputAsset {
|
|
987
1030
|
get fileName(): string;
|
|
988
1031
|
get originalFileName(): string | null;
|
|
@@ -1186,6 +1229,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1186
1229
|
dedupe: Array<string>;
|
|
1187
1230
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1188
1231
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1232
|
+
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
1189
1233
|
}
|
|
1190
1234
|
interface BindingViteResolvePluginResolveOptions {
|
|
1191
1235
|
isBuild: boolean;
|
|
@@ -1202,6 +1246,7 @@ interface BindingViteResolvePluginResolveOptions {
|
|
|
1202
1246
|
tryIndex: boolean;
|
|
1203
1247
|
tryPrefix?: string;
|
|
1204
1248
|
preserveSymlinks: boolean;
|
|
1249
|
+
tsconfigPaths: boolean;
|
|
1205
1250
|
}
|
|
1206
1251
|
interface PreRenderedChunk {
|
|
1207
1252
|
name: string;
|
|
@@ -1212,4 +1257,4 @@ interface PreRenderedChunk {
|
|
|
1212
1257
|
exports: Array<string>;
|
|
1213
1258
|
}
|
|
1214
1259
|
//#endregion
|
|
1215
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1260
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
2
|
-
import { Program } from "@oxc-project/types";
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-B8kHDLfO.mjs";
|
|
3
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
|
+
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.d.ts
|
|
6
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -38,6 +38,29 @@ interface RollupError extends RollupLog {
|
|
|
38
38
|
}
|
|
39
39
|
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
40
40
|
//#endregion
|
|
41
|
+
//#region src/types/module-info.d.ts
|
|
42
|
+
interface ModuleInfo extends ModuleOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Unsupported at rolldown
|
|
45
|
+
*/
|
|
46
|
+
ast: any;
|
|
47
|
+
code: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
importers: string[];
|
|
50
|
+
dynamicImporters: string[];
|
|
51
|
+
importedIds: string[];
|
|
52
|
+
dynamicallyImportedIds: string[];
|
|
53
|
+
exports: string[];
|
|
54
|
+
isEntry: boolean;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/types/chunking-context.d.ts
|
|
58
|
+
declare class ChunkingContext {
|
|
59
|
+
private context;
|
|
60
|
+
constructor(context: BindingChunkingContext);
|
|
61
|
+
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
41
64
|
//#region src/types/misc.d.ts
|
|
42
65
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
43
66
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -170,7 +193,7 @@ interface OutputOptions {
|
|
|
170
193
|
externalLiveBindings?: boolean;
|
|
171
194
|
inlineDynamicImports?: boolean;
|
|
172
195
|
/**
|
|
173
|
-
* - Type: `((moduleId: string) => string | NullValue)`
|
|
196
|
+
* - Type: `((moduleId: string, meta: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
174
197
|
* - Object form is not supported.
|
|
175
198
|
*
|
|
176
199
|
* :::warning
|
|
@@ -213,7 +236,9 @@ interface OutputOptions {
|
|
|
213
236
|
*
|
|
214
237
|
* @deprecated Please use `advancedChunks` instead.
|
|
215
238
|
*/
|
|
216
|
-
manualChunks?: (moduleId: string, meta: {
|
|
239
|
+
manualChunks?: (moduleId: string, meta: {
|
|
240
|
+
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
241
|
+
}) => string | NullValue;
|
|
217
242
|
/**
|
|
218
243
|
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
|
|
219
244
|
*/
|
|
@@ -253,7 +278,7 @@ interface OutputOptions {
|
|
|
253
278
|
*/
|
|
254
279
|
groups?: {
|
|
255
280
|
/**
|
|
256
|
-
* - Type: `string | ((moduleId: string) => string | NullValue)`
|
|
281
|
+
* - Type: `string | ((moduleId: string, ctx: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
257
282
|
*
|
|
258
283
|
* Name of the group. It will be also used as the name of the chunk and replaced the `[name]` placeholder in the `chunkFileNames` option.
|
|
259
284
|
*
|
|
@@ -304,7 +329,7 @@ interface OutputOptions {
|
|
|
304
329
|
* Constraints like `minSize`, `maxSize`, etc. are applied separately for different names returned by the function.
|
|
305
330
|
* :::
|
|
306
331
|
*/
|
|
307
|
-
name: string | ((moduleId: string) => string | NullValue);
|
|
332
|
+
name: string | ((moduleId: string, ctx: ChunkingContext) => string | NullValue);
|
|
308
333
|
/**
|
|
309
334
|
* - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
|
|
310
335
|
*
|
|
@@ -618,22 +643,6 @@ type ParallelPlugin = {
|
|
|
618
643
|
type DefineParallelPluginResult<Options> = (options: Options) => ParallelPlugin;
|
|
619
644
|
declare function defineParallelPlugin<Options>(pluginPath: string): DefineParallelPluginResult<Options>;
|
|
620
645
|
//#endregion
|
|
621
|
-
//#region src/types/module-info.d.ts
|
|
622
|
-
interface ModuleInfo extends ModuleOptions {
|
|
623
|
-
/**
|
|
624
|
-
* Unsupported at rolldown
|
|
625
|
-
*/
|
|
626
|
-
ast: any;
|
|
627
|
-
code: string | null;
|
|
628
|
-
id: string;
|
|
629
|
-
importers: string[];
|
|
630
|
-
dynamicImporters: string[];
|
|
631
|
-
importedIds: string[];
|
|
632
|
-
dynamicallyImportedIds: string[];
|
|
633
|
-
exports: string[];
|
|
634
|
-
isEntry: boolean;
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
646
|
//#region src/plugin/plugin-context.d.ts
|
|
638
647
|
interface EmittedAsset {
|
|
639
648
|
type: "asset";
|
|
@@ -694,6 +703,7 @@ type TreeshakingOptions = {
|
|
|
694
703
|
annotations?: boolean;
|
|
695
704
|
manualPureFunctions?: string[];
|
|
696
705
|
unknownGlobalSideEffects?: boolean;
|
|
706
|
+
commonjs?: boolean;
|
|
697
707
|
} | boolean;
|
|
698
708
|
//#endregion
|
|
699
709
|
//#region src/types/output-bundle.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
2
|
-
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingChunkingContext, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CbR_BHh9.cjs";
|
|
3
2
|
import { Program } from "@oxc-project/types";
|
|
3
|
+
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.d.ts
|
|
6
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -38,6 +38,29 @@ interface RollupError extends RollupLog {
|
|
|
38
38
|
}
|
|
39
39
|
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
40
40
|
//#endregion
|
|
41
|
+
//#region src/types/module-info.d.ts
|
|
42
|
+
interface ModuleInfo extends ModuleOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Unsupported at rolldown
|
|
45
|
+
*/
|
|
46
|
+
ast: any;
|
|
47
|
+
code: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
importers: string[];
|
|
50
|
+
dynamicImporters: string[];
|
|
51
|
+
importedIds: string[];
|
|
52
|
+
dynamicallyImportedIds: string[];
|
|
53
|
+
exports: string[];
|
|
54
|
+
isEntry: boolean;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/types/chunking-context.d.ts
|
|
58
|
+
declare class ChunkingContext {
|
|
59
|
+
private context;
|
|
60
|
+
constructor(context: BindingChunkingContext);
|
|
61
|
+
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
41
64
|
//#region src/types/misc.d.ts
|
|
42
65
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
43
66
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -170,7 +193,7 @@ interface OutputOptions {
|
|
|
170
193
|
externalLiveBindings?: boolean;
|
|
171
194
|
inlineDynamicImports?: boolean;
|
|
172
195
|
/**
|
|
173
|
-
* - Type: `((moduleId: string) => string | NullValue)`
|
|
196
|
+
* - Type: `((moduleId: string, meta: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
174
197
|
* - Object form is not supported.
|
|
175
198
|
*
|
|
176
199
|
* :::warning
|
|
@@ -213,7 +236,9 @@ interface OutputOptions {
|
|
|
213
236
|
*
|
|
214
237
|
* @deprecated Please use `advancedChunks` instead.
|
|
215
238
|
*/
|
|
216
|
-
manualChunks?: (moduleId: string, meta: {
|
|
239
|
+
manualChunks?: (moduleId: string, meta: {
|
|
240
|
+
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
241
|
+
}) => string | NullValue;
|
|
217
242
|
/**
|
|
218
243
|
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
|
|
219
244
|
*/
|
|
@@ -253,7 +278,7 @@ interface OutputOptions {
|
|
|
253
278
|
*/
|
|
254
279
|
groups?: {
|
|
255
280
|
/**
|
|
256
|
-
* - Type: `string | ((moduleId: string) => string | NullValue)`
|
|
281
|
+
* - Type: `string | ((moduleId: string, ctx: { getModuleInfo: (moduleId: string) => ModuleInfo | null }) => string | NullValue)`
|
|
257
282
|
*
|
|
258
283
|
* Name of the group. It will be also used as the name of the chunk and replaced the `[name]` placeholder in the `chunkFileNames` option.
|
|
259
284
|
*
|
|
@@ -304,7 +329,7 @@ interface OutputOptions {
|
|
|
304
329
|
* Constraints like `minSize`, `maxSize`, etc. are applied separately for different names returned by the function.
|
|
305
330
|
* :::
|
|
306
331
|
*/
|
|
307
|
-
name: string | ((moduleId: string) => string | NullValue);
|
|
332
|
+
name: string | ((moduleId: string, ctx: ChunkingContext) => string | NullValue);
|
|
308
333
|
/**
|
|
309
334
|
* - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
|
|
310
335
|
*
|
|
@@ -618,22 +643,6 @@ type ParallelPlugin = {
|
|
|
618
643
|
type DefineParallelPluginResult<Options> = (options: Options) => ParallelPlugin;
|
|
619
644
|
declare function defineParallelPlugin<Options>(pluginPath: string): DefineParallelPluginResult<Options>;
|
|
620
645
|
//#endregion
|
|
621
|
-
//#region src/types/module-info.d.ts
|
|
622
|
-
interface ModuleInfo extends ModuleOptions {
|
|
623
|
-
/**
|
|
624
|
-
* Unsupported at rolldown
|
|
625
|
-
*/
|
|
626
|
-
ast: any;
|
|
627
|
-
code: string | null;
|
|
628
|
-
id: string;
|
|
629
|
-
importers: string[];
|
|
630
|
-
dynamicImporters: string[];
|
|
631
|
-
importedIds: string[];
|
|
632
|
-
dynamicallyImportedIds: string[];
|
|
633
|
-
exports: string[];
|
|
634
|
-
isEntry: boolean;
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
646
|
//#region src/plugin/plugin-context.d.ts
|
|
638
647
|
interface EmittedAsset {
|
|
639
648
|
type: "asset";
|
|
@@ -694,6 +703,7 @@ type TreeshakingOptions = {
|
|
|
694
703
|
annotations?: boolean;
|
|
695
704
|
manualPureFunctions?: string[];
|
|
696
705
|
unknownGlobalSideEffects?: boolean;
|
|
706
|
+
commonjs?: boolean;
|
|
697
707
|
} | boolean;
|
|
698
708
|
//#endregion
|
|
699
709
|
//#region src/types/output-bundle.d.ts
|
|
@@ -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-9_Ra3A9D.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, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, 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;
|
|
329
|
+
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, 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
|
|
@@ -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, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, 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;
|
|
356
|
+
const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, getBufferOffset, ImportNameKind, parseAsync, parseAsyncRaw, parseSync, parseSyncRaw, 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
|
|
@@ -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-DDMiEgyY.cjs');
|
|
3
3
|
const require_misc = require('./misc-BKp5iIef.cjs');
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -9,7 +9,7 @@ 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.22";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -1989,7 +1989,8 @@ const ResolveOptionsSchema = strictObject({
|
|
|
1989
1989
|
const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
1990
1990
|
annotations: optional(boolean()),
|
|
1991
1991
|
manualPureFunctions: optional(array(string())),
|
|
1992
|
-
unknownGlobalSideEffects: optional(boolean())
|
|
1992
|
+
unknownGlobalSideEffects: optional(boolean()),
|
|
1993
|
+
commonjs: optional(boolean())
|
|
1993
1994
|
})]);
|
|
1994
1995
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
1995
1996
|
LogLevelSchema,
|
|
@@ -2648,9 +2649,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2648
2649
|
async resolve(source, importer, options) {
|
|
2649
2650
|
let receipt = void 0;
|
|
2650
2651
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
2652
|
+
const vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {
|
|
2653
|
+
if (key.startsWith("vite:")) (acc ??= {})[key] = value;
|
|
2654
|
+
return acc;
|
|
2655
|
+
}, void 0);
|
|
2651
2656
|
const res = await this.context.resolve(source, importer, {
|
|
2652
2657
|
custom: receipt,
|
|
2653
|
-
skipSelf: options?.skipSelf
|
|
2658
|
+
skipSelf: options?.skipSelf,
|
|
2659
|
+
vitePluginCustom
|
|
2654
2660
|
});
|
|
2655
2661
|
if (receipt != null) this.data.removeSavedResolveOptions(receipt);
|
|
2656
2662
|
if (res == null) return null;
|
|
@@ -2892,6 +2898,25 @@ function bindingifyModuleParsed(args$1) {
|
|
|
2892
2898
|
};
|
|
2893
2899
|
}
|
|
2894
2900
|
|
|
2901
|
+
//#endregion
|
|
2902
|
+
//#region src/types/chunking-context.ts
|
|
2903
|
+
var ChunkingContext = class {
|
|
2904
|
+
constructor(context) {
|
|
2905
|
+
this.context = context;
|
|
2906
|
+
}
|
|
2907
|
+
getModuleInfo(moduleId) {
|
|
2908
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
2909
|
+
if (bindingInfo) {
|
|
2910
|
+
const info = transformModuleInfo(bindingInfo, {
|
|
2911
|
+
moduleSideEffects: null,
|
|
2912
|
+
meta: {}
|
|
2913
|
+
});
|
|
2914
|
+
return info;
|
|
2915
|
+
}
|
|
2916
|
+
return null;
|
|
2917
|
+
}
|
|
2918
|
+
};
|
|
2919
|
+
|
|
2895
2920
|
//#endregion
|
|
2896
2921
|
//#region src/utils/transform-rendered-module.ts
|
|
2897
2922
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -2961,11 +2986,7 @@ function transformChunkModules(modules) {
|
|
|
2961
2986
|
//#region src/utils/bindingify-output-options.ts
|
|
2962
2987
|
function bindingifyOutputOptions(outputOptions) {
|
|
2963
2988
|
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks } = outputOptions;
|
|
2964
|
-
|
|
2965
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
2966
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(id) {
|
|
2967
|
-
return manualChunks(id, {});
|
|
2968
|
-
} }] };
|
|
2989
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
2969
2990
|
return {
|
|
2970
2991
|
dir,
|
|
2971
2992
|
file: file == null ? void 0 : file,
|
|
@@ -3045,6 +3066,24 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
3045
3066
|
};
|
|
3046
3067
|
return assetFileNames;
|
|
3047
3068
|
}
|
|
3069
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3070
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3071
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3072
|
+
return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
|
|
3073
|
+
} }] };
|
|
3074
|
+
if (advancedChunks == null) return void 0;
|
|
3075
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3076
|
+
return {
|
|
3077
|
+
...restAdvancedChunks,
|
|
3078
|
+
groups: groups?.map((group) => {
|
|
3079
|
+
const { name,...restGroup } = group;
|
|
3080
|
+
return {
|
|
3081
|
+
...restGroup,
|
|
3082
|
+
name: typeof name === "function" ? (id, ctx) => name(id, new ChunkingContext(ctx)) : name
|
|
3083
|
+
};
|
|
3084
|
+
})
|
|
3085
|
+
};
|
|
3086
|
+
}
|
|
3048
3087
|
|
|
3049
3088
|
//#endregion
|
|
3050
3089
|
//#region src/options/normalized-output-options.ts
|
|
@@ -3950,7 +3989,8 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
3950
3989
|
moduleSideEffects: true,
|
|
3951
3990
|
annotations: config.annotations,
|
|
3952
3991
|
manualPureFunctions: config.manualPureFunctions,
|
|
3953
|
-
unknownGlobalSideEffects: config.unknownGlobalSideEffects
|
|
3992
|
+
unknownGlobalSideEffects: config.unknownGlobalSideEffects,
|
|
3993
|
+
commonjs: config.commonjs
|
|
3954
3994
|
};
|
|
3955
3995
|
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
3956
3996
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
@@ -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, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, shutdownAsyncRuntime, startAsyncRuntime } from "./parse-ast-index-DmWy-n6o.mjs";
|
|
2
2
|
import { arraify, isNullish, noop, unimplemented, unreachable, unsupported } from "./misc-BN0nse6C.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -8,7 +8,7 @@ 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.22";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -1988,7 +1988,8 @@ const ResolveOptionsSchema = strictObject({
|
|
|
1988
1988
|
const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
1989
1989
|
annotations: optional(boolean()),
|
|
1990
1990
|
manualPureFunctions: optional(array(string())),
|
|
1991
|
-
unknownGlobalSideEffects: optional(boolean())
|
|
1991
|
+
unknownGlobalSideEffects: optional(boolean()),
|
|
1992
|
+
commonjs: optional(boolean())
|
|
1992
1993
|
})]);
|
|
1993
1994
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
1994
1995
|
LogLevelSchema,
|
|
@@ -2647,9 +2648,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2647
2648
|
async resolve(source, importer, options) {
|
|
2648
2649
|
let receipt = void 0;
|
|
2649
2650
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
2651
|
+
const vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {
|
|
2652
|
+
if (key.startsWith("vite:")) (acc ??= {})[key] = value;
|
|
2653
|
+
return acc;
|
|
2654
|
+
}, void 0);
|
|
2650
2655
|
const res = await this.context.resolve(source, importer, {
|
|
2651
2656
|
custom: receipt,
|
|
2652
|
-
skipSelf: options?.skipSelf
|
|
2657
|
+
skipSelf: options?.skipSelf,
|
|
2658
|
+
vitePluginCustom
|
|
2653
2659
|
});
|
|
2654
2660
|
if (receipt != null) this.data.removeSavedResolveOptions(receipt);
|
|
2655
2661
|
if (res == null) return null;
|
|
@@ -2891,6 +2897,25 @@ function bindingifyModuleParsed(args$1) {
|
|
|
2891
2897
|
};
|
|
2892
2898
|
}
|
|
2893
2899
|
|
|
2900
|
+
//#endregion
|
|
2901
|
+
//#region src/types/chunking-context.ts
|
|
2902
|
+
var ChunkingContext = class {
|
|
2903
|
+
constructor(context) {
|
|
2904
|
+
this.context = context;
|
|
2905
|
+
}
|
|
2906
|
+
getModuleInfo(moduleId) {
|
|
2907
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
2908
|
+
if (bindingInfo) {
|
|
2909
|
+
const info = transformModuleInfo(bindingInfo, {
|
|
2910
|
+
moduleSideEffects: null,
|
|
2911
|
+
meta: {}
|
|
2912
|
+
});
|
|
2913
|
+
return info;
|
|
2914
|
+
}
|
|
2915
|
+
return null;
|
|
2916
|
+
}
|
|
2917
|
+
};
|
|
2918
|
+
|
|
2894
2919
|
//#endregion
|
|
2895
2920
|
//#region src/utils/transform-rendered-module.ts
|
|
2896
2921
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -2960,11 +2985,7 @@ function transformChunkModules(modules) {
|
|
|
2960
2985
|
//#region src/utils/bindingify-output-options.ts
|
|
2961
2986
|
function bindingifyOutputOptions(outputOptions) {
|
|
2962
2987
|
const { dir, format, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks } = outputOptions;
|
|
2963
|
-
|
|
2964
|
-
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
2965
|
-
else if (manualChunks != null) advancedChunks = { groups: [{ name(id) {
|
|
2966
|
-
return manualChunks(id, {});
|
|
2967
|
-
} }] };
|
|
2988
|
+
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
2968
2989
|
return {
|
|
2969
2990
|
dir,
|
|
2970
2991
|
file: file == null ? void 0 : file,
|
|
@@ -3044,6 +3065,24 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
3044
3065
|
};
|
|
3045
3066
|
return assetFileNames;
|
|
3046
3067
|
}
|
|
3068
|
+
function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
3069
|
+
if (manualChunks != null && advancedChunks != null) console.warn("`manualChunks` option is ignored due to `advancedChunks` option is specified.");
|
|
3070
|
+
else if (manualChunks != null) advancedChunks = { groups: [{ name(moduleId, ctx) {
|
|
3071
|
+
return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
|
|
3072
|
+
} }] };
|
|
3073
|
+
if (advancedChunks == null) return void 0;
|
|
3074
|
+
const { groups,...restAdvancedChunks } = advancedChunks;
|
|
3075
|
+
return {
|
|
3076
|
+
...restAdvancedChunks,
|
|
3077
|
+
groups: groups?.map((group) => {
|
|
3078
|
+
const { name,...restGroup } = group;
|
|
3079
|
+
return {
|
|
3080
|
+
...restGroup,
|
|
3081
|
+
name: typeof name === "function" ? (id, ctx) => name(id, new ChunkingContext(ctx)) : name
|
|
3082
|
+
};
|
|
3083
|
+
})
|
|
3084
|
+
};
|
|
3085
|
+
}
|
|
3047
3086
|
|
|
3048
3087
|
//#endregion
|
|
3049
3088
|
//#region src/options/normalized-output-options.ts
|
|
@@ -3949,7 +3988,8 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
3949
3988
|
moduleSideEffects: true,
|
|
3950
3989
|
annotations: config.annotations,
|
|
3951
3990
|
manualPureFunctions: config.manualPureFunctions,
|
|
3952
|
-
unknownGlobalSideEffects: config.unknownGlobalSideEffects
|
|
3991
|
+
unknownGlobalSideEffects: config.unknownGlobalSideEffects,
|
|
3992
|
+
commonjs: config.commonjs
|
|
3953
3993
|
};
|
|
3954
3994
|
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
3955
3995
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
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.22",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@oxc-project/runtime": "=0.75.0",
|
|
94
94
|
"@oxc-project/types": "=0.75.0",
|
|
95
95
|
"ansis": "^4.0.0",
|
|
96
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
96
|
+
"@rolldown/pluginutils": "1.0.0-beta.22"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@napi-rs/cli": "3.0.0-alpha.91",
|
|
@@ -118,28 +118,29 @@
|
|
|
118
118
|
"typedoc": "^0.28.0",
|
|
119
119
|
"typescript": "^5.7.3",
|
|
120
120
|
"valibot": "1.1.0",
|
|
121
|
-
"
|
|
122
|
-
"rolldown": "
|
|
121
|
+
"rolldown": "1.0.0-beta.22",
|
|
122
|
+
"@rolldown/testing": "0.0.1"
|
|
123
123
|
},
|
|
124
124
|
"optionalDependencies": {
|
|
125
|
-
"@rolldown/binding-darwin-arm64": "1.0.0-beta.
|
|
126
|
-
"@rolldown/binding-darwin-x64": "1.0.0-beta.
|
|
127
|
-
"@rolldown/binding-
|
|
128
|
-
"@rolldown/binding-linux-
|
|
129
|
-
"@rolldown/binding-
|
|
130
|
-
"@rolldown/binding-linux-
|
|
131
|
-
"@rolldown/binding-linux-
|
|
132
|
-
"@rolldown/binding-
|
|
133
|
-
"@rolldown/binding-
|
|
134
|
-
"@rolldown/binding-win32-
|
|
135
|
-
"@rolldown/binding-win32-
|
|
136
|
-
"@rolldown/binding-win32-
|
|
125
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.22",
|
|
126
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.22",
|
|
127
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.22",
|
|
128
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.22",
|
|
129
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.22",
|
|
130
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.22",
|
|
131
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.22",
|
|
132
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.22",
|
|
133
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.22",
|
|
134
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.22",
|
|
135
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.22",
|
|
136
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.22"
|
|
137
137
|
},
|
|
138
138
|
"scripts": {
|
|
139
139
|
"# Scrips for binding #": "_",
|
|
140
140
|
"artifacts": "napi artifacts --cwd ./src --package-json-path ../package.json -o=../artifacts --npm-dir ../npm",
|
|
141
141
|
"build-binding": "oxnode ./build-binding.ts",
|
|
142
142
|
"build-binding:release": "pnpm build-binding --release",
|
|
143
|
+
"build-binding:memory-profile": "pnpm build-binding --profile memory-profile --features default_global_allocator",
|
|
143
144
|
"build-binding:wasi": "pnpm build-binding --target wasm32-wasip1-threads",
|
|
144
145
|
"build-binding:wasi:release": "pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads",
|
|
145
146
|
"# Scrips for node #": "_",
|
|
@@ -148,6 +149,7 @@
|
|
|
148
149
|
"build-js-glue": "pnpm run --sequential '/^build-(types|node|types-check)$/'",
|
|
149
150
|
"build-native:debug": "pnpm run --sequential '/^build-(binding|js-glue)$/'",
|
|
150
151
|
"build-native:release": "pnpm run --sequential '/^build-(binding:release|js-glue)$/'",
|
|
152
|
+
"build-native:memory-profile": "pnpm run --sequential '/^build-(binding:memory-profile|js-glue)$/'",
|
|
151
153
|
"build-browser:debug": "BROWSER_PKG=1 pnpm run --sequential '/^build-(binding|binding:wasi|node)$/'",
|
|
152
154
|
"build-browser:release": "BROWSER_PKG=1 pnpm run --sequential '/^build-(binding|binding:wasi:release|node)$/'",
|
|
153
155
|
"# Scrips for docs #": "_",
|