@rolldown/browser 1.0.0-rc.3 → 1.0.0-rc.5
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 +9 -8
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +8 -7
- package/dist/{constructors-B8gqcrFr.js → constructors-D2wC6vT5.js} +2 -5
- package/dist/error-Cqi7XTjG.js +158 -0
- package/dist/experimental-index.browser.mjs +61 -32
- package/dist/experimental-index.d.mts +74 -29
- package/dist/experimental-index.mjs +63 -34
- package/dist/filter-index.d.mts +1 -1
- package/dist/get-log-filter.d.mts +3 -7
- package/dist/index.browser.mjs +3 -2
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +8 -7
- package/dist/{normalize-string-or-regex-CL-PJZI7.js → normalize-string-or-regex-B0X1hEA4.js} +1 -1
- package/dist/parallel-plugin-worker.mjs +4 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -2
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +2 -2
- package/dist/plugins-index.mjs +2 -2
- package/dist/rolldown-binding.wasi-browser.js +4 -0
- package/dist/rolldown-binding.wasi.cjs +4 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-D38aLTC9.js → rolldown-build-D_uxS53o.js} +39 -152
- package/dist/shared/{bindingify-input-options-C95V1-v7.mjs → bindingify-input-options-CntM6OGD.mjs} +19 -94
- package/dist/shared/{constructors-5bt5oBhE.d.mts → constructors-CtryxP-m.d.mts} +3 -4
- package/dist/shared/{constructors-BTW-c3jX.mjs → constructors-f9W8MQZ_.mjs} +2 -5
- package/dist/shared/{define-config-C3-RX4yW.d.mts → define-config-CMsxCx69.d.mts} +79 -6
- package/dist/shared/error-DTJQ7tjB.mjs +89 -0
- package/dist/shared/get-log-filter-MhZu4MML.d.mts +7 -0
- package/dist/shared/{load-config-By_XBxvI.mjs → load-config-DwB0RYGU.mjs} +1 -1
- package/dist/shared/{logs-B2CASPcx.mjs → logs-CCc_0vhs.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-DIwprzLy.mjs → normalize-string-or-regex-CdT2cmt4.mjs} +1 -1
- package/dist/shared/{parse-Dltex8ec.mjs → parse-TCwR4L_P.mjs} +21 -4
- package/dist/shared/{rolldown-BMW1SW-b.mjs → rolldown-aTvfnZNF.mjs} +1 -1
- package/dist/shared/{rolldown-build-DS1J_xeK.mjs → rolldown-build-Bvz-G_y6.mjs} +23 -8
- package/dist/shared/transform-ChAcTNv3.d.mts +92 -0
- package/dist/shared/transform-DhHPKnL-.mjs +90 -0
- package/dist/shared/{types-B9-K3ZPX.d.mts → types-CMaRlYYn.d.mts} +2 -2
- package/dist/shared/{watch-BvXJc2Ra.mjs → watch-BWJtu1lP.mjs} +4 -3
- package/dist/transform-BQei0Mty.js +90 -0
- package/dist/utils-index.browser.mjs +2405 -0
- package/dist/utils-index.d.mts +350 -0
- package/dist/utils-index.mjs +2406 -0
- package/package.json +1 -1
- /package/dist/shared/{define-config-Dlptvz3X.mjs → define-config-BVG4QvnP.mjs} +0 -0
- /package/dist/shared/{logging-RB67zQ4N.d.mts → logging-C28dTP71.d.mts} +0 -0
- /package/dist/shared/{prompt-CYPmuhh-.mjs → prompt-BcvPElI8.mjs} +0 -0
- /package/dist/shared/{utils-CqMTwlsR.d.mts → utils-DOXNRW_3.d.mts} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { o as PartialNull } from "./shared/utils-
|
|
4
|
-
|
|
5
|
-
export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, BindingMagicString, type BufferEncoding, type BuildOptions, type ChecksOptions, type ChunkFileNamesFunction, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
|
|
1
|
+
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C28dTP71.mjs";
|
|
2
|
+
import { $ as VERSION, $t as OutputOptions, A as TransformResult, At as watch, Bt as AdvancedChunksGroup, C as Plugin, Ct as InternalModuleFormat, D as RolldownPlugin, Dt as ChecksOptions, E as ResolvedId, Et as TransformOptions, Ft as rolldown, Gt as CodeSplittingNameFunction, Ht as ChunkFileNamesFunction, It as RolldownBuild, Jt as GeneratedCodeOptions, Kt as CodeSplittingOptions, Lt as BuildOptions, Mt as RolldownWatcherEvent, Nt as RolldownWatcherWatcherEventMap, O as RolldownPluginOption, Ot as LoggingFunction, Pt as WatchOptions, Q as RUNTIME_MODULE_ID, Qt as ModuleFormat, Rt as build, S as PartialResolvedId, St as RolldownFsModule, T as ResolveIdResult, Tt as NormalizedInputOptions, Ut as ChunkingContext, Vt as AdvancedChunksOptions, Wt as CodeSplittingGroup, X as BindingMagicString, Xt as GlobalsFunction, Yt as GeneratedCodePreset, Z as PreRenderedChunk, Zt as MinifyOptions, _ as LoadResult, _t as HookFilter, a as ExternalOption, an as RolldownOutput, at as EmittedAsset, b as ObjectHook, bt as RolldownDirectoryEntry, c as InputOptions, cn as ModuleInfo, ct as EmittedPrebuiltChunk, d as WatcherOptions, dt as PluginContextResolveOptions, en as PreRenderedAsset, et as ExistingRawSourceMap, f as AsyncPluginHooks, ft as DefineParallelPluginResult, g as ImportKind, gt as GeneralHookFilter, h as HookFilterExtension, ht as PluginContextMeta, i as RolldownOptions, in as RenderedModule, it as TransformPluginContext, jt as RolldownWatcher, k as SourceDescription, kt as WarningHandlerWithDefault, l as ModuleTypes, ln as SourcemapIgnoreListOption, lt as GetModuleInfo, m as FunctionPluginHooks, mt as MinimalPluginContext, n as RolldownOptionsFunction, nn as OutputChunk, nt as OutputBundle, o as ExternalOptionFunction, on as SourceMap, ot as EmittedChunk, p as CustomPluginOptions, qt as CommentsOptions, r as defineConfig, rn as RenderedChunk, rt as TreeshakingOptions, s as InputOption, st as EmittedFile, t as ConfigExport, tn as OutputAsset, tt as SourceMapInput, u as OptimizationOptions, ut as PluginContext, v as ModuleOptions, vt as ModuleTypeFilter, w as ResolveIdExtraOptions, wt as NormalizedOutputOptions, x as ParallelPluginHooks, xt as RolldownFileStats, y as ModuleType, yt as BufferEncoding, zt as AddonFunction } from "./shared/define-config-CMsxCx69.mjs";
|
|
3
|
+
import { o as PartialNull } from "./shared/utils-DOXNRW_3.mjs";
|
|
4
|
+
export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, 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, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import "./shared/normalize-string-or-regex-
|
|
3
|
-
import {
|
|
4
|
-
import "./shared/rolldown-build-
|
|
5
|
-
import "./shared/
|
|
6
|
-
import
|
|
7
|
-
import { t as
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-BWJtu1lP.mjs";
|
|
2
|
+
import "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
|
|
3
|
+
import { b as VERSION, y as RUNTIME_MODULE_ID } from "./shared/bindingify-input-options-CntM6OGD.mjs";
|
|
4
|
+
import "./shared/rolldown-build-Bvz-G_y6.mjs";
|
|
5
|
+
import "./shared/error-DTJQ7tjB.mjs";
|
|
6
|
+
import "./shared/parse-TCwR4L_P.mjs";
|
|
7
|
+
import { t as rolldown } from "./shared/rolldown-aTvfnZNF.mjs";
|
|
8
|
+
import { t as defineConfig } from "./shared/define-config-BVG4QvnP.mjs";
|
|
8
9
|
import { isMainThread } from "node:worker_threads";
|
|
9
10
|
import { BindingMagicString, initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
10
11
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./shared/normalize-string-or-regex-
|
|
2
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-
|
|
3
|
-
import "./shared/
|
|
1
|
+
import "./shared/normalize-string-or-regex-CdT2cmt4.mjs";
|
|
2
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-CntM6OGD.mjs";
|
|
3
|
+
import "./shared/error-DTJQ7tjB.mjs";
|
|
4
|
+
import "./shared/parse-TCwR4L_P.mjs";
|
|
4
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
6
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Plugin } from "./shared/define-config-
|
|
2
|
-
import { i as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { C as Plugin } from "./shared/define-config-CMsxCx69.mjs";
|
|
2
|
+
import { i as MaybePromise } from "./shared/utils-DOXNRW_3.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
1
|
+
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-CCc_0vhs.mjs";
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-TCwR4L_P.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/parse-ast-index.ts
|
|
5
5
|
function wrap(result, filename, sourceText) {
|
|
@@ -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-B0X1hEA4.js";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./constructors-D2wC6vT5.js";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
5
5
|
/**
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { t as BuiltinPlugin } from "./shared/utils-DOXNRW_3.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CtryxP-m.mjs";
|
|
3
3
|
import { BindingReplacePluginConfig } from "../binding.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
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-CdT2cmt4.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-f9W8MQZ_.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
5
5
|
/**
|
|
@@ -111,6 +111,7 @@ export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
111
111
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
112
112
|
export const ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
113
113
|
export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
114
|
+
export const TsconfigCache = __napiModule.exports.TsconfigCache
|
|
114
115
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
115
116
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
116
117
|
export const BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
@@ -121,8 +122,11 @@ export const BindingPropertyWriteSideEffects = __napiModule.exports.BindingPrope
|
|
|
121
122
|
export const BindingRebuildStrategy = __napiModule.exports.BindingRebuildStrategy
|
|
122
123
|
export const collapseSourcemaps = __napiModule.exports.collapseSourcemaps
|
|
123
124
|
export const createTokioRuntime = __napiModule.exports.createTokioRuntime
|
|
125
|
+
export const enhancedTransform = __napiModule.exports.enhancedTransform
|
|
126
|
+
export const enhancedTransformSync = __napiModule.exports.enhancedTransformSync
|
|
124
127
|
export const FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
125
128
|
export const initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
126
129
|
export const registerPlugins = __napiModule.exports.registerPlugins
|
|
130
|
+
export const resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
127
131
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
128
132
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
@@ -156,6 +156,7 @@ module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
|
156
156
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
157
157
|
module.exports.ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
158
158
|
module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
159
|
+
module.exports.TsconfigCache = __napiModule.exports.TsconfigCache
|
|
159
160
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
160
161
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
161
162
|
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy
|
|
@@ -166,8 +167,11 @@ module.exports.BindingPropertyWriteSideEffects = __napiModule.exports.BindingPro
|
|
|
166
167
|
module.exports.BindingRebuildStrategy = __napiModule.exports.BindingRebuildStrategy
|
|
167
168
|
module.exports.collapseSourcemaps = __napiModule.exports.collapseSourcemaps
|
|
168
169
|
module.exports.createTokioRuntime = __napiModule.exports.createTokioRuntime
|
|
170
|
+
module.exports.enhancedTransform = __napiModule.exports.enhancedTransform
|
|
171
|
+
module.exports.enhancedTransformSync = __napiModule.exports.enhancedTransformSync
|
|
169
172
|
module.exports.FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
170
173
|
module.exports.initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
171
174
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
175
|
+
module.exports.resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
172
176
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
173
177
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
Binary file
|
|
@@ -1,5 +1,6 @@
|
|
|
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 {
|
|
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-B0X1hEA4.js";
|
|
2
|
+
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-Cqi7XTjG.js";
|
|
3
|
+
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
3
4
|
|
|
4
5
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
5
6
|
let _lazyMatch = () => {
|
|
@@ -398,7 +399,7 @@ const basename = function(p, extension) {
|
|
|
398
399
|
}
|
|
399
400
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
400
401
|
};
|
|
401
|
-
const parse$
|
|
402
|
+
const parse$1 = function(p) {
|
|
402
403
|
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
403
404
|
const base = basename(p);
|
|
404
405
|
const extension = extname(base);
|
|
@@ -424,7 +425,7 @@ const _path = {
|
|
|
424
425
|
matchesGlob,
|
|
425
426
|
normalize,
|
|
426
427
|
normalizeString,
|
|
427
|
-
parse: parse$
|
|
428
|
+
parse: parse$1,
|
|
428
429
|
relative,
|
|
429
430
|
resolve,
|
|
430
431
|
sep,
|
|
@@ -451,7 +452,7 @@ const win32 = /* @__PURE__ */ mix(";");
|
|
|
451
452
|
|
|
452
453
|
//#endregion
|
|
453
454
|
//#region package.json
|
|
454
|
-
var version = "1.0.0-rc.
|
|
455
|
+
var version = "1.0.0-rc.5";
|
|
455
456
|
|
|
456
457
|
//#endregion
|
|
457
458
|
//#region src/constants/version.ts
|
|
@@ -2050,7 +2051,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
2050
2051
|
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
2051
2052
|
pluginTimings: pipe(optional(boolean()), description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
2052
2053
|
duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
2053
|
-
unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported"))
|
|
2054
|
+
unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
2055
|
+
ineffectiveDynamicImport: pipe(optional(boolean()), description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
|
|
2054
2056
|
});
|
|
2055
2057
|
isTypeTrue();
|
|
2056
2058
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
@@ -2274,7 +2276,9 @@ const AdvancedChunksSchema = strictObject({
|
|
|
2274
2276
|
minShareCount: optional(number()),
|
|
2275
2277
|
maxSize: optional(number()),
|
|
2276
2278
|
minModuleSize: optional(number()),
|
|
2277
|
-
maxModuleSize: optional(number())
|
|
2279
|
+
maxModuleSize: optional(number()),
|
|
2280
|
+
entriesAware: optional(boolean()),
|
|
2281
|
+
entriesAwareMergeThreshold: optional(number())
|
|
2278
2282
|
})))
|
|
2279
2283
|
});
|
|
2280
2284
|
isTypeTrue();
|
|
@@ -2343,7 +2347,12 @@ const OutputOptionsSchema = strictObject({
|
|
|
2343
2347
|
manualChunks: optional(ManualChunksFunctionSchema),
|
|
2344
2348
|
codeSplitting: optional(union([boolean(), AdvancedChunksSchema])),
|
|
2345
2349
|
advancedChunks: optional(AdvancedChunksSchema),
|
|
2346
|
-
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
|
|
2350
|
+
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control legal comments in the output")),
|
|
2351
|
+
comments: pipe(optional(union([boolean(), strictObject({
|
|
2352
|
+
legal: optional(boolean()),
|
|
2353
|
+
annotation: optional(boolean()),
|
|
2354
|
+
jsdoc: optional(boolean())
|
|
2355
|
+
})])), description("Control comments in the output")),
|
|
2347
2356
|
plugins: optional(custom(() => true)),
|
|
2348
2357
|
polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
|
|
2349
2358
|
hoistTransitiveImports: optional(literal(false)),
|
|
@@ -2559,7 +2568,7 @@ function bindingAssetSource(source) {
|
|
|
2559
2568
|
}
|
|
2560
2569
|
|
|
2561
2570
|
//#endregion
|
|
2562
|
-
//#region \0@oxc-project+runtime@0.
|
|
2571
|
+
//#region \0@oxc-project+runtime@0.114.0/helpers/decorate.js
|
|
2563
2572
|
function __decorate(decorators, target, key, desc) {
|
|
2564
2573
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2565
2574
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2747,22 +2756,6 @@ __decorate([lazyProp], OutputChunkImpl.prototype, "dynamicImports", null);
|
|
|
2747
2756
|
__decorate([lazyProp], OutputChunkImpl.prototype, "moduleIds", null);
|
|
2748
2757
|
__decorate([lazyProp], OutputChunkImpl.prototype, "map", null);
|
|
2749
2758
|
|
|
2750
|
-
//#endregion
|
|
2751
|
-
//#region src/types/sourcemap.ts
|
|
2752
|
-
function bindingifySourcemap$1(map) {
|
|
2753
|
-
if (map == null) return;
|
|
2754
|
-
return { inner: typeof map === "string" ? map : {
|
|
2755
|
-
file: map.file ?? void 0,
|
|
2756
|
-
mappings: map.mappings,
|
|
2757
|
-
sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
|
|
2758
|
-
sources: map.sources?.map((s) => s ?? void 0),
|
|
2759
|
-
sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
|
|
2760
|
-
names: map.names,
|
|
2761
|
-
x_google_ignoreList: map.x_google_ignoreList,
|
|
2762
|
-
debugId: "debugId" in map ? map.debugId : void 0
|
|
2763
|
-
} };
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
2759
|
//#endregion
|
|
2767
2760
|
//#region src/utils/transform-to-rollup-output.ts
|
|
2768
2761
|
function transformToRollupSourceMap(map) {
|
|
@@ -2947,58 +2940,6 @@ var RolldownOutputImpl = class extends PlainObjectLike {
|
|
|
2947
2940
|
};
|
|
2948
2941
|
__decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
|
|
2949
2942
|
|
|
2950
|
-
//#endregion
|
|
2951
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.112.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2952
|
-
function wrap$1(result) {
|
|
2953
|
-
let program, module, comments, errors;
|
|
2954
|
-
return {
|
|
2955
|
-
get program() {
|
|
2956
|
-
if (!program) program = jsonParseAst(result.program);
|
|
2957
|
-
return program;
|
|
2958
|
-
},
|
|
2959
|
-
get module() {
|
|
2960
|
-
if (!module) module = result.module;
|
|
2961
|
-
return module;
|
|
2962
|
-
},
|
|
2963
|
-
get comments() {
|
|
2964
|
-
if (!comments) comments = result.comments;
|
|
2965
|
-
return comments;
|
|
2966
|
-
},
|
|
2967
|
-
get errors() {
|
|
2968
|
-
if (!errors) errors = result.errors;
|
|
2969
|
-
return errors;
|
|
2970
|
-
}
|
|
2971
|
-
};
|
|
2972
|
-
}
|
|
2973
|
-
function jsonParseAst(programJson) {
|
|
2974
|
-
const { node: program, fixes } = JSON.parse(programJson);
|
|
2975
|
-
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
2976
|
-
return program;
|
|
2977
|
-
}
|
|
2978
|
-
function applyFix(program, fixPath) {
|
|
2979
|
-
let node = program;
|
|
2980
|
-
for (const key of fixPath) node = node[key];
|
|
2981
|
-
if (node.bigint) node.value = BigInt(node.bigint);
|
|
2982
|
-
else try {
|
|
2983
|
-
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
2984
|
-
} catch {}
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
//#endregion
|
|
2988
|
-
//#region src/utils/parse.ts
|
|
2989
|
-
/**
|
|
2990
|
-
* Parse asynchronously.
|
|
2991
|
-
*
|
|
2992
|
-
* Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
|
|
2993
|
-
*/
|
|
2994
|
-
async function parse$1(filename, sourceText, options) {
|
|
2995
|
-
return wrap$1(await parse(filename, sourceText, options));
|
|
2996
|
-
}
|
|
2997
|
-
/** Parse synchronously. */
|
|
2998
|
-
function parseSync$1(filename, sourceText, options) {
|
|
2999
|
-
return wrap$1(parseSync(filename, sourceText, options));
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
2943
|
//#endregion
|
|
3003
2944
|
//#region src/parse-ast-index.ts
|
|
3004
2945
|
function wrap(result, filename, sourceText) {
|
|
@@ -3035,76 +2976,6 @@ function parseAst(sourceText, options, filename) {
|
|
|
3035
2976
|
}), filename, sourceText);
|
|
3036
2977
|
}
|
|
3037
2978
|
|
|
3038
|
-
//#endregion
|
|
3039
|
-
//#region src/utils/error.ts
|
|
3040
|
-
function unwrapBindingResult(container) {
|
|
3041
|
-
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
|
|
3042
|
-
return container;
|
|
3043
|
-
}
|
|
3044
|
-
function normalizeBindingResult(container) {
|
|
3045
|
-
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
|
|
3046
|
-
return container;
|
|
3047
|
-
}
|
|
3048
|
-
function normalizeBindingError(e) {
|
|
3049
|
-
return e.type === "JsError" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
3050
|
-
code: e.field0.kind,
|
|
3051
|
-
kind: e.field0.kind,
|
|
3052
|
-
message: e.field0.message,
|
|
3053
|
-
id: e.field0.id,
|
|
3054
|
-
exporter: e.field0.exporter,
|
|
3055
|
-
loc: e.field0.loc,
|
|
3056
|
-
pos: e.field0.pos,
|
|
3057
|
-
stack: void 0
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
function aggregateBindingErrorsIntoJsError(rawErrors) {
|
|
3061
|
-
const errors = rawErrors.map(normalizeBindingError);
|
|
3062
|
-
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
3063
|
-
for (let i = 0; i < errors.length; i++) {
|
|
3064
|
-
summary += "\n";
|
|
3065
|
-
if (i >= 5) {
|
|
3066
|
-
summary += "...";
|
|
3067
|
-
break;
|
|
3068
|
-
}
|
|
3069
|
-
summary += getErrorMessage(errors[i]);
|
|
3070
|
-
}
|
|
3071
|
-
const wrapper = new Error(summary);
|
|
3072
|
-
Object.defineProperty(wrapper, "errors", {
|
|
3073
|
-
configurable: true,
|
|
3074
|
-
enumerable: true,
|
|
3075
|
-
get: () => errors,
|
|
3076
|
-
set: (value) => Object.defineProperty(wrapper, "errors", {
|
|
3077
|
-
configurable: true,
|
|
3078
|
-
enumerable: true,
|
|
3079
|
-
value
|
|
3080
|
-
})
|
|
3081
|
-
});
|
|
3082
|
-
return wrapper;
|
|
3083
|
-
}
|
|
3084
|
-
function getErrorMessage(e) {
|
|
3085
|
-
if (Object.hasOwn(e, "kind")) return e.message;
|
|
3086
|
-
let s = "";
|
|
3087
|
-
if (e.plugin) s += `[plugin ${e.plugin}]`;
|
|
3088
|
-
const id = e.id ?? e.loc?.file;
|
|
3089
|
-
if (id) {
|
|
3090
|
-
s += " " + id;
|
|
3091
|
-
if (e.loc) s += `:${e.loc.line}:${e.loc.column}`;
|
|
3092
|
-
}
|
|
3093
|
-
if (s) s += "\n";
|
|
3094
|
-
const message = `${e.name ?? "Error"}: ${e.message}`;
|
|
3095
|
-
s += message;
|
|
3096
|
-
if (e.frame) s = joinNewLine(s, e.frame);
|
|
3097
|
-
if (e.stack) s = joinNewLine(s, e.stack.replace(message, ""));
|
|
3098
|
-
if (e.cause) {
|
|
3099
|
-
s = joinNewLine(s, "Caused by:");
|
|
3100
|
-
s = joinNewLine(s, getErrorMessage(e.cause).split("\n").map((line) => " " + line).join("\n"));
|
|
3101
|
-
}
|
|
3102
|
-
return s;
|
|
3103
|
-
}
|
|
3104
|
-
function joinNewLine(s1, s2) {
|
|
3105
|
-
return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
2979
|
//#endregion
|
|
3109
2980
|
//#region src/utils/transform-module-info.ts
|
|
3110
2981
|
function transformModuleInfo(info, option) {
|
|
@@ -3122,6 +2993,7 @@ function transformModuleInfo(info, option) {
|
|
|
3122
2993
|
dynamicallyImportedIds: info.dynamicallyImportedIds,
|
|
3123
2994
|
exports: info.exports,
|
|
3124
2995
|
isEntry: info.isEntry,
|
|
2996
|
+
inputFormat: info.inputFormat,
|
|
3125
2997
|
...option
|
|
3126
2998
|
};
|
|
3127
2999
|
}
|
|
@@ -3226,7 +3098,7 @@ function exclude(expr) {
|
|
|
3226
3098
|
}
|
|
3227
3099
|
|
|
3228
3100
|
//#endregion
|
|
3229
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3101
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
3230
3102
|
function e(e, t, n) {
|
|
3231
3103
|
let r = (n) => e(n, ...t);
|
|
3232
3104
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -3236,7 +3108,7 @@ function e(e, t, n) {
|
|
|
3236
3108
|
}
|
|
3237
3109
|
|
|
3238
3110
|
//#endregion
|
|
3239
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3111
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/purry.js
|
|
3240
3112
|
function t$1(t, n, r) {
|
|
3241
3113
|
let i = t.length - n.length;
|
|
3242
3114
|
if (i === 0) return t(...n);
|
|
@@ -3245,7 +3117,7 @@ function t$1(t, n, r) {
|
|
|
3245
3117
|
}
|
|
3246
3118
|
|
|
3247
3119
|
//#endregion
|
|
3248
|
-
//#region ../../node_modules/.pnpm/remeda@2.33.
|
|
3120
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/partition.js
|
|
3249
3121
|
function t(...t) {
|
|
3250
3122
|
return t$1(n, t);
|
|
3251
3123
|
}
|
|
@@ -4364,6 +4236,14 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
4364
4236
|
get legalComments() {
|
|
4365
4237
|
return this.inner.legalComments;
|
|
4366
4238
|
}
|
|
4239
|
+
get comments() {
|
|
4240
|
+
const c = this.inner.comments;
|
|
4241
|
+
return {
|
|
4242
|
+
legal: c.legal ?? true,
|
|
4243
|
+
annotation: c.annotation ?? true,
|
|
4244
|
+
jsdoc: c.jsdoc ?? true
|
|
4245
|
+
};
|
|
4246
|
+
}
|
|
4367
4247
|
get polyfillRequire() {
|
|
4368
4248
|
return this.inner.polyfillRequire;
|
|
4369
4249
|
}
|
|
@@ -4419,6 +4299,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreLi
|
|
|
4419
4299
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
|
|
4420
4300
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
|
|
4421
4301
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "legalComments", null);
|
|
4302
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "comments", null);
|
|
4422
4303
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "polyfillRequire", null);
|
|
4423
4304
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "plugins", null);
|
|
4424
4305
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "preserveModules", null);
|
|
@@ -5247,7 +5128,7 @@ const logger = createConsola({ formatOptions: { date: false } });
|
|
|
5247
5128
|
//#endregion
|
|
5248
5129
|
//#region src/utils/bindingify-output-options.ts
|
|
5249
5130
|
function bindingifyOutputOptions(outputOptions) {
|
|
5250
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5131
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
5251
5132
|
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
|
|
5252
5133
|
return {
|
|
5253
5134
|
dir,
|
|
@@ -5288,6 +5169,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
5288
5169
|
preserveModules,
|
|
5289
5170
|
virtualDirname,
|
|
5290
5171
|
legalComments,
|
|
5172
|
+
comments: bindingifyComments(comments),
|
|
5291
5173
|
preserveModulesRoot,
|
|
5292
5174
|
topLevelVar,
|
|
5293
5175
|
minifyInternalExports: outputOptions.minifyInternalExports,
|
|
@@ -5336,6 +5218,11 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
5336
5218
|
};
|
|
5337
5219
|
return assetFileNames;
|
|
5338
5220
|
}
|
|
5221
|
+
function bindingifyComments(comments) {
|
|
5222
|
+
if (comments == null) return;
|
|
5223
|
+
if (typeof comments === "boolean") return comments;
|
|
5224
|
+
return comments;
|
|
5225
|
+
}
|
|
5339
5226
|
function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks) {
|
|
5340
5227
|
let inlineDynamicImports;
|
|
5341
5228
|
let effectiveChunksOption;
|
|
@@ -5523,4 +5410,4 @@ var RolldownBuild = class RolldownBuild {
|
|
|
5523
5410
|
};
|
|
5524
5411
|
|
|
5525
5412
|
//#endregion
|
|
5526
|
-
export {
|
|
5413
|
+
export { PluginDriver as a, RUNTIME_MODULE_ID as c, validateOption as i, VERSION as l, createBundlerOptions as n, LOG_LEVEL_WARN as o, transformToRollupOutput as r, arraify as s, RolldownBuild as t };
|