rolldown 1.0.0-beta.45 → 1.0.0-beta.46
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 +4 -3
- package/dist/cli.mjs +6 -6
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -4
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +59 -8
- package/dist/experimental-runtime-types.d.ts +16 -5
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/dist/parallel-plugin-worker.mjs +5 -4
- 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/shared/{binding-S7w0fEEX.d.mts → binding-CCMrV5an.d.mts} +37 -22
- package/dist/shared/binding-DOZoR4bu.mjs +578 -0
- package/dist/shared/{define-config-BhR6ffrr.d.mts → define-config-Czc1YEBi.d.mts} +59 -5
- package/dist/shared/{load-config-jm5iO_Ww.mjs → load-config-Brje6-4J.mjs} +1 -1
- package/dist/shared/{parse-ast-index-lp33x2Wb.mjs → parse-ast-index-oPgrkdqc.mjs} +11 -5
- package/dist/shared/{src-CPA2meNe.mjs → src-D1weNlnG.mjs} +277 -125
- package/package.json +24 -22
- package/dist/shared/binding-D7oxcV7l.mjs +0 -10719
package/dist/cli-setup.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-DOZoR4bu.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cli/setup-index.ts
|
|
4
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4
5
|
let isWatchMode = false;
|
|
5
6
|
for (let i = 0; i < process.argv.length; i++) {
|
|
6
7
|
const arg = process.argv[i];
|
|
@@ -9,8 +10,8 @@ for (let i = 0; i < process.argv.length; i++) {
|
|
|
9
10
|
break;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
|
-
if (isWatchMode) createTokioRuntime(32);
|
|
13
|
-
else createTokioRuntime(4);
|
|
13
|
+
if (isWatchMode) (0, import_binding.createTokioRuntime)(32);
|
|
14
|
+
else (0, import_binding.createTokioRuntime)(4);
|
|
14
15
|
|
|
15
16
|
//#endregion
|
|
16
17
|
export { };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { C as
|
|
3
|
-
import { h as styleText$1 } from "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { C as version, S as description, _ as getOutputCliKeys, g as getInputCliKeys, h as getCliSchemaInfo, i as watch, o as rolldown, v as validateCliOptions, w as onExit } from "./shared/src-D1weNlnG.mjs";
|
|
3
|
+
import { h as styleText$1 } from "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
4
4
|
import { t as arraify } from "./shared/misc-usdOVIou.mjs";
|
|
5
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
6
|
-
import path, { sep } from "node:path";
|
|
5
|
+
import { t as loadConfig } from "./shared/load-config-Brje6-4J.mjs";
|
|
7
6
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
7
|
+
import path, { sep } from "node:path";
|
|
8
8
|
import process$1 from "node:process";
|
|
9
9
|
import * as tty from "node:tty";
|
|
10
10
|
import { performance } from "node:perf_hooks";
|
|
@@ -1223,7 +1223,7 @@ function getClearScreenFunction(options$1) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
//#endregion
|
|
1226
|
-
//#region \0@oxc-project+runtime@0.
|
|
1226
|
+
//#region \0@oxc-project+runtime@0.96.0/helpers/usingCtx.js
|
|
1227
1227
|
function _usingCtx() {
|
|
1228
1228
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1229
1229
|
var n$2 = Error();
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ConfigExport, t as defineConfig } from "./shared/define-config-
|
|
2
|
-
import "./shared/binding-
|
|
1
|
+
import { n as ConfigExport, t as defineConfig } from "./shared/define-config-Czc1YEBi.mjs";
|
|
2
|
+
import "./shared/binding-CCMrV5an.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import {
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { C as version, r as defineConfig } from "./shared/src-D1weNlnG.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
4
4
|
import "./shared/misc-usdOVIou.mjs";
|
|
5
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
5
|
+
import { t as loadConfig } from "./shared/load-config-Brje6-4J.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/config.ts
|
|
8
8
|
const VERSION = version;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as BuiltinPlugin, N as SourceMapInput, U as defineParallelPlugin, bt as OutputOptions, kt as RolldownOutput, o as InputOptions, wt as StringOrRegExp } from "./shared/define-config-
|
|
2
|
-
import { A as
|
|
1
|
+
import { A as BuiltinPlugin, N as SourceMapInput, U as defineParallelPlugin, bt as OutputOptions, jt as freeExternalMemory, kt as RolldownOutput, o as InputOptions, wt as StringOrRegExp } from "./shared/define-config-Czc1YEBi.mjs";
|
|
2
|
+
import { A as IsolatedDeclarationsOptions, B as TransformOptions, C as BindingViteCssPluginConfig, D as BindingWasmHelperPluginConfig, E as BindingViteResolvePluginConfig, H as isolatedDeclaration, P as NapiResolveOptions, R as ResolveResult, S as BindingUrlResolver, T as BindingViteHtmlPluginConfig, U as moduleRunnerTransform, V as TransformResult, W as transform, a as BindingClientHmrUpdate, d as BindingJsonPluginConfig, g as BindingRebuildStrategy, h as BindingReactRefreshWrapperPluginConfig, j as IsolatedDeclarationsResult, l as BindingImportGlobPluginConfig, m as BindingModulePreloadPolyfillPluginConfig, n as BindingBuildImportAnalysisPluginConfig, o as BindingDynamicImportVarsPluginConfig, p as BindingManifestPluginConfig, s as BindingEsmExternalRequirePluginConfig, t as BindingAssetPluginConfig, u as BindingIsolatedDeclarationPluginConfig, v as BindingReplacePluginConfig, w as BindingViteCssPostPluginConfig, x as BindingTransformPluginConfig, y as BindingReporterPluginConfig, z as ResolverFactory } from "./shared/binding-CCMrV5an.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
5
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -173,4 +173,4 @@ type ViteCssPluginConfig = Omit<BindingViteCssPluginConfig, "compileCSS"> & {
|
|
|
173
173
|
};
|
|
174
174
|
declare function viteCSSPlugin(config?: ViteCssPluginConfig): BuiltinPlugin;
|
|
175
175
|
//#endregion
|
|
176
|
-
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
176
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, freeExternalMemory, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { b as BuiltinPlugin, c as createBundlerOptions, f as normalizeBindingResult, l as normalizedStringOrRegex, m as bindingifySourcemap, p as transformToRollupOutput, s as RolldownBuild, x as makeBuiltinPluginCallable, y as PluginDriver } from "./shared/src-D1weNlnG.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
4
4
|
import "./shared/misc-usdOVIou.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
7
|
//#region src/api/dev/dev-engine.ts
|
|
8
|
+
var import_binding$1 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
8
9
|
var DevEngine = class DevEngine {
|
|
9
10
|
#inner;
|
|
10
11
|
#cachedBuildFinishPromise = null;
|
|
@@ -35,7 +36,7 @@ var DevEngine = class DevEngine {
|
|
|
35
36
|
}
|
|
36
37
|
userOnOutput(transformToRollupOutput(result));
|
|
37
38
|
} : void 0,
|
|
38
|
-
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy.Auto : BindingRebuildStrategy.Never : void 0,
|
|
39
|
+
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? import_binding$1.BindingRebuildStrategy.Always : devOptions.rebuildStrategy === "auto" ? import_binding$1.BindingRebuildStrategy.Auto : import_binding$1.BindingRebuildStrategy.Never : void 0,
|
|
39
40
|
watch: devOptions.watch && {
|
|
40
41
|
skipWrite: devOptions.watch.skipWrite,
|
|
41
42
|
usePolling: devOptions.watch.usePolling,
|
|
@@ -46,7 +47,7 @@ var DevEngine = class DevEngine {
|
|
|
46
47
|
debounceTickRate: devOptions.watch.debounceTickRate
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
|
-
return new DevEngine(new BindingDevEngine(options.bundlerOptions, bindingDevOptions));
|
|
50
|
+
return new DevEngine(new import_binding$1.BindingDevEngine(options.bundlerOptions, bindingDevOptions));
|
|
50
51
|
}
|
|
51
52
|
constructor(inner) {
|
|
52
53
|
this.#inner = inner;
|
|
@@ -86,6 +87,47 @@ var DevEngine = class DevEngine {
|
|
|
86
87
|
//#region src/api/dev/index.ts
|
|
87
88
|
const dev = (...args) => DevEngine.create(...args);
|
|
88
89
|
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/types/external-memory-handle.ts
|
|
92
|
+
const symbolForExternalMemoryHandle = "__rolldown_external_memory_handle__";
|
|
93
|
+
/**
|
|
94
|
+
* Frees the external memory held by the given handle.
|
|
95
|
+
*
|
|
96
|
+
* This is useful when you want to manually release memory held by Rust objects
|
|
97
|
+
* (like `OutputChunk` or `OutputAsset`) before they are garbage collected.
|
|
98
|
+
*
|
|
99
|
+
* @param handle - The object with external memory to free
|
|
100
|
+
* @param keepDataAlive - If true, evaluates all lazy fields before freeing memory (default: false).
|
|
101
|
+
* This will take time to copy data from Rust to JavaScript, but prevents errors
|
|
102
|
+
* when accessing properties after the memory is freed.
|
|
103
|
+
* @returns Status object with `freed` boolean and optional `reason` string.
|
|
104
|
+
* - `{ freed: true }` if memory was successfully freed
|
|
105
|
+
* - `{ freed: false, reason: "..." }` if memory couldn't be freed (e.g., already freed or other references exist)
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* import { freeExternalMemory } from 'rolldown/experimental';
|
|
110
|
+
*
|
|
111
|
+
* const output = await bundle.generate();
|
|
112
|
+
* const chunk = output.output[0];
|
|
113
|
+
*
|
|
114
|
+
* // Use the chunk...
|
|
115
|
+
*
|
|
116
|
+
* // Manually free the memory (fast, but accessing properties after will throw)
|
|
117
|
+
* const status = freeExternalMemory(chunk); // { freed: true }
|
|
118
|
+
* const statusAgain = freeExternalMemory(chunk); // { freed: false, reason: "Memory has already been freed" }
|
|
119
|
+
*
|
|
120
|
+
* // Keep data alive before freeing (slower, but data remains accessible)
|
|
121
|
+
* freeExternalMemory(chunk, true); // Evaluates all lazy fields first
|
|
122
|
+
* console.log(chunk.code); // OK - data was copied to JavaScript before freeing
|
|
123
|
+
*
|
|
124
|
+
* // Without keepDataAlive, accessing chunk properties after freeing will throw an error
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
function freeExternalMemory(handle, keepDataAlive = false) {
|
|
128
|
+
return handle[symbolForExternalMemoryHandle](keepDataAlive);
|
|
129
|
+
}
|
|
130
|
+
|
|
89
131
|
//#endregion
|
|
90
132
|
//#region src/api/experimental.ts
|
|
91
133
|
/**
|
|
@@ -216,10 +258,10 @@ function replacePlugin(values = {}, options = {}) {
|
|
|
216
258
|
const value = values[key];
|
|
217
259
|
if (typeof value !== "string") values[key] = String(value);
|
|
218
260
|
});
|
|
219
|
-
return new BuiltinPlugin("builtin:replace", {
|
|
261
|
+
return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:replace", {
|
|
220
262
|
...options,
|
|
221
263
|
values
|
|
222
|
-
});
|
|
264
|
+
}));
|
|
223
265
|
}
|
|
224
266
|
|
|
225
267
|
//#endregion
|
|
@@ -251,4 +293,13 @@ function viteCSSPlugin(config) {
|
|
|
251
293
|
}
|
|
252
294
|
|
|
253
295
|
//#endregion
|
|
254
|
-
|
|
296
|
+
//#region src/experimental-index.ts
|
|
297
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
298
|
+
|
|
299
|
+
//#endregion
|
|
300
|
+
var BindingRebuildStrategy = import_binding.BindingRebuildStrategy;
|
|
301
|
+
var ResolverFactory = import_binding.ResolverFactory;
|
|
302
|
+
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
303
|
+
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
304
|
+
var transform = import_binding.transform;
|
|
305
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, freeExternalMemory, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {{ type: 'hmr:module-registered', modules: string[] }} DevRuntimeMessage
|
|
3
|
+
* @typedef {{ send(message: DevRuntimeMessage): void }} Messenger
|
|
4
|
+
*/
|
|
1
5
|
export class DevRuntime {
|
|
2
6
|
/**
|
|
3
|
-
* @param {
|
|
7
|
+
* @param {Messenger} messenger
|
|
4
8
|
*/
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
9
|
+
constructor(messenger: Messenger);
|
|
10
|
+
messenger: Messenger;
|
|
7
11
|
/**
|
|
8
12
|
* @type {Record<string, Module>}
|
|
9
13
|
*/
|
|
@@ -13,9 +17,9 @@ export class DevRuntime {
|
|
|
13
17
|
*/
|
|
14
18
|
createModuleHotContext(_moduleId: string): void;
|
|
15
19
|
/**
|
|
16
|
-
* @param {string[]} _boundaries
|
|
20
|
+
* @param {[string, string][]} _boundaries
|
|
17
21
|
*/
|
|
18
|
-
applyUpdates(_boundaries: string[]): void;
|
|
22
|
+
applyUpdates(_boundaries: [string, string][]): void;
|
|
19
23
|
/**
|
|
20
24
|
* @param {string} id
|
|
21
25
|
* @param {{ exports: any }} exportsHolder
|
|
@@ -57,6 +61,13 @@ export class DevRuntime {
|
|
|
57
61
|
__reExport: any;
|
|
58
62
|
sendModuleRegisteredMessage: (module: string) => void;
|
|
59
63
|
}
|
|
64
|
+
export type DevRuntimeMessage = {
|
|
65
|
+
type: "hmr:module-registered";
|
|
66
|
+
modules: string[];
|
|
67
|
+
};
|
|
68
|
+
export type Messenger = {
|
|
69
|
+
send(message: DevRuntimeMessage): void;
|
|
70
|
+
};
|
|
60
71
|
declare class Module {
|
|
61
72
|
/**
|
|
62
73
|
* @param {string} id
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as withFilter } from "./shared/define-config-
|
|
2
|
-
import "./shared/binding-
|
|
1
|
+
import { k as withFilter } from "./shared/define-config-Czc1YEBi.mjs";
|
|
2
|
+
import "./shared/binding-CCMrV5an.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as InternalModuleFormat, At as SourceMap, B as GetModuleInfo, C as ResolveIdResult, Ct as PartialNull, D as SourceDescription, Dt as RenderedChunk, E as RolldownPluginOption, Et as OutputChunk, F as OutputBundle, Ft as
|
|
2
|
-
import {
|
|
1
|
+
import { $ as InternalModuleFormat, At as SourceMap, B as GetModuleInfo, C as ResolveIdResult, Ct as PartialNull, D as SourceDescription, Dt as RenderedChunk, E as RolldownPluginOption, Et as OutputChunk, F as OutputBundle, Ft as LogLevelOption, G as PluginContextMeta, H as DefineParallelPluginResult, I as TreeshakingOptions, It as LogOrStringHandler, J as ModuleTypeFilter, K as GeneralHookFilter, L as TransformPluginContext, Lt as RollupError, M as ExistingRawSourceMap, Mt as ModuleInfo, N as SourceMapInput, Nt as SourcemapIgnoreListOption, O as TransformResult, Ot as RenderedModule, P as RolldownOptionsFunction, Pt as LogLevel, Q as RolldownFsModule, R as EmittedAsset, Rt as RollupLog, S as ResolveIdExtraOptions, T as RolldownPlugin, Tt as OutputAsset, V as PluginContext, W as MinimalPluginContext, X as RolldownDirectoryEntry, Y as BufferEncoding, Z as RolldownFileStats, _ as ModuleType, _t as GlobalsFunction, a as InputOption, at as RolldownWatcher, b as PartialResolvedId, bt as OutputOptions, c as OptimizationOptions, ct as rolldown, d as CustomPluginOptions, dt as build, et as NormalizedOutputOptions, f as FunctionPluginHooks, ft as AddonFunction, g as ModuleOptions, gt as GeneratedCodePreset, h as LoadResult, ht as GeneratedCodeOptions, i as ExternalOption, it as watch, j as VERSION, kt as RolldownOutput, l as WatcherOptions, lt as RolldownBuild, m as ImportKind, mt as ChunkingContext, n as ConfigExport, nt as LoggingFunction, o as InputOptions, ot as RolldownWatcherEvent, p as HookFilterExtension, pt as ChunkFileNamesFunction, q as HookFilter, r as RolldownOptions, rt as WarningHandlerWithDefault, s as ModuleTypes, st as WatchOptions, t as defineConfig, tt as NormalizedInputOptions, u as AsyncPluginHooks, ut as BuildOptions, v as ObjectHook, vt as MinifyOptions, w as ResolvedId, x as Plugin, xt as PreRenderedAsset, y as ParallelPluginHooks, yt as ModuleFormat, z as EmittedFile, zt as RollupLogWithString } from "./shared/define-config-Czc1YEBi.mjs";
|
|
2
|
+
import { L as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-CCMrV5an.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, 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, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { a as
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { a as build, i as watch, n as import_binding, o as rolldown, r as defineConfig, t as VERSION } from "./shared/src-D1weNlnG.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
4
4
|
import "./shared/misc-usdOVIou.mjs";
|
|
5
5
|
|
|
6
|
+
var BindingMagicString = import_binding.BindingMagicString;
|
|
6
7
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-D1weNlnG.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
4
4
|
import "./shared/misc-usdOVIou.mjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
8
9
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
9
10
|
(async () => {
|
|
10
11
|
try {
|
|
11
|
-
registerPlugins(registryId, await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
12
|
+
(0, import_binding.registerPlugins)(registryId, await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
12
13
|
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
|
|
13
14
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
14
15
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { St as MaybePromise, x as Plugin } from "./shared/define-config-
|
|
2
|
-
import "./shared/binding-
|
|
1
|
+
import { St as MaybePromise, x as Plugin } from "./shared/define-config-Czc1YEBi.mjs";
|
|
2
|
+
import "./shared/binding-CCMrV5an.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,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-DOZoR4bu.mjs";
|
|
2
|
+
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-oPgrkdqc.mjs";
|
|
3
3
|
|
|
4
4
|
export { parseAst, parseAstAsync };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _oxc_project_types0 from "@oxc-project/types";
|
|
2
2
|
|
|
3
|
-
//#region src/binding.d.
|
|
3
|
+
//#region src/binding.d.cts
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
5
|
type VoidNullable<T = void> = T | null | undefined | void;
|
|
6
6
|
type BindingStringOrRegex = string | RegExp;
|
|
@@ -67,6 +67,14 @@ interface CompressOptions {
|
|
|
67
67
|
* @default true
|
|
68
68
|
*/
|
|
69
69
|
sequences?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Set of label names to drop from the code.
|
|
72
|
+
*
|
|
73
|
+
* Labeled statements matching these names will be removed during minification.
|
|
74
|
+
*
|
|
75
|
+
* @default []
|
|
76
|
+
*/
|
|
77
|
+
dropLabels?: Array<string>;
|
|
70
78
|
/** Limit the maximum number of iterations for debugging purpose. */
|
|
71
79
|
maxIterations?: number;
|
|
72
80
|
}
|
|
@@ -1198,28 +1206,30 @@ declare class BindingMagicString {
|
|
|
1198
1206
|
isEmpty(): boolean;
|
|
1199
1207
|
}
|
|
1200
1208
|
declare class BindingOutputAsset {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1209
|
+
dropInner(): ExternalMemoryStatus;
|
|
1210
|
+
getFileName(): string;
|
|
1211
|
+
getOriginalFileName(): string | null;
|
|
1212
|
+
getOriginalFileNames(): Array<string>;
|
|
1213
|
+
getSource(): BindingAssetSource;
|
|
1214
|
+
getName(): string | null;
|
|
1215
|
+
getNames(): Array<string>;
|
|
1207
1216
|
}
|
|
1208
1217
|
declare class BindingOutputChunk {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1218
|
+
dropInner(): ExternalMemoryStatus;
|
|
1219
|
+
getIsEntry(): boolean;
|
|
1220
|
+
getIsDynamicEntry(): boolean;
|
|
1221
|
+
getFacadeModuleId(): string | null;
|
|
1222
|
+
getModuleIds(): Array<string>;
|
|
1223
|
+
getExports(): Array<string>;
|
|
1224
|
+
getFileName(): string;
|
|
1225
|
+
getModules(): BindingModules;
|
|
1226
|
+
getImports(): Array<string>;
|
|
1227
|
+
getDynamicImports(): Array<string>;
|
|
1228
|
+
getCode(): string;
|
|
1229
|
+
getMap(): string | null;
|
|
1230
|
+
getSourcemapFileName(): string | null;
|
|
1231
|
+
getPreliminaryFileName(): string;
|
|
1232
|
+
getName(): string;
|
|
1223
1233
|
}
|
|
1224
1234
|
declare class BindingRenderedChunk {
|
|
1225
1235
|
get name(): string;
|
|
@@ -1272,6 +1282,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1272
1282
|
optimizeModulePreloadRelativePaths: boolean;
|
|
1273
1283
|
renderBuiltUrl: boolean;
|
|
1274
1284
|
isRelativeBase: boolean;
|
|
1285
|
+
isTestV2?: boolean;
|
|
1275
1286
|
}
|
|
1276
1287
|
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:esm-external-require' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:react-refresh-wrapper' | 'builtin:reporter' | 'builtin:replace' | 'builtin:transform' | 'builtin:vite-css' | 'builtin:vite-css-post' | 'builtin:vite-html' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1277
1288
|
interface BindingClientHmrUpdate {
|
|
@@ -1495,6 +1506,10 @@ interface BindingViteResolvePluginResolveOptions {
|
|
|
1495
1506
|
interface BindingWasmHelperPluginConfig {
|
|
1496
1507
|
decodedBase: string;
|
|
1497
1508
|
}
|
|
1509
|
+
interface ExternalMemoryStatus {
|
|
1510
|
+
freed: boolean;
|
|
1511
|
+
reason?: string;
|
|
1512
|
+
}
|
|
1498
1513
|
/** Error emitted from native side, it only contains kind and message, no stack trace. */
|
|
1499
1514
|
interface NativeError {
|
|
1500
1515
|
kind: string;
|
|
@@ -1509,4 +1524,4 @@ interface PreRenderedChunk {
|
|
|
1509
1524
|
exports: Array<string>;
|
|
1510
1525
|
}
|
|
1511
1526
|
//#endregion
|
|
1512
|
-
export {
|
|
1527
|
+
export { IsolatedDeclarationsOptions as A, TransformOptions as B, BindingViteCssPluginConfig as C, BindingWasmHelperPluginConfig as D, BindingViteResolvePluginConfig as E, ParseResult as F, isolatedDeclaration as H, ParserOptions as I, PreRenderedChunk as L, JsxOptions as M, MinifyOptions as N, BindingWatcherEvent as O, NapiResolveOptions as P, ResolveResult as R, BindingUrlResolver as S, BindingViteHtmlPluginConfig as T, moduleRunnerTransform as U, TransformResult as V, transform as W, BindingRenderedChunk as _, BindingClientHmrUpdate as a, BindingTransformHookExtraArgs as b, BindingHookResolveIdExtraArgs as c, BindingJsonPluginConfig as d, BindingMagicString as f, BindingRebuildStrategy as g, BindingReactRefreshWrapperPluginConfig as h, BindingBundlerImpl as i, IsolatedDeclarationsResult as j, ExternalMemoryStatus as k, BindingImportGlobPluginConfig as l, BindingModulePreloadPolyfillPluginConfig as m, BindingBuildImportAnalysisPluginConfig as n, BindingDynamicImportVarsPluginConfig as o, BindingManifestPluginConfig as p, BindingBuiltinPluginName as r, BindingEsmExternalRequirePluginConfig as s, BindingAssetPluginConfig as t, BindingIsolatedDeclarationPluginConfig as u, BindingReplacePluginConfig as v, BindingViteCssPostPluginConfig as w, BindingTransformPluginConfig as x, BindingReporterPluginConfig as y, ResolverFactory as z };
|