rolldown 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 +17 -28
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.d.mts +8 -5
- package/dist/experimental-index.mjs +6 -4
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.mjs +3 -4
- 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/shared/{binding-9k0egz6L.d.mts → binding-wK0CRIMb.d.mts} +1 -0
- package/dist/shared/{define-config-DhrkZ_o7.d.cts → define-config-wxvILtDx.d.mts} +3 -3
- package/dist/shared/{load-config-C93_L4MP.mjs → load-config-Jqw6FAJp.mjs} +4 -6
- package/dist/shared/parse-ast-index-CkDFQ-07.mjs +10847 -0
- package/dist/shared/{prompt-C5jz26Zn.mjs → prompt-DuG2i9ud.mjs} +4 -7
- package/dist/shared/{src-D954P1TH.mjs → src-WjgJWoNk.mjs} +69 -42
- package/package.json +32 -46
- package/dist/cli.cjs +0 -1773
- 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 -154
- package/dist/experimental-index.d.cts +0 -99
- package/dist/filter-index.cjs +0 -106
- 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 -33
- 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-3arq8OPE.d.mts +0 -1421
- package/dist/shared/load-config-S_ofSLrj.cjs +0 -130
- package/dist/shared/misc-DksvspN4.cjs +0 -58
- package/dist/shared/parse-ast-index-BadydpMA.mjs +0 -725
- package/dist/shared/parse-ast-index-cePJvlvW.cjs +0 -871
- package/dist/shared/prompt-Q05EYrFb.cjs +0 -858
- package/dist/shared/src-BBMxhaqf.cjs +0 -4673
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM } from "./shared/parse-ast-index-
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
1
|
+
import { __commonJS, __toESM } from "./shared/parse-ast-index-CkDFQ-07.mjs";
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-WjgJWoNk.mjs";
|
|
3
3
|
import { arraify } from "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-Jqw6FAJp.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import colors from "ansis";
|
|
7
7
|
import process$1 from "node:process";
|
|
@@ -599,12 +599,10 @@ function createConsola$1(options$1 = {}) {
|
|
|
599
599
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
600
600
|
function parseStack(stack, message) {
|
|
601
601
|
const cwd$1 = process.cwd() + sep;
|
|
602
|
-
|
|
603
|
-
return lines;
|
|
602
|
+
return stack.split("\n").splice(message.split("\n").length).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
|
|
604
603
|
}
|
|
605
604
|
function writeStream(data, stream) {
|
|
606
|
-
|
|
607
|
-
return write.call(stream, data);
|
|
605
|
+
return (stream.__write || stream.write).call(stream, data);
|
|
608
606
|
}
|
|
609
607
|
const bracket = (x) => x ? `[${x}]` : "";
|
|
610
608
|
var BasicReporter = class {
|
|
@@ -1008,11 +1006,9 @@ function G() {
|
|
|
1008
1006
|
const e = F.find((s$1) => s$1[0]);
|
|
1009
1007
|
if (e) return { name: e[1] };
|
|
1010
1008
|
}
|
|
1011
|
-
|
|
1012
|
-
P?.name;
|
|
1009
|
+
G()?.name;
|
|
1013
1010
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
1014
|
-
const
|
|
1015
|
-
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("|");
|
|
1011
|
+
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("|");
|
|
1016
1012
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1017
1013
|
}
|
|
1018
1014
|
const regex = ansiRegex();
|
|
@@ -1098,8 +1094,7 @@ const TYPE_ICONS = {
|
|
|
1098
1094
|
log: ""
|
|
1099
1095
|
};
|
|
1100
1096
|
function stringWidth(str) {
|
|
1101
|
-
|
|
1102
|
-
if (!hasICU || !Intl.Segmenter) return stripAnsi(str).length;
|
|
1097
|
+
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi(str).length;
|
|
1103
1098
|
return stringWidth$1(str);
|
|
1104
1099
|
}
|
|
1105
1100
|
var FancyReporter = class extends BasicReporter {
|
|
@@ -1151,16 +1146,15 @@ function getBgColor(color = "bgWhite") {
|
|
|
1151
1146
|
function createConsola(options$1 = {}) {
|
|
1152
1147
|
let level = _getDefaultLogLevel();
|
|
1153
1148
|
if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
1154
|
-
|
|
1149
|
+
return createConsola$1({
|
|
1155
1150
|
level,
|
|
1156
1151
|
defaults: { level },
|
|
1157
1152
|
stdout: process.stdout,
|
|
1158
1153
|
stderr: process.stderr,
|
|
1159
|
-
prompt: (...args) => import("./shared/prompt-
|
|
1154
|
+
prompt: (...args) => import("./shared/prompt-DuG2i9ud.mjs").then((m) => m.prompt(...args)),
|
|
1160
1155
|
reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
1161
1156
|
...options$1
|
|
1162
1157
|
});
|
|
1163
|
-
return consola2;
|
|
1164
1158
|
}
|
|
1165
1159
|
function _getDefaultLogLevel() {
|
|
1166
1160
|
if (g) return LogLevels.debug;
|
|
@@ -1316,8 +1310,7 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
1316
1310
|
"watch"
|
|
1317
1311
|
];
|
|
1318
1312
|
for (let [key, value] of Object.entries(options$1)) {
|
|
1319
|
-
const
|
|
1320
|
-
const [primary] = keys;
|
|
1313
|
+
const [primary] = key.split(".");
|
|
1321
1314
|
if (keysOfInput.includes(primary)) setNestedProperty(result.input, key, value);
|
|
1322
1315
|
else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
|
|
1323
1316
|
else if (!reservedKeys.includes(key)) {
|
|
@@ -1336,9 +1329,8 @@ const objectSchema = getJsonSchema();
|
|
|
1336
1329
|
const flattenedSchema = flattenSchema(objectSchema.properties);
|
|
1337
1330
|
const options = Object.fromEntries(Object.entries(flattenedSchema).filter(([_key, schema]) => getSchemaType(schema) !== "never").map(([key, schema]) => {
|
|
1338
1331
|
const config = Object.getOwnPropertyDescriptor(alias, key)?.value;
|
|
1339
|
-
const type = getSchemaType(schema);
|
|
1340
1332
|
const result = {
|
|
1341
|
-
type:
|
|
1333
|
+
type: getSchemaType(schema) === "boolean" ? "boolean" : "string",
|
|
1342
1334
|
description: schema?.description ?? config?.description ?? "",
|
|
1343
1335
|
hint: config?.hint
|
|
1344
1336
|
};
|
|
@@ -1434,8 +1426,8 @@ function getClearScreenFunction(options$1) {
|
|
|
1434
1426
|
}
|
|
1435
1427
|
|
|
1436
1428
|
//#endregion
|
|
1437
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1438
|
-
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1429
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.87.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1430
|
+
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) => {
|
|
1439
1431
|
function _usingCtx() {
|
|
1440
1432
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1441
1433
|
var n$2 = Error();
|
|
@@ -1513,16 +1505,14 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1513
1505
|
try {
|
|
1514
1506
|
var _usingCtx$1 = (0, import_usingCtx.default)();
|
|
1515
1507
|
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1516
|
-
|
|
1517
|
-
await operation({}, cliOptions);
|
|
1508
|
+
await (cliOptions.watch ? watchInner : bundleInner)({}, cliOptions);
|
|
1518
1509
|
return;
|
|
1519
1510
|
}
|
|
1520
1511
|
if (cliOptions.watch) {
|
|
1521
1512
|
logger.error("You must specify `output.dir` to use watch mode");
|
|
1522
1513
|
process.exit(1);
|
|
1523
1514
|
}
|
|
1524
|
-
const
|
|
1525
|
-
const { output: outputs } = await build.generate(cliOptions.output);
|
|
1515
|
+
const { output: outputs } = await _usingCtx$1.a(await rolldown(cliOptions.input)).generate(cliOptions.output);
|
|
1526
1516
|
if (outputs.length === 0) {
|
|
1527
1517
|
logger.error("No output generated");
|
|
1528
1518
|
process.exit(1);
|
|
@@ -1605,8 +1595,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1605
1595
|
}
|
|
1606
1596
|
result.forEach(printBundleOutputPretty);
|
|
1607
1597
|
logger.log(``);
|
|
1608
|
-
const
|
|
1609
|
-
const duration = endTime - startTime;
|
|
1598
|
+
const duration = performance.now() - startTime;
|
|
1610
1599
|
logger.success(`rolldown v${version} Finished in ${colors.green(ms(duration))}`);
|
|
1611
1600
|
}
|
|
1612
1601
|
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-wxvILtDx.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 "./shared/parse-ast-index-
|
|
2
|
-
import { defineConfig, version } from "./shared/src-
|
|
1
|
+
import "./shared/parse-ast-index-CkDFQ-07.mjs";
|
|
2
|
+
import { defineConfig, version } from "./shared/src-WjgJWoNk.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-Jqw6FAJp.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -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-wxvILtDx.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,5 +1,5 @@
|
|
|
1
|
-
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-
|
|
2
|
-
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-
|
|
1
|
+
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-CkDFQ-07.mjs";
|
|
2
|
+
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-WjgJWoNk.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
@@ -12,8 +12,10 @@ var DevEngine = class DevEngine {
|
|
|
12
12
|
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
13
13
|
const bindingDevOptions = {
|
|
14
14
|
onHmrUpdates: devOptions.onHmrUpdates,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
watch: devOptions.watch && {
|
|
16
|
+
usePolling: devOptions.watch.usePolling,
|
|
17
|
+
pollInterval: devOptions.watch.pollInterval
|
|
18
|
+
}
|
|
17
19
|
};
|
|
18
20
|
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
19
21
|
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-wxvILtDx.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { 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-wxvILtDx.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 "./shared/parse-ast-index-
|
|
2
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
1
|
+
import "./shared/parse-ast-index-CkDFQ-07.mjs";
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-WjgJWoNk.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerPlugins } from "./shared/parse-ast-index-
|
|
2
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
1
|
+
import { registerPlugins } from "./shared/parse-ast-index-CkDFQ-07.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-WjgJWoNk.mjs";
|
|
3
3
|
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
@@ -8,8 +8,7 @@ const { registryId, pluginInfos, threadNumber } = workerData;
|
|
|
8
8
|
(async () => {
|
|
9
9
|
try {
|
|
10
10
|
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
11
|
-
const
|
|
12
|
-
const definePluginImpl = pluginModule.default;
|
|
11
|
+
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
|
|
13
12
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
14
13
|
return {
|
|
15
14
|
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-wxvILtDx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
2
|
-
import { Program } from "@oxc-project/types";
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-wK0CRIMb.mjs";
|
|
3
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
|
+
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.d.ts
|
|
6
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -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-WjgJWoNk.mjs";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -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 = [
|