@rolldown/browser 1.0.0-beta.46 → 1.0.0-beta.47
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 +3 -4
- package/dist/cli.mjs +5 -6
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -5
- package/dist/experimental-index.browser.mjs +5 -14
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +7 -17
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -5
- package/dist/parallel-plugin-worker.mjs +5 -6
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CCMrV5an.d.mts → binding-CRSqCQIK.d.mts} +31 -10
- package/dist/shared/{define-config-Bj-neIhz.d.mts → define-config-pfDd6Le4.d.mts} +1 -1
- package/dist/shared/{load-config-DnUAKl9P.mjs → load-config-D508WsWM.mjs} +2 -2
- package/dist/shared/{parse-ast-index-DMI5m8Lk.mjs → parse-ast-index-BiBzSGZe.mjs} +3 -4
- package/dist/shared/{src-B8saaB3b.mjs → src-DE7RBSfl.mjs} +37 -41
- package/dist/{src-B-7Hrt6w.js → src-Deywlnh0.js} +37 -595
- package/package.json +1 -1
- package/dist/shared/binding-BeWSOIj5.mjs +0 -578
- /package/dist/shared/{composable-filters-CgRsnfr3.mjs → composable-filters-D_PY7Qa7.mjs} +0 -0
- /package/dist/shared/{prompt-YGfbLmz5.mjs → prompt-BDwA3jSr.mjs} +0 -0
package/dist/cli-setup.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTokioRuntime } from "./rolldown-binding.wasi.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/cli/setup-index.ts
|
|
4
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5
4
|
let isWatchMode = false;
|
|
6
5
|
for (let i = 0; i < process.argv.length; i++) {
|
|
7
6
|
const arg = process.argv[i];
|
|
@@ -10,8 +9,8 @@ for (let i = 0; i < process.argv.length; i++) {
|
|
|
10
9
|
break;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
if (isWatchMode)
|
|
14
|
-
else
|
|
12
|
+
if (isWatchMode) createTokioRuntime(32);
|
|
13
|
+
else createTokioRuntime(4);
|
|
15
14
|
|
|
16
15
|
//#endregion
|
|
17
16
|
export { };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as loadConfig } from "./shared/load-config-DnUAKl9P.mjs";
|
|
1
|
+
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-DE7RBSfl.mjs";
|
|
2
|
+
import { h as styleText$1 } from "./shared/parse-ast-index-BiBzSGZe.mjs";
|
|
3
|
+
import { d as arraify } from "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
|
+
import { t as loadConfig } from "./shared/load-config-D508WsWM.mjs";
|
|
6
5
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
7
6
|
import path, { sep } from "node:path";
|
|
8
7
|
import process$1 from "node:process";
|
|
@@ -947,7 +946,7 @@ function createConsola(options$1 = {}) {
|
|
|
947
946
|
defaults: { level },
|
|
948
947
|
stdout: process.stdout,
|
|
949
948
|
stderr: process.stderr,
|
|
950
|
-
prompt: (...args) => import("./shared/prompt-
|
|
949
|
+
prompt: (...args) => import("./shared/prompt-BDwA3jSr.mjs").then((m) => m.prompt(...args)),
|
|
951
950
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
952
951
|
...options$1
|
|
953
952
|
});
|
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-pfDd6Le4.mjs";
|
|
2
|
+
import "./shared/binding-CRSqCQIK.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,7 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/
|
|
5
|
-
import { t as loadConfig } from "./shared/load-config-DnUAKl9P.mjs";
|
|
1
|
+
import { C as version, r as defineConfig } from "./shared/src-DE7RBSfl.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BiBzSGZe.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
|
+
import { t as loadConfig } from "./shared/load-config-D508WsWM.mjs";
|
|
6
5
|
|
|
7
6
|
//#region src/config.ts
|
|
8
7
|
const VERSION = version;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as createBundlerOptions, d as transformToRollupOutput, f as bindingifySourcemap, h as makeBuiltinPluginCallable, l as normalizedStringOrRegex, m as BuiltinPlugin, p as PluginDriver, s as RolldownBuild, u as normalizeBindingResult } from "./src-Deywlnh0.js";
|
|
2
|
+
import { BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, minify, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
2
3
|
|
|
3
4
|
//#region src/api/dev/dev-engine.ts
|
|
4
|
-
var import_binding$1 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5
5
|
var DevEngine = class DevEngine {
|
|
6
6
|
#inner;
|
|
7
7
|
#cachedBuildFinishPromise = null;
|
|
@@ -32,7 +32,7 @@ var DevEngine = class DevEngine {
|
|
|
32
32
|
}
|
|
33
33
|
userOnOutput(transformToRollupOutput(result));
|
|
34
34
|
} : void 0,
|
|
35
|
-
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ?
|
|
35
|
+
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy$1.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy$1.Auto : BindingRebuildStrategy$1.Never : void 0,
|
|
36
36
|
watch: devOptions.watch && {
|
|
37
37
|
skipWrite: devOptions.watch.skipWrite,
|
|
38
38
|
usePolling: devOptions.watch.usePolling,
|
|
@@ -43,7 +43,7 @@ var DevEngine = class DevEngine {
|
|
|
43
43
|
debounceTickRate: devOptions.watch.debounceTickRate
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return new DevEngine(new
|
|
46
|
+
return new DevEngine(new BindingDevEngine(options.bundlerOptions, bindingDevOptions));
|
|
47
47
|
}
|
|
48
48
|
constructor(inner) {
|
|
49
49
|
this.#inner = inner;
|
|
@@ -284,13 +284,4 @@ function viteCSSPlugin(config) {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
//#endregion
|
|
287
|
-
|
|
288
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
289
|
-
|
|
290
|
-
//#endregion
|
|
291
|
-
var BindingRebuildStrategy = import_binding.BindingRebuildStrategy;
|
|
292
|
-
var ResolverFactory = import_binding.ResolverFactory;
|
|
293
|
-
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
294
|
-
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
295
|
-
var transform = import_binding.transform;
|
|
296
|
-
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 };
|
|
287
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, freeExternalMemory, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, minify, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { A as IsolatedDeclarationsOptions, B 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-pfDd6Le4.mjs";
|
|
2
|
+
import { A as IsolatedDeclarationsOptions, B as ResolverFactory, C as BindingViteCssPluginConfig, D as BindingWasmHelperPluginConfig, E as BindingViteResolvePluginConfig, F as NapiResolveOptions, G as moduleRunnerTransform, H as TransformResult, K as transform, N as MinifyOptions, P as MinifyResult, S as BindingUrlResolver, T as BindingViteHtmlPluginConfig, U as isolatedDeclaration, V as TransformOptions, W as minify, 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 ResolveResult } from "./shared/binding-CRSqCQIK.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, freeExternalMemory, 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 MinifyOptions, type MinifyResult, 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, minify, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./
|
|
1
|
+
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-DE7RBSfl.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BiBzSGZe.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
|
+
import { BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, minify, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
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);
|
|
9
8
|
var DevEngine = class DevEngine {
|
|
10
9
|
#inner;
|
|
11
10
|
#cachedBuildFinishPromise = null;
|
|
@@ -36,7 +35,7 @@ var DevEngine = class DevEngine {
|
|
|
36
35
|
}
|
|
37
36
|
userOnOutput(transformToRollupOutput(result));
|
|
38
37
|
} : void 0,
|
|
39
|
-
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ?
|
|
38
|
+
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy$1.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy$1.Auto : BindingRebuildStrategy$1.Never : void 0,
|
|
40
39
|
watch: devOptions.watch && {
|
|
41
40
|
skipWrite: devOptions.watch.skipWrite,
|
|
42
41
|
usePolling: devOptions.watch.usePolling,
|
|
@@ -47,7 +46,7 @@ var DevEngine = class DevEngine {
|
|
|
47
46
|
debounceTickRate: devOptions.watch.debounceTickRate
|
|
48
47
|
}
|
|
49
48
|
};
|
|
50
|
-
return new DevEngine(new
|
|
49
|
+
return new DevEngine(new BindingDevEngine(options.bundlerOptions, bindingDevOptions));
|
|
51
50
|
}
|
|
52
51
|
constructor(inner) {
|
|
53
52
|
this.#inner = inner;
|
|
@@ -293,13 +292,4 @@ function viteCSSPlugin(config) {
|
|
|
293
292
|
}
|
|
294
293
|
|
|
295
294
|
//#endregion
|
|
296
|
-
|
|
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 };
|
|
295
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, freeExternalMemory, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, minify, modulePreloadPolyfillPlugin, moduleRunnerTransform, reactRefreshWrapperPlugin, replacePlugin, reporterPlugin, scan, transform, transformPlugin, viteCSSPlugin, viteCSSPostPlugin, viteHtmlPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
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-pfDd6Le4.mjs";
|
|
2
|
+
import "./shared/binding-CRSqCQIK.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/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as include, c as or, d as arraify, f as isPromiseLike, i as id, l as queries, n as code, o as moduleType, r as exclude, s as not, t as and, u as query } from "./shared/composable-filters-
|
|
1
|
+
import { a as include, c as or, d as arraify, f as isPromiseLike, i as id, l as queries, n as code, o as moduleType, r as exclude, s as not, t as and, u as query } from "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
4
|
function withFilterImpl(pluginOption, filterObjectList) {
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { a as build, i as watch, n as
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./src-Deywlnh0.js";
|
|
2
2
|
|
|
3
|
-
var BindingMagicString = import_binding.BindingMagicString;
|
|
4
3
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
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 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-
|
|
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-pfDd6Le4.mjs";
|
|
2
|
+
import { R as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-CRSqCQIK.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,7 +1,5 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/composable-filters-CgRsnfr3.mjs";
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-DE7RBSfl.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BiBzSGZe.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
5
4
|
|
|
6
|
-
var BindingMagicString = import_binding.BindingMagicString;
|
|
7
5
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./shared/
|
|
4
|
-
import "./shared/composable-filters-CgRsnfr3.mjs";
|
|
1
|
+
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-DE7RBSfl.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BiBzSGZe.mjs";
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
5
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
|
+
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
9
8
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
10
9
|
(async () => {
|
|
11
10
|
try {
|
|
12
|
-
|
|
11
|
+
registerPlugins(registryId, await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
13
12
|
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
|
|
14
13
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
15
14
|
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-pfDd6Le4.mjs";
|
|
2
|
+
import "./shared/binding-CRSqCQIK.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
|
Binary file
|
|
@@ -126,6 +126,8 @@ interface MangleOptionsKeepNames {
|
|
|
126
126
|
*/
|
|
127
127
|
class: boolean;
|
|
128
128
|
}
|
|
129
|
+
/** Minify synchronously. */
|
|
130
|
+
declare function minify(filename: string, sourceText: string, options?: MinifyOptions | undefined | null): MinifyResult;
|
|
129
131
|
interface MinifyOptions {
|
|
130
132
|
/** Use when minifying an ES6 module. */
|
|
131
133
|
module?: boolean;
|
|
@@ -134,6 +136,11 @@ interface MinifyOptions {
|
|
|
134
136
|
codegen?: boolean | CodegenOptions;
|
|
135
137
|
sourcemap?: boolean;
|
|
136
138
|
}
|
|
139
|
+
interface MinifyResult {
|
|
140
|
+
code: string;
|
|
141
|
+
map?: SourceMap;
|
|
142
|
+
errors: Array<OxcError>;
|
|
143
|
+
}
|
|
137
144
|
interface Comment {
|
|
138
145
|
type: 'Line' | 'Block';
|
|
139
146
|
value: string;
|
|
@@ -1204,6 +1211,10 @@ declare class BindingMagicString {
|
|
|
1204
1211
|
hasChanged(): boolean;
|
|
1205
1212
|
length(): number;
|
|
1206
1213
|
isEmpty(): boolean;
|
|
1214
|
+
remove(start: number, end: number): void;
|
|
1215
|
+
update(start: number, end: number, content: string): void;
|
|
1216
|
+
relocate(start: number, end: number, to: number): void;
|
|
1217
|
+
indent(indentor?: string | undefined | null): void;
|
|
1207
1218
|
}
|
|
1208
1219
|
declare class BindingOutputAsset {
|
|
1209
1220
|
dropInner(): ExternalMemoryStatus;
|
|
@@ -1271,7 +1282,7 @@ interface BindingAssetPluginConfig {
|
|
|
1271
1282
|
isSkipAssets: boolean;
|
|
1272
1283
|
assetsInclude: Array<BindingStringOrRegex>;
|
|
1273
1284
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1274
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1285
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1275
1286
|
}
|
|
1276
1287
|
interface BindingAssetSource {
|
|
1277
1288
|
inner: string | Uint8Array;
|
|
@@ -1282,7 +1293,14 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1282
1293
|
optimizeModulePreloadRelativePaths: boolean;
|
|
1283
1294
|
renderBuiltUrl: boolean;
|
|
1284
1295
|
isRelativeBase: boolean;
|
|
1285
|
-
|
|
1296
|
+
v2?: BindingBuildImportAnalysisPluginV2Config;
|
|
1297
|
+
}
|
|
1298
|
+
interface BindingBuildImportAnalysisPluginV2Config {
|
|
1299
|
+
isSsr: boolean;
|
|
1300
|
+
urlBase: string;
|
|
1301
|
+
decodedBase: string;
|
|
1302
|
+
modulePreload: false | BindingModulePreloadOptions;
|
|
1303
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1286
1304
|
}
|
|
1287
1305
|
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';
|
|
1288
1306
|
interface BindingClientHmrUpdate {
|
|
@@ -1365,6 +1383,13 @@ interface BindingManifestPluginConfig {
|
|
|
1365
1383
|
isLegacy?: () => boolean;
|
|
1366
1384
|
cssEntries: () => Record<string, string>;
|
|
1367
1385
|
}
|
|
1386
|
+
interface BindingModulePreloadOptions {
|
|
1387
|
+
polyfill: boolean;
|
|
1388
|
+
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
1389
|
+
hostId: string;
|
|
1390
|
+
hostType: 'html' | 'js';
|
|
1391
|
+
}) => string[];
|
|
1392
|
+
}
|
|
1368
1393
|
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1369
1394
|
isServer?: boolean;
|
|
1370
1395
|
}
|
|
@@ -1454,7 +1479,7 @@ interface BindingViteCssPostPluginConfig {
|
|
|
1454
1479
|
libCssFilename?: string;
|
|
1455
1480
|
isLegacy?: () => boolean;
|
|
1456
1481
|
cssMinify?: (css: string) => Promise<string>;
|
|
1457
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1482
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1458
1483
|
}
|
|
1459
1484
|
interface BindingViteHtmlPluginConfig {
|
|
1460
1485
|
isLib: boolean;
|
|
@@ -1463,13 +1488,9 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1463
1488
|
publicDir: string;
|
|
1464
1489
|
decodedBase: string;
|
|
1465
1490
|
cssCodeSplit: boolean;
|
|
1466
|
-
|
|
1491
|
+
modulePreload: false | BindingModulePreloadOptions;
|
|
1467
1492
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1468
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1469
|
-
resolveDependencies?: boolean | ((filename: string, dependencies: string[], context: {
|
|
1470
|
-
hostId: string;
|
|
1471
|
-
hostType: 'html' | 'js';
|
|
1472
|
-
}) => Promise<string[]>);
|
|
1493
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1473
1494
|
}
|
|
1474
1495
|
interface BindingViteResolvePluginConfig {
|
|
1475
1496
|
resolveOptions: BindingViteResolvePluginResolveOptions;
|
|
@@ -1524,4 +1545,4 @@ interface PreRenderedChunk {
|
|
|
1524
1545
|
exports: Array<string>;
|
|
1525
1546
|
}
|
|
1526
1547
|
//#endregion
|
|
1527
|
-
export { IsolatedDeclarationsOptions as A,
|
|
1548
|
+
export { IsolatedDeclarationsOptions as A, ResolverFactory as B, BindingViteCssPluginConfig as C, BindingWasmHelperPluginConfig as D, BindingViteResolvePluginConfig as E, NapiResolveOptions as F, moduleRunnerTransform as G, TransformResult as H, ParseResult as I, transform as K, ParserOptions as L, JsxOptions as M, MinifyOptions as N, BindingWatcherEvent as O, MinifyResult as P, PreRenderedChunk as R, BindingUrlResolver as S, BindingViteHtmlPluginConfig as T, isolatedDeclaration as U, TransformOptions as V, minify 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, ResolveResult as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ParserOptions, M as JsxOptions, N as MinifyOptions$1, O as BindingWatcherEvent, R as PreRenderedChunk, V as TransformOptions$1, _ as BindingRenderedChunk, b as BindingTransformHookExtraArgs, c as BindingHookResolveIdExtraArgs, f as BindingMagicString, i as BindingBundlerImpl, k as ExternalMemoryStatus, r as BindingBuiltinPluginName } from "./binding-CRSqCQIK.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as rolldown } from "./src-
|
|
2
|
-
import fs from "node:fs";
|
|
1
|
+
import { o as rolldown } from "./src-DE7RBSfl.mjs";
|
|
3
2
|
import path from "node:path";
|
|
4
3
|
import { readdir } from "node:fs/promises";
|
|
5
4
|
import { pathToFileURL } from "node:url";
|
|
6
5
|
import { cwd } from "node:process";
|
|
6
|
+
import fs from "node:fs";
|
|
7
7
|
|
|
8
8
|
//#region src/utils/load-config.ts
|
|
9
9
|
async function bundleTsConfig(configFile, isEsm) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
2
2
|
import { styleText } from "node:util";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/code-frame.ts
|
|
@@ -260,7 +260,6 @@ function applyFix(program, fixPath) {
|
|
|
260
260
|
|
|
261
261
|
//#endregion
|
|
262
262
|
//#region src/parse-ast-index.ts
|
|
263
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
264
263
|
function wrap(result, sourceText) {
|
|
265
264
|
result = wrap$1(result);
|
|
266
265
|
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
@@ -287,13 +286,13 @@ const defaultParserOptions = {
|
|
|
287
286
|
preserveParens: false
|
|
288
287
|
};
|
|
289
288
|
function parseAst(sourceText, options, filename) {
|
|
290
|
-
return wrap(
|
|
289
|
+
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
291
290
|
...defaultParserOptions,
|
|
292
291
|
...options
|
|
293
292
|
}), sourceText);
|
|
294
293
|
}
|
|
295
294
|
async function parseAstAsync(sourceText, options, filename) {
|
|
296
|
-
return wrap(await
|
|
295
|
+
return wrap(await parseAsync(filename ?? "file.js", sourceText, {
|
|
297
296
|
...defaultParserOptions,
|
|
298
297
|
...options
|
|
299
298
|
}), sourceText);
|