@rolldown/browser 1.0.0-rc.10 → 1.0.0-rc.12
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.mjs +6 -9
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -7
- package/dist/{constructors-DsfxKD6A.js → constructors-LtcP0f-6.js} +1 -1
- package/dist/{error-BeZaDkS8.js → error-nyELQq9T.js} +1 -1
- package/dist/experimental-index.browser.mjs +5 -5
- package/dist/experimental-index.d.mts +1 -1
- package/dist/experimental-index.mjs +5 -5
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -7
- package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-Db8ibFkp.js} +19 -11
- package/dist/parallel-plugin-worker.mjs +1 -4
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.mjs +2 -2
- package/dist/{resolve-tsconfig-DThkUPSZ.js → resolve-tsconfig-CkWJwi9L.js} +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-Chx5S-TB.js → rolldown-build-B2FA5DNv.js} +30 -6
- package/dist/shared/{bindingify-input-options-Czbczr8Z.mjs → bindingify-input-options-MqDue3xO.mjs} +25 -3
- package/dist/shared/{constructors-CemeNi29.mjs → constructors-BGLoUvKR.mjs} +1 -1
- package/dist/shared/{define-config-i6TWE2hm.d.mts → define-config-Cr6054d_.d.mts} +17 -3
- package/dist/shared/{load-config-CxvL5JxT.mjs → load-config-DIkJ9d-P.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-D0o84ejN.mjs} +19 -11
- package/dist/shared/{parse-CRhjbrcT.mjs → parse-B_jvq8dU.mjs} +1 -1
- package/dist/shared/{rolldown-C3wFxOwq.mjs → rolldown-B5m6XtwJ.mjs} +1 -1
- package/dist/shared/{rolldown-build-ChZOz6BP.mjs → rolldown-build-CfQ_wZyF.mjs} +6 -4
- package/dist/shared/{types-Cx3HYorz.d.mts → types-K2r0mx6Y.d.mts} +7 -7
- package/dist/shared/{watch-C1jC1oFT.mjs → watch-Bkj4zPhn.mjs} +2 -2
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +1302 -3
- package/dist/utils-index.mjs +4 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import { C as version, S as description } from "./shared/bindingify-input-options-Czbczr8Z.mjs";
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-Bkj4zPhn.mjs";
|
|
2
|
+
import { C as version, S as description } from "./shared/bindingify-input-options-MqDue3xO.mjs";
|
|
4
3
|
import { h as arraify } from "./shared/composable-filters-B2ByPP8y.mjs";
|
|
5
|
-
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-
|
|
6
|
-
import "./shared/
|
|
7
|
-
import "./shared/
|
|
8
|
-
import { t as rolldown } from "./shared/rolldown-C3wFxOwq.mjs";
|
|
9
|
-
import { t as loadConfig } from "./shared/load-config-CxvL5JxT.mjs";
|
|
4
|
+
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-CfQ_wZyF.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-B5m6XtwJ.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-DIkJ9d-P.mjs";
|
|
10
7
|
import path from "node:path";
|
|
11
8
|
import process$1 from "node:process";
|
|
12
9
|
import { performance } from "node:perf_hooks";
|
|
@@ -850,7 +847,7 @@ function getClearScreenFunction(options) {
|
|
|
850
847
|
};
|
|
851
848
|
}
|
|
852
849
|
//#endregion
|
|
853
|
-
//#region \0@oxc-project+runtime@0.
|
|
850
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/usingCtx.js
|
|
854
851
|
function _usingCtx() {
|
|
855
852
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
856
853
|
var n = Error();
|
package/dist/config.d.mts
CHANGED
package/dist/config.mjs
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import { x as VERSION } from "./shared/bindingify-input-options-Czbczr8Z.mjs";
|
|
3
|
-
import "./shared/rolldown-build-ChZOz6BP.mjs";
|
|
4
|
-
import "./shared/error-CQ6njWsV.mjs";
|
|
5
|
-
import "./shared/parse-CRhjbrcT.mjs";
|
|
6
|
-
import "./shared/rolldown-C3wFxOwq.mjs";
|
|
1
|
+
import { x as VERSION } from "./shared/bindingify-input-options-MqDue3xO.mjs";
|
|
7
2
|
import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
|
|
8
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { t as loadConfig } from "./shared/load-config-DIkJ9d-P.mjs";
|
|
9
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Db8ibFkp.js";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -14,7 +14,7 @@ function bindingifySourcemap(map) {
|
|
|
14
14
|
} };
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
17
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.121.0/node_modules/oxc-parser/src-js/wrap.js
|
|
18
18
|
function wrap(result) {
|
|
19
19
|
let program, module, comments, errors;
|
|
20
20
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-
|
|
3
|
-
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-
|
|
4
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./constructors-
|
|
5
|
-
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Db8ibFkp.js";
|
|
2
|
+
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-B2FA5DNv.js";
|
|
3
|
+
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-nyELQq9T.js";
|
|
4
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./constructors-LtcP0f-6.js";
|
|
5
|
+
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-CkWJwi9L.js";
|
|
6
6
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
7
7
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tt as NormalizedOutputOptions, c as InputOptions, ln as freeExternalMemory, mt as defineParallelPlugin, sn as RolldownOutput, tn as OutputOptions } from "./shared/define-config-
|
|
1
|
+
import { Tt as NormalizedOutputOptions, c as InputOptions, ln as freeExternalMemory, mt as defineParallelPlugin, sn as RolldownOutput, tn as OutputOptions } from "./shared/define-config-Cr6054d_.mjs";
|
|
2
2
|
import { t as BuiltinPlugin } from "./shared/utils-6wxe_LMG.mjs";
|
|
3
3
|
import { a as transform$1, c as MinifyResult$2, d as ParseResult$3, f as ParserOptions$3, g as resolveTsconfig, h as TsconfigCache$2, i as TsconfigRawOptions$1, l as minify$1, m as parseSync$1, n as TransformResult$1, o as transformSync$1, p as parse$1, r as TsconfigCompilerOptions$1, s as MinifyOptions$2, t as TransformOptions$2, u as minifySync$1 } from "./shared/transform-DEgNAQOQ.mjs";
|
|
4
4
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-BVnf_fH1.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
3
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-D0o84ejN.mjs";
|
|
2
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-MqDue3xO.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-CfQ_wZyF.mjs";
|
|
4
4
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CQ6njWsV.mjs";
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
6
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-B_jvq8dU.mjs";
|
|
6
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-BGLoUvKR.mjs";
|
|
7
7
|
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-Cwoo4h_o.mjs";
|
|
8
8
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-
|
|
1
|
+
import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-Cr6054d_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../pluginutils/dist/filter/filter-vite-plugins.d.ts
|
|
4
4
|
/**
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-
|
|
3
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
1
|
+
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-Db8ibFkp.js";
|
|
2
|
+
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-B2FA5DNv.js";
|
|
3
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-nyELQq9T.js";
|
|
4
4
|
import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C6h4g8dA.mjs";
|
|
2
|
-
import { $ as VERSION, $t as MinifyOptions, A as SourceDescription, At as WarningHandlerWithDefault, Bt as build, C as PartialResolvedId, Ct as RolldownFsModule, D as ResolvedId, Dt as TransformOptions, E as ResolveIdResult, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkingContext, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingOptions, Kt as CodeSplittingGroup, Lt as rolldown, Mt as watch, Nt as RolldownWatcher, O as RolldownPlugin, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GlobalsFunction, Rt as RolldownBuild, S as ParallelPluginHooks, St as RolldownFileStats, T as ResolveIdExtraOptions, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as ChunkFileNamesFunction, Xt as GeneratedCodeOptions, Yt as CommentsOptions, Z as PreRenderedChunk, Zt as GeneratedCodePreset, _ as ImportKind, _t as GeneralHookFilter, a as ExternalOption, an as RenderedChunk, at as TransformPluginContext, b as ModuleType, bt as BufferEncoding, c as InputOptions, cn as SourceMap, ct as EmittedFile, d as WatcherFileWatcherOptions, dn as SourcemapIgnoreListOption, dt as PluginContext, en as ModuleFormat, et as BundleError, f as WatcherOptions, ft as PluginContextResolveOptions, g as HookFilterExtension, gt as PluginContextMeta, h as FunctionPluginHooks, ht as MinimalPluginContext, i as RolldownOptions, in as OutputChunk, it as TreeshakingOptions, j as TransformResult, jt as RolldownMagicString, k as RolldownPluginOption, kt as LoggingFunction, l as ModuleTypes, lt as EmittedPrebuiltChunk, m as CustomPluginOptions, n as RolldownOptionsFunction, nn as PreRenderedAsset, nt as SourceMapInput, o as ExternalOptionFunction, on as RenderedModule, ot as EmittedAsset, p as AsyncPluginHooks, pt as DefineParallelPluginResult, qt as CodeSplittingNameFunction, r as defineConfig, rn as OutputAsset, rt as OutputBundle, s as InputOption, sn as RolldownOutput, st as EmittedChunk, t as ConfigExport, tn as OutputOptions, tt as ExistingRawSourceMap, u as OptimizationOptions, un as ModuleInfo, ut as GetModuleInfo, v as LoadResult, vt as HookFilter, w as Plugin, wt as InternalModuleFormat, x as ObjectHook, xt as RolldownDirectoryEntry, y as ModuleOptions, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-
|
|
2
|
+
import { $ as VERSION, $t as MinifyOptions, A as SourceDescription, At as WarningHandlerWithDefault, Bt as build, C as PartialResolvedId, Ct as RolldownFsModule, D as ResolvedId, Dt as TransformOptions, E as ResolveIdResult, Et as NormalizedInputOptions, Ft as RolldownWatcherWatcherEventMap, Gt as ChunkingContext, Ht as AdvancedChunksGroup, It as WatchOptions, Jt as CodeSplittingOptions, Kt as CodeSplittingGroup, Lt as rolldown, Mt as watch, Nt as RolldownWatcher, O as RolldownPlugin, Ot as ChecksOptions, Pt as RolldownWatcherEvent, Q as RUNTIME_MODULE_ID, Qt as GlobalsFunction, Rt as RolldownBuild, S as ParallelPluginHooks, St as RolldownFileStats, T as ResolveIdExtraOptions, Tt as NormalizedOutputOptions, Ut as AdvancedChunksOptions, Vt as AddonFunction, Wt as ChunkFileNamesFunction, Xt as GeneratedCodeOptions, Yt as CommentsOptions, Z as PreRenderedChunk, Zt as GeneratedCodePreset, _ as ImportKind, _t as GeneralHookFilter, a as ExternalOption, an as RenderedChunk, at as TransformPluginContext, b as ModuleType, bt as BufferEncoding, c as InputOptions, cn as SourceMap, ct as EmittedFile, d as WatcherFileWatcherOptions, dn as SourcemapIgnoreListOption, dt as PluginContext, en as ModuleFormat, et as BundleError, f as WatcherOptions, ft as PluginContextResolveOptions, g as HookFilterExtension, gt as PluginContextMeta, h as FunctionPluginHooks, ht as MinimalPluginContext, i as RolldownOptions, in as OutputChunk, it as TreeshakingOptions, j as TransformResult, jt as RolldownMagicString, k as RolldownPluginOption, kt as LoggingFunction, l as ModuleTypes, lt as EmittedPrebuiltChunk, m as CustomPluginOptions, n as RolldownOptionsFunction, nn as PreRenderedAsset, nt as SourceMapInput, o as ExternalOptionFunction, on as RenderedModule, ot as EmittedAsset, p as AsyncPluginHooks, pt as DefineParallelPluginResult, qt as CodeSplittingNameFunction, r as defineConfig, rn as OutputAsset, rt as OutputBundle, s as InputOption, sn as RolldownOutput, st as EmittedChunk, t as ConfigExport, tn as OutputOptions, tt as ExistingRawSourceMap, u as OptimizationOptions, un as ModuleInfo, ut as GetModuleInfo, v as LoadResult, vt as HookFilter, w as Plugin, wt as InternalModuleFormat, x as ObjectHook, xt as RolldownDirectoryEntry, y as ModuleOptions, yt as ModuleTypeFilter, zt as BuildOptions } from "./shared/define-config-Cr6054d_.mjs";
|
|
3
3
|
import { o as PartialNull } from "./shared/utils-6wxe_LMG.mjs";
|
|
4
4
|
export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedChunk, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, ExternalOptionFunction, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, 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, PluginContextResolveOptions, PreRenderedAsset, PreRenderedChunk, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, RolldownMagicString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherFileWatcherOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import {
|
|
4
|
-
import "./shared/rolldown-build-ChZOz6BP.mjs";
|
|
5
|
-
import "./shared/error-CQ6njWsV.mjs";
|
|
6
|
-
import "./shared/parse-CRhjbrcT.mjs";
|
|
7
|
-
import { t as rolldown } from "./shared/rolldown-C3wFxOwq.mjs";
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-Bkj4zPhn.mjs";
|
|
2
|
+
import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-MqDue3xO.mjs";
|
|
3
|
+
import { t as rolldown } from "./shared/rolldown-B5m6XtwJ.mjs";
|
|
8
4
|
import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
|
|
9
5
|
import { isMainThread } from "node:worker_threads";
|
|
10
6
|
import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-Db8ibFkp.js}
RENAMED
|
@@ -196,17 +196,25 @@ var BuiltinPlugin = class {
|
|
|
196
196
|
function makeBuiltinPluginCallable(plugin) {
|
|
197
197
|
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
198
198
|
const wrappedPlugin = plugin;
|
|
199
|
-
for (const key in callablePlugin)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
199
|
+
for (const key in callablePlugin) {
|
|
200
|
+
const wrappedHook = async function(...args) {
|
|
201
|
+
try {
|
|
202
|
+
return await callablePlugin[key](...args);
|
|
203
|
+
} catch (e) {
|
|
204
|
+
if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
|
|
205
|
+
return error(logPluginError(e, plugin.name, {
|
|
206
|
+
hook: key,
|
|
207
|
+
id: key === "transform" ? args[2] : void 0
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const order = callablePlugin.getOrder(key);
|
|
212
|
+
if (order == void 0) wrappedPlugin[key] = wrappedHook;
|
|
213
|
+
else wrappedPlugin[key] = {
|
|
214
|
+
handler: wrappedHook,
|
|
215
|
+
order
|
|
216
|
+
};
|
|
217
|
+
}
|
|
210
218
|
return wrappedPlugin;
|
|
211
219
|
}
|
|
212
220
|
function bindingifyBuiltInPlugin(plugin) {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Czbczr8Z.mjs";
|
|
3
|
-
import "./shared/error-CQ6njWsV.mjs";
|
|
4
|
-
import "./shared/parse-CRhjbrcT.mjs";
|
|
1
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-MqDue3xO.mjs";
|
|
5
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
3
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
7
4
|
//#region src/parallel-plugin-worker.ts
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-D80CXhvg.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-B_jvq8dU.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-Db8ibFkp.js";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./constructors-LtcP0f-6.js";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-D0o84ejN.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-BGLoUvKR.mjs";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-
|
|
1
|
+
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-nyELQq9T.js";
|
|
2
2
|
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
/**
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-
|
|
2
|
-
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
1
|
+
import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-Db8ibFkp.js";
|
|
2
|
+
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-nyELQq9T.js";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
5
5
|
let _lazyMatch = () => {
|
|
@@ -454,7 +454,7 @@ const win32 = /* @__PURE__ */ mix(";");
|
|
|
454
454
|
*
|
|
455
455
|
* @category Plugin APIs
|
|
456
456
|
*/
|
|
457
|
-
const VERSION = "1.0.0-rc.
|
|
457
|
+
const VERSION = "1.0.0-rc.12";
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/constants/index.ts
|
|
460
460
|
/**
|
|
@@ -747,7 +747,7 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
747
747
|
];
|
|
748
748
|
}
|
|
749
749
|
//#endregion
|
|
750
|
-
//#region ../../node_modules/.pnpm/valibot@1.
|
|
750
|
+
//#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.mjs
|
|
751
751
|
let store$4;
|
|
752
752
|
/**
|
|
753
753
|
* Returns the global configuration.
|
|
@@ -2261,6 +2261,7 @@ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
2261
2261
|
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or \`-s\` for \`.map\` file)`)),
|
|
2262
2262
|
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
2263
2263
|
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
2264
|
+
sourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Exclude source content from sourcemaps")),
|
|
2264
2265
|
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
2265
2266
|
/* @__PURE__ */ boolean(),
|
|
2266
2267
|
/* @__PURE__ */ custom(() => true),
|
|
@@ -2505,7 +2506,7 @@ function bindingAssetSource(source) {
|
|
|
2505
2506
|
return { inner: source };
|
|
2506
2507
|
}
|
|
2507
2508
|
//#endregion
|
|
2508
|
-
//#region \0@oxc-project+runtime@0.
|
|
2509
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/decorate.js
|
|
2509
2510
|
function __decorate(decorators, target, key, desc) {
|
|
2510
2511
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2511
2512
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2877,6 +2878,24 @@ Object.defineProperty(BindingMagicString.prototype, "isRolldownMagicString", {
|
|
|
2877
2878
|
writable: false,
|
|
2878
2879
|
configurable: false
|
|
2879
2880
|
});
|
|
2881
|
+
const nativeReplace = BindingMagicString.prototype.replace;
|
|
2882
|
+
const nativeReplaceAll = BindingMagicString.prototype.replaceAll;
|
|
2883
|
+
BindingMagicString.prototype.replace = function(searchValue, replacement) {
|
|
2884
|
+
if (typeof searchValue === "string") return nativeReplace.call(this, searchValue, replacement);
|
|
2885
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
2886
|
+
const lastMatchEnd = this.replaceRegex(searchValue, replacement);
|
|
2887
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
2888
|
+
else if (searchValue.sticky) searchValue.lastIndex = lastMatchEnd === -1 ? 0 : lastMatchEnd;
|
|
2889
|
+
return this;
|
|
2890
|
+
};
|
|
2891
|
+
BindingMagicString.prototype.replaceAll = function(searchValue, replacement) {
|
|
2892
|
+
if (typeof searchValue === "string") return nativeReplaceAll.call(this, searchValue, replacement);
|
|
2893
|
+
if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
|
|
2894
|
+
searchValue.lastIndex = 0;
|
|
2895
|
+
this.replaceRegex(searchValue, replacement);
|
|
2896
|
+
searchValue.lastIndex = 0;
|
|
2897
|
+
return this;
|
|
2898
|
+
};
|
|
2880
2899
|
/**
|
|
2881
2900
|
* A native MagicString implementation powered by Rust.
|
|
2882
2901
|
*
|
|
@@ -4151,6 +4170,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
4151
4170
|
get sourcemapDebugIds() {
|
|
4152
4171
|
return this.inner.sourcemapDebugIds;
|
|
4153
4172
|
}
|
|
4173
|
+
get sourcemapExcludeSources() {
|
|
4174
|
+
return this.inner.sourcemapExcludeSources;
|
|
4175
|
+
}
|
|
4154
4176
|
get sourcemapIgnoreList() {
|
|
4155
4177
|
return this.outputOptions.sourcemapIgnoreList;
|
|
4156
4178
|
}
|
|
@@ -4226,6 +4248,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "globals", null);
|
|
|
4226
4248
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "paths", null);
|
|
4227
4249
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "hashCharacters", null);
|
|
4228
4250
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapDebugIds", null);
|
|
4251
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapExcludeSources", null);
|
|
4229
4252
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreList", null);
|
|
4230
4253
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
4231
4254
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
@@ -5065,7 +5088,7 @@ const logger = createConsola({ formatOptions: { date: false } });
|
|
|
5065
5088
|
//#endregion
|
|
5066
5089
|
//#region src/utils/bindingify-output-options.ts
|
|
5067
5090
|
function bindingifyOutputOptions(outputOptions) {
|
|
5068
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5091
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5069
5092
|
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
5070
5093
|
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
|
|
5071
5094
|
return {
|
|
@@ -5077,6 +5100,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
5077
5100
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
5078
5101
|
sourcemapBaseUrl,
|
|
5079
5102
|
sourcemapDebugIds,
|
|
5103
|
+
sourcemapExcludeSources,
|
|
5080
5104
|
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
5081
5105
|
sourcemapPathTransform,
|
|
5082
5106
|
banner: bindingifyAddon(banner),
|
package/dist/shared/{bindingify-input-options-Czbczr8Z.mjs → bindingify-input-options-MqDue3xO.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-D80CXhvg.mjs";
|
|
2
|
-
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
2
|
+
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-D0o84ejN.mjs";
|
|
3
3
|
import { _ as noop, a as id, b as unsupported, f as or, h as arraify, n as code, r as exclude, s as include, t as and, u as moduleType, y as unreachable } from "./composable-filters-B2ByPP8y.mjs";
|
|
4
4
|
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-CQ6njWsV.mjs";
|
|
5
5
|
import { parseAst } from "../parse-ast-index.mjs";
|
|
@@ -7,7 +7,7 @@ import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, Bin
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.0.0-rc.
|
|
10
|
+
var version = "1.0.0-rc.12";
|
|
11
11
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/constants/version.ts
|
|
@@ -216,7 +216,7 @@ function bindingAssetSource(source) {
|
|
|
216
216
|
return { inner: source };
|
|
217
217
|
}
|
|
218
218
|
//#endregion
|
|
219
|
-
//#region \0@oxc-project+runtime@0.
|
|
219
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/decorate.js
|
|
220
220
|
function __decorate(decorators, target, key, desc) {
|
|
221
221
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
222
222
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -565,6 +565,24 @@ Object.defineProperty(BindingMagicString.prototype, "isRolldownMagicString", {
|
|
|
565
565
|
writable: false,
|
|
566
566
|
configurable: false
|
|
567
567
|
});
|
|
568
|
+
const nativeReplace = BindingMagicString.prototype.replace;
|
|
569
|
+
const nativeReplaceAll = BindingMagicString.prototype.replaceAll;
|
|
570
|
+
BindingMagicString.prototype.replace = function(searchValue, replacement) {
|
|
571
|
+
if (typeof searchValue === "string") return nativeReplace.call(this, searchValue, replacement);
|
|
572
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
573
|
+
const lastMatchEnd = this.replaceRegex(searchValue, replacement);
|
|
574
|
+
if (searchValue.global) searchValue.lastIndex = 0;
|
|
575
|
+
else if (searchValue.sticky) searchValue.lastIndex = lastMatchEnd === -1 ? 0 : lastMatchEnd;
|
|
576
|
+
return this;
|
|
577
|
+
};
|
|
578
|
+
BindingMagicString.prototype.replaceAll = function(searchValue, replacement) {
|
|
579
|
+
if (typeof searchValue === "string") return nativeReplaceAll.call(this, searchValue, replacement);
|
|
580
|
+
if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
|
|
581
|
+
searchValue.lastIndex = 0;
|
|
582
|
+
this.replaceRegex(searchValue, replacement);
|
|
583
|
+
searchValue.lastIndex = 0;
|
|
584
|
+
return this;
|
|
585
|
+
};
|
|
568
586
|
/**
|
|
569
587
|
* A native MagicString implementation powered by Rust.
|
|
570
588
|
*
|
|
@@ -1708,6 +1726,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1708
1726
|
get sourcemapDebugIds() {
|
|
1709
1727
|
return this.inner.sourcemapDebugIds;
|
|
1710
1728
|
}
|
|
1729
|
+
get sourcemapExcludeSources() {
|
|
1730
|
+
return this.inner.sourcemapExcludeSources;
|
|
1731
|
+
}
|
|
1711
1732
|
get sourcemapIgnoreList() {
|
|
1712
1733
|
return this.outputOptions.sourcemapIgnoreList;
|
|
1713
1734
|
}
|
|
@@ -1783,6 +1804,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "globals", null);
|
|
|
1783
1804
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "paths", null);
|
|
1784
1805
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "hashCharacters", null);
|
|
1785
1806
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapDebugIds", null);
|
|
1807
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapExcludeSources", null);
|
|
1786
1808
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreList", null);
|
|
1787
1809
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
1788
1810
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-D0o84ejN.mjs";
|
|
2
2
|
//#region src/builtin-plugin/constructors.ts
|
|
3
3
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
4
4
|
return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as Program } from "./types-K2r0mx6Y.mjs";
|
|
2
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-C6h4g8dA.mjs";
|
|
3
3
|
import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-6wxe_LMG.mjs";
|
|
4
4
|
import { BindingHookResolveIdExtraArgs, BindingPluginContextResolveOptions, BindingRenderedChunk, BindingTransformHookExtraArgs, ExternalMemoryStatus, JsxOptions, MinifyOptions, ParserOptions, PreRenderedChunk, TransformOptions } from "../binding.cjs";
|
|
@@ -457,6 +457,16 @@ interface OutputOptions {
|
|
|
457
457
|
*/
|
|
458
458
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
459
459
|
/**
|
|
460
|
+
* Whether to exclude the original source code from sourcemaps.
|
|
461
|
+
*
|
|
462
|
+
* When `true`, the `sourcesContent` field is omitted from the generated sourcemap,
|
|
463
|
+
* reducing the sourcemap file size. The sourcemap will still contain source file paths
|
|
464
|
+
* and mappings, so debugging works if the original files are available.
|
|
465
|
+
*
|
|
466
|
+
* @default false
|
|
467
|
+
*/
|
|
468
|
+
sourcemapExcludeSources?: boolean;
|
|
469
|
+
/**
|
|
460
470
|
* A string to prepend to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
|
|
461
471
|
*
|
|
462
472
|
* See {@linkcode intro | output.intro}, {@linkcode postBanner | output.postBanner} as well.
|
|
@@ -1393,6 +1403,10 @@ declare function watch(input: WatchOptions | WatchOptions[]): RolldownWatcher;
|
|
|
1393
1403
|
//#region src/binding-magic-string.d.ts
|
|
1394
1404
|
interface RolldownMagicString extends BindingMagicString {
|
|
1395
1405
|
readonly isRolldownMagicString: true;
|
|
1406
|
+
/** Accepts a string or RegExp pattern. RegExp supports `$&`, `$$`, and `$N` substitutions. */
|
|
1407
|
+
replace(from: string | RegExp, to: string): this;
|
|
1408
|
+
/** Accepts a string or RegExp pattern. RegExp must have the global (`g`) flag. */
|
|
1409
|
+
replaceAll(from: string | RegExp, to: string): this;
|
|
1396
1410
|
}
|
|
1397
1411
|
type RolldownMagicStringConstructor = Omit<typeof BindingMagicString, "prototype"> & {
|
|
1398
1412
|
new (...args: ConstructorParameters<typeof BindingMagicString>): RolldownMagicString;
|
|
@@ -1746,6 +1760,8 @@ interface NormalizedOutputOptions {
|
|
|
1746
1760
|
hashCharacters: "base64" | "base36" | "hex";
|
|
1747
1761
|
/** @see {@linkcode OutputOptions.sourcemapDebugIds | sourcemapDebugIds} */
|
|
1748
1762
|
sourcemapDebugIds: boolean;
|
|
1763
|
+
/** @see {@linkcode OutputOptions.sourcemapExcludeSources | sourcemapExcludeSources} */
|
|
1764
|
+
sourcemapExcludeSources: boolean;
|
|
1749
1765
|
/** @see {@linkcode OutputOptions.sourcemapIgnoreList | sourcemapIgnoreList} */
|
|
1750
1766
|
sourcemapIgnoreList: boolean | SourcemapIgnoreListOption | StringOrRegExp$1 | undefined;
|
|
1751
1767
|
/** @see {@linkcode OutputOptions.sourcemapPathTransform | sourcemapPathTransform} */
|
|
@@ -1930,8 +1946,6 @@ interface PluginContextMeta {
|
|
|
1930
1946
|
}
|
|
1931
1947
|
/** @category Plugin APIs */
|
|
1932
1948
|
interface MinimalPluginContext {
|
|
1933
|
-
/** @hidden */
|
|
1934
|
-
readonly pluginName: string;
|
|
1935
1949
|
/**
|
|
1936
1950
|
* Similar to {@linkcode warn | this.warn}, except that it will also abort
|
|
1937
1951
|
* the bundling process with an error.
|
|
@@ -12,17 +12,25 @@ var BuiltinPlugin = class {
|
|
|
12
12
|
function makeBuiltinPluginCallable(plugin) {
|
|
13
13
|
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
14
14
|
const wrappedPlugin = plugin;
|
|
15
|
-
for (const key in callablePlugin)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
for (const key in callablePlugin) {
|
|
16
|
+
const wrappedHook = async function(...args) {
|
|
17
|
+
try {
|
|
18
|
+
return await callablePlugin[key](...args);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
|
|
21
|
+
return error(logPluginError(e, plugin.name, {
|
|
22
|
+
hook: key,
|
|
23
|
+
id: key === "transform" ? args[2] : void 0
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const order = callablePlugin.getOrder(key);
|
|
28
|
+
if (order == void 0) wrappedPlugin[key] = wrappedHook;
|
|
29
|
+
else wrappedPlugin[key] = {
|
|
30
|
+
handler: wrappedHook,
|
|
31
|
+
order
|
|
32
|
+
};
|
|
33
|
+
}
|
|
26
34
|
return wrappedPlugin;
|
|
27
35
|
}
|
|
28
36
|
function bindingifyBuiltInPlugin(plugin) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
2
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.121.0/node_modules/oxc-parser/src-js/wrap.js
|
|
3
3
|
function wrap(result) {
|
|
4
4
|
let program, module, comments, errors;
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-
|
|
1
|
+
import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-CfQ_wZyF.mjs";
|
|
2
2
|
//#region src/api/rolldown/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* The API compatible with Rollup's `rollup` function.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as logInputHookInOutputPlugin, n as error } from "./logs-D80CXhvg.mjs";
|
|
2
|
-
import { n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
3
|
-
import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-
|
|
2
|
+
import { n as BuiltinPlugin } from "./normalize-string-or-regex-D0o84ejN.mjs";
|
|
3
|
+
import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-MqDue3xO.mjs";
|
|
4
4
|
import { v as unimplemented } from "./composable-filters-B2ByPP8y.mjs";
|
|
5
5
|
import { i as unwrapBindingResult } from "./error-CQ6njWsV.mjs";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
@@ -211,7 +211,7 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
211
211
|
];
|
|
212
212
|
}
|
|
213
213
|
//#endregion
|
|
214
|
-
//#region ../../node_modules/.pnpm/valibot@1.
|
|
214
|
+
//#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.mjs
|
|
215
215
|
let store$4;
|
|
216
216
|
/**
|
|
217
217
|
* Returns the global configuration.
|
|
@@ -1818,6 +1818,7 @@ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
|
1818
1818
|
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or \`-s\` for \`.map\` file)`)),
|
|
1819
1819
|
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
1820
1820
|
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
1821
|
+
sourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Exclude source content from sourcemaps")),
|
|
1821
1822
|
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1822
1823
|
/* @__PURE__ */ boolean(),
|
|
1823
1824
|
/* @__PURE__ */ custom(() => true),
|
|
@@ -2973,7 +2974,7 @@ function createTestingLogger() {
|
|
|
2973
2974
|
//#endregion
|
|
2974
2975
|
//#region src/utils/bindingify-output-options.ts
|
|
2975
2976
|
function bindingifyOutputOptions(outputOptions) {
|
|
2976
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
2977
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
2977
2978
|
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
2978
2979
|
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
|
|
2979
2980
|
return {
|
|
@@ -2985,6 +2986,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2985
2986
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
2986
2987
|
sourcemapBaseUrl,
|
|
2987
2988
|
sourcemapDebugIds,
|
|
2989
|
+
sourcemapExcludeSources,
|
|
2988
2990
|
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
2989
2991
|
sourcemapPathTransform,
|
|
2990
2992
|
banner: bindingifyAddon(banner),
|