@rolldown/browser 1.0.0-beta.44 → 1.0.0-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +4 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +2 -2
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +3 -3
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +3 -3
- package/dist/rolldown-binding.wasi-browser.js +0 -1
- package/dist/rolldown-binding.wasi.cjs +0 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-0m41EAn-.d.mts → binding-DRegrFdE.d.mts} +11 -10
- package/dist/shared/{dist-DNFKY37q.mjs → composable-filters-D_PY7Qa7.mjs} +1 -1
- package/dist/shared/{define-config-BbwLmCDX.d.mts → define-config-C6-goOPh.d.mts} +25 -13
- package/dist/shared/{load-config-B3FsKQ_6.mjs → load-config-Z2MWPLZO.mjs} +3 -3
- package/dist/shared/{src-BnIhK3nA.mjs → src-B4ZmdjD5.mjs} +497 -389
- package/dist/{src-CIeG_TGR.js → src-CLWy1Uip.js} +395 -287
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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-B4ZmdjD5.mjs";
|
|
2
2
|
import { h as styleText$1 } from "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
-
import { d as arraify } from "./shared/
|
|
4
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { d as arraify } from "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
|
+
import { t as loadConfig } from "./shared/load-config-Z2MWPLZO.mjs";
|
|
5
5
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
6
6
|
import path, { sep } from "node:path";
|
|
7
7
|
import process$1 from "node:process";
|
|
@@ -1287,7 +1287,7 @@ async function bundleWithConfig(configPath, cliOptions, rawArgs = {}) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
const config = await loadConfig(configPath);
|
|
1289
1289
|
if (!config) {
|
|
1290
|
-
logger.error(`No configuration found at ${
|
|
1290
|
+
logger.error(`No configuration found at ${configPath}`);
|
|
1291
1291
|
process.exit(1);
|
|
1292
1292
|
}
|
|
1293
1293
|
const resolvedConfig = typeof config === "function" ? await config(rawArgs) : config;
|
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-C6-goOPh.mjs";
|
|
2
|
+
import "./shared/binding-DRegrFdE.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,7 +1,7 @@
|
|
|
1
|
-
import { C as version, r as defineConfig } from "./shared/src-
|
|
1
|
+
import { C as version, r as defineConfig } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
-
import "./shared/
|
|
4
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
|
+
import { t as loadConfig } from "./shared/load-config-Z2MWPLZO.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createBundlerOptions, d as
|
|
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-CLWy1Uip.js";
|
|
2
2
|
import { BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -81,7 +81,7 @@ var DevEngine = class DevEngine {
|
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/api/dev/index.ts
|
|
84
|
-
|
|
84
|
+
const dev = (...args) => DevEngine.create(...args);
|
|
85
85
|
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/api/experimental.ts
|
|
@@ -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 IsolatedDeclarationsResult, B as TransformResult, C as BindingViteCssPluginConfig, D as BindingWasmHelperPluginConfig, E as BindingViteResolvePluginConfig, H as moduleRunnerTransform, L as ResolveResult, N as NapiResolveOptions, R as ResolverFactory, S as BindingUrlResolver, T as BindingViteHtmlPluginConfig, U as transform, V as isolatedDeclaration, a as BindingClientHmrUpdate, d as BindingJsonPluginConfig, g as BindingRebuildStrategy, h as BindingReactRefreshWrapperPluginConfig, k as IsolatedDeclarationsOptions, 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 TransformOptions } from "./shared/binding-
|
|
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-C6-goOPh.mjs";
|
|
2
|
+
import { A as IsolatedDeclarationsResult, B as TransformResult, C as BindingViteCssPluginConfig, D as BindingWasmHelperPluginConfig, E as BindingViteResolvePluginConfig, H as moduleRunnerTransform, L as ResolveResult, N as NapiResolveOptions, R as ResolverFactory, S as BindingUrlResolver, T as BindingViteHtmlPluginConfig, U as transform, V as isolatedDeclaration, a as BindingClientHmrUpdate, d as BindingJsonPluginConfig, g as BindingRebuildStrategy, h as BindingReactRefreshWrapperPluginConfig, k as IsolatedDeclarationsOptions, 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 TransformOptions } from "./shared/binding-DRegrFdE.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
5
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -77,7 +77,7 @@ declare class DevEngine {
|
|
|
77
77
|
}
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/api/dev/index.d.ts
|
|
80
|
-
declare
|
|
80
|
+
declare const dev: typeof DevEngine.create;
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/api/experimental.d.ts
|
|
83
83
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as BuiltinPlugin, c as createBundlerOptions, f as
|
|
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-B4ZmdjD5.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
-
import "./shared/
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
4
|
import { BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
@@ -84,7 +84,7 @@ var DevEngine = class DevEngine {
|
|
|
84
84
|
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/api/dev/index.ts
|
|
87
|
-
|
|
87
|
+
const dev = (...args) => DevEngine.create(...args);
|
|
88
88
|
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/api/experimental.ts
|
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-C6-goOPh.mjs";
|
|
2
|
+
import "./shared/binding-DRegrFdE.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/
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./src-
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./src-CLWy1Uip.js";
|
|
2
2
|
|
|
3
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 LogOrStringHandler, G as PluginContextMeta, H as DefineParallelPluginResult, I as TreeshakingOptions, It as RollupError, J as ModuleTypeFilter, K as GeneralHookFilter, L as TransformPluginContext, Lt as RollupLog, M as ExistingRawSourceMap, Mt as SourcemapIgnoreListOption, N as SourceMapInput, Nt as LogLevel, O as TransformResult, Ot as RenderedModule, P as RolldownOptionsFunction, Pt as LogLevelOption, Q as RolldownFsModule, R as EmittedAsset, Rt as RollupLogWithString, 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, jt as ModuleInfo, 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 } from "./shared/define-config-
|
|
2
|
-
import { I as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-
|
|
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 LogOrStringHandler, G as PluginContextMeta, H as DefineParallelPluginResult, I as TreeshakingOptions, It as RollupError, J as ModuleTypeFilter, K as GeneralHookFilter, L as TransformPluginContext, Lt as RollupLog, M as ExistingRawSourceMap, Mt as SourcemapIgnoreListOption, N as SourceMapInput, Nt as LogLevel, O as TransformResult, Ot as RenderedModule, P as RolldownOptionsFunction, Pt as LogLevelOption, Q as RolldownFsModule, R as EmittedAsset, Rt as RollupLogWithString, 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, jt as ModuleInfo, 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 } from "./shared/define-config-C6-goOPh.mjs";
|
|
2
|
+
import { I as PreRenderedChunk, f as BindingMagicString } from "./shared/binding-DRegrFdE.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,5 +1,5 @@
|
|
|
1
|
-
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-
|
|
1
|
+
import { a as build, i as watch, n as VERSION, o as rolldown, r as defineConfig, t as BindingMagicString } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
-
import "./shared/
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
4
|
|
|
5
5
|
export { BindingMagicString, VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-
|
|
1
|
+
import { d as bindingifyPlugin, u as PluginContextData } from "./shared/src-B4ZmdjD5.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-Ck5SwMSC.mjs";
|
|
3
|
-
import "./shared/
|
|
3
|
+
import "./shared/composable-filters-D_PY7Qa7.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
@@ -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-C6-goOPh.mjs";
|
|
2
|
+
import "./shared/binding-DRegrFdE.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as ParserOptions, P as ParseResult } from "./shared/binding-
|
|
1
|
+
import { F as ParserOptions, P as ParseResult } from "./shared/binding-DRegrFdE.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
|
|
4
4
|
//#region src/parse-ast-index.d.ts
|
|
5
|
-
declare function parseAst(sourceText: string, options?: ParserOptions |
|
|
6
|
-
declare function parseAstAsync(sourceText: string, options?: ParserOptions |
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | null, filename?: string): Promise<Program>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { type ParseResult, type ParserOptions, parseAst, parseAstAsync };
|
|
@@ -94,7 +94,6 @@ export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
|
94
94
|
export const BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
95
95
|
export const BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
96
96
|
export const BindingOutputChunk = __napiModule.exports.BindingOutputChunk
|
|
97
|
-
export const BindingOutputs = __napiModule.exports.BindingOutputs
|
|
98
97
|
export const BindingPluginContext = __napiModule.exports.BindingPluginContext
|
|
99
98
|
export const BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
100
99
|
export const BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
@@ -139,7 +139,6 @@ module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
|
139
139
|
module.exports.BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
140
140
|
module.exports.BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
141
141
|
module.exports.BindingOutputChunk = __napiModule.exports.BindingOutputChunk
|
|
142
|
-
module.exports.BindingOutputs = __napiModule.exports.BindingOutputs
|
|
143
142
|
module.exports.BindingPluginContext = __napiModule.exports.BindingPluginContext
|
|
144
143
|
module.exports.BindingRenderedChunk = __napiModule.exports.BindingRenderedChunk
|
|
145
144
|
module.exports.BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta
|
|
Binary file
|
|
@@ -394,11 +394,11 @@ type ModuleType = 'module' | 'commonjs' | 'json' | 'wasm' | 'addon';
|
|
|
394
394
|
*/
|
|
395
395
|
interface NapiResolveOptions {
|
|
396
396
|
/**
|
|
397
|
-
*
|
|
397
|
+
* Discover tsconfig automatically or use the specified tsconfig.json path.
|
|
398
398
|
*
|
|
399
399
|
* Default `None`
|
|
400
400
|
*/
|
|
401
|
-
tsconfig?: TsconfigOptions;
|
|
401
|
+
tsconfig?: 'auto' | TsconfigOptions;
|
|
402
402
|
/**
|
|
403
403
|
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
404
404
|
*
|
|
@@ -1221,10 +1221,6 @@ declare class BindingOutputChunk {
|
|
|
1221
1221
|
get preliminaryFileName(): string;
|
|
1222
1222
|
get name(): string;
|
|
1223
1223
|
}
|
|
1224
|
-
declare class BindingOutputs {
|
|
1225
|
-
get chunks(): Array<BindingOutputChunk>;
|
|
1226
|
-
get assets(): Array<BindingOutputAsset>;
|
|
1227
|
-
}
|
|
1228
1224
|
declare class BindingRenderedChunk {
|
|
1229
1225
|
get name(): string;
|
|
1230
1226
|
get isEntry(): boolean;
|
|
@@ -1265,7 +1261,7 @@ interface BindingAssetPluginConfig {
|
|
|
1265
1261
|
isSkipAssets: boolean;
|
|
1266
1262
|
assetsInclude: Array<BindingStringOrRegex>;
|
|
1267
1263
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1268
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1264
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1269
1265
|
}
|
|
1270
1266
|
interface BindingAssetSource {
|
|
1271
1267
|
inner: string | Uint8Array;
|
|
@@ -1356,7 +1352,7 @@ interface BindingManifestPluginConfig {
|
|
|
1356
1352
|
root: string;
|
|
1357
1353
|
outPath: string;
|
|
1358
1354
|
isLegacy?: () => boolean;
|
|
1359
|
-
cssEntries: () =>
|
|
1355
|
+
cssEntries: () => Record<string, string>;
|
|
1360
1356
|
}
|
|
1361
1357
|
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1362
1358
|
isServer?: boolean;
|
|
@@ -1365,6 +1361,10 @@ interface BindingModules {
|
|
|
1365
1361
|
values: Array<BindingRenderedModule>;
|
|
1366
1362
|
keys: Array<string>;
|
|
1367
1363
|
}
|
|
1364
|
+
interface BindingOutputs {
|
|
1365
|
+
chunks: Array<BindingOutputChunk>;
|
|
1366
|
+
assets: Array<BindingOutputAsset>;
|
|
1367
|
+
}
|
|
1368
1368
|
interface BindingReactRefreshWrapperPluginConfig {
|
|
1369
1369
|
cwd: string;
|
|
1370
1370
|
include?: Array<BindingStringOrRegex>;
|
|
@@ -1443,7 +1443,7 @@ interface BindingViteCssPostPluginConfig {
|
|
|
1443
1443
|
libCssFilename?: string;
|
|
1444
1444
|
isLegacy?: () => boolean;
|
|
1445
1445
|
cssMinify?: (css: string) => Promise<string>;
|
|
1446
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1446
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1447
1447
|
}
|
|
1448
1448
|
interface BindingViteHtmlPluginConfig {
|
|
1449
1449
|
isLib: boolean;
|
|
@@ -1454,7 +1454,7 @@ interface BindingViteHtmlPluginConfig {
|
|
|
1454
1454
|
cssCodeSplit: boolean;
|
|
1455
1455
|
modulePreloadPolyfill: boolean;
|
|
1456
1456
|
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1457
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) =>
|
|
1457
|
+
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => Promise<undefined | string | BindingRenderBuiltUrlRet>;
|
|
1458
1458
|
resolveDependencies?: boolean | ((filename: string, dependencies: string[], context: {
|
|
1459
1459
|
hostId: string;
|
|
1460
1460
|
hostType: 'html' | 'js';
|
|
@@ -1468,6 +1468,7 @@ interface BindingViteResolvePluginConfig {
|
|
|
1468
1468
|
external: true | string[];
|
|
1469
1469
|
noExternal: true | Array<string | RegExp>;
|
|
1470
1470
|
dedupe: Array<string>;
|
|
1471
|
+
legacyInconsistentCjsInterop?: boolean;
|
|
1471
1472
|
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string>;
|
|
1472
1473
|
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string>;
|
|
1473
1474
|
resolveSubpathImports: (id: string, importer: string, isRequire: boolean, scan: boolean) => VoidNullable<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as ParserOptions, I as PreRenderedChunk, M as MinifyOptions$1, O as BindingWatcherEvent, _ as BindingRenderedChunk, b as BindingTransformHookExtraArgs, c as BindingHookResolveIdExtraArgs, f as BindingMagicString, i as BindingBundlerImpl, j as JsxOptions, r as BindingBuiltinPluginName, z as TransformOptions$1 } from "./binding-
|
|
1
|
+
import { F as ParserOptions, I as PreRenderedChunk, M as MinifyOptions$1, O as BindingWatcherEvent, _ as BindingRenderedChunk, b as BindingTransformHookExtraArgs, c as BindingHookResolveIdExtraArgs, f as BindingMagicString, i as BindingBundlerImpl, j as JsxOptions, r as BindingBuiltinPluginName, z as TransformOptions$1 } from "./binding-DRegrFdE.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -172,6 +172,7 @@ interface GeneratedCodeOptions {
|
|
|
172
172
|
type ModuleFormat = "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd";
|
|
173
173
|
type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
174
174
|
type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
|
|
175
|
+
type SanitizeFileNameFunction = (name: string) => string;
|
|
175
176
|
interface PreRenderedAsset {
|
|
176
177
|
type: "asset";
|
|
177
178
|
name?: string;
|
|
@@ -181,7 +182,13 @@ interface PreRenderedAsset {
|
|
|
181
182
|
source: string | Uint8Array;
|
|
182
183
|
}
|
|
183
184
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
185
|
+
type PathsFunction$1 = (id: string) => string;
|
|
186
|
+
type ManualChunksFunction = (moduleId: string, meta: {
|
|
187
|
+
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
188
|
+
}) => string | NullValue;
|
|
184
189
|
type GlobalsFunction = (name: string) => string;
|
|
190
|
+
type AdvancedChunksNameFunction = (moduleId: string, ctx: ChunkingContext) => string | NullValue;
|
|
191
|
+
type AdvancedChunksTestFunction = (id: string) => boolean | undefined | void;
|
|
185
192
|
type MinifyOptions = Omit<MinifyOptions$1, "module" | "sourcemap">;
|
|
186
193
|
interface ChunkingContext {
|
|
187
194
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
@@ -248,7 +255,7 @@ interface OutputOptions {
|
|
|
248
255
|
chunkFileNames?: string | ChunkFileNamesFunction;
|
|
249
256
|
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
250
257
|
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
251
|
-
sanitizeFileName?: boolean |
|
|
258
|
+
sanitizeFileName?: boolean | SanitizeFileNameFunction;
|
|
252
259
|
/**
|
|
253
260
|
* Control code minification.
|
|
254
261
|
*
|
|
@@ -292,7 +299,7 @@ interface OutputOptions {
|
|
|
292
299
|
* }
|
|
293
300
|
* ```
|
|
294
301
|
*/
|
|
295
|
-
paths?: Record<string, string> |
|
|
302
|
+
paths?: Record<string, string> | PathsFunction$1;
|
|
296
303
|
generatedCode?: Partial<GeneratedCodeOptions>;
|
|
297
304
|
externalLiveBindings?: boolean;
|
|
298
305
|
inlineDynamicImports?: boolean;
|
|
@@ -340,11 +347,9 @@ interface OutputOptions {
|
|
|
340
347
|
*
|
|
341
348
|
* @deprecated Please use `advancedChunks` instead.
|
|
342
349
|
*/
|
|
343
|
-
manualChunks?:
|
|
344
|
-
getModuleInfo: (moduleId: string) => ModuleInfo | null;
|
|
345
|
-
}) => string | NullValue;
|
|
350
|
+
manualChunks?: ManualChunksFunction;
|
|
346
351
|
/**
|
|
347
|
-
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/
|
|
352
|
+
* Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/in-depth/advanced-chunks).
|
|
348
353
|
*/
|
|
349
354
|
advancedChunks?: {
|
|
350
355
|
/**
|
|
@@ -446,7 +451,7 @@ interface OutputOptions {
|
|
|
446
451
|
* Constraints like `minSize`, `maxSize`, etc. are applied separately for different names returned by the function.
|
|
447
452
|
* :::
|
|
448
453
|
*/
|
|
449
|
-
name: string |
|
|
454
|
+
name: string | AdvancedChunksNameFunction;
|
|
450
455
|
/**
|
|
451
456
|
* - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
|
|
452
457
|
*
|
|
@@ -463,7 +468,7 @@ interface OutputOptions {
|
|
|
463
468
|
* - ❌ Not recommended: `/node_modules/react/`
|
|
464
469
|
* :::
|
|
465
470
|
*/
|
|
466
|
-
test?: StringOrRegExp |
|
|
471
|
+
test?: StringOrRegExp | AdvancedChunksTestFunction;
|
|
467
472
|
/**
|
|
468
473
|
* - Type: `number`
|
|
469
474
|
* - Default: `0`
|
|
@@ -876,7 +881,7 @@ interface PluginContext extends MinimalPluginContext {
|
|
|
876
881
|
id: string;
|
|
877
882
|
resolveDependencies?: boolean;
|
|
878
883
|
} & Partial<PartialNull<ModuleOptions>>): Promise<ModuleInfo>;
|
|
879
|
-
parse(input: string, options?: ParserOptions |
|
|
884
|
+
parse(input: string, options?: ParserOptions | null): Program;
|
|
880
885
|
resolve(source: string, importer?: string, options?: PluginContextResolveOptions): Promise<ResolvedId | null>;
|
|
881
886
|
}
|
|
882
887
|
//#endregion
|
|
@@ -1276,7 +1281,8 @@ interface TransformOptions extends Omit<TransformOptions$1, "sourceType" | "lang
|
|
|
1276
1281
|
//#endregion
|
|
1277
1282
|
//#region src/options/input-options.d.ts
|
|
1278
1283
|
type InputOption = string | string[] | Record<string, string>;
|
|
1279
|
-
type
|
|
1284
|
+
type ExternalOptionFunction = (id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>;
|
|
1285
|
+
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ExternalOptionFunction;
|
|
1280
1286
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
1281
1287
|
interface WatcherOptions {
|
|
1282
1288
|
skipWrite?: boolean;
|
|
@@ -1340,9 +1346,15 @@ type OptimizationOptions = {
|
|
|
1340
1346
|
mode?: "all" | "smart";
|
|
1341
1347
|
pass?: number;
|
|
1342
1348
|
};
|
|
1349
|
+
/**
|
|
1350
|
+
* Use PIFE pattern for module wrappers
|
|
1351
|
+
*/
|
|
1352
|
+
pifeForModuleWrappers?: boolean;
|
|
1343
1353
|
};
|
|
1344
1354
|
type AttachDebugOptions = "none" | "simple" | "full";
|
|
1345
1355
|
type ChunkModulesOrder = "exec-order" | "module-id";
|
|
1356
|
+
type OnLogFunction = (level: LogLevel, log: RollupLog, defaultHandler: LogOrStringHandler) => void;
|
|
1357
|
+
type OnwarnFunction = (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void;
|
|
1346
1358
|
interface InputOptions {
|
|
1347
1359
|
input?: InputOption;
|
|
1348
1360
|
plugins?: RolldownPluginOption;
|
|
@@ -1392,8 +1404,8 @@ interface InputOptions {
|
|
|
1392
1404
|
shimMissingExports?: boolean;
|
|
1393
1405
|
treeshake?: boolean | TreeshakingOptions;
|
|
1394
1406
|
logLevel?: LogLevelOption;
|
|
1395
|
-
onLog?:
|
|
1396
|
-
onwarn?:
|
|
1407
|
+
onLog?: OnLogFunction;
|
|
1408
|
+
onwarn?: OnwarnFunction;
|
|
1397
1409
|
moduleTypes?: ModuleTypes;
|
|
1398
1410
|
experimental?: {
|
|
1399
1411
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as rolldown } from "./src-
|
|
1
|
+
import { o as rolldown } from "./src-B4ZmdjD5.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { readdir } from "node:fs/promises";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -14,13 +14,13 @@ async function bundleTsConfig(configFile, isEsm) {
|
|
|
14
14
|
input: configFile,
|
|
15
15
|
platform: "node",
|
|
16
16
|
resolve: { mainFields: ["main"] },
|
|
17
|
-
define: {
|
|
17
|
+
transform: { define: {
|
|
18
18
|
__dirname: dirnameVarName,
|
|
19
19
|
__filename: filenameVarName,
|
|
20
20
|
"import.meta.url": importMetaUrlVarName,
|
|
21
21
|
"import.meta.dirname": dirnameVarName,
|
|
22
22
|
"import.meta.filename": filenameVarName
|
|
23
|
-
},
|
|
23
|
+
} },
|
|
24
24
|
treeshake: false,
|
|
25
25
|
external: [/^[\w@][^:]/],
|
|
26
26
|
plugins: [{
|