@rolldown/browser 1.0.0-beta.34 → 1.0.0-beta.35
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 +215 -210
- package/dist/cli.mjs +203 -203
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/experimental-index.browser.mjs +20 -6
- package/dist/experimental-index.cjs +25 -9
- package/dist/experimental-index.d.cts +13 -4
- package/dist/experimental-index.d.mts +13 -4
- package/dist/experimental-index.mjs +20 -6
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +6 -4
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +4 -0
- package/dist/rolldown-binding.wasi.cjs +4 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{define-config-DzIQxNqU.d.mts → define-config-DJXaSinS.d.mts} +29 -2
- package/dist/shared/{define-config-D5AluabE.d.cts → define-config-DhrkZ_o7.d.cts} +29 -2
- package/dist/shared/{load-config--VYNOtUY.mjs → load-config-BCjD-AGJ.mjs} +1 -1
- package/dist/shared/{load-config-DfHD1OI9.cjs → load-config-BJKhRKZL.cjs} +11 -6
- package/dist/shared/{parse-ast-index-ChWj_C49.cjs → parse-ast-index-J0xVKZRe.cjs} +2 -1
- package/dist/shared/{prompt-QNI93ne7.cjs → prompt-Q05EYrFb.cjs} +8 -4
- package/dist/shared/{src-B4V64IkU.mjs → src-B0RCtUy7.mjs} +75 -31
- package/dist/shared/{src-McCMqGpa.cjs → src-Bd4BGX4v.cjs} +91 -41
- package/dist/{src-Bl12Y5ab.js → src-C8U06Im1.js} +73 -29
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBuiltinPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-B0RCtUy7.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
@@ -8,10 +8,15 @@ import { pathToFileURL } from "node:url";
|
|
|
8
8
|
var DevEngine = class DevEngine {
|
|
9
9
|
#inner;
|
|
10
10
|
#cachedBuildFinishPromise = null;
|
|
11
|
-
static async create(inputOptions, outputOptions) {
|
|
11
|
+
static async create(inputOptions, outputOptions = {}, devOptions = {}) {
|
|
12
12
|
inputOptions = await PluginDriver.callOptionsHook(inputOptions);
|
|
13
13
|
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
14
|
-
const
|
|
14
|
+
const bindingDevOptions = {
|
|
15
|
+
onHmrUpdates: devOptions.onHmrUpdates,
|
|
16
|
+
usePolling: devOptions.usePolling,
|
|
17
|
+
pollInterval: devOptions.pollInterval
|
|
18
|
+
};
|
|
19
|
+
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
15
20
|
return new DevEngine(inner);
|
|
16
21
|
}
|
|
17
22
|
constructor(inner) {
|
|
@@ -28,6 +33,12 @@ var DevEngine = class DevEngine {
|
|
|
28
33
|
this.#cachedBuildFinishPromise = promise;
|
|
29
34
|
return promise;
|
|
30
35
|
}
|
|
36
|
+
async ensureLatestBuild() {
|
|
37
|
+
await this.#inner.ensureLatestBuild();
|
|
38
|
+
}
|
|
39
|
+
async invalidate(file, firstInvalidatedBy) {
|
|
40
|
+
return this.#inner.invalidate(file, firstInvalidatedBy);
|
|
41
|
+
}
|
|
31
42
|
};
|
|
32
43
|
|
|
33
44
|
//#endregion
|
|
@@ -63,7 +74,7 @@ function defineParallelPlugin(pluginPath) {
|
|
|
63
74
|
//#endregion
|
|
64
75
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
65
76
|
function aliasPlugin(config) {
|
|
66
|
-
return
|
|
77
|
+
return createBuiltinPlugin("builtin:alias", config);
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
//#endregion
|
|
@@ -91,7 +102,10 @@ function aliasPlugin(config) {
|
|
|
91
102
|
* ```
|
|
92
103
|
*/
|
|
93
104
|
function replacePlugin(values = {}, options = {}) {
|
|
94
|
-
|
|
105
|
+
Object.keys(values).forEach((key) => {
|
|
106
|
+
values[key] = values[key].toString();
|
|
107
|
+
});
|
|
108
|
+
return createBuiltinPlugin("builtin:replace", {
|
|
95
109
|
...options,
|
|
96
110
|
values
|
|
97
111
|
});
|
|
@@ -107,7 +121,7 @@ function transformPlugin(config) {
|
|
|
107
121
|
jsxRefreshInclude: normalizedStringOrRegex(config.jsxRefreshInclude),
|
|
108
122
|
jsxRefreshExclude: normalizedStringOrRegex(config.jsxRefreshExclude)
|
|
109
123
|
};
|
|
110
|
-
return
|
|
124
|
+
return createBuiltinPlugin("builtin:transform", config);
|
|
111
125
|
}
|
|
112
126
|
|
|
113
127
|
//#endregion
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./shared/binding-D13M6Llu.cjs";
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
2
|
+
import { withFilter } from "./shared/define-config-DhrkZ_o7.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
1
|
import "./shared/binding-9k0egz6L.mjs";
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
2
|
+
import { withFilter } from "./shared/define-config-DJXaSinS.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,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-Bd4BGX4v.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-J0xVKZRe.cjs');
|
|
3
3
|
require('./shared/dist-CK0hotcm.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PreRenderedChunk } from "./shared/binding-D13M6Llu.cjs";
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-DhrkZ_o7.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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
1
|
import { PreRenderedChunk } from "./shared/binding-9k0egz6L.mjs";
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-DJXaSinS.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, 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, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-B0RCtUy7.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
|
|
@@ -1,9 +1,11 @@
|
|
|
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-Bd4BGX4v.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-J0xVKZRe.cjs');
|
|
4
4
|
require('./shared/dist-CK0hotcm.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
let node_worker_threads = require("node:worker_threads");
|
|
6
|
+
node_worker_threads = require_chunk.__toESM(node_worker_threads);
|
|
7
|
+
let src_rolldown_binding_wasi_cjs = require("./rolldown-binding.wasi.cjs");
|
|
8
|
+
src_rolldown_binding_wasi_cjs = require_chunk.__toESM(src_rolldown_binding_wasi_cjs);
|
|
7
9
|
|
|
8
10
|
//#region src/parallel-plugin-worker.ts
|
|
9
11
|
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-B0RCtUy7.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
|
+
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
8
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./shared/binding-D13M6Llu.cjs";
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DhrkZ_o7.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./shared/binding-9k0egz6L.mjs";
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DJXaSinS.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-J0xVKZRe.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
|
@@ -103,13 +103,17 @@ export const BindingWatcher = __napiModule.exports.BindingWatcher
|
|
|
103
103
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
104
104
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
105
105
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
106
|
+
export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
106
107
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
107
108
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
108
109
|
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
109
110
|
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
110
111
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
111
112
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
113
|
+
export const BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects
|
|
114
|
+
export const BindingPropertyWriteSideEffects = __napiModule.exports.BindingPropertyWriteSideEffects
|
|
112
115
|
export const FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
116
|
+
export const initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
113
117
|
export const registerPlugins = __napiModule.exports.registerPlugins
|
|
114
118
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
115
119
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
@@ -148,13 +148,17 @@ module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
|
148
148
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
149
149
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
150
150
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
151
|
+
module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
151
152
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
152
153
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
153
154
|
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
154
155
|
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
155
156
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
156
157
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
158
|
+
module.exports.BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects
|
|
159
|
+
module.exports.BindingPropertyWriteSideEffects = __napiModule.exports.BindingPropertyWriteSideEffects
|
|
157
160
|
module.exports.FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
161
|
+
module.exports.initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
158
162
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
159
163
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
160
164
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
Binary file
|
|
@@ -150,7 +150,7 @@ interface PreRenderedAsset {
|
|
|
150
150
|
}
|
|
151
151
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
152
152
|
type GlobalsFunction = (name: string) => string;
|
|
153
|
-
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "
|
|
153
|
+
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "sourcemap">;
|
|
154
154
|
interface ChunkingContext {
|
|
155
155
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
156
156
|
}
|
|
@@ -793,6 +793,8 @@ type TreeshakingOptions = {
|
|
|
793
793
|
manualPureFunctions?: readonly string[];
|
|
794
794
|
unknownGlobalSideEffects?: boolean;
|
|
795
795
|
commonjs?: boolean;
|
|
796
|
+
propertyReadSideEffects?: false | "always";
|
|
797
|
+
propertyWriteSideEffects?: false | "always";
|
|
796
798
|
};
|
|
797
799
|
//#endregion
|
|
798
800
|
//#region src/types/output-bundle.d.ts
|
|
@@ -817,11 +819,15 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
817
819
|
declare const VERSION: string;
|
|
818
820
|
//#endregion
|
|
819
821
|
//#region src/builtin-plugin/utils.d.ts
|
|
822
|
+
declare const BuiltinClassSymbol: symbol;
|
|
820
823
|
declare class BuiltinPlugin {
|
|
821
824
|
name: BindingBuiltinPluginName;
|
|
822
825
|
_options?: unknown;
|
|
823
826
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
824
827
|
}
|
|
828
|
+
interface BuiltinPlugin {
|
|
829
|
+
[BuiltinClassSymbol]: boolean;
|
|
830
|
+
}
|
|
825
831
|
//#endregion
|
|
826
832
|
//#region src/constants/plugin.d.ts
|
|
827
833
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
@@ -1070,6 +1076,7 @@ type HmrOptions = boolean | {
|
|
|
1070
1076
|
host?: string;
|
|
1071
1077
|
port?: number;
|
|
1072
1078
|
implement?: string;
|
|
1079
|
+
new?: boolean;
|
|
1073
1080
|
};
|
|
1074
1081
|
type OptimizationOptions = {
|
|
1075
1082
|
/**
|
|
@@ -1077,6 +1084,19 @@ type OptimizationOptions = {
|
|
|
1077
1084
|
*
|
|
1078
1085
|
* When enabled, constant values from imported modules will be inlined at their usage sites,
|
|
1079
1086
|
* potentially reducing bundle size and improving runtime performance by eliminating variable lookups.
|
|
1087
|
+
* **options**:
|
|
1088
|
+
* - `true`: equivalent to `{ mode: 'all', pass: 1 }`, enabling constant inlining for all eligible constants with a single pass.
|
|
1089
|
+
* - `false`: Disable constant inlining
|
|
1090
|
+
* - `{ mode: 'smart' | 'all', pass?: number }`:
|
|
1091
|
+
* - `mode: 'smart'`: Only inline constants in specific scenarios where it is likely to reduce bundle size and improve performance.
|
|
1092
|
+
* Smart mode inlines constants in these specific scenarios:
|
|
1093
|
+
* 1. `if (test) {} else {}` - condition expressions in if statements
|
|
1094
|
+
* 2. `test ? a : b` - condition expressions in ternary operators
|
|
1095
|
+
* 3. `test1 || test2` - logical OR expressions
|
|
1096
|
+
* 4. `test1 && test2` - logical AND expressions
|
|
1097
|
+
* 5. `test1 ?? test2` - nullish coalescing expressions
|
|
1098
|
+
* - `mode: 'all'`: Inline all imported constants wherever they are used.
|
|
1099
|
+
* - `pass`: Number of passes to perform for inlining constants.
|
|
1080
1100
|
*
|
|
1081
1101
|
* **example**
|
|
1082
1102
|
* ```js
|
|
@@ -1098,7 +1118,10 @@ type OptimizationOptions = {
|
|
|
1098
1118
|
*
|
|
1099
1119
|
* @default false
|
|
1100
1120
|
*/
|
|
1101
|
-
inlineConst?: boolean
|
|
1121
|
+
inlineConst?: boolean | {
|
|
1122
|
+
mode?: "all" | "smart";
|
|
1123
|
+
pass?: number;
|
|
1124
|
+
};
|
|
1102
1125
|
};
|
|
1103
1126
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
1104
1127
|
type ChunkModulesOrder = "exec-order" | "module-id";
|
|
@@ -1136,6 +1159,10 @@ interface InputOptions {
|
|
|
1136
1159
|
mainFiles?: string[];
|
|
1137
1160
|
modules?: string[];
|
|
1138
1161
|
symlinks?: boolean;
|
|
1162
|
+
/**
|
|
1163
|
+
* @deprecated Use the top-level `tsconfig` option instead.
|
|
1164
|
+
*/
|
|
1165
|
+
tsconfigFilename?: string;
|
|
1139
1166
|
};
|
|
1140
1167
|
cwd?: string;
|
|
1141
1168
|
/**
|
|
@@ -150,7 +150,7 @@ interface PreRenderedAsset {
|
|
|
150
150
|
}
|
|
151
151
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
152
152
|
type GlobalsFunction = (name: string) => string;
|
|
153
|
-
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "
|
|
153
|
+
type MinifyOptions = Omit<MinifyOptions$1, "module" | "codegen" | "sourcemap">;
|
|
154
154
|
interface ChunkingContext {
|
|
155
155
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
156
156
|
}
|
|
@@ -793,6 +793,8 @@ type TreeshakingOptions = {
|
|
|
793
793
|
manualPureFunctions?: readonly string[];
|
|
794
794
|
unknownGlobalSideEffects?: boolean;
|
|
795
795
|
commonjs?: boolean;
|
|
796
|
+
propertyReadSideEffects?: false | "always";
|
|
797
|
+
propertyWriteSideEffects?: false | "always";
|
|
796
798
|
};
|
|
797
799
|
//#endregion
|
|
798
800
|
//#region src/types/output-bundle.d.ts
|
|
@@ -817,11 +819,15 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
817
819
|
declare const VERSION: string;
|
|
818
820
|
//#endregion
|
|
819
821
|
//#region src/builtin-plugin/utils.d.ts
|
|
822
|
+
declare const BuiltinClassSymbol: symbol;
|
|
820
823
|
declare class BuiltinPlugin {
|
|
821
824
|
name: BindingBuiltinPluginName;
|
|
822
825
|
_options?: unknown;
|
|
823
826
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
824
827
|
}
|
|
828
|
+
interface BuiltinPlugin {
|
|
829
|
+
[BuiltinClassSymbol]: boolean;
|
|
830
|
+
}
|
|
825
831
|
//#endregion
|
|
826
832
|
//#region src/constants/plugin.d.ts
|
|
827
833
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
@@ -1070,6 +1076,7 @@ type HmrOptions = boolean | {
|
|
|
1070
1076
|
host?: string;
|
|
1071
1077
|
port?: number;
|
|
1072
1078
|
implement?: string;
|
|
1079
|
+
new?: boolean;
|
|
1073
1080
|
};
|
|
1074
1081
|
type OptimizationOptions = {
|
|
1075
1082
|
/**
|
|
@@ -1077,6 +1084,19 @@ type OptimizationOptions = {
|
|
|
1077
1084
|
*
|
|
1078
1085
|
* When enabled, constant values from imported modules will be inlined at their usage sites,
|
|
1079
1086
|
* potentially reducing bundle size and improving runtime performance by eliminating variable lookups.
|
|
1087
|
+
* **options**:
|
|
1088
|
+
* - `true`: equivalent to `{ mode: 'all', pass: 1 }`, enabling constant inlining for all eligible constants with a single pass.
|
|
1089
|
+
* - `false`: Disable constant inlining
|
|
1090
|
+
* - `{ mode: 'smart' | 'all', pass?: number }`:
|
|
1091
|
+
* - `mode: 'smart'`: Only inline constants in specific scenarios where it is likely to reduce bundle size and improve performance.
|
|
1092
|
+
* Smart mode inlines constants in these specific scenarios:
|
|
1093
|
+
* 1. `if (test) {} else {}` - condition expressions in if statements
|
|
1094
|
+
* 2. `test ? a : b` - condition expressions in ternary operators
|
|
1095
|
+
* 3. `test1 || test2` - logical OR expressions
|
|
1096
|
+
* 4. `test1 && test2` - logical AND expressions
|
|
1097
|
+
* 5. `test1 ?? test2` - nullish coalescing expressions
|
|
1098
|
+
* - `mode: 'all'`: Inline all imported constants wherever they are used.
|
|
1099
|
+
* - `pass`: Number of passes to perform for inlining constants.
|
|
1080
1100
|
*
|
|
1081
1101
|
* **example**
|
|
1082
1102
|
* ```js
|
|
@@ -1098,7 +1118,10 @@ type OptimizationOptions = {
|
|
|
1098
1118
|
*
|
|
1099
1119
|
* @default false
|
|
1100
1120
|
*/
|
|
1101
|
-
inlineConst?: boolean
|
|
1121
|
+
inlineConst?: boolean | {
|
|
1122
|
+
mode?: "all" | "smart";
|
|
1123
|
+
pass?: number;
|
|
1124
|
+
};
|
|
1102
1125
|
};
|
|
1103
1126
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
1104
1127
|
type ChunkModulesOrder = "exec-order" | "module-id";
|
|
@@ -1136,6 +1159,10 @@ interface InputOptions {
|
|
|
1136
1159
|
mainFiles?: string[];
|
|
1137
1160
|
modules?: string[];
|
|
1138
1161
|
symlinks?: boolean;
|
|
1162
|
+
/**
|
|
1163
|
+
* @deprecated Use the top-level `tsconfig` option instead.
|
|
1164
|
+
*/
|
|
1165
|
+
tsconfigFilename?: string;
|
|
1139
1166
|
};
|
|
1140
1167
|
cwd?: string;
|
|
1141
1168
|
/**
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const require_src = require('./src-Bd4BGX4v.cjs');
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
node_path = require_chunk.__toESM(node_path);
|
|
5
|
+
let node_url = require("node:url");
|
|
6
|
+
node_url = require_chunk.__toESM(node_url);
|
|
7
|
+
let node_fs_promises = require("node:fs/promises");
|
|
8
|
+
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
9
|
+
let node_process = require("node:process");
|
|
10
|
+
node_process = require_chunk.__toESM(node_process);
|
|
11
|
+
let node_fs = require("node:fs");
|
|
12
|
+
node_fs = require_chunk.__toESM(node_fs);
|
|
8
13
|
|
|
9
14
|
//#region src/utils/load-config.ts
|
|
10
15
|
async function bundleTsConfig(configFile, isEsm) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
|
|
2
|
+
let src_rolldown_binding_wasi_cjs = require("../rolldown-binding.wasi.cjs");
|
|
3
|
+
src_rolldown_binding_wasi_cjs = require_chunk.__toESM(src_rolldown_binding_wasi_cjs);
|
|
3
4
|
|
|
4
5
|
//#region src/utils/code-frame.ts
|
|
5
6
|
function spaces(index) {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
let node_process = require("node:process");
|
|
3
|
+
node_process = require_chunk.__toESM(node_process);
|
|
4
|
+
let node_util = require("node:util");
|
|
5
|
+
node_util = require_chunk.__toESM(node_util);
|
|
6
|
+
let node_tty = require("node:tty");
|
|
7
|
+
node_tty = require_chunk.__toESM(node_tty);
|
|
8
|
+
let node_readline = require("node:readline");
|
|
9
|
+
node_readline = require_chunk.__toESM(node_readline);
|
|
6
10
|
|
|
7
11
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
|
|
8
12
|
function getDefaultExportFromCjs(x$1) {
|