rolldown 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 +217 -211
- package/dist/cli.mjs +204 -204
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.cjs +23 -8
- package/dist/experimental-index.d.cts +13 -4
- package/dist/experimental-index.d.mts +13 -4
- package/dist/experimental-index.mjs +21 -7
- package/dist/filter-index.cjs +2 -1
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +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 +2 -2
- package/dist/parallel-plugin-worker.cjs +4 -3
- 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/parse-ast-index.mjs +1 -1
- package/dist/shared/{define-config-DVSr6Unb.d.mts → define-config-3arq8OPE.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-CXpGBNqp.mjs → load-config-C93_L4MP.mjs} +1 -1
- package/dist/shared/{load-config-CefxSUnT.cjs → load-config-S_ofSLrj.cjs} +11 -6
- package/dist/shared/{parse-ast-index-DjojK-Vf.mjs → parse-ast-index-BadydpMA.mjs} +25 -25
- package/dist/shared/{parse-ast-index-BCv3Y1TT.cjs → parse-ast-index-cePJvlvW.cjs} +36 -24
- package/dist/shared/{prompt-QNI93ne7.cjs → prompt-Q05EYrFb.cjs} +8 -4
- package/dist/shared/{src-djpzntWm.cjs → src-BBMxhaqf.cjs} +93 -42
- package/dist/shared/{src-Chn1S4O2.mjs → src-D954P1TH.mjs} +75 -31
- package/package.json +18 -19
package/dist/filter-index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
2
|
const require_misc = require('./shared/misc-DksvspN4.cjs');
|
|
3
|
-
|
|
3
|
+
let __rolldown_pluginutils = require("@rolldown/pluginutils");
|
|
4
|
+
__rolldown_pluginutils = require_chunk.__toESM(__rolldown_pluginutils);
|
|
4
5
|
|
|
5
6
|
//#region src/plugin/with-filter.ts
|
|
6
7
|
function withFilterImpl(pluginOption, filterObjectList) {
|
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-3arq8OPE.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
|
-
|
|
2
|
-
require('./shared/
|
|
1
|
+
require('./shared/parse-ast-index-cePJvlvW.cjs');
|
|
2
|
+
const require_src = require('./shared/src-BBMxhaqf.cjs');
|
|
3
3
|
require('./shared/misc-DksvspN4.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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-3arq8OPE.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,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-BadydpMA.mjs";
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-D954P1TH.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-cePJvlvW.cjs');
|
|
3
|
+
const require_src = require('./shared/src-BBMxhaqf.cjs');
|
|
4
4
|
require('./shared/misc-DksvspN4.cjs');
|
|
5
|
-
|
|
5
|
+
let node_worker_threads = require("node:worker_threads");
|
|
6
|
+
node_worker_threads = require_chunk.__toESM(node_worker_threads);
|
|
6
7
|
|
|
7
8
|
//#region src/parallel-plugin-worker.ts
|
|
8
9
|
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
@@ -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-BadydpMA.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-D954P1TH.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-3arq8OPE.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-cePJvlvW.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
|
@@ -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-BBMxhaqf.cjs');
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_chunk.__toESM(node_fs);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_chunk.__toESM(node_path);
|
|
7
|
+
let node_url = require("node:url");
|
|
8
|
+
node_url = require_chunk.__toESM(node_url);
|
|
9
|
+
let node_fs_promises = require("node:fs/promises");
|
|
10
|
+
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
11
|
+
let node_process = require("node:process");
|
|
12
|
+
node_process = require_chunk.__toESM(node_process);
|
|
8
13
|
|
|
9
14
|
//#region src/utils/load-config.ts
|
|
10
15
|
async function bundleTsConfig(configFile, isEsm) {
|
|
@@ -109,7 +109,7 @@ function requireNative() {
|
|
|
109
109
|
try {
|
|
110
110
|
const binding = __require("@rolldown/binding-android-arm64");
|
|
111
111
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
112
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
112
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
113
113
|
return binding;
|
|
114
114
|
} catch (e) {
|
|
115
115
|
loadErrors.push(e);
|
|
@@ -123,7 +123,7 @@ function requireNative() {
|
|
|
123
123
|
try {
|
|
124
124
|
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
125
125
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
126
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
126
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
127
127
|
return binding;
|
|
128
128
|
} catch (e) {
|
|
129
129
|
loadErrors.push(e);
|
|
@@ -138,7 +138,7 @@ function requireNative() {
|
|
|
138
138
|
try {
|
|
139
139
|
const binding = __require("@rolldown/binding-win32-x64-msvc");
|
|
140
140
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-msvc/package.json").version;
|
|
141
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
141
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
142
142
|
return binding;
|
|
143
143
|
} catch (e) {
|
|
144
144
|
loadErrors.push(e);
|
|
@@ -152,7 +152,7 @@ function requireNative() {
|
|
|
152
152
|
try {
|
|
153
153
|
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
154
154
|
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
155
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
155
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
156
156
|
return binding;
|
|
157
157
|
} catch (e) {
|
|
158
158
|
loadErrors.push(e);
|
|
@@ -166,7 +166,7 @@ function requireNative() {
|
|
|
166
166
|
try {
|
|
167
167
|
const binding = __require("@rolldown/binding-win32-arm64-msvc");
|
|
168
168
|
const bindingPackageVersion = __require("@rolldown/binding-win32-arm64-msvc/package.json").version;
|
|
169
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
169
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
170
170
|
return binding;
|
|
171
171
|
} catch (e) {
|
|
172
172
|
loadErrors.push(e);
|
|
@@ -181,7 +181,7 @@ function requireNative() {
|
|
|
181
181
|
try {
|
|
182
182
|
const binding = __require("@rolldown/binding-darwin-universal");
|
|
183
183
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
184
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
184
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
185
185
|
return binding;
|
|
186
186
|
} catch (e) {
|
|
187
187
|
loadErrors.push(e);
|
|
@@ -195,7 +195,7 @@ function requireNative() {
|
|
|
195
195
|
try {
|
|
196
196
|
const binding = __require("@rolldown/binding-darwin-x64");
|
|
197
197
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-x64/package.json").version;
|
|
198
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
198
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
199
199
|
return binding;
|
|
200
200
|
} catch (e) {
|
|
201
201
|
loadErrors.push(e);
|
|
@@ -209,7 +209,7 @@ function requireNative() {
|
|
|
209
209
|
try {
|
|
210
210
|
const binding = __require("@rolldown/binding-darwin-arm64");
|
|
211
211
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-arm64/package.json").version;
|
|
212
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
212
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
213
213
|
return binding;
|
|
214
214
|
} catch (e) {
|
|
215
215
|
loadErrors.push(e);
|
|
@@ -224,7 +224,7 @@ function requireNative() {
|
|
|
224
224
|
try {
|
|
225
225
|
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
226
226
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
227
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
227
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
228
228
|
return binding;
|
|
229
229
|
} catch (e) {
|
|
230
230
|
loadErrors.push(e);
|
|
@@ -238,7 +238,7 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
240
240
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
241
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
242
242
|
return binding;
|
|
243
243
|
} catch (e) {
|
|
244
244
|
loadErrors.push(e);
|
|
@@ -253,7 +253,7 @@ function requireNative() {
|
|
|
253
253
|
try {
|
|
254
254
|
const binding = __require("@rolldown/binding-linux-x64-musl");
|
|
255
255
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-musl/package.json").version;
|
|
256
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
256
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
257
257
|
return binding;
|
|
258
258
|
} catch (e) {
|
|
259
259
|
loadErrors.push(e);
|
|
@@ -267,7 +267,7 @@ function requireNative() {
|
|
|
267
267
|
try {
|
|
268
268
|
const binding = __require("@rolldown/binding-linux-x64-gnu");
|
|
269
269
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-gnu/package.json").version;
|
|
270
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
270
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
271
271
|
return binding;
|
|
272
272
|
} catch (e) {
|
|
273
273
|
loadErrors.push(e);
|
|
@@ -282,7 +282,7 @@ function requireNative() {
|
|
|
282
282
|
try {
|
|
283
283
|
const binding = __require("@rolldown/binding-linux-arm64-musl");
|
|
284
284
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-musl/package.json").version;
|
|
285
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
285
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
return binding;
|
|
287
287
|
} catch (e) {
|
|
288
288
|
loadErrors.push(e);
|
|
@@ -296,7 +296,7 @@ function requireNative() {
|
|
|
296
296
|
try {
|
|
297
297
|
const binding = __require("@rolldown/binding-linux-arm64-gnu");
|
|
298
298
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-gnu/package.json").version;
|
|
299
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
299
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
300
300
|
return binding;
|
|
301
301
|
} catch (e) {
|
|
302
302
|
loadErrors.push(e);
|
|
@@ -311,7 +311,7 @@ function requireNative() {
|
|
|
311
311
|
try {
|
|
312
312
|
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
313
313
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
314
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
314
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
315
315
|
return binding;
|
|
316
316
|
} catch (e) {
|
|
317
317
|
loadErrors.push(e);
|
|
@@ -325,7 +325,7 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
327
327
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
328
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
329
329
|
return binding;
|
|
330
330
|
} catch (e) {
|
|
331
331
|
loadErrors.push(e);
|
|
@@ -340,7 +340,7 @@ function requireNative() {
|
|
|
340
340
|
try {
|
|
341
341
|
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
342
342
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
343
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
343
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
344
344
|
return binding;
|
|
345
345
|
} catch (e) {
|
|
346
346
|
loadErrors.push(e);
|
|
@@ -354,7 +354,7 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
356
356
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
357
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
357
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
358
358
|
return binding;
|
|
359
359
|
} catch (e) {
|
|
360
360
|
loadErrors.push(e);
|
|
@@ -369,7 +369,7 @@ function requireNative() {
|
|
|
369
369
|
try {
|
|
370
370
|
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
371
371
|
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
372
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
372
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
373
373
|
return binding;
|
|
374
374
|
} catch (e) {
|
|
375
375
|
loadErrors.push(e);
|
|
@@ -383,7 +383,7 @@ function requireNative() {
|
|
|
383
383
|
try {
|
|
384
384
|
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
385
385
|
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
386
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
386
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
387
387
|
return binding;
|
|
388
388
|
} catch (e) {
|
|
389
389
|
loadErrors.push(e);
|
|
@@ -398,7 +398,7 @@ function requireNative() {
|
|
|
398
398
|
try {
|
|
399
399
|
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
400
400
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
401
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
401
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
402
402
|
return binding;
|
|
403
403
|
} catch (e) {
|
|
404
404
|
loadErrors.push(e);
|
|
@@ -412,7 +412,7 @@ function requireNative() {
|
|
|
412
412
|
try {
|
|
413
413
|
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
414
414
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
415
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
415
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
416
416
|
return binding;
|
|
417
417
|
} catch (e) {
|
|
418
418
|
loadErrors.push(e);
|
|
@@ -426,7 +426,7 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
428
428
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
429
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== "1.0.0-beta.35" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
430
430
|
return binding;
|
|
431
431
|
} catch (e) {
|
|
432
432
|
loadErrors.push(e);
|
|
@@ -456,7 +456,7 @@ if (!nativeBinding) {
|
|
|
456
456
|
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 });
|
|
457
457
|
throw new Error(`Failed to load native binding`);
|
|
458
458
|
}
|
|
459
|
-
const { minify, Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingDevEngine, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, FilterTokenKind, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, JsWatcher } = nativeBinding;
|
|
459
|
+
const { minify, Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingDevEngine, BindingHmrOutput, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, TraceSubscriberGuard, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, FilterTokenKind, initTraceSubscriber, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, JsWatcher } = nativeBinding;
|
|
460
460
|
|
|
461
461
|
//#endregion
|
|
462
462
|
//#region src/utils/code-frame.ts
|
|
@@ -722,4 +722,4 @@ async function parseAstAsync(sourceText, options, filename) {
|
|
|
722
722
|
}
|
|
723
723
|
|
|
724
724
|
//#endregion
|
|
725
|
-
export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingDevEngine, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
|
|
725
|
+
export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingDevEngine, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, __commonJS, __toESM, augmentCodeLocation, error, isolatedDeclaration, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
|