@rolldown/browser 1.0.0-beta.9-commit.8371a90 → 1.0.0-beta.9-commit.b174110
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.cjs +10 -10
- package/dist/cli.mjs +2 -2
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +1 -1
- package/dist/experimental-index.d.mts +1 -1
- package/dist/experimental-index.mjs +1 -1
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -5
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{define-config.d-D11P5huJ.d.cts → define-config.d-D4lKXE9V.d.cts} +23 -33
- package/dist/shared/{define-config.d-Sf3K9yNa.d.mts → define-config.d-Dm9iNdt9.d.mts} +23 -33
- package/dist/shared/{load-config--4dZSqAQ.mjs → load-config-CV_7wWhH.mjs} +1 -1
- package/dist/shared/{load-config-CT3T7nfY.cjs → load-config-DegJq4hI.cjs} +1 -1
- package/dist/shared/{src-HTcyNJiS.cjs → src-BDUsoOnL.cjs} +28 -47
- package/dist/shared/{src-CXLmg0t5.mjs → src-CJu4NZI4.mjs} +329 -1505
- package/dist/{src-CB1SRiRS.js → src-CBsKC-xF.js} +29 -48
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-BDUsoOnL.cjs');
|
|
3
3
|
const require_dist = require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-BHaE0ECV.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
5
|
+
const require_load_config = require('./shared/load-config-DegJq4hI.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
8
8
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -532,7 +532,7 @@ function getColor$1(color, fallback = "reset") {
|
|
|
532
532
|
return colors$2[color] || colors$2[fallback];
|
|
533
533
|
}
|
|
534
534
|
const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
535
|
-
function stripAnsi
|
|
535
|
+
function stripAnsi(text) {
|
|
536
536
|
return text.replace(new RegExp(ansiRegex$1, "g"), "");
|
|
537
537
|
}
|
|
538
538
|
const boxStylePresets = {
|
|
@@ -625,14 +625,14 @@ function box(text, _opts = {}) {
|
|
|
625
625
|
if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
|
|
626
626
|
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
627
627
|
const height = textLines.length + paddingOffset;
|
|
628
|
-
const width = Math.max(...textLines.map((line) => stripAnsi
|
|
628
|
+
const width = Math.max(...textLines.map((line) => stripAnsi(line).length), opts.title ? stripAnsi(opts.title).length : 0) + paddingOffset;
|
|
629
629
|
const widthOffset = width + paddingOffset;
|
|
630
630
|
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
631
631
|
if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
|
|
632
632
|
if (opts.title) {
|
|
633
633
|
const title = _color ? _color(opts.title) : opts.title;
|
|
634
|
-
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi
|
|
635
|
-
const right = borderStyle.h.repeat(width - stripAnsi
|
|
634
|
+
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
|
|
635
|
+
const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
|
|
636
636
|
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
|
|
637
637
|
} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
638
638
|
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
@@ -640,7 +640,7 @@ function box(text, _opts = {}) {
|
|
|
640
640
|
else {
|
|
641
641
|
const line = textLines[i$1 - valignOffset];
|
|
642
642
|
const left = " ".repeat(paddingOffset);
|
|
643
|
-
const right = " ".repeat(width - stripAnsi
|
|
643
|
+
const right = " ".repeat(width - stripAnsi(line).length);
|
|
644
644
|
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
645
645
|
}
|
|
646
646
|
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
@@ -816,7 +816,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
816
816
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
817
817
|
}
|
|
818
818
|
const regex = ansiRegex();
|
|
819
|
-
function stripAnsi(string) {
|
|
819
|
+
function stripAnsi$1(string) {
|
|
820
820
|
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
821
821
|
return string.replace(regex, "");
|
|
822
822
|
}
|
|
@@ -845,7 +845,7 @@ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
|
845
845
|
function stringWidth$1(string, options$1 = {}) {
|
|
846
846
|
if (typeof string !== "string" || string.length === 0) return 0;
|
|
847
847
|
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options$1;
|
|
848
|
-
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
848
|
+
if (!countAnsiEscapeCodes) string = stripAnsi$1(string);
|
|
849
849
|
if (string.length === 0) return 0;
|
|
850
850
|
let width = 0;
|
|
851
851
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
@@ -899,7 +899,7 @@ const TYPE_ICONS = {
|
|
|
899
899
|
};
|
|
900
900
|
function stringWidth(str) {
|
|
901
901
|
const hasICU = typeof Intl === "object";
|
|
902
|
-
if (!hasICU || !Intl.Segmenter) return stripAnsi
|
|
902
|
+
if (!hasICU || !Intl.Segmenter) return stripAnsi(str).length;
|
|
903
903
|
return stringWidth$1(str);
|
|
904
904
|
}
|
|
905
905
|
var FancyReporter = class extends BasicReporter {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-CJu4NZI4.mjs";
|
|
3
3
|
import { arraify, init_misc } from "./shared/dist-CAn6dxW6.mjs";
|
|
4
4
|
import "./shared/parse-ast-index-vu376yZ1.mjs";
|
|
5
|
-
import { init_load_config, loadConfig } from "./shared/load-config
|
|
5
|
+
import { init_load_config, loadConfig } from "./shared/load-config-CV_7wWhH.mjs";
|
|
6
6
|
import path, { sep } from "node:path";
|
|
7
7
|
import colors from "ansis";
|
|
8
8
|
import process$1 from "node:process";
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-BDUsoOnL.cjs');
|
|
2
2
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
3
3
|
require('./shared/parse-ast-index-BHaE0ECV.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-DegJq4hI.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigExport, defineConfig } from "./shared/define-config.d-
|
|
1
|
+
import { ConfigExport, defineConfig } from "./shared/define-config.d-D4lKXE9V.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/load-config.d.ts
|
|
4
4
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigExport, defineConfig$1 as defineConfig } from "./shared/define-config.d-
|
|
1
|
+
import { ConfigExport, defineConfig$1 as defineConfig } from "./shared/define-config.d-Dm9iNdt9.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/load-config.d.ts
|
|
4
4
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { defineConfig,
|
|
1
|
+
import { defineConfig, version } from "./shared/src-CJu4NZI4.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-vu376yZ1.mjs";
|
|
4
|
-
import { init_load_config, loadConfig } from "./shared/load-config
|
|
4
|
+
import { init_load_config, loadConfig } from "./shared/load-config-CV_7wWhH.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
|
-
init_define_config();
|
|
8
7
|
init_load_config();
|
|
9
8
|
const VERSION = version;
|
|
10
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-CBsKC-xF.js";
|
|
2
2
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-BDUsoOnL.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-BHaE0ECV.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-
|
|
1
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-D4lKXE9V.cjs";
|
|
2
2
|
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin$1 as assetPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reporterPlugin$1 as reporterPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin, webWorkerPostPlugin$1 as webWorkerPostPlugin } from "./shared/define-config.d-
|
|
1
|
+
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin$1 as assetPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reporterPlugin$1 as reporterPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin, webWorkerPostPlugin$1 as webWorkerPostPlugin } from "./shared/define-config.d-Dm9iNdt9.mjs";
|
|
2
2
|
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CJu4NZI4.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-vu376yZ1.mjs";
|
|
4
4
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-
|
|
1
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-D4lKXE9V.cjs";
|
|
2
2
|
|
|
3
3
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-
|
|
1
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-Dm9iNdt9.mjs";
|
|
2
2
|
|
|
3
3
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include,
|
|
1
|
+
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, init_misc, isPromiseLike, moduleType$1 as moduleType, not$1 as not, or$1 as or, queries$1 as queries, query$1 as query } from "./shared/dist-CAn6dxW6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
4
|
init_misc();
|
|
@@ -40,9 +40,5 @@ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
|
40
40
|
return -1;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/filter-index.ts
|
|
45
|
-
init_dist();
|
|
46
|
-
|
|
47
43
|
//#endregion
|
|
48
44
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
1
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config.d-D4lKXE9V.cjs";
|
|
2
2
|
|
|
3
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, 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.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
1
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/define-config.d-Dm9iNdt9.mjs";
|
|
2
2
|
|
|
3
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, 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,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-CJu4NZI4.mjs";
|
|
2
2
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-vu376yZ1.mjs";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-BDUsoOnL.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
4
|
require('./shared/parse-ast-index-BHaE0ECV.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-CJu4NZI4.mjs";
|
|
3
3
|
import "./shared/dist-CAn6dxW6.mjs";
|
|
4
4
|
import "./shared/parse-ast-index-vu376yZ1.mjs";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
@@ -84,6 +84,7 @@ export const ParseResult = __napiModule.exports.ParseResult
|
|
|
84
84
|
export const ResolverFactory = __napiModule.exports.ResolverFactory
|
|
85
85
|
export const BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
86
86
|
export const BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
87
|
+
export const BindingJsx = __napiModule.exports.BindingJsx
|
|
87
88
|
export const BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
88
89
|
export const BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
89
90
|
export const EnforceExtension = __napiModule.exports.EnforceExtension
|
|
@@ -108,6 +108,7 @@ module.exports.ParseResult = __napiModule.exports.ParseResult
|
|
|
108
108
|
module.exports.ResolverFactory = __napiModule.exports.ResolverFactory
|
|
109
109
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
110
110
|
module.exports.BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
111
|
+
module.exports.BindingJsx = __napiModule.exports.BindingJsx
|
|
111
112
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
112
113
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
113
114
|
module.exports.EnforceExtension = __napiModule.exports.EnforceExtension
|
|
Binary file
|
|
@@ -121,7 +121,7 @@ type NullValue<T = void> = T | undefined | null | void;
|
|
|
121
121
|
type PartialNull<T> = { [P in keyof T] : T[P] | null };
|
|
122
122
|
type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
123
123
|
type MaybeArray<T> = T | T[];
|
|
124
|
-
type StringOrRegExp
|
|
124
|
+
type StringOrRegExp = string | RegExp;
|
|
125
125
|
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/options/output-options.d.ts
|
|
@@ -226,7 +226,7 @@ interface OutputOptions {
|
|
|
226
226
|
* If `test` is a regular expression, the module whose id matches the regular expression will be captured.
|
|
227
227
|
* if `test` is empty, any module will be considered as matched.
|
|
228
228
|
*/
|
|
229
|
-
test?: StringOrRegExp
|
|
229
|
+
test?: StringOrRegExp
|
|
230
230
|
/**
|
|
231
231
|
* - Type: `number`
|
|
232
232
|
*
|
|
@@ -281,7 +281,6 @@ interface OutputOptions {
|
|
|
281
281
|
legalComments?: "none" | "inline";
|
|
282
282
|
plugins?: RolldownOutputPluginOption;
|
|
283
283
|
polyfillRequire?: boolean;
|
|
284
|
-
target?: string | string[];
|
|
285
284
|
hoistTransitiveImports?: false;
|
|
286
285
|
preserveModules?: boolean;
|
|
287
286
|
virtualDirname?: string;
|
|
@@ -430,7 +429,7 @@ interface NormalizedOutputOptions {
|
|
|
430
429
|
|
|
431
430
|
//#endregion
|
|
432
431
|
//#region ../pluginutils/dist/index.d.ts
|
|
433
|
-
type StringOrRegExp = string | RegExp;
|
|
432
|
+
type StringOrRegExp$1 = string | RegExp;
|
|
434
433
|
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
435
434
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Query;
|
|
436
435
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
@@ -450,16 +449,16 @@ declare class Not {
|
|
|
450
449
|
constructor(expr: FilterExpression);
|
|
451
450
|
}
|
|
452
451
|
interface QueryFilterObject {
|
|
453
|
-
[key: string]: StringOrRegExp | boolean;
|
|
452
|
+
[key: string]: StringOrRegExp$1 | boolean;
|
|
454
453
|
}
|
|
455
454
|
interface IdParams {
|
|
456
455
|
cleanUrl?: boolean;
|
|
457
456
|
}
|
|
458
457
|
declare class Id {
|
|
459
458
|
kind: "id";
|
|
460
|
-
pattern: StringOrRegExp;
|
|
459
|
+
pattern: StringOrRegExp$1;
|
|
461
460
|
params: IdParams;
|
|
462
|
-
constructor(pattern: StringOrRegExp, params?: IdParams);
|
|
461
|
+
constructor(pattern: StringOrRegExp$1, params?: IdParams);
|
|
463
462
|
}
|
|
464
463
|
declare class ModuleType$1 {
|
|
465
464
|
kind: "moduleType";
|
|
@@ -468,14 +467,14 @@ declare class ModuleType$1 {
|
|
|
468
467
|
}
|
|
469
468
|
declare class Code {
|
|
470
469
|
kind: "code";
|
|
471
|
-
pattern: StringOrRegExp;
|
|
472
|
-
constructor(expr: StringOrRegExp);
|
|
470
|
+
pattern: StringOrRegExp$1;
|
|
471
|
+
constructor(expr: StringOrRegExp$1);
|
|
473
472
|
}
|
|
474
473
|
declare class Query {
|
|
475
474
|
kind: "query";
|
|
476
475
|
key: string;
|
|
477
|
-
pattern: StringOrRegExp | boolean;
|
|
478
|
-
constructor(key: string, pattern: StringOrRegExp | boolean);
|
|
476
|
+
pattern: StringOrRegExp$1 | boolean;
|
|
477
|
+
constructor(key: string, pattern: StringOrRegExp$1 | boolean);
|
|
479
478
|
}
|
|
480
479
|
declare class Include {
|
|
481
480
|
kind: "include";
|
|
@@ -490,10 +489,10 @@ declare class Exclude$1 {
|
|
|
490
489
|
declare function and(...args: FilterExpression[]): And;
|
|
491
490
|
declare function or(...args: FilterExpression[]): Or;
|
|
492
491
|
declare function not(expr: FilterExpression): Not;
|
|
493
|
-
declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
|
|
492
|
+
declare function id(pattern: StringOrRegExp$1, params?: IdParams): Id;
|
|
494
493
|
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
495
|
-
declare function code(pattern: StringOrRegExp): Code;
|
|
496
|
-
declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
|
|
494
|
+
declare function code(pattern: StringOrRegExp$1): Code;
|
|
495
|
+
declare function query(key: string, pattern: StringOrRegExp$1 | boolean): Query;
|
|
497
496
|
declare function include(expr: FilterExpression): Include;
|
|
498
497
|
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
499
498
|
/**
|
|
@@ -516,7 +515,7 @@ declare function queries(queryFilter: QueryFilterObject): And;
|
|
|
516
515
|
|
|
517
516
|
//#endregion
|
|
518
517
|
//#region src/plugin/hook-filter.d.ts
|
|
519
|
-
type GeneralHookFilter<Value = StringOrRegExp
|
|
518
|
+
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
520
519
|
include?: MaybeArray<Value>
|
|
521
520
|
exclude?: MaybeArray<Value>
|
|
522
521
|
};
|
|
@@ -785,7 +784,7 @@ type OverrideFilterObject = {
|
|
|
785
784
|
transform?: HookFilterExtension<"transform">["filter"]
|
|
786
785
|
resolveId?: HookFilterExtension<"resolveId">["filter"]
|
|
787
786
|
load?: HookFilterExtension<"load">["filter"]
|
|
788
|
-
pluginNamePattern?: StringOrRegExp
|
|
787
|
+
pluginNamePattern?: StringOrRegExp[]
|
|
789
788
|
};
|
|
790
789
|
declare function withFilter<
|
|
791
790
|
A,
|
|
@@ -821,7 +820,7 @@ interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
|
821
820
|
interface ResolveIdExtraOptions {
|
|
822
821
|
custom?: CustomPluginOptions;
|
|
823
822
|
isEntry: boolean;
|
|
824
|
-
kind: "
|
|
823
|
+
kind: BindingHookResolveIdExtraArgs["kind"];
|
|
825
824
|
}
|
|
826
825
|
type ResolveIdResult = string | NullValue | false | PartialResolvedId;
|
|
827
826
|
type LoadResult = NullValue | string | SourceDescription;
|
|
@@ -978,18 +977,9 @@ interface ChecksOptions {
|
|
|
978
977
|
//#endregion
|
|
979
978
|
//#region src/options/input-options.d.ts
|
|
980
979
|
type InputOption = string | string[] | Record<string, string>;
|
|
981
|
-
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "
|
|
982
|
-
type ExternalOption = StringOrRegExp
|
|
980
|
+
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject">;
|
|
981
|
+
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
983
982
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
984
|
-
interface JsxOptions {
|
|
985
|
-
mode?: "classic" | "automatic" | "preserve";
|
|
986
|
-
factory?: string;
|
|
987
|
-
fragment?: string;
|
|
988
|
-
importSource?: string;
|
|
989
|
-
jsxImportSource?: string;
|
|
990
|
-
refresh?: boolean;
|
|
991
|
-
development?: boolean;
|
|
992
|
-
}
|
|
993
983
|
interface WatcherOptions {
|
|
994
984
|
skipWrite?: boolean;
|
|
995
985
|
buildDelay?: number;
|
|
@@ -997,8 +987,8 @@ interface WatcherOptions {
|
|
|
997
987
|
pollInterval?: number
|
|
998
988
|
compareContents?: boolean
|
|
999
989
|
};
|
|
1000
|
-
include?: StringOrRegExp
|
|
1001
|
-
exclude?: StringOrRegExp
|
|
990
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
991
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
1002
992
|
}
|
|
1003
993
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
1004
994
|
type HmrOptions = boolean | {
|
|
@@ -1135,9 +1125,9 @@ interface InputOptions {
|
|
|
1135
1125
|
* - `"react"` enables the `classic` JSX transformer.
|
|
1136
1126
|
* - `"react-jsx"` enables the `automatic` JSX transformer.
|
|
1137
1127
|
*
|
|
1138
|
-
* @default
|
|
1128
|
+
* @default runtime = "automatic"
|
|
1139
1129
|
*/
|
|
1140
|
-
jsx?: false | "react" | "react-jsx" | "preserve"
|
|
1130
|
+
jsx?: false | "react" | "react-jsx" | "preserve";
|
|
1141
1131
|
transform?: OxcTransformOption;
|
|
1142
1132
|
watch?: WatcherOptions | false;
|
|
1143
1133
|
dropLabels?: string[];
|
|
@@ -1172,4 +1162,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1172
1162
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1173
1163
|
|
|
1174
1164
|
//#endregion
|
|
1175
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
1165
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, assetPlugin, build, buildImportAnalysisPlugin, code, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, exclude, id, importGlobPlugin, include, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleType, not, or, queries, query, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|