rolldown 1.0.0-beta.53 → 1.0.0-beta.55
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 +2 -2
- package/dist/cli.mjs +21 -21
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +8 -8
- package/dist/experimental-index.d.mts +16 -10
- package/dist/experimental-index.mjs +18 -19
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/get-log-filter.d.mts +7 -0
- package/dist/get-log-filter.mjs +48 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +10 -14
- package/dist/parallel-plugin-worker.mjs +5 -5
- 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.d.mts +3 -3
- package/dist/plugins-index.mjs +3 -3
- package/dist/shared/{binding-BJqdPU1r.mjs → binding-DMnPPQ90.mjs} +51 -27
- package/dist/shared/{binding-CY7Z709f.d.mts → binding-r9j8jqRV.d.mts} +65 -19
- package/dist/shared/{bindingify-input-options-Bk0BBr2s.mjs → bindingify-input-options-A-rLIOKA.mjs} +41 -24
- package/dist/shared/{constructors-LQ8mmhQE.mjs → constructors-BGI2r6Tk.mjs} +8 -3
- package/dist/shared/{constructors-CMvFUBhn.d.mts → constructors-DO8UjlE5.d.mts} +6 -6
- package/dist/shared/{define-config-BS8Bt-r8.d.mts → define-config-MdVaFcie.d.mts} +32 -42
- package/dist/shared/{load-config-JSXrnuaS.mjs → load-config-DnirbDRj.mjs} +1 -1
- package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
- package/dist/shared/{normalize-string-or-regex-BhaIG1rU.mjs → normalize-string-or-regex-B4d0IHth.mjs} +8 -6
- package/dist/shared/{parse-ast-index-BFX0oHaQ.mjs → parse-ast-index-CoZSRGeP.mjs} +4 -4
- package/dist/shared/{rolldown-Cqalltnr.mjs → rolldown-BTFK71hw.mjs} +1 -1
- package/dist/shared/{rolldown-build-BEU8N80I.mjs → rolldown-build-CNW2eye_.mjs} +25 -17
- package/dist/shared/{watch-DBnC-zol.mjs → watch-CKam-d6K.mjs} +20 -8
- package/package.json +20 -19
- /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
- /package/dist/shared/{logs-CSQ_UMWp.mjs → logs-sGci9sux.mjs} +0 -0
- /package/dist/shared/{misc-CxyvWjTr.mjs → misc-DpjTMcQQ.mjs} +0 -0
- /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B4d0IHth.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -33,7 +33,10 @@ function viteBuildImportAnalysisPlugin(config) {
|
|
|
33
33
|
return new BuiltinPlugin("builtin:vite-build-import-analysis", config);
|
|
34
34
|
}
|
|
35
35
|
function viteResolvePlugin(config) {
|
|
36
|
-
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve",
|
|
36
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-resolve", {
|
|
37
|
+
...config,
|
|
38
|
+
yarnPnp: typeof process === "object" && !!process.versions?.pnp
|
|
39
|
+
}));
|
|
37
40
|
}
|
|
38
41
|
function isolatedDeclarationPlugin(config) {
|
|
39
42
|
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
@@ -42,7 +45,9 @@ function viteWebWorkerPostPlugin() {
|
|
|
42
45
|
return new BuiltinPlugin("builtin:vite-web-worker-post");
|
|
43
46
|
}
|
|
44
47
|
function esmExternalRequirePlugin(config) {
|
|
45
|
-
|
|
48
|
+
const plugin = new BuiltinPlugin("builtin:esm-external-require", config);
|
|
49
|
+
plugin.enforce = "pre";
|
|
50
|
+
return plugin;
|
|
46
51
|
}
|
|
47
52
|
function viteReactRefreshWrapperPlugin(config) {
|
|
48
53
|
if (config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
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-r9j8jqRV.mjs";
|
|
2
|
+
import { A as BuiltinPlugin, Tt as StringOrRegExp } from "./define-config-MdVaFcie.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -9,13 +9,13 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
|
|
|
9
9
|
};
|
|
10
10
|
declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
11
11
|
declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
|
|
12
|
-
declare function viteReporterPlugin(config
|
|
13
|
-
declare function viteWasmHelperPlugin(config
|
|
12
|
+
declare function viteReporterPlugin(config: BindingViteReporterPluginConfig): BuiltinPlugin;
|
|
13
|
+
declare function viteWasmHelperPlugin(config: BindingViteWasmHelperPluginConfig): BuiltinPlugin;
|
|
14
14
|
declare function viteWasmFallbackPlugin(): BuiltinPlugin;
|
|
15
15
|
declare function viteLoadFallbackPlugin(): BuiltinPlugin;
|
|
16
|
-
declare function viteJsonPlugin(config
|
|
16
|
+
declare function viteJsonPlugin(config: BindingViteJsonPluginConfig): BuiltinPlugin;
|
|
17
17
|
declare function viteBuildImportAnalysisPlugin(config: BindingViteBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
18
|
-
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
18
|
+
declare function viteResolvePlugin(config: Omit<BindingViteResolvePluginConfig, "yarnPnp">): BuiltinPlugin;
|
|
19
19
|
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
20
20
|
declare function viteWebWorkerPostPlugin(): BuiltinPlugin;
|
|
21
21
|
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
@@ -1,43 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BpAvp7KV.mjs";
|
|
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, t as BindingBuiltinPluginName } from "./binding-r9j8jqRV.mjs";
|
|
2
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
4
|
import { Program } from "@oxc-project/types";
|
|
4
5
|
|
|
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
|
|
41
6
|
//#region src/types/misc.d.ts
|
|
42
7
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
43
8
|
type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
@@ -299,6 +264,14 @@ interface OutputOptions {
|
|
|
299
264
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
300
265
|
banner?: string | AddonFunction;
|
|
301
266
|
footer?: string | AddonFunction;
|
|
267
|
+
/**
|
|
268
|
+
* Similar to `banner` option, but will run after the `renderChunk` hook and builtin minification.
|
|
269
|
+
*/
|
|
270
|
+
postBanner?: string | AddonFunction;
|
|
271
|
+
/**
|
|
272
|
+
* Similar to `footer` option, but will run after the `renderChunk` hook and builtin minification.
|
|
273
|
+
*/
|
|
274
|
+
postFooter?: string | AddonFunction;
|
|
302
275
|
intro?: string | AddonFunction;
|
|
303
276
|
outro?: string | AddonFunction;
|
|
304
277
|
extend?: boolean;
|
|
@@ -720,7 +693,7 @@ type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFun
|
|
|
720
693
|
//#region src/options/normalized-input-options.d.ts
|
|
721
694
|
interface NormalizedInputOptions {
|
|
722
695
|
input: string[] | Record<string, string>;
|
|
723
|
-
cwd: string
|
|
696
|
+
cwd: string;
|
|
724
697
|
platform: InputOptions["platform"];
|
|
725
698
|
shimMissingExports: boolean;
|
|
726
699
|
context: string;
|
|
@@ -746,6 +719,8 @@ interface NormalizedOutputOptions {
|
|
|
746
719
|
externalLiveBindings: boolean;
|
|
747
720
|
banner: AddonFunction;
|
|
748
721
|
footer: AddonFunction;
|
|
722
|
+
postBanner: AddonFunction;
|
|
723
|
+
postFooter: AddonFunction;
|
|
749
724
|
intro: AddonFunction;
|
|
750
725
|
outro: AddonFunction;
|
|
751
726
|
esModule: boolean | "if-default-prop";
|
|
@@ -918,7 +893,15 @@ interface EmittedChunk {
|
|
|
918
893
|
id: string;
|
|
919
894
|
importer?: string;
|
|
920
895
|
}
|
|
921
|
-
|
|
896
|
+
interface EmittedPrebuiltChunk {
|
|
897
|
+
type: "prebuilt-chunk";
|
|
898
|
+
fileName: string;
|
|
899
|
+
code: string;
|
|
900
|
+
exports?: string[];
|
|
901
|
+
map?: SourceMap;
|
|
902
|
+
sourcemapFileName?: string;
|
|
903
|
+
}
|
|
904
|
+
type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
|
|
922
905
|
interface PluginContextResolveOptions {
|
|
923
906
|
isEntry?: boolean;
|
|
924
907
|
skipSelf?: boolean;
|
|
@@ -997,6 +980,8 @@ declare const VERSION: string;
|
|
|
997
980
|
declare class BuiltinPlugin {
|
|
998
981
|
name: BindingBuiltinPluginName;
|
|
999
982
|
_options?: unknown;
|
|
983
|
+
/** Vite-specific option to control plugin ordering */
|
|
984
|
+
enforce?: "pre" | "post";
|
|
1000
985
|
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
1001
986
|
}
|
|
1002
987
|
//#endregion
|
|
@@ -1232,6 +1217,11 @@ interface ChecksOptions {
|
|
|
1232
1217
|
* @default true
|
|
1233
1218
|
*/
|
|
1234
1219
|
couldNotCleanDirectory?: boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* Whether to emit warning when detecting plugin timings
|
|
1222
|
+
* @default true
|
|
1223
|
+
*/
|
|
1224
|
+
pluginTimings?: boolean;
|
|
1235
1225
|
}
|
|
1236
1226
|
//#endregion
|
|
1237
1227
|
//#region src/options/transform-options.d.ts
|
|
@@ -1358,7 +1348,7 @@ interface WatcherOptions {
|
|
|
1358
1348
|
clearScreen?: boolean;
|
|
1359
1349
|
}
|
|
1360
1350
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
1361
|
-
type
|
|
1351
|
+
type DevModeOptions = boolean | {
|
|
1362
1352
|
host?: string;
|
|
1363
1353
|
port?: number;
|
|
1364
1354
|
implement?: string;
|
|
@@ -1484,7 +1474,7 @@ interface InputOptions {
|
|
|
1484
1474
|
disableLiveBindings?: boolean;
|
|
1485
1475
|
viteMode?: boolean;
|
|
1486
1476
|
resolveNewUrlToAsset?: boolean;
|
|
1487
|
-
|
|
1477
|
+
devMode?: DevModeOptions;
|
|
1488
1478
|
/**
|
|
1489
1479
|
* Control which order should use when rendering modules in chunk
|
|
1490
1480
|
*
|
|
@@ -1676,4 +1666,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1676
1666
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1677
1667
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1678
1668
|
//#endregion
|
|
1679
|
-
export {
|
|
1669
|
+
export { RolldownFsModule as $, BuiltinPlugin as A, RolldownOutput as At, EmittedPrebuiltChunk as B, ResolveIdResult as C, MaybePromise as Ct, SourceDescription as D, OutputChunk as Dt, RolldownPluginOption as E, OutputAsset as Et, OutputBundle as F, MinimalPluginContext as G, PluginContext as H, TreeshakingOptions as I, HookFilter as J, PluginContextMeta as K, TransformPluginContext as L, ExistingRawSourceMap as M, freeExternalMemory as Mt, SourceMapInput as N, ModuleInfo as Nt, TransformResult as O, RenderedChunk as Ot, RolldownOptionsFunction as P, SourcemapIgnoreListOption as Pt, RolldownFileStats as Q, EmittedAsset as R, ResolveIdExtraOptions as S, PreRenderedAsset as St, RolldownPlugin as T, StringOrRegExp as Tt, DefineParallelPluginResult as U, GetModuleInfo as V, defineParallelPlugin as W, BufferEncoding as X, ModuleTypeFilter as Y, RolldownDirectoryEntry as Z, ModuleType as _, GeneratedCodePreset as _t, InputOption as a, watch as at, PartialResolvedId as b, ModuleFormat as bt, OptimizationOptions as c, WatchOptions as ct, CustomPluginOptions as d, BuildOptions as dt, InternalModuleFormat as et, FunctionPluginHooks as f, build as ft, ModuleOptions as g, GeneratedCodeOptions as gt, LoadResult as h, ChunkingContext as ht, ExternalOption as i, WarningHandlerWithDefault as it, VERSION as j, SourceMap as jt, withFilter as k, RenderedModule as kt, WatcherOptions as l, rolldown as lt, ImportKind as m, ChunkFileNamesFunction as mt, ConfigExport as n, NormalizedInputOptions as nt, InputOptions as o, RolldownWatcher as ot, HookFilterExtension as p, AddonFunction as pt, GeneralHookFilter as q, RolldownOptions as r, LoggingFunction as rt, ModuleTypes as s, RolldownWatcherEvent as st, defineConfig as t, NormalizedOutputOptions as tt, AsyncPluginHooks as u, RolldownBuild as ut, ObjectHook as v, GlobalsFunction as vt, ResolvedId as w, PartialNull as wt, Plugin as x, OutputOptions as xt, ParallelPluginHooks as y, MinifyOptions as yt, EmittedFile as z };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/log/logging.d.ts
|
|
2
|
+
type LogLevel = "info" | "debug" | "warn";
|
|
3
|
+
type LogLevelOption = LogLevel | "silent";
|
|
4
|
+
type LogLevelWithError = LogLevel | "error";
|
|
5
|
+
interface RollupLog {
|
|
6
|
+
binding?: string;
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
code?: string;
|
|
9
|
+
exporter?: string;
|
|
10
|
+
frame?: string;
|
|
11
|
+
hook?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
ids?: string[];
|
|
14
|
+
loc?: {
|
|
15
|
+
column: number;
|
|
16
|
+
file?: string;
|
|
17
|
+
line: number;
|
|
18
|
+
};
|
|
19
|
+
message: string;
|
|
20
|
+
meta?: any;
|
|
21
|
+
names?: string[];
|
|
22
|
+
plugin?: string;
|
|
23
|
+
pluginCode?: unknown;
|
|
24
|
+
pos?: number;
|
|
25
|
+
reexporter?: string;
|
|
26
|
+
stack?: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
}
|
|
29
|
+
type RollupLogWithString = RollupLog | string;
|
|
30
|
+
interface RollupError extends RollupLog {
|
|
31
|
+
name?: string;
|
|
32
|
+
stack?: string;
|
|
33
|
+
watchFiles?: string[];
|
|
34
|
+
}
|
|
35
|
+
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { RollupLog as a, RollupError as i, LogLevelOption as n, RollupLogWithString as o, LogOrStringHandler as r, LogLevel as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
2
|
-
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-
|
|
3
|
-
import { r as noop } from "./misc-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
|
|
2
|
+
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-sGci9sux.mjs";
|
|
3
|
+
import { r as noop } from "./misc-DpjTMcQQ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.ts
|
|
6
6
|
const LOG_LEVEL_SILENT = "silent";
|
|
@@ -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.55";
|
|
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.103.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);
|
|
@@ -556,8 +556,10 @@ function collectChangedBundle(changed, bundle) {
|
|
|
556
556
|
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/builtin-plugin/utils.ts
|
|
559
|
-
var import_binding = require_binding();
|
|
559
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
560
560
|
var BuiltinPlugin = class {
|
|
561
|
+
/** Vite-specific option to control plugin ordering */
|
|
562
|
+
enforce;
|
|
561
563
|
constructor(name, _options) {
|
|
562
564
|
this.name = name;
|
|
563
565
|
this._options = _options;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
2
|
-
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
|
|
2
|
+
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-sGci9sux.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
4
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.103.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 {
|
|
@@ -39,7 +39,7 @@ function applyFix(program, fixPath) {
|
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/utils/parse.ts
|
|
42
|
-
var import_binding = require_binding();
|
|
42
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
43
43
|
/**
|
|
44
44
|
* Parse asynchronously.
|
|
45
45
|
*
|
|
@@ -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-CNW2eye_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/rolldown/index.ts
|
|
4
4
|
const rolldown = async (input) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
2
|
-
import { i as logInputHookInOutputPlugin, n as error } from "./logs-
|
|
3
|
-
import { i as unimplemented } from "./misc-
|
|
4
|
-
import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-
|
|
5
|
-
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
|
|
2
|
+
import { i as logInputHookInOutputPlugin, n as error } from "./logs-sGci9sux.mjs";
|
|
3
|
+
import { i as unimplemented } from "./misc-DpjTMcQQ.mjs";
|
|
4
|
+
import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-B4d0IHth.mjs";
|
|
5
|
+
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-A-rLIOKA.mjs";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { styleText } from "node:util";
|
|
@@ -1585,7 +1585,7 @@ const TransformOptionsSchema = object({
|
|
|
1585
1585
|
JsxOptionsSchema
|
|
1586
1586
|
])),
|
|
1587
1587
|
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
1588
|
-
define: pipe(optional(record(string(), string())), description("Define global variables")),
|
|
1588
|
+
define: pipe(optional(record(string(), string())), description("Define global variables (syntax: key=value,key2=value2)")),
|
|
1589
1589
|
inject: pipe(optional(record(string(), union([string(), tuple([string(), string()])]))), description("Inject import statements on demand")),
|
|
1590
1590
|
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names"))
|
|
1591
1591
|
});
|
|
@@ -1616,7 +1616,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
1616
1616
|
emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
|
|
1617
1617
|
configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
|
|
1618
1618
|
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
|
|
1619
|
-
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory"))
|
|
1619
|
+
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
|
|
1620
|
+
pluginTimings: pipe(optional(boolean()), description("Whether to emit warning when detecting plugin timings"))
|
|
1620
1621
|
});
|
|
1621
1622
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
1622
1623
|
function: boolean(),
|
|
@@ -1695,7 +1696,7 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
|
1695
1696
|
LogOrStringHandlerSchema
|
|
1696
1697
|
])));
|
|
1697
1698
|
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
1698
|
-
const
|
|
1699
|
+
const DevModeSchema = union([boolean(), strictObject({
|
|
1699
1700
|
new: optional(boolean()),
|
|
1700
1701
|
port: optional(number()),
|
|
1701
1702
|
host: optional(string()),
|
|
@@ -1728,7 +1729,7 @@ const InputOptionsSchema = strictObject({
|
|
|
1728
1729
|
strictExecutionOrder: optional(boolean()),
|
|
1729
1730
|
onDemandWrapping: optional(boolean()),
|
|
1730
1731
|
incrementalBuild: optional(boolean()),
|
|
1731
|
-
|
|
1732
|
+
devMode: optional(DevModeSchema),
|
|
1732
1733
|
attachDebugInfo: optional(union([
|
|
1733
1734
|
literal("none"),
|
|
1734
1735
|
literal("simple"),
|
|
@@ -1851,6 +1852,8 @@ const OutputOptionsSchema = strictObject({
|
|
|
1851
1852
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
1852
1853
|
banner: optional(union([string(), AddonFunctionSchema])),
|
|
1853
1854
|
footer: optional(union([string(), AddonFunctionSchema])),
|
|
1855
|
+
postBanner: optional(union([string(), AddonFunctionSchema])),
|
|
1856
|
+
postFooter: optional(union([string(), AddonFunctionSchema])),
|
|
1854
1857
|
intro: optional(union([string(), AddonFunctionSchema])),
|
|
1855
1858
|
outro: optional(union([string(), AddonFunctionSchema])),
|
|
1856
1859
|
extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
@@ -1898,6 +1901,8 @@ const OutputCliOverrideSchema = strictObject({
|
|
|
1898
1901
|
sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
|
|
1899
1902
|
banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
|
|
1900
1903
|
footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
|
|
1904
|
+
postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1905
|
+
postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1901
1906
|
intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
|
|
1902
1907
|
outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
|
|
1903
1908
|
esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
@@ -2013,7 +2018,10 @@ var ChunkingContextImpl = class {
|
|
|
2013
2018
|
//#endregion
|
|
2014
2019
|
//#region src/utils/bindingify-output-options.ts
|
|
2015
2020
|
function bindingifyOutputOptions(outputOptions) {
|
|
2016
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
2021
|
+
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 } = outputOptions;
|
|
2022
|
+
if (outputOptions.inlineDynamicImports === true) {
|
|
2023
|
+
if (manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
|
|
2024
|
+
}
|
|
2017
2025
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
2018
2026
|
return {
|
|
2019
2027
|
dir,
|
|
@@ -2028,6 +2036,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2028
2036
|
sourcemapPathTransform,
|
|
2029
2037
|
banner: bindingifyAddon(banner),
|
|
2030
2038
|
footer: bindingifyAddon(footer),
|
|
2039
|
+
postBanner: bindingifyAddon(postBanner),
|
|
2040
|
+
postFooter: bindingifyAddon(postFooter),
|
|
2031
2041
|
intro: bindingifyAddon(intro),
|
|
2032
2042
|
outro: bindingifyAddon(outro),
|
|
2033
2043
|
extend: outputOptions.extend,
|
|
@@ -2058,10 +2068,9 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2058
2068
|
};
|
|
2059
2069
|
}
|
|
2060
2070
|
function bindingifyAddon(configAddon) {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
};
|
|
2071
|
+
if (configAddon == null || configAddon === "") return;
|
|
2072
|
+
if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
|
|
2073
|
+
return configAddon;
|
|
2065
2074
|
}
|
|
2066
2075
|
function bindingifyFormat(format) {
|
|
2067
2076
|
switch (format) {
|
|
@@ -2120,7 +2129,7 @@ function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
|
2120
2129
|
|
|
2121
2130
|
//#endregion
|
|
2122
2131
|
//#region src/utils/initialize-parallel-plugins.ts
|
|
2123
|
-
var import_binding
|
|
2132
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
2124
2133
|
async function initializeParallelPlugins(plugins) {
|
|
2125
2134
|
const pluginInfos = [];
|
|
2126
2135
|
for (const [index, plugin] of plugins.entries()) if ("_parallel" in plugin) {
|
|
@@ -2133,7 +2142,7 @@ async function initializeParallelPlugins(plugins) {
|
|
|
2133
2142
|
}
|
|
2134
2143
|
if (pluginInfos.length <= 0) return;
|
|
2135
2144
|
const count = availableParallelism();
|
|
2136
|
-
const parallelJsPluginRegistry = new import_binding
|
|
2145
|
+
const parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);
|
|
2137
2146
|
const registryId = parallelJsPluginRegistry.id;
|
|
2138
2147
|
const workers = await initializeWorkers(registryId, count, pluginInfos);
|
|
2139
2148
|
const stopWorkers = async () => {
|
|
@@ -2211,7 +2220,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
2211
2220
|
|
|
2212
2221
|
//#endregion
|
|
2213
2222
|
//#region src/api/rolldown/rolldown-build.ts
|
|
2214
|
-
var import_binding = require_binding();
|
|
2215
2223
|
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
2216
2224
|
var RolldownBuild = class RolldownBuild {
|
|
2217
2225
|
#inputOptions;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as require_binding } from "./binding-
|
|
2
|
-
import { o as logMultiplyNotifyOption } from "./logs-
|
|
3
|
-
import { t as arraify } from "./misc-
|
|
4
|
-
import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-
|
|
5
|
-
import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-
|
|
6
|
-
import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
|
|
2
|
+
import { o as logMultiplyNotifyOption } from "./logs-sGci9sux.mjs";
|
|
3
|
+
import { t as arraify } from "./misc-DpjTMcQQ.mjs";
|
|
4
|
+
import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-B4d0IHth.mjs";
|
|
5
|
+
import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-CNW2eye_.mjs";
|
|
6
|
+
import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-A-rLIOKA.mjs";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
9
9
|
/**
|
|
@@ -203,7 +203,19 @@ var SignalExit = class extends SignalExitBase {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
const process$1 = globalThis.process;
|
|
206
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
206
|
+
const { onExit: onExit$1, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/utils/signal-exit.ts
|
|
210
|
+
function onExit(...args) {
|
|
211
|
+
if (typeof process === "object" && process.versions.webcontainer) {
|
|
212
|
+
process.on("exit", (code) => {
|
|
213
|
+
args[0](code, null);
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
onExit$1(...args);
|
|
218
|
+
}
|
|
207
219
|
|
|
208
220
|
//#endregion
|
|
209
221
|
//#region src/api/watch/watch-emitter.ts
|
|
@@ -280,7 +292,7 @@ var WatcherEmitter = class {
|
|
|
280
292
|
|
|
281
293
|
//#endregion
|
|
282
294
|
//#region src/api/watch/watcher.ts
|
|
283
|
-
var import_binding = require_binding();
|
|
295
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
284
296
|
var Watcher = class {
|
|
285
297
|
closed;
|
|
286
298
|
inner;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.55",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"types": "./dist/experimental-runtime-types.d.ts"
|
|
39
39
|
},
|
|
40
40
|
"./filter": "./dist/filter-index.mjs",
|
|
41
|
+
"./getLogFilter": "./dist/get-log-filter.mjs",
|
|
41
42
|
"./parallelPlugin": "./dist/parallel-plugin.mjs",
|
|
42
43
|
"./parseAst": "./dist/parse-ast-index.mjs",
|
|
43
44
|
"./package.json": "./package.json",
|
|
@@ -78,19 +79,19 @@
|
|
|
78
79
|
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\ntype BindingResult<T> = { errors: BindingError[], isBindingErrors: boolean } | T\n\n"
|
|
79
80
|
},
|
|
80
81
|
"dependencies": {
|
|
81
|
-
"@oxc-project/types": "=0.
|
|
82
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
82
|
+
"@oxc-project/types": "=0.103.0",
|
|
83
|
+
"@rolldown/pluginutils": "1.0.0-beta.55"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
85
86
|
"@napi-rs/cli": "^3.4.1",
|
|
86
87
|
"@napi-rs/wasm-runtime": "^1.0.0",
|
|
87
|
-
"@oxc-node/cli": "^0.0.
|
|
88
|
+
"@oxc-node/cli": "^0.0.35",
|
|
88
89
|
"@rollup/plugin-json": "^6.1.0",
|
|
89
90
|
"buble": "^0.20.0",
|
|
90
91
|
"consola": "^3.4.2",
|
|
91
92
|
"execa": "^9.2.0",
|
|
92
93
|
"glob": "^13.0.0",
|
|
93
|
-
"oxc-parser": "=0.
|
|
94
|
+
"oxc-parser": "=0.103.0",
|
|
94
95
|
"pathe": "^2.0.3",
|
|
95
96
|
"remeda": "^2.10.0",
|
|
96
97
|
"rolldown-plugin-dts": "^0.18.0",
|
|
@@ -99,25 +100,25 @@
|
|
|
99
100
|
"source-map": "^0.7.4",
|
|
100
101
|
"typescript": "^5.8.3",
|
|
101
102
|
"valibot": "1.2.0",
|
|
102
|
-
"rolldown": "1.0.0-beta.
|
|
103
|
+
"rolldown": "1.0.0-beta.55"
|
|
103
104
|
},
|
|
104
105
|
"engines": {
|
|
105
106
|
"node": "^20.19.0 || >=22.12.0"
|
|
106
107
|
},
|
|
107
108
|
"optionalDependencies": {
|
|
108
|
-
"@rolldown/binding-darwin-x64": "1.0.0-beta.
|
|
109
|
-
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.
|
|
110
|
-
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.
|
|
111
|
-
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.
|
|
112
|
-
"@rolldown/binding-freebsd-x64": "1.0.0-beta.
|
|
113
|
-
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.
|
|
114
|
-
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.
|
|
115
|
-
"@rolldown/binding-darwin-arm64": "1.0.0-beta.
|
|
116
|
-
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.
|
|
117
|
-
"@rolldown/binding-openharmony-arm64": "1.0.0-beta.
|
|
118
|
-
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.
|
|
119
|
-
"@rolldown/binding-android-arm64": "1.0.0-beta.
|
|
120
|
-
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.
|
|
109
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.55",
|
|
110
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.55",
|
|
111
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.55",
|
|
112
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.55",
|
|
113
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.55",
|
|
114
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.55",
|
|
115
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.55",
|
|
116
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.55",
|
|
117
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.55",
|
|
118
|
+
"@rolldown/binding-openharmony-arm64": "1.0.0-beta.55",
|
|
119
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.55",
|
|
120
|
+
"@rolldown/binding-android-arm64": "1.0.0-beta.55",
|
|
121
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.55"
|
|
121
122
|
},
|
|
122
123
|
"scripts": {
|
|
123
124
|
"# Scrips for binding #": "_",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|