@rolldown/browser 1.0.0-beta.35 → 1.0.0-beta.36
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 +18 -29
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -4
- package/dist/experimental-index.browser.mjs +5 -3
- package/dist/experimental-index.d.mts +8 -5
- package/dist/experimental-index.mjs +7 -5
- 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 +3 -3
- package/dist/parallel-plugin-worker.mjs +4 -5
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-9k0egz6L.d.mts → binding-wK0CRIMb.d.mts} +1 -0
- package/dist/shared/{define-config-DhrkZ_o7.d.cts → define-config-BcNhk996.d.mts} +2 -2
- package/dist/shared/{dist-ByKQkexh.mjs → dist-CHTC3-kR.mjs} +1 -1
- package/dist/shared/{load-config-BCjD-AGJ.mjs → load-config-M8Gvqt1X.mjs} +4 -6
- package/dist/shared/{parse-ast-index-C_CZT4St.mjs → parse-ast-index-C3TkGcEQ.mjs} +1 -1
- package/dist/shared/{prompt-C5jz26Zn.mjs → prompt-DuG2i9ud.mjs} +4 -7
- package/dist/shared/{src-B0RCtUy7.mjs → src-Dc4fRARy.mjs} +70 -43
- package/dist/{src-C8U06Im1.js → src-Cl6h35QH.js} +70 -44
- package/package.json +10 -24
- package/dist/cli.cjs +0 -1771
- package/dist/cli.d.cts +0 -1
- package/dist/config.cjs +0 -12
- package/dist/config.d.cts +0 -10
- package/dist/experimental-index.cjs +0 -176
- package/dist/experimental-index.d.cts +0 -99
- package/dist/filter-index.cjs +0 -53
- package/dist/filter-index.d.cts +0 -4
- package/dist/index.cjs +0 -9
- package/dist/index.d.cts +0 -3
- package/dist/parallel-plugin-worker.cjs +0 -35
- package/dist/parallel-plugin-worker.d.cts +0 -1
- package/dist/parallel-plugin.cjs +0 -8
- package/dist/parallel-plugin.d.cts +0 -14
- package/dist/parse-ast-index.cjs +0 -4
- package/dist/parse-ast-index.d.cts +0 -8
- package/dist/shared/binding-D13M6Llu.d.cts +0 -1425
- package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
- package/dist/shared/define-config-DJXaSinS.d.mts +0 -1421
- package/dist/shared/dist-CK0hotcm.cjs +0 -240
- package/dist/shared/load-config-BJKhRKZL.cjs +0 -130
- package/dist/shared/parse-ast-index-J0xVKZRe.cjs +0 -327
- package/dist/shared/prompt-Q05EYrFb.cjs +0 -858
- package/dist/shared/src-Bd4BGX4v.cjs +0 -4788
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import { arraify } from "./shared/dist-
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
1
|
+
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-Dc4fRARy.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C3TkGcEQ.mjs";
|
|
3
|
+
import { arraify } from "./shared/dist-CHTC3-kR.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-M8Gvqt1X.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import process$1 from "node:process";
|
|
7
7
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
@@ -598,12 +598,10 @@ function createConsola$1(options$1 = {}) {
|
|
|
598
598
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
599
599
|
function parseStack(stack, message) {
|
|
600
600
|
const cwd$1 = process.cwd() + sep;
|
|
601
|
-
|
|
602
|
-
return lines;
|
|
601
|
+
return stack.split("\n").splice(message.split("\n").length).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
|
|
603
602
|
}
|
|
604
603
|
function writeStream(data, stream) {
|
|
605
|
-
|
|
606
|
-
return write.call(stream, data);
|
|
604
|
+
return (stream.__write || stream.write).call(stream, data);
|
|
607
605
|
}
|
|
608
606
|
const bracket = (x) => x ? `[${x}]` : "";
|
|
609
607
|
var BasicReporter = class {
|
|
@@ -1007,11 +1005,9 @@ function G() {
|
|
|
1007
1005
|
const e = F.find((s$1) => s$1[0]);
|
|
1008
1006
|
if (e) return { name: e[1] };
|
|
1009
1007
|
}
|
|
1010
|
-
|
|
1011
|
-
P?.name;
|
|
1008
|
+
G()?.name;
|
|
1012
1009
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
1013
|
-
const
|
|
1014
|
-
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
1010
|
+
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
1015
1011
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1016
1012
|
}
|
|
1017
1013
|
const regex = ansiRegex();
|
|
@@ -1097,8 +1093,7 @@ const TYPE_ICONS = {
|
|
|
1097
1093
|
log: ""
|
|
1098
1094
|
};
|
|
1099
1095
|
function stringWidth(str) {
|
|
1100
|
-
|
|
1101
|
-
if (!hasICU || !Intl.Segmenter) return stripAnsi(str).length;
|
|
1096
|
+
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi(str).length;
|
|
1102
1097
|
return stringWidth$1(str);
|
|
1103
1098
|
}
|
|
1104
1099
|
var FancyReporter = class extends BasicReporter {
|
|
@@ -1150,16 +1145,15 @@ function getBgColor(color = "bgWhite") {
|
|
|
1150
1145
|
function createConsola(options$1 = {}) {
|
|
1151
1146
|
let level = _getDefaultLogLevel();
|
|
1152
1147
|
if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
1153
|
-
|
|
1148
|
+
return createConsola$1({
|
|
1154
1149
|
level,
|
|
1155
1150
|
defaults: { level },
|
|
1156
1151
|
stdout: process.stdout,
|
|
1157
1152
|
stderr: process.stderr,
|
|
1158
|
-
prompt: (...args) => import("./shared/prompt-
|
|
1153
|
+
prompt: (...args) => import("./shared/prompt-DuG2i9ud.mjs").then((m) => m.prompt(...args)),
|
|
1159
1154
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
1160
1155
|
...options$1
|
|
1161
1156
|
});
|
|
1162
|
-
return consola2;
|
|
1163
1157
|
}
|
|
1164
1158
|
function _getDefaultLogLevel() {
|
|
1165
1159
|
if (g) return LogLevels.debug;
|
|
@@ -1315,8 +1309,7 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
1315
1309
|
"watch"
|
|
1316
1310
|
];
|
|
1317
1311
|
for (let [key, value] of Object.entries(options$1)) {
|
|
1318
|
-
const
|
|
1319
|
-
const [primary] = keys;
|
|
1312
|
+
const [primary] = key.split(".");
|
|
1320
1313
|
if (keysOfInput.includes(primary)) setNestedProperty(result.input, key, value);
|
|
1321
1314
|
else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
|
|
1322
1315
|
else if (!reservedKeys.includes(key)) {
|
|
@@ -1335,9 +1328,8 @@ const objectSchema = getJsonSchema();
|
|
|
1335
1328
|
const flattenedSchema = flattenSchema(objectSchema.properties);
|
|
1336
1329
|
const options = Object.fromEntries(Object.entries(flattenedSchema).filter(([_key, schema]) => getSchemaType(schema) !== "never").map(([key, schema]) => {
|
|
1337
1330
|
const config = Object.getOwnPropertyDescriptor(alias, key)?.value;
|
|
1338
|
-
const type = getSchemaType(schema);
|
|
1339
1331
|
const result = {
|
|
1340
|
-
type:
|
|
1332
|
+
type: getSchemaType(schema) === "boolean" ? "boolean" : "string",
|
|
1341
1333
|
description: schema?.description ?? config?.description ?? "",
|
|
1342
1334
|
hint: config?.hint
|
|
1343
1335
|
};
|
|
@@ -1433,8 +1425,8 @@ function getClearScreenFunction(options$1) {
|
|
|
1433
1425
|
}
|
|
1434
1426
|
|
|
1435
1427
|
//#endregion
|
|
1436
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1437
|
-
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1428
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1429
|
+
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
|
|
1438
1430
|
function _usingCtx() {
|
|
1439
1431
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1440
1432
|
var n$2 = Error();
|
|
@@ -1512,16 +1504,14 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1512
1504
|
try {
|
|
1513
1505
|
var _usingCtx$1 = (0, import_usingCtx.default)();
|
|
1514
1506
|
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1515
|
-
|
|
1516
|
-
await operation({}, cliOptions);
|
|
1507
|
+
await (cliOptions.watch ? watchInner : bundleInner)({}, cliOptions);
|
|
1517
1508
|
return;
|
|
1518
1509
|
}
|
|
1519
1510
|
if (cliOptions.watch) {
|
|
1520
1511
|
logger.error("You must specify `output.dir` to use watch mode");
|
|
1521
1512
|
process.exit(1);
|
|
1522
1513
|
}
|
|
1523
|
-
const
|
|
1524
|
-
const { output: outputs } = await build.generate(cliOptions.output);
|
|
1514
|
+
const { output: outputs } = await _usingCtx$1.a(await rolldown(cliOptions.input)).generate(cliOptions.output);
|
|
1525
1515
|
if (outputs.length === 0) {
|
|
1526
1516
|
logger.error("No output generated");
|
|
1527
1517
|
process.exit(1);
|
|
@@ -1604,8 +1594,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1604
1594
|
}
|
|
1605
1595
|
result.forEach(printBundleOutputPretty);
|
|
1606
1596
|
logger.log(``);
|
|
1607
|
-
const
|
|
1608
|
-
const duration = endTime - startTime;
|
|
1597
|
+
const duration = performance.now() - startTime;
|
|
1609
1598
|
logger.success(`rolldown v${version} Finished in ${ansis_default.green(ms(duration))}`);
|
|
1610
1599
|
}
|
|
1611
1600
|
function printBundleOutputPretty(output) {
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-wK0CRIMb.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-BcNhk996.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 { defineConfig, version } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/dist-
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-Dc4fRARy.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C3TkGcEQ.mjs";
|
|
3
|
+
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-M8Gvqt1X.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBuiltinPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBuiltinPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-Cl6h35QH.js";
|
|
2
2
|
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -10,8 +10,10 @@ var DevEngine = class DevEngine {
|
|
|
10
10
|
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
11
11
|
const bindingDevOptions = {
|
|
12
12
|
onHmrUpdates: devOptions.onHmrUpdates,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
watch: devOptions.watch && {
|
|
14
|
+
usePolling: devOptions.watch.usePolling,
|
|
15
|
+
pollInterval: devOptions.watch.pollInterval
|
|
16
|
+
}
|
|
15
17
|
};
|
|
16
18
|
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
17
19
|
return new DevEngine(inner);
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-wK0CRIMb.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-BcNhk996.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
|
-
interface
|
|
6
|
-
onHmrUpdates?: (updates: BindingHmrUpdate[]) => void | Promise<void>;
|
|
5
|
+
interface DevWatchOptions {
|
|
7
6
|
usePolling?: boolean;
|
|
8
7
|
pollInterval?: number;
|
|
9
8
|
}
|
|
9
|
+
interface DevOptions {
|
|
10
|
+
onHmrUpdates?: (updates: BindingHmrUpdate[]) => void | Promise<void>;
|
|
11
|
+
watch?: DevWatchOptions;
|
|
12
|
+
}
|
|
10
13
|
//#endregion
|
|
11
14
|
//#region src/api/dev/dev-engine.d.ts
|
|
12
15
|
declare class DevEngine {
|
|
@@ -96,4 +99,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
96
99
|
};
|
|
97
100
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
98
101
|
//#endregion
|
|
99
|
-
export { DevEngine, type DevOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
102
|
+
export { DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBuiltinPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/dist-
|
|
1
|
+
import { PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBuiltinPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-Dc4fRARy.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C3TkGcEQ.mjs";
|
|
3
|
+
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
@@ -13,8 +13,10 @@ var DevEngine = class DevEngine {
|
|
|
13
13
|
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
14
14
|
const bindingDevOptions = {
|
|
15
15
|
onHmrUpdates: devOptions.onHmrUpdates,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
watch: devOptions.watch && {
|
|
17
|
+
usePolling: devOptions.watch.usePolling,
|
|
18
|
+
pollInterval: devOptions.watch.pollInterval
|
|
19
|
+
}
|
|
18
20
|
};
|
|
19
21
|
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
20
22
|
return new DevEngine(inner);
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-wK0CRIMb.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-BcNhk996.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 { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-
|
|
1
|
+
import { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-CHTC3-kR.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
4
|
function withFilterImpl(pluginOption, filterObjectList) {
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-wK0CRIMb.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-BcNhk996.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/dist-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-Dc4fRARy.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C3TkGcEQ.mjs";
|
|
3
|
+
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
3
|
-
import "./shared/dist-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-Dc4fRARy.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C3TkGcEQ.mjs";
|
|
3
|
+
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
@@ -9,8 +9,7 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
9
9
|
(async () => {
|
|
10
10
|
try {
|
|
11
11
|
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
12
|
-
const
|
|
13
|
-
const definePluginImpl = pluginModule.default;
|
|
12
|
+
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
|
|
14
13
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
15
14
|
return {
|
|
16
15
|
index: pluginInfo.index,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-wK0CRIMb.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-BcNhk996.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-wK0CRIMb.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -150,7 +150,7 @@ interface PreRenderedAsset {
|
|
|
150
150
|
}
|
|
151
151
|
type AssetFileNamesFunction = (chunkInfo: PreRenderedAsset) => string;
|
|
152
152
|
type GlobalsFunction = (name: string) => string;
|
|
153
|
-
type MinifyOptions = Omit<MinifyOptions$1, "module" | "
|
|
153
|
+
type MinifyOptions = Omit<MinifyOptions$1, "module" | "sourcemap">;
|
|
154
154
|
interface ChunkingContext {
|
|
155
155
|
getModuleInfo(moduleId: string): ModuleInfo | null;
|
|
156
156
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { rolldown } from "./src-
|
|
1
|
+
import { rolldown } from "./src-Dc4fRARy.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
@@ -28,9 +28,8 @@ async function bundleTsConfig(configFile, isEsm) {
|
|
|
28
28
|
transform: {
|
|
29
29
|
filter: { id: /\.[cm]?[jt]s$/ },
|
|
30
30
|
async handler(code, id) {
|
|
31
|
-
const injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
|
|
32
31
|
return {
|
|
33
|
-
code:
|
|
32
|
+
code: `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};` + code,
|
|
34
33
|
map: null
|
|
35
34
|
};
|
|
36
35
|
}
|
|
@@ -38,13 +37,12 @@ async function bundleTsConfig(configFile, isEsm) {
|
|
|
38
37
|
}]
|
|
39
38
|
});
|
|
40
39
|
const outputDir = path.dirname(configFile);
|
|
41
|
-
const
|
|
40
|
+
const fileName = (await bundle.write({
|
|
42
41
|
dir: outputDir,
|
|
43
42
|
format: isEsm ? "esm" : "cjs",
|
|
44
43
|
sourcemap: "inline",
|
|
45
44
|
entryFileNames: `rolldown.config.[hash]${path.extname(configFile).replace("ts", "js")}`
|
|
46
|
-
});
|
|
47
|
-
const fileName = result.output.find((chunk) => chunk.type === "chunk" && chunk.isEntry).fileName;
|
|
45
|
+
})).output.find((chunk) => chunk.type === "chunk" && chunk.isEntry).fileName;
|
|
48
46
|
return path.join(outputDir, fileName);
|
|
49
47
|
}
|
|
50
48
|
const SUPPORTED_JS_CONFIG_FORMATS = [
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.87.0/node_modules/oxc-parser/wrap.mjs
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|
|
@@ -137,8 +137,7 @@ function requirePicocolors() {
|
|
|
137
137
|
picocolors.exports.createColors = createColors;
|
|
138
138
|
return picocolors.exports;
|
|
139
139
|
}
|
|
140
|
-
|
|
141
|
-
const e = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
|
|
140
|
+
const e = /* @__PURE__ */ getDefaultExportFromCjs(/* @__PURE__ */ requirePicocolors());
|
|
142
141
|
function J({ onlyFirst: t = false } = {}) {
|
|
143
142
|
const F$1 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
144
143
|
return new RegExp(F$1, t ? void 0 : "g");
|
|
@@ -596,12 +595,10 @@ let wD = class extends x {
|
|
|
596
595
|
return this.options[this.cursor].value;
|
|
597
596
|
}
|
|
598
597
|
toggleAll() {
|
|
599
|
-
|
|
600
|
-
this.value = u$1 ? [] : this.options.map((F$1) => F$1.value);
|
|
598
|
+
this.value = this.value.length === this.options.length ? [] : this.options.map((F$1) => F$1.value);
|
|
601
599
|
}
|
|
602
600
|
toggleValue() {
|
|
603
|
-
|
|
604
|
-
this.value = u$1 ? this.value.filter((F$1) => F$1 !== this._value) : [...this.value, this._value];
|
|
601
|
+
this.value = this.value.includes(this._value) ? this.value.filter((F$1) => F$1 !== this._value) : [...this.value, this._value];
|
|
605
602
|
}
|
|
606
603
|
};
|
|
607
604
|
var SD = Object.defineProperty, $D = (t, u$1, F$1) => u$1 in t ? SD(t, u$1, {
|
|
@@ -811,7 +808,7 @@ async function prompt(message, opts = {}) {
|
|
|
811
808
|
if (Error.captureStackTrace) Error.captureStackTrace(error, prompt);
|
|
812
809
|
throw error;
|
|
813
810
|
}
|
|
814
|
-
case "undefined": return
|
|
811
|
+
case "undefined": return;
|
|
815
812
|
case "null": return null;
|
|
816
813
|
case "symbol": return kCancel;
|
|
817
814
|
default:
|