@rolldown/browser 1.0.0-beta.24 → 1.0.0-beta.25
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 +5 -5
- package/dist/cli.mjs +5 -5
- 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.browser.mjs +1 -1
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -4
- package/dist/experimental-index.d.mts +2 -4
- package/dist/experimental-index.mjs +2 -2
- package/dist/experimental-runtime-types.d.ts +2 -0
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- 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 -2
- package/dist/parse-ast-index.d.mts +1 -2
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -1
- package/dist/rolldown-binding.wasi.cjs +24 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-DG3bbtXG.d.cts → binding-B9-3a5q4.d.cts} +0 -2
- package/dist/shared/{binding-cECB-Ts3.d.mts → binding-DQYRWAqj.d.mts} +0 -2
- package/dist/shared/{define-config-BnlWQIlM.d.cts → define-config-BtEiHmBk.d.mts} +26 -29
- package/dist/shared/{define-config-Dipre2WB.d.mts → define-config-ZN70csxk.d.cts} +26 -29
- package/dist/shared/{load-config-FXcGLoFh.mjs → load-config-B_r5s5Sw.mjs} +1 -1
- package/dist/shared/{load-config-B-Wrkmqo.cjs → load-config-CbbGAxoK.cjs} +1 -1
- package/dist/shared/{parse-ast-index-B0vXlNs8.cjs → parse-ast-index-80TSV2Ni.cjs} +1 -1
- package/dist/shared/{parse-ast-index-DQEVpsUG.mjs → parse-ast-index-Bo5jcF9A.mjs} +1 -1
- package/dist/shared/{src-DmJCtJ15.mjs → src-DgEwyn6q.mjs} +57 -41
- package/dist/shared/{src-dEUToPiW.cjs → src-Dtgcnc61.cjs} +56 -40
- package/dist/{src-BHNQaKQh.js → src-nDvl0w95.js} +57 -41
- package/package.json +2 -2
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-
|
|
2
|
+
const require_src = require('./shared/src-Dtgcnc61.cjs');
|
|
3
3
|
const require_dist = require('./shared/dist-BVAp8sOm.cjs');
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
require('./shared/parse-ast-index-80TSV2Ni.cjs');
|
|
5
|
+
const require_load_config = require('./shared/load-config-CbbGAxoK.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
8
8
|
const node_util = require_chunk.__toESM(require("node:util"));
|
|
@@ -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.
|
|
1427
|
-
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1426
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.76.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1427
|
+
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.76.0/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();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
1
|
+
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-DgEwyn6q.mjs";
|
|
2
2
|
import { arraify } from "./shared/dist-DvBwroyk.mjs";
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
3
|
+
import "./shared/parse-ast-index-Bo5jcF9A.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-B_r5s5Sw.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import process$1 from "node:process";
|
|
7
7
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
@@ -1422,8 +1422,8 @@ const process$2 = globalThis.process;
|
|
|
1422
1422
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
1423
1423
|
|
|
1424
1424
|
//#endregion
|
|
1425
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1426
|
-
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1425
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.76.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1426
|
+
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.76.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1427
1427
|
function _usingCtx() {
|
|
1428
1428
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1429
1429
|
var n$2 = Error();
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-Dtgcnc61.cjs');
|
|
2
2
|
require('./shared/dist-BVAp8sOm.cjs');
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
3
|
+
require('./shared/parse-ast-index-80TSV2Ni.cjs');
|
|
4
|
+
const require_load_config = require('./shared/load-config-CbbGAxoK.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-B9-3a5q4.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-ZN70csxk.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-DQYRWAqj.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-BtEiHmBk.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 { defineConfig, version } from "./shared/src-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-DgEwyn6q.mjs";
|
|
2
2
|
import "./shared/dist-DvBwroyk.mjs";
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
3
|
+
import "./shared/parse-ast-index-Bo5jcF9A.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-B_r5s5Sw.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-nDvl0w95.js";
|
|
2
2
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-Dtgcnc61.cjs');
|
|
3
3
|
require('./shared/dist-BVAp8sOm.cjs');
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
4
|
+
require('./shared/parse-ast-index-80TSV2Ni.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
7
|
|
|
@@ -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-B9-3a5q4.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-ZN70csxk.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -15,7 +15,6 @@ type AliasPluginAlias = {
|
|
|
15
15
|
find: string | RegExp;
|
|
16
16
|
replacement: string;
|
|
17
17
|
};
|
|
18
|
-
// A temp config type for giving better user experience
|
|
19
18
|
type AliasPluginConfig = {
|
|
20
19
|
entries: AliasPluginAlias[];
|
|
21
20
|
};
|
|
@@ -48,7 +47,6 @@ declare function replacePlugin(values?: BindingReplacePluginConfig["values"], op
|
|
|
48
47
|
//#endregion
|
|
49
48
|
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
50
49
|
type TransformPattern = string | RegExp | readonly (RegExp | string)[];
|
|
51
|
-
// A temp config type for giving better user experience
|
|
52
50
|
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
|
|
53
51
|
include?: TransformPattern;
|
|
54
52
|
exclude?: TransformPattern;
|
|
@@ -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-DQYRWAqj.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-BtEiHmBk.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -15,7 +15,6 @@ type AliasPluginAlias = {
|
|
|
15
15
|
find: string | RegExp;
|
|
16
16
|
replacement: string;
|
|
17
17
|
};
|
|
18
|
-
// A temp config type for giving better user experience
|
|
19
18
|
type AliasPluginConfig = {
|
|
20
19
|
entries: AliasPluginAlias[];
|
|
21
20
|
};
|
|
@@ -48,7 +47,6 @@ declare function replacePlugin(values?: BindingReplacePluginConfig["values"], op
|
|
|
48
47
|
//#endregion
|
|
49
48
|
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
50
49
|
type TransformPattern = string | RegExp | readonly (RegExp | string)[];
|
|
51
|
-
// A temp config type for giving better user experience
|
|
52
50
|
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
|
|
53
51
|
include?: TransformPattern;
|
|
54
52
|
exclude?: TransformPattern;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
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 { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-DgEwyn6q.mjs";
|
|
2
2
|
import "./shared/dist-DvBwroyk.mjs";
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
3
|
+
import "./shared/parse-ast-index-Bo5jcF9A.mjs";
|
|
4
4
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
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-B9-3a5q4.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-ZN70csxk.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-DQYRWAqj.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-BtEiHmBk.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.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-Dtgcnc61.cjs');
|
|
2
2
|
require('./shared/dist-BVAp8sOm.cjs');
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
3
|
+
require('./shared/parse-ast-index-80TSV2Ni.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
|
6
6
|
exports.build = require_src.build;
|
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, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-B9-3a5q4.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-ZN70csxk.cjs";
|
|
3
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, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-DQYRWAqj.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-BtEiHmBk.mjs";
|
|
3
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 { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-DgEwyn6q.mjs";
|
|
2
2
|
import "./shared/dist-DvBwroyk.mjs";
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
3
|
+
import "./shared/parse-ast-index-Bo5jcF9A.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-Dtgcnc61.cjs');
|
|
3
3
|
require('./shared/dist-BVAp8sOm.cjs');
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
4
|
+
require('./shared/parse-ast-index-80TSV2Ni.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-DgEwyn6q.mjs";
|
|
2
2
|
import "./shared/dist-DvBwroyk.mjs";
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
3
|
+
import "./shared/parse-ast-index-Bo5jcF9A.mjs";
|
|
4
4
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-B9-3a5q4.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-ZN70csxk.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-DQYRWAqj.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-BtEiHmBk.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-80TSV2Ni.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ParseResult, ParserOptions } from "./shared/binding-
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding-B9-3a5q4.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/parse-ast-index.d.ts
|
|
5
|
-
// The api compat to rollup `parseAst` and `parseAstAsync`.
|
|
6
5
|
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
7
6
|
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
8
7
|
//#endregion
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ParseResult, ParserOptions } from "./shared/binding-
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding-DQYRWAqj.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/parse-ast-index.d.ts
|
|
5
|
-
// The api compat to rollup `parseAst` and `parseAstAsync`.
|
|
6
5
|
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
7
6
|
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
8
7
|
//#endregion
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -102,7 +102,7 @@ export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
102
102
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
103
103
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
104
104
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
105
|
-
export const
|
|
105
|
+
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
106
106
|
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
107
107
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
108
108
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
@@ -65,6 +65,29 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
|
|
|
65
65
|
worker.onmessage = ({ data }) => {
|
|
66
66
|
__wasmCreateOnMessageForFsProxy(__nodeFs)(data)
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
// The main thread of Node.js waits for all the active handles before exiting.
|
|
70
|
+
// But Rust threads are never waited without `thread::join`.
|
|
71
|
+
// So here we hack the code of Node.js to prevent the workers from being referenced (active).
|
|
72
|
+
// According to https://github.com/nodejs/node/blob/19e0d472728c79d418b74bddff588bea70a403d0/lib/internal/worker.js#L415,
|
|
73
|
+
// a worker is consist of two handles: kPublicPort and kHandle.
|
|
74
|
+
{
|
|
75
|
+
const kPublicPort = Object.getOwnPropertySymbols(worker).find(s =>
|
|
76
|
+
s.toString().includes("kPublicPort")
|
|
77
|
+
);
|
|
78
|
+
if (kPublicPort) {
|
|
79
|
+
worker[kPublicPort].ref = () => {};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const kHandle = Object.getOwnPropertySymbols(worker).find(s =>
|
|
83
|
+
s.toString().includes("kHandle")
|
|
84
|
+
);
|
|
85
|
+
if (kPublicPort) {
|
|
86
|
+
worker[kHandle].ref = () => {};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
worker.unref();
|
|
90
|
+
}
|
|
68
91
|
return worker
|
|
69
92
|
},
|
|
70
93
|
overwriteImports(importObject) {
|
|
@@ -126,7 +149,7 @@ module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
126
149
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
127
150
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
128
151
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
129
|
-
module.exports.
|
|
152
|
+
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
130
153
|
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
131
154
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
132
155
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
Binary file
|
|
@@ -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-DQYRWAqj.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -426,6 +426,14 @@ interface OutputOptions {
|
|
|
426
426
|
preserveModules?: boolean;
|
|
427
427
|
virtualDirname?: string;
|
|
428
428
|
preserveModulesRoot?: string;
|
|
429
|
+
topLevelVar?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* - Type: `boolean`
|
|
432
|
+
* - Default: `false`
|
|
433
|
+
*
|
|
434
|
+
* Whether to minify internal exports.
|
|
435
|
+
*/
|
|
436
|
+
minifyInternalExports?: boolean;
|
|
429
437
|
}
|
|
430
438
|
//#endregion
|
|
431
439
|
//#region src/api/build.d.ts
|
|
@@ -453,16 +461,12 @@ declare class RolldownBuild {
|
|
|
453
461
|
write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
|
|
454
462
|
close(): Promise<void>;
|
|
455
463
|
[Symbol.asyncDispose](): Promise<void>;
|
|
456
|
-
generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch>;
|
|
464
|
+
generateHmrPatch(changedFiles: string[]): Promise<BindingHmrOutputPatch | undefined>;
|
|
457
465
|
hmrInvalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrOutputPatch>;
|
|
458
|
-
// TODO(underfin)
|
|
459
|
-
// The `watchFiles` method returns a promise, but Rollup does not.
|
|
460
|
-
// Converting it to a synchronous API might cause a deadlock if the user calls `write` and `watchFiles` simultaneously.
|
|
461
466
|
get watchFiles(): Promise<string[]>;
|
|
462
467
|
}
|
|
463
468
|
//#endregion
|
|
464
469
|
//#region src/api/rolldown/index.d.ts
|
|
465
|
-
// `async` here is intentional to be compatible with `rollup.rollup`.
|
|
466
470
|
declare const rolldown: (input: InputOptions) => Promise<RolldownBuild>;
|
|
467
471
|
//#endregion
|
|
468
472
|
//#region src/options/watch-options.d.ts
|
|
@@ -473,7 +477,6 @@ interface WatchOptions extends InputOptions {
|
|
|
473
477
|
//#region src/api/watch/watch-emitter.d.ts
|
|
474
478
|
type WatcherEvent = "close" | "event" | "restart" | "change";
|
|
475
479
|
type ChangeEvent$1 = "create" | "update" | "delete";
|
|
476
|
-
// TODO: find a way use `RolldownBuild` instead of `Bundler`.
|
|
477
480
|
type RolldownWatchBuild = BindingBundlerImpl;
|
|
478
481
|
type RolldownWatcherEvent = {
|
|
479
482
|
code: "START";
|
|
@@ -482,7 +485,6 @@ type RolldownWatcherEvent = {
|
|
|
482
485
|
} | {
|
|
483
486
|
code: "BUNDLE_END";
|
|
484
487
|
duration: number;
|
|
485
|
-
// input?: InputOption
|
|
486
488
|
output: readonly string[];
|
|
487
489
|
result: RolldownWatchBuild;
|
|
488
490
|
} | {
|
|
@@ -508,7 +510,6 @@ declare class WatcherEmitter {
|
|
|
508
510
|
type RolldownWatcher = WatcherEmitter;
|
|
509
511
|
//#endregion
|
|
510
512
|
//#region src/api/watch/index.d.ts
|
|
511
|
-
// Compat to `rollup.watch`
|
|
512
513
|
declare const watch: (input: WatchOptions | WatchOptions[]) => RolldownWatcher;
|
|
513
514
|
//#endregion
|
|
514
515
|
//#region src/log/log-handler.d.ts
|
|
@@ -526,7 +527,6 @@ interface NormalizedInputOptions {
|
|
|
526
527
|
platform: InputOptions["platform"];
|
|
527
528
|
shimMissingExports: boolean;
|
|
528
529
|
}
|
|
529
|
-
// TODO: I guess we make these getters enumerable so it act more like a plain object
|
|
530
530
|
//#endregion
|
|
531
531
|
//#region src/options/normalized-output-options.d.ts
|
|
532
532
|
type InternalModuleFormat = "es" | "cjs" | "iife" | "umd";
|
|
@@ -562,8 +562,9 @@ interface NormalizedOutputOptions {
|
|
|
562
562
|
preserveModules: boolean;
|
|
563
563
|
virtualDirname: string;
|
|
564
564
|
preserveModulesRoot?: string;
|
|
565
|
+
topLevelVar?: boolean;
|
|
566
|
+
minifyInternalExports?: boolean;
|
|
565
567
|
}
|
|
566
|
-
// TODO: I guess we make these getters enumerable so it act more like a plain object
|
|
567
568
|
//#endregion
|
|
568
569
|
//#region src/plugin/hook-filter.d.ts
|
|
569
570
|
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
@@ -657,6 +658,7 @@ interface EmittedChunk {
|
|
|
657
658
|
}
|
|
658
659
|
type EmittedFile = EmittedAsset | EmittedChunk;
|
|
659
660
|
interface PluginContextResolveOptions {
|
|
661
|
+
isEntry?: boolean;
|
|
660
662
|
skipSelf?: boolean;
|
|
661
663
|
custom?: CustomPluginOptions;
|
|
662
664
|
}
|
|
@@ -726,7 +728,6 @@ declare const VERSION: string;
|
|
|
726
728
|
//#region src/builtin-plugin/constructors.d.ts
|
|
727
729
|
declare class BuiltinPlugin {
|
|
728
730
|
name: BindingBuiltinPluginName;
|
|
729
|
-
// NOTE: has `_` to avoid conflict with `options` hook
|
|
730
731
|
_options?: unknown;
|
|
731
732
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
732
733
|
}
|
|
@@ -792,7 +793,6 @@ declare function withFilter<A, T extends RolldownPluginOption<A>>(pluginOption:
|
|
|
792
793
|
//#endregion
|
|
793
794
|
//#region src/plugin/index.d.ts
|
|
794
795
|
type ModuleSideEffects = boolean | "no-treeshake" | null;
|
|
795
|
-
// ref: https://github.com/microsoft/TypeScript/issues/33471#issuecomment-1376364329
|
|
796
796
|
type ModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
797
797
|
type ImportKind = BindingHookResolveIdExtraArgs["kind"];
|
|
798
798
|
interface CustomPluginOptions {
|
|
@@ -801,8 +801,6 @@ interface CustomPluginOptions {
|
|
|
801
801
|
interface ModuleOptions {
|
|
802
802
|
moduleSideEffects: ModuleSideEffects;
|
|
803
803
|
meta: CustomPluginOptions;
|
|
804
|
-
// flag used to check if user directly modified the `ModuleInfo`
|
|
805
|
-
// this is used to sync state between rust and js
|
|
806
804
|
invalidate?: boolean;
|
|
807
805
|
}
|
|
808
806
|
interface ResolvedId extends ModuleOptions {
|
|
@@ -832,9 +830,7 @@ type RenderedChunkMeta = {
|
|
|
832
830
|
interface FunctionPluginHooks {
|
|
833
831
|
[DEFINED_HOOK_NAMES.onLog]: (this: MinimalPluginContext, level: LogLevel, log: RollupLog) => NullValue | boolean;
|
|
834
832
|
[DEFINED_HOOK_NAMES.options]: (this: MinimalPluginContext, options: InputOptions) => NullValue | InputOptions;
|
|
835
|
-
// TODO find a way to make `this: PluginContext` work.
|
|
836
833
|
[DEFINED_HOOK_NAMES.outputOptions]: (this: MinimalPluginContext, options: OutputOptions) => NullValue | OutputOptions;
|
|
837
|
-
// --- Build hooks ---
|
|
838
834
|
[DEFINED_HOOK_NAMES.buildStart]: (this: PluginContext, options: NormalizedInputOptions) => void;
|
|
839
835
|
[DEFINED_HOOK_NAMES.resolveId]: (this: PluginContext, source: string, importer: string | undefined, extraOptions: ResolveIdExtraOptions) => ResolveIdResult;
|
|
840
836
|
/**
|
|
@@ -848,7 +844,6 @@ interface FunctionPluginHooks {
|
|
|
848
844
|
}) => TransformResult;
|
|
849
845
|
[DEFINED_HOOK_NAMES.moduleParsed]: (this: PluginContext, moduleInfo: ModuleInfo) => void;
|
|
850
846
|
[DEFINED_HOOK_NAMES.buildEnd]: (this: PluginContext, err?: Error) => void;
|
|
851
|
-
// --- Generate hooks ---
|
|
852
847
|
[DEFINED_HOOK_NAMES.renderStart]: (this: PluginContext, outputOptions: NormalizedOutputOptions, inputOptions: NormalizedInputOptions) => void;
|
|
853
848
|
[DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions, meta: RenderedChunkMeta) => NullValue | string | {
|
|
854
849
|
code: string;
|
|
@@ -859,7 +854,6 @@ interface FunctionPluginHooks {
|
|
|
859
854
|
[DEFINED_HOOK_NAMES.generateBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle, isWrite: boolean) => void;
|
|
860
855
|
[DEFINED_HOOK_NAMES.writeBundle]: (this: PluginContext, outputOptions: NormalizedOutputOptions, bundle: OutputBundle) => void;
|
|
861
856
|
[DEFINED_HOOK_NAMES.closeBundle]: (this: PluginContext) => void;
|
|
862
|
-
// --- watch hooks ---
|
|
863
857
|
[DEFINED_HOOK_NAMES.watchChange]: (this: PluginContext, id: string, event: {
|
|
864
858
|
event: ChangeEvent;
|
|
865
859
|
}) => void;
|
|
@@ -874,13 +868,8 @@ type ObjectHook<T, O = {}> = T | ({
|
|
|
874
868
|
handler: T;
|
|
875
869
|
} & ObjectHookMeta & O);
|
|
876
870
|
type SyncPluginHooks = DefinedHookNames["augmentChunkHash" | "onLog" | "outputOptions"];
|
|
877
|
-
// | 'renderDynamicImport'
|
|
878
|
-
// | 'resolveFileUrl'
|
|
879
|
-
// | 'resolveImportMeta'
|
|
880
871
|
type AsyncPluginHooks = Exclude<keyof FunctionPluginHooks, SyncPluginHooks>;
|
|
881
872
|
type FirstPluginHooks = DefinedHookNames["load" | "resolveDynamicImport" | "resolveId"];
|
|
882
|
-
// | 'resolveImportMeta'
|
|
883
|
-
// | 'shouldTransformCachedModule'
|
|
884
873
|
type SequentialPluginHooks = DefinedHookNames["augmentChunkHash" | "generateBundle" | "onLog" | "options" | "outputOptions" | "renderChunk" | "transform"];
|
|
885
874
|
type AddonHooks = DefinedHookNames["banner" | "footer" | "intro" | "outro"];
|
|
886
875
|
type OutputPluginHooks = DefinedHookNames["augmentChunkHash" | "generateBundle" | "outputOptions" | "renderChunk" | "renderError" | "renderStart" | "writeBundle"];
|
|
@@ -907,11 +896,9 @@ type PluginHooks = { [K in keyof FunctionPluginHooks]: ObjectHook<K extends Asyn
|
|
|
907
896
|
type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>;
|
|
908
897
|
type AddonHook = string | AddonHookFunction;
|
|
909
898
|
interface OutputPlugin extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>, Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
|
|
910
|
-
// cacheKey?: string
|
|
911
899
|
name: string;
|
|
912
900
|
}
|
|
913
901
|
interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
914
|
-
// for inter-plugin communication
|
|
915
902
|
api?: A;
|
|
916
903
|
}
|
|
917
904
|
type RolldownPlugin<A = any> = Plugin<A> | BuiltinPlugin | ParallelPlugin;
|
|
@@ -924,8 +911,6 @@ type RolldownOutputPluginOption = MaybePromise<NullValue<RolldownOutputPlugin> |
|
|
|
924
911
|
} | false | RolldownOutputPluginOption[]>;
|
|
925
912
|
//#endregion
|
|
926
913
|
//#region src/options/generated/checks-options.d.ts
|
|
927
|
-
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
928
|
-
// To edit this generated file you have to edit `tasks/generator/src/generators/checks.rs`
|
|
929
914
|
interface ChecksOptions {
|
|
930
915
|
/**
|
|
931
916
|
* Whether to emit warning when detecting circular dependency
|
|
@@ -986,7 +971,6 @@ interface ChecksOptions {
|
|
|
986
971
|
//#endregion
|
|
987
972
|
//#region src/options/input-options.d.ts
|
|
988
973
|
type InputOption = string | string[] | Record<string, string>;
|
|
989
|
-
// Omit those key that are part of rolldown option
|
|
990
974
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject">;
|
|
991
975
|
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
992
976
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
@@ -1010,6 +994,7 @@ type OptimizationOptions = {
|
|
|
1010
994
|
inlineConst?: boolean;
|
|
1011
995
|
};
|
|
1012
996
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
997
|
+
type ChunkModulesOrder = "exec-order" | "module-id";
|
|
1013
998
|
interface RollupJsxOptions {
|
|
1014
999
|
mode?: "classic" | "automatic" | "preserve";
|
|
1015
1000
|
factory?: string;
|
|
@@ -1068,6 +1053,18 @@ interface InputOptions {
|
|
|
1068
1053
|
resolveNewUrlToAsset?: boolean;
|
|
1069
1054
|
hmr?: HmrOptions;
|
|
1070
1055
|
/**
|
|
1056
|
+
* Control which order should use when rendering modules in chunk
|
|
1057
|
+
*
|
|
1058
|
+
* - Type: `'exec-order' | 'module-id'
|
|
1059
|
+
* - Default: `'exec-order'`
|
|
1060
|
+
*
|
|
1061
|
+
* - `exec-order`: Almost equivalent to the topological order of the module graph, but specially handling when module graph has cycle.
|
|
1062
|
+
* - `module-id`: This is more friendly for gzip compression, especially for some javascript static asset lib (e.g. icon library)
|
|
1063
|
+
* > [!NOTE]
|
|
1064
|
+
* > Try to sort the modules by their module id if possible(Since rolldown scope hoist all modules in the chunk, we only try to sort those modules by module id if we could ensure runtime behavior is correct after sorting).
|
|
1065
|
+
*/
|
|
1066
|
+
chunkModulesOrder?: ChunkModulesOrder;
|
|
1067
|
+
/**
|
|
1071
1068
|
* Attach debug information to the output bundle.
|
|
1072
1069
|
*
|
|
1073
1070
|
* - Type: `'none' | 'simple' | 'full'`
|