rolldown 1.0.0-beta.52 → 1.0.0-beta.53
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-setup.mjs +1 -1
- package/dist/cli.mjs +9 -10
- package/dist/config.d.mts +2 -3
- package/dist/config.mjs +7 -9
- package/dist/experimental-index.d.mts +19 -8
- package/dist/experimental-index.mjs +24 -13
- package/dist/filter-index.d.mts +2 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +7 -9
- package/dist/parallel-plugin-worker.mjs +4 -6
- package/dist/parallel-plugin.d.mts +2 -3
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -3
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +3 -5
- package/dist/shared/{binding-kg77KQCQ.mjs → binding-BJqdPU1r.mjs} +26 -26
- package/dist/shared/{binding-BKL2JHoJ.d.mts → binding-CY7Z709f.d.mts} +45 -3
- package/dist/shared/{bindingify-input-options-6nBAYjYP.mjs → bindingify-input-options-Bk0BBr2s.mjs} +8 -6
- package/dist/shared/{constructors-BvaMwihu.d.mts → constructors-CMvFUBhn.d.mts} +3 -5
- package/dist/shared/{constructors-CwAnOHmv.mjs → constructors-LQ8mmhQE.mjs} +2 -8
- package/dist/shared/{define-config-9CiSl0uo.d.mts → define-config-BS8Bt-r8.d.mts} +61 -3
- package/dist/shared/{load-config-DS8fzWF9.mjs → load-config-JSXrnuaS.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-VlPkMWXA.mjs → normalize-string-or-regex-BhaIG1rU.mjs} +42 -5
- package/dist/shared/{parse-ast-index-C44ewaWh.mjs → parse-ast-index-BFX0oHaQ.mjs} +2 -2
- package/dist/shared/{rolldown-CpwN72kC.mjs → rolldown-Cqalltnr.mjs} +1 -1
- package/dist/shared/{rolldown-build-D2CkFbcq.mjs → rolldown-build-BEU8N80I.mjs} +334 -188
- package/dist/shared/{watch-BWN40jw1.mjs → watch-DBnC-zol.mjs} +4 -4
- package/package.json +19 -21
- package/dist/shared/utils-DKydZ4iH.d.mts +0 -62
|
@@ -1269,6 +1269,44 @@ declare class BindingMagicString {
|
|
|
1269
1269
|
relocate(start: number, end: number, to: number): void;
|
|
1270
1270
|
indent(indentor?: string | undefined | null): void;
|
|
1271
1271
|
}
|
|
1272
|
+
declare class BindingNormalizedOptions {
|
|
1273
|
+
get input(): Array<string> | Record<string, string>;
|
|
1274
|
+
get cwd(): string | null;
|
|
1275
|
+
get platform(): 'node' | 'browser' | 'neutral';
|
|
1276
|
+
get shimMissingExports(): boolean;
|
|
1277
|
+
get name(): string | null;
|
|
1278
|
+
get cssEntryFilenames(): string | undefined;
|
|
1279
|
+
get cssChunkFilenames(): string | undefined;
|
|
1280
|
+
get entryFilenames(): string | undefined;
|
|
1281
|
+
get chunkFilenames(): string | undefined;
|
|
1282
|
+
get assetFilenames(): string | undefined;
|
|
1283
|
+
get dir(): string | null;
|
|
1284
|
+
get file(): string | null;
|
|
1285
|
+
get format(): 'es' | 'cjs' | 'iife' | 'umd';
|
|
1286
|
+
get exports(): 'default' | 'named' | 'none' | 'auto';
|
|
1287
|
+
get esModule(): boolean | 'if-default-prop';
|
|
1288
|
+
get inlineDynamicImports(): boolean;
|
|
1289
|
+
get sourcemap(): boolean | 'inline' | 'hidden';
|
|
1290
|
+
get sourcemapBaseUrl(): string | null;
|
|
1291
|
+
get banner(): string | undefined | null | undefined;
|
|
1292
|
+
get footer(): string | undefined | null | undefined;
|
|
1293
|
+
get intro(): string | undefined | null | undefined;
|
|
1294
|
+
get outro(): string | undefined | null | undefined;
|
|
1295
|
+
get externalLiveBindings(): boolean;
|
|
1296
|
+
get extend(): boolean;
|
|
1297
|
+
get globals(): Record<string, string> | undefined;
|
|
1298
|
+
get hashCharacters(): 'base64' | 'base36' | 'hex';
|
|
1299
|
+
get sourcemapDebugIds(): boolean;
|
|
1300
|
+
get polyfillRequire(): boolean;
|
|
1301
|
+
get minify(): false | 'dce-only' | MinifyOptions;
|
|
1302
|
+
get legalComments(): 'none' | 'inline';
|
|
1303
|
+
get preserveModules(): boolean;
|
|
1304
|
+
get preserveModulesRoot(): string | undefined;
|
|
1305
|
+
get virtualDirname(): string;
|
|
1306
|
+
get topLevelVar(): boolean;
|
|
1307
|
+
get minifyInternalExports(): boolean;
|
|
1308
|
+
get context(): string;
|
|
1309
|
+
}
|
|
1272
1310
|
declare class BindingOutputAsset {
|
|
1273
1311
|
dropInner(): ExternalMemoryStatus;
|
|
1274
1312
|
getFileName(): string;
|
|
@@ -1504,9 +1542,10 @@ interface BindingViteCssPostPluginConfig {
|
|
|
1504
1542
|
urlBase: string;
|
|
1505
1543
|
decodedBase: string;
|
|
1506
1544
|
libCssFilename?: string;
|
|
1507
|
-
isLegacy?: () => boolean;
|
|
1545
|
+
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1508
1546
|
cssMinify?: (css: string, inline: boolean) => Promise<string>;
|
|
1509
1547
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1548
|
+
cssScopeTo: () => Record<string, readonly [string, string | undefined]>;
|
|
1510
1549
|
}
|
|
1511
1550
|
interface BindingViteDynamicImportVarsPluginConfig {
|
|
1512
1551
|
include?: Array<BindingStringOrRegex>;
|
|
@@ -1528,6 +1567,7 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1528
1567
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1529
1568
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1530
1569
|
transformIndexHtml: (html: string, path: string, filename: string, hook: 'transform' | 'generateBundle', output?: BindingOutputs, chunk?: BindingOutputChunk) => Promise<string>;
|
|
1570
|
+
setModuleSideEffects: (id: string) => void;
|
|
1531
1571
|
}
|
|
1532
1572
|
interface BindingViteImportGlobPluginConfig {
|
|
1533
1573
|
root?: string;
|
|
@@ -1543,7 +1583,7 @@ interface BindingViteManifestPluginConfig {
|
|
|
1543
1583
|
root: string;
|
|
1544
1584
|
outPath: string;
|
|
1545
1585
|
isEnableV2?: boolean;
|
|
1546
|
-
isLegacy?: () => boolean;
|
|
1586
|
+
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1547
1587
|
cssEntries: () => Record<string, string>;
|
|
1548
1588
|
}
|
|
1549
1589
|
interface BindingViteModulePreloadPolyfillPluginConfig {
|
|
@@ -1574,6 +1614,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1574
1614
|
external: true | string[];
|
|
1575
1615
|
noExternal: true | Array<string | RegExp>;
|
|
1576
1616
|
dedupe: Array<string>;
|
|
1617
|
+
disableCache?: boolean;
|
|
1577
1618
|
legacyInconsistentCjsInterop?: boolean;
|
|
1578
1619
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1579
1620
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
@@ -1611,6 +1652,7 @@ interface BindingViteTransformPluginConfig {
|
|
|
1611
1652
|
interface BindingViteWasmHelperPluginConfig {
|
|
1612
1653
|
decodedBase: string;
|
|
1613
1654
|
}
|
|
1655
|
+
declare function createTokioRuntime(blockingThreads?: number | undefined | null): void;
|
|
1614
1656
|
interface ExternalMemoryStatus {
|
|
1615
1657
|
freed: boolean;
|
|
1616
1658
|
reason?: string;
|
|
@@ -1629,4 +1671,4 @@ interface PreRenderedChunk {
|
|
|
1629
1671
|
exports: Array<string>;
|
|
1630
1672
|
}
|
|
1631
1673
|
//#endregion
|
|
1632
|
-
export { BindingWatcherBundler as A, ParserOptions as B, BindingViteManifestPluginConfig as C, BindingViteResolvePluginConfig as D, BindingViteReporterPluginConfig as E, JsxOptions as F, TransformResult as G, ResolveResult as H, MinifyOptions as I,
|
|
1674
|
+
export { transformSync as $, BindingWatcherBundler as A, ParserOptions as B, BindingViteManifestPluginConfig as C, BindingViteResolvePluginConfig as D, BindingViteReporterPluginConfig as E, JsxOptions as F, TransformResult as G, ResolveResult as H, MinifyOptions as I, isolatedDeclarationSync as J, createTokioRuntime as K, MinifyResult as L, ExternalMemoryStatus as M, IsolatedDeclarationsOptions as N, BindingViteTransformPluginConfig as O, IsolatedDeclarationsResult as P, transform as Q, NapiResolveOptions as R, BindingViteJsonPluginConfig as S, BindingViteReactRefreshWrapperPluginConfig as T, ResolverFactory as U, PreRenderedChunk as V, TransformOptions as W, minifySync as X, minify as Y, moduleRunnerTransform as Z, BindingViteCssPostPluginConfig as _, BindingHookResolveIdExtraArgs as a, BindingViteHtmlPluginConfig as b, BindingRebuildStrategy as c, BindingTransformHookExtraArgs as d, BindingUrlResolver as f, BindingViteCssPluginConfig as g, BindingViteBuildImportAnalysisPluginConfig as h, BindingEsmExternalRequirePluginConfig as i, BindingWatcherEvent as j, BindingViteWasmHelperPluginConfig as k, BindingRenderedChunk as l, BindingViteAssetPluginConfig as m, BindingBundleState as n, BindingIsolatedDeclarationPluginConfig as o, BindingViteAssetImportMetaUrlPluginConfig as p, isolatedDeclaration as q, BindingClientHmrUpdate as r, BindingMagicString as s, BindingBuiltinPluginName as t, BindingReplacePluginConfig as u, BindingViteDynamicImportVarsPluginConfig as v, BindingViteModulePreloadPolyfillPluginConfig as w, BindingViteImportGlobPluginConfig as x, BindingViteHtmlInlineProxyPluginConfig as y, ParseResult as z };
|
package/dist/shared/{bindingify-input-options-6nBAYjYP.mjs → bindingify-input-options-Bk0BBr2s.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
1
|
+
import { t as require_binding } from "./binding-BJqdPU1r.mjs";
|
|
2
2
|
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-CSQ_UMWp.mjs";
|
|
3
3
|
import { a as unreachable, i as unimplemented, o as unsupported, t as arraify } from "./misc-CxyvWjTr.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { t as parseAst } from "./parse-ast-index-
|
|
4
|
+
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-BhaIG1rU.mjs";
|
|
5
|
+
import { t as parseAst } from "./parse-ast-index-BFX0oHaQ.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import * as filter from "@rolldown/pluginutils";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
@@ -1345,9 +1345,11 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
1345
1345
|
const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
|
|
1346
1346
|
const plugins = rawPlugins.map((plugin) => {
|
|
1347
1347
|
if ("_parallel" in plugin) return;
|
|
1348
|
-
if (plugin instanceof BuiltinPlugin) {
|
|
1349
|
-
|
|
1350
|
-
return
|
|
1348
|
+
if (plugin instanceof BuiltinPlugin) switch (plugin.name) {
|
|
1349
|
+
case "builtin:vite-css-post": return bindingifyCSSPostPlugin(plugin, pluginContextData);
|
|
1350
|
+
case "builtin:vite-html": return bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode, pluginContextData);
|
|
1351
|
+
case "builtin:vite-manifest": return bindingifyManifestPlugin(plugin, pluginContextData);
|
|
1352
|
+
default: return bindingifyBuiltInPlugin(plugin);
|
|
1351
1353
|
}
|
|
1352
1354
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
|
|
1353
1355
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as BuiltinPlugin, wt as StringOrRegExp } from "./define-config-BS8Bt-r8.mjs";
|
|
2
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, h as BindingViteBuildImportAnalysisPluginConfig, i as BindingEsmExternalRequirePluginConfig, k as BindingViteWasmHelperPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteAssetImportMetaUrlPluginConfig, v as BindingViteDynamicImportVarsPluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteHtmlInlineProxyPluginConfig } from "./binding-CY7Z709f.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -10,7 +10,6 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
|
|
|
10
10
|
declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
11
11
|
declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
|
|
12
12
|
declare function viteReporterPlugin(config?: BindingViteReporterPluginConfig): BuiltinPlugin;
|
|
13
|
-
declare function viteManifestPlugin(config?: BindingViteManifestPluginConfig): BuiltinPlugin;
|
|
14
13
|
declare function viteWasmHelperPlugin(config?: BindingViteWasmHelperPluginConfig): BuiltinPlugin;
|
|
15
14
|
declare function viteWasmFallbackPlugin(): BuiltinPlugin;
|
|
16
15
|
declare function viteLoadFallbackPlugin(): BuiltinPlugin;
|
|
@@ -25,8 +24,7 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
|
|
|
25
24
|
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
26
25
|
};
|
|
27
26
|
declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
|
|
28
|
-
declare function viteCSSPostPlugin(config?: BindingViteCssPostPluginConfig): BuiltinPlugin;
|
|
29
27
|
declare function viteHtmlInlineProxyPlugin(config: BindingViteHtmlInlineProxyPluginConfig): BuiltinPlugin;
|
|
30
28
|
declare function viteAssetImportMetaUrlPlugin(config: BindingViteAssetImportMetaUrlPluginConfig): BuiltinPlugin;
|
|
31
29
|
//#endregion
|
|
32
|
-
export {
|
|
30
|
+
export { viteDynamicImportVarsPlugin as a, viteJsonPlugin as c, viteReactRefreshWrapperPlugin as d, viteReporterPlugin as f, viteWebWorkerPostPlugin as g, viteWasmHelperPlugin as h, viteBuildImportAnalysisPlugin as i, viteLoadFallbackPlugin as l, viteWasmFallbackPlugin as m, isolatedDeclarationPlugin as n, viteHtmlInlineProxyPlugin as o, viteResolvePlugin as p, viteAssetImportMetaUrlPlugin as r, viteImportGlobPlugin as s, esmExternalRequirePlugin as t, viteModulePreloadPolyfillPlugin as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-BhaIG1rU.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -17,9 +17,6 @@ function viteImportGlobPlugin(config) {
|
|
|
17
17
|
function viteReporterPlugin(config) {
|
|
18
18
|
return new BuiltinPlugin("builtin:vite-reporter", config);
|
|
19
19
|
}
|
|
20
|
-
function viteManifestPlugin(config) {
|
|
21
|
-
return new BuiltinPlugin("builtin:vite-manifest", config);
|
|
22
|
-
}
|
|
23
20
|
function viteWasmHelperPlugin(config) {
|
|
24
21
|
return new BuiltinPlugin("builtin:vite-wasm-helper", config);
|
|
25
22
|
}
|
|
@@ -54,9 +51,6 @@ function viteReactRefreshWrapperPlugin(config) {
|
|
|
54
51
|
}
|
|
55
52
|
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
|
|
56
53
|
}
|
|
57
|
-
function viteCSSPostPlugin(config) {
|
|
58
|
-
return new BuiltinPlugin("builtin:vite-css-post", config);
|
|
59
|
-
}
|
|
60
54
|
function viteHtmlInlineProxyPlugin(config) {
|
|
61
55
|
return new BuiltinPlugin("builtin:vite-html-inline-proxy", config);
|
|
62
56
|
}
|
|
@@ -65,4 +59,4 @@ function viteAssetImportMetaUrlPlugin(config) {
|
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
//#endregion
|
|
68
|
-
export {
|
|
62
|
+
export { viteDynamicImportVarsPlugin as a, viteJsonPlugin as c, viteReactRefreshWrapperPlugin as d, viteReporterPlugin as f, viteWebWorkerPostPlugin as g, viteWasmHelperPlugin as h, viteBuildImportAnalysisPlugin as i, viteLoadFallbackPlugin as l, viteWasmFallbackPlugin as m, isolatedDeclarationPlugin as n, viteHtmlInlineProxyPlugin as o, viteResolvePlugin as p, viteAssetImportMetaUrlPlugin as r, viteImportGlobPlugin as s, esmExternalRequirePlugin as t, viteModulePreloadPolyfillPlugin as u };
|
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString } from "./binding-BKL2JHoJ.mjs";
|
|
1
|
+
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString, t as BindingBuiltinPluginName } from "./binding-CY7Z709f.mjs";
|
|
3
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
3
|
import { Program } from "@oxc-project/types";
|
|
5
4
|
|
|
5
|
+
//#region src/log/logging.d.ts
|
|
6
|
+
type LogLevel = "info" | "debug" | "warn";
|
|
7
|
+
type LogLevelOption = LogLevel | "silent";
|
|
8
|
+
type LogLevelWithError = LogLevel | "error";
|
|
9
|
+
interface RollupLog {
|
|
10
|
+
binding?: string;
|
|
11
|
+
cause?: unknown;
|
|
12
|
+
code?: string;
|
|
13
|
+
exporter?: string;
|
|
14
|
+
frame?: string;
|
|
15
|
+
hook?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
ids?: string[];
|
|
18
|
+
loc?: {
|
|
19
|
+
column: number;
|
|
20
|
+
file?: string;
|
|
21
|
+
line: number;
|
|
22
|
+
};
|
|
23
|
+
message: string;
|
|
24
|
+
meta?: any;
|
|
25
|
+
names?: string[];
|
|
26
|
+
plugin?: string;
|
|
27
|
+
pluginCode?: unknown;
|
|
28
|
+
pos?: number;
|
|
29
|
+
reexporter?: string;
|
|
30
|
+
stack?: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
}
|
|
33
|
+
type RollupLogWithString = RollupLog | string;
|
|
34
|
+
interface RollupError extends RollupLog {
|
|
35
|
+
name?: string;
|
|
36
|
+
stack?: string;
|
|
37
|
+
watchFiles?: string[];
|
|
38
|
+
}
|
|
39
|
+
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
40
|
+
//#endregion
|
|
6
41
|
//#region src/types/misc.d.ts
|
|
7
42
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
8
43
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -144,6 +179,14 @@ interface RolldownOutput extends ExternalMemoryHandle {
|
|
|
144
179
|
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
|
|
145
180
|
}
|
|
146
181
|
//#endregion
|
|
182
|
+
//#region src/types/utils.d.ts
|
|
183
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
184
|
+
type NullValue<T = void> = T | undefined | null | void;
|
|
185
|
+
type PartialNull<T> = { [P in keyof T]: T[P] | null };
|
|
186
|
+
type MakeAsync<Function_> = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
187
|
+
type MaybeArray<T> = T | T[];
|
|
188
|
+
type StringOrRegExp = string | RegExp;
|
|
189
|
+
//#endregion
|
|
147
190
|
//#region src/options/output-options.d.ts
|
|
148
191
|
type GeneratedCodePreset = "es5" | "es2015";
|
|
149
192
|
interface GeneratedCodeOptions {
|
|
@@ -666,6 +709,14 @@ type RolldownWatcher = WatcherEmitter;
|
|
|
666
709
|
//#region src/api/watch/index.d.ts
|
|
667
710
|
declare const watch: (input: WatchOptions | WatchOptions[]) => RolldownWatcher;
|
|
668
711
|
//#endregion
|
|
712
|
+
//#region src/log/log-handler.d.ts
|
|
713
|
+
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
714
|
+
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
715
|
+
column: number;
|
|
716
|
+
line: number;
|
|
717
|
+
}) => void;
|
|
718
|
+
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
719
|
+
//#endregion
|
|
669
720
|
//#region src/options/normalized-input-options.d.ts
|
|
670
721
|
interface NormalizedInputOptions {
|
|
671
722
|
input: string[] | Record<string, string>;
|
|
@@ -942,6 +993,13 @@ type SourceMapInput = ExistingRawSourceMap | string | null;
|
|
|
942
993
|
//#region src/version.d.ts
|
|
943
994
|
declare const VERSION: string;
|
|
944
995
|
//#endregion
|
|
996
|
+
//#region src/builtin-plugin/utils.d.ts
|
|
997
|
+
declare class BuiltinPlugin {
|
|
998
|
+
name: BindingBuiltinPluginName;
|
|
999
|
+
_options?: unknown;
|
|
1000
|
+
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
1001
|
+
}
|
|
1002
|
+
//#endregion
|
|
945
1003
|
//#region src/constants/plugin.d.ts
|
|
946
1004
|
declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
947
1005
|
declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"];
|
|
@@ -1618,4 +1676,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1618
1676
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1619
1677
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1620
1678
|
//#endregion
|
|
1621
|
-
export {
|
|
1679
|
+
export { InternalModuleFormat as $, BuiltinPlugin as A, SourceMap as At, GetModuleInfo as B, ResolveIdResult as C, PartialNull as Ct, SourceDescription as D, RenderedChunk as Dt, RolldownPluginOption as E, OutputChunk as Et, OutputBundle as F, LogLevelOption as Ft, PluginContextMeta as G, DefineParallelPluginResult as H, TreeshakingOptions as I, LogOrStringHandler as It, ModuleTypeFilter as J, GeneralHookFilter as K, TransformPluginContext as L, RollupError as Lt, ExistingRawSourceMap as M, ModuleInfo as Mt, SourceMapInput as N, SourcemapIgnoreListOption as Nt, TransformResult as O, RenderedModule as Ot, RolldownOptionsFunction as P, LogLevel as Pt, RolldownFsModule as Q, EmittedAsset as R, RollupLog as Rt, ResolveIdExtraOptions as S, MaybePromise as St, RolldownPlugin as T, OutputAsset as Tt, defineParallelPlugin as U, PluginContext as V, MinimalPluginContext as W, RolldownDirectoryEntry as X, BufferEncoding as Y, RolldownFileStats as Z, ModuleType as _, GlobalsFunction as _t, InputOption as a, RolldownWatcher as at, PartialResolvedId as b, OutputOptions as bt, OptimizationOptions as c, rolldown as ct, CustomPluginOptions as d, build as dt, NormalizedOutputOptions as et, FunctionPluginHooks as f, AddonFunction as ft, ModuleOptions as g, GeneratedCodePreset as gt, LoadResult as h, GeneratedCodeOptions as ht, ExternalOption as i, watch as it, VERSION as j, freeExternalMemory as jt, withFilter as k, RolldownOutput as kt, WatcherOptions as l, RolldownBuild as lt, ImportKind as m, ChunkingContext as mt, ConfigExport as n, LoggingFunction as nt, InputOptions as o, RolldownWatcherEvent as ot, HookFilterExtension as p, ChunkFileNamesFunction as pt, HookFilter as q, RolldownOptions as r, WarningHandlerWithDefault as rt, ModuleTypes as s, WatchOptions as st, defineConfig as t, NormalizedInputOptions as tt, AsyncPluginHooks as u, BuildOptions as ut, ObjectHook as v, MinifyOptions as vt, ResolvedId as w, StringOrRegExp as wt, Plugin as x, PreRenderedAsset as xt, ParallelPluginHooks as y, ModuleFormat as yt, EmittedFile as z, RollupLogWithString as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
1
|
+
import { t as require_binding } from "./binding-BJqdPU1r.mjs";
|
|
2
2
|
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-CSQ_UMWp.mjs";
|
|
3
3
|
import { r as noop } from "./misc-CxyvWjTr.mjs";
|
|
4
4
|
|
|
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "1.0.0-beta.
|
|
35
|
+
var version = "1.0.0-beta.53";
|
|
36
36
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
@@ -190,7 +190,7 @@ function bindingAssetSource(source) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.101.0/helpers/decorate.js
|
|
194
194
|
function __decorate(decorators, target, key, desc) {
|
|
195
195
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
196
196
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -585,7 +585,36 @@ function bindingifyBuiltInPlugin(plugin) {
|
|
|
585
585
|
options: plugin._options
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function bindingifyManifestPlugin(plugin, pluginContextData) {
|
|
589
|
+
const { isOutputOptionsForLegacyChunks, ...options } = plugin._options;
|
|
590
|
+
return {
|
|
591
|
+
__name: plugin.name,
|
|
592
|
+
options: {
|
|
593
|
+
...options,
|
|
594
|
+
isLegacy: isOutputOptionsForLegacyChunks ? (opts) => {
|
|
595
|
+
return isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));
|
|
596
|
+
} : void 0
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function bindingifyCSSPostPlugin(plugin, pluginContextData) {
|
|
601
|
+
const { isOutputOptionsForLegacyChunks, ...options } = plugin._options;
|
|
602
|
+
return {
|
|
603
|
+
__name: plugin.name,
|
|
604
|
+
options: {
|
|
605
|
+
...options,
|
|
606
|
+
isLegacy: isOutputOptionsForLegacyChunks ? (opts) => {
|
|
607
|
+
return isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));
|
|
608
|
+
} : void 0,
|
|
609
|
+
cssScopeTo() {
|
|
610
|
+
const cssScopeTo = {};
|
|
611
|
+
for (const [id, opts] of pluginContextData.moduleOptionMap.entries()) if (opts?.meta.vite?.cssScopeTo) cssScopeTo[id] = opts.meta.vite.cssScopeTo;
|
|
612
|
+
return cssScopeTo;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode, pluginContextData) {
|
|
589
618
|
const { preHooks, normalHooks, postHooks, applyHtmlTransforms, ...options } = plugin._options;
|
|
590
619
|
if (preHooks.length + normalHooks.length + postHooks.length > 0) return {
|
|
591
620
|
__name: plugin.name,
|
|
@@ -606,6 +635,14 @@ function bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode) {
|
|
|
606
635
|
case "transform": return await applyHtmlTransforms(html, preHooks, pluginContext, context);
|
|
607
636
|
case "generateBundle": return await applyHtmlTransforms(html, [...normalHooks, ...postHooks], pluginContext, context);
|
|
608
637
|
}
|
|
638
|
+
},
|
|
639
|
+
setModuleSideEffects(id) {
|
|
640
|
+
let opts = pluginContextData.getModuleOption(id);
|
|
641
|
+
pluginContextData.updateModuleOption(id, {
|
|
642
|
+
moduleSideEffects: true,
|
|
643
|
+
meta: opts.meta,
|
|
644
|
+
invalidate: true
|
|
645
|
+
});
|
|
609
646
|
}
|
|
610
647
|
}
|
|
611
648
|
};
|
|
@@ -627,4 +664,4 @@ function isReadonlyArray(input) {
|
|
|
627
664
|
}
|
|
628
665
|
|
|
629
666
|
//#endregion
|
|
630
|
-
export {
|
|
667
|
+
export { LOG_LEVEL_DEBUG as C, logLevelPriority as D, LOG_LEVEL_WARN as E, normalizeLog as S, LOG_LEVEL_INFO as T, PlainObjectLike as _, bindingifyManifestPlugin as a, description as b, collectChangedBundle as c, bindingifySourcemap as d, transformRenderedChunk as f, lazyProp as g, transformAssetSource as h, bindingifyCSSPostPlugin as i, transformToOutputBundle as l, bindingAssetSource as m, BuiltinPlugin as n, bindingifyViteHtmlPlugin as o, __decorate as p, bindingifyBuiltInPlugin as r, makeBuiltinPluginCallable as s, normalizedStringOrRegex as t, transformToRollupOutput as u, MinimalPluginContextImpl as v, LOG_LEVEL_ERROR as w, version as x, VERSION as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
1
|
+
import { t as require_binding } from "./binding-BJqdPU1r.mjs";
|
|
2
2
|
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-CSQ_UMWp.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
4
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.101.0/node_modules/oxc-parser/src-js/wrap.js
|
|
5
5
|
function wrap$1(result) {
|
|
6
6
|
let program, module, comments, errors;
|
|
7
7
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-
|
|
1
|
+
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-BEU8N80I.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/rolldown/index.ts
|
|
4
4
|
const rolldown = async (input) => {
|