rolldown 1.0.0-beta.1-commit.67a0051 → 1.0.0-beta.1-commit.1d4a330
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/cjs/cli.cjs +11 -11
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +11 -11
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{consola_36c0034f-BBnpcLZ5.cjs → consola_36c0034f-CnRr1OYk.cjs} +7 -7
- package/dist/shared/{consola_36c0034f-BwyQ494_.mjs → consola_36c0034f-rAZL9aWp.mjs} +7 -7
- package/dist/shared/{prompt-CqEsx-3v.mjs → prompt-BN0wKILJ.mjs} +7 -7
- package/dist/shared/{prompt-BKuli-WV.cjs → prompt-CvISMk2k.cjs} +7 -7
- package/dist/shared/{src-ed8l008o.cjs → src-B7GNdu2r.cjs} +23 -23
- package/dist/shared/{src-BvPrj1a4.mjs → src-BKtzXvhI.mjs} +23 -23
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -280,7 +280,7 @@ function collectChangedBundle(changed, bundle) {
|
|
|
280
280
|
source: bindingAssetSource(item.source),
|
|
281
281
|
names: item.names
|
|
282
282
|
});
|
|
283
|
-
else chunks.push({
|
|
283
|
+
else chunks.push({
|
|
284
284
|
code: item.code,
|
|
285
285
|
filename: item.fileName,
|
|
286
286
|
name: item.name,
|
|
@@ -368,7 +368,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
368
368
|
loadErrors.push(e);
|
|
369
369
|
}
|
|
370
370
|
} else loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
371
|
-
else if (process.platform === "win32") if (process.arch === "x64") {
|
|
371
|
+
else if (process.platform === "win32") if (process.arch === "x64") {
|
|
372
372
|
try {
|
|
373
373
|
return __require("./rolldown-binding.win32-x64-msvc.node");
|
|
374
374
|
} catch (e) {
|
|
@@ -402,7 +402,7 @@ else if (process.platform === "win32") if (process.arch === "x64") {
|
|
|
402
402
|
loadErrors.push(e);
|
|
403
403
|
}
|
|
404
404
|
} else loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
405
|
-
else if (process.platform === "darwin") {
|
|
405
|
+
else if (process.platform === "darwin") {
|
|
406
406
|
try {
|
|
407
407
|
return __require("./rolldown-binding.darwin-universal.node");
|
|
408
408
|
} catch (e) {
|
|
@@ -459,7 +459,7 @@ else if (process.platform === "darwin") {
|
|
|
459
459
|
loadErrors.push(e);
|
|
460
460
|
}
|
|
461
461
|
} else loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
462
|
-
else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
|
|
462
|
+
else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
|
|
463
463
|
try {
|
|
464
464
|
return __require("./rolldown-binding.linux-x64-musl.node");
|
|
465
465
|
} catch (e) {
|
|
@@ -482,7 +482,7 @@ else if (process.platform === "linux") if (process.arch === "x64") if (isMusl())
|
|
|
482
482
|
loadErrors.push(e);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
else if (process.arch === "arm64") if (isMusl()) {
|
|
485
|
+
else if (process.arch === "arm64") if (isMusl()) {
|
|
486
486
|
try {
|
|
487
487
|
return __require("./rolldown-binding.linux-arm64-musl.node");
|
|
488
488
|
} catch (e) {
|
|
@@ -505,7 +505,7 @@ else if (process.arch === "arm64") if (isMusl()) {
|
|
|
505
505
|
loadErrors.push(e);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
else if (process.arch === "arm") if (isMusl()) {
|
|
508
|
+
else if (process.arch === "arm") if (isMusl()) {
|
|
509
509
|
try {
|
|
510
510
|
return __require("./rolldown-binding.linux-arm-musleabihf.node");
|
|
511
511
|
} catch (e) {
|
|
@@ -528,7 +528,7 @@ else if (process.arch === "arm") if (isMusl()) {
|
|
|
528
528
|
loadErrors.push(e);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
else if (process.arch === "riscv64") if (isMusl()) {
|
|
531
|
+
else if (process.arch === "riscv64") if (isMusl()) {
|
|
532
532
|
try {
|
|
533
533
|
return __require("./rolldown-binding.linux-riscv64-musl.node");
|
|
534
534
|
} catch (e) {
|
|
@@ -551,7 +551,7 @@ else if (process.arch === "riscv64") if (isMusl()) {
|
|
|
551
551
|
loadErrors.push(e);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
else if (process.arch === "ppc64") {
|
|
554
|
+
else if (process.arch === "ppc64") {
|
|
555
555
|
try {
|
|
556
556
|
return __require("./rolldown-binding.linux-ppc64-gnu.node");
|
|
557
557
|
} catch (e) {
|
|
@@ -574,7 +574,7 @@ else if (process.arch === "ppc64") {
|
|
|
574
574
|
loadErrors.push(e);
|
|
575
575
|
}
|
|
576
576
|
} else loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
577
|
-
else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
577
|
+
else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
578
578
|
}
|
|
579
579
|
nativeBinding = requireNative();
|
|
580
580
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
@@ -906,7 +906,7 @@ const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
|
|
|
906
906
|
};
|
|
907
907
|
const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
|
|
908
908
|
if (level === LOG_LEVEL_WARN) onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
|
|
909
|
-
else printLog(level, log);
|
|
909
|
+
else printLog(level, log);
|
|
910
910
|
} : printLog;
|
|
911
911
|
const addLogToString = (log) => {
|
|
912
912
|
Object.defineProperty(log, "toString", {
|
|
@@ -1000,7 +1000,7 @@ function viteResolvePlugin(config) {
|
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region src/utils/async-flatten.ts
|
|
1002
1002
|
async function asyncFlatten(array) {
|
|
1003
|
-
do
|
|
1003
|
+
do
|
|
1004
1004
|
array = (await Promise.all(array)).flat(Infinity);
|
|
1005
1005
|
while (array.some((v$1) => v$1?.then));
|
|
1006
1006
|
return array;
|
|
@@ -1389,7 +1389,7 @@ function bindingifyTransformFilter(filterOption) {
|
|
|
1389
1389
|
const { id, code, moduleType } = filterOption;
|
|
1390
1390
|
let moduleTypeRet;
|
|
1391
1391
|
if (moduleType) if (Array.isArray(moduleType)) moduleTypeRet = moduleType;
|
|
1392
|
-
else moduleTypeRet = moduleType.include;
|
|
1392
|
+
else moduleTypeRet = moduleType.include;
|
|
1393
1393
|
return {
|
|
1394
1394
|
id: id ? bindingifyStringFilter(id) : undefined,
|
|
1395
1395
|
code: code ? bindingifyStringFilter(code) : undefined,
|
|
@@ -2167,14 +2167,14 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
2167
2167
|
};
|
|
2168
2168
|
let normalizedConfig = { moduleSideEffects: true };
|
|
2169
2169
|
if (config.moduleSideEffects === undefined) normalizedConfig.moduleSideEffects = true;
|
|
2170
|
-
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
2170
|
+
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
2171
2171
|
external: true,
|
|
2172
2172
|
sideEffects: false
|
|
2173
2173
|
}, {
|
|
2174
2174
|
external: false,
|
|
2175
2175
|
sideEffects: true
|
|
2176
2176
|
}];
|
|
2177
|
-
else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
|
|
2177
|
+
else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
|
|
2178
2178
|
normalizedConfig.annotations = config.annotations ?? true;
|
|
2179
2179
|
return normalizedConfig;
|
|
2180
2180
|
}
|
|
@@ -2460,7 +2460,7 @@ function createComposedPlugin(plugins) {
|
|
|
2460
2460
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code, id, moduleType);
|
|
2461
2461
|
if (!isNullish(result)) {
|
|
2462
2462
|
if (typeof result === "string") updateOutput(result);
|
|
2463
|
-
else if (result.code) updateOutput(result.code, result.moduleSideEffects);
|
|
2463
|
+
else if (result.code) updateOutput(result.code, result.moduleSideEffects);
|
|
2464
2464
|
}
|
|
2465
2465
|
}
|
|
2466
2466
|
return {
|
|
@@ -2573,10 +2573,10 @@ function composeJsPlugins(plugins) {
|
|
|
2573
2573
|
const toBeComposed = [];
|
|
2574
2574
|
plugins.forEach((plugin) => {
|
|
2575
2575
|
if (isComposablePlugin(plugin)) toBeComposed.push(plugin);
|
|
2576
|
-
else {
|
|
2576
|
+
else {
|
|
2577
2577
|
if (toBeComposed.length > 0) {
|
|
2578
2578
|
if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
|
|
2579
|
-
else newPlugins.push(toBeComposed[0]);
|
|
2579
|
+
else newPlugins.push(toBeComposed[0]);
|
|
2580
2580
|
toBeComposed.length = 0;
|
|
2581
2581
|
}
|
|
2582
2582
|
newPlugins.push(plugin);
|
|
@@ -2584,7 +2584,7 @@ else newPlugins.push(toBeComposed[0]);
|
|
|
2584
2584
|
});
|
|
2585
2585
|
if (toBeComposed.length > 0) {
|
|
2586
2586
|
if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
|
|
2587
|
-
else newPlugins.push(toBeComposed[0]);
|
|
2587
|
+
else newPlugins.push(toBeComposed[0]);
|
|
2588
2588
|
toBeComposed.length = 0;
|
|
2589
2589
|
}
|
|
2590
2590
|
return newPlugins;
|
|
@@ -2633,7 +2633,7 @@ async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
|
2633
2633
|
await new Promise((resolve, reject) => {
|
|
2634
2634
|
worker.once("message", async (message) => {
|
|
2635
2635
|
if (message.type === "error") reject(message.error);
|
|
2636
|
-
else resolve();
|
|
2636
|
+
else resolve();
|
|
2637
2637
|
});
|
|
2638
2638
|
});
|
|
2639
2639
|
return worker;
|
|
@@ -3083,7 +3083,7 @@ var WatcherEmitter = class {
|
|
|
3083
3083
|
on(event, listener) {
|
|
3084
3084
|
const listeners = this.listeners.get(event);
|
|
3085
3085
|
if (listeners) listeners.push(listener);
|
|
3086
|
-
else this.listeners.set(event, [listener]);
|
|
3086
|
+
else this.listeners.set(event, [listener]);
|
|
3087
3087
|
return this;
|
|
3088
3088
|
}
|
|
3089
3089
|
async onEvent(event) {
|
|
@@ -3190,19 +3190,19 @@ const watch = (input) => {
|
|
|
3190
3190
|
|
|
3191
3191
|
//#endregion
|
|
3192
3192
|
//#region package.json
|
|
3193
|
-
var version = "1.0.0-beta.1-commit.
|
|
3193
|
+
var version = "1.0.0-beta.1-commit.1d4a330";
|
|
3194
3194
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
3195
3195
|
|
|
3196
3196
|
//#endregion
|
|
3197
3197
|
//#region src/api/build.ts
|
|
3198
3198
|
async function build(options) {
|
|
3199
3199
|
if (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));
|
|
3200
|
-
else {
|
|
3200
|
+
else {
|
|
3201
3201
|
const { output, write = true,...inputOptions } = options;
|
|
3202
3202
|
const build$1 = await rolldown(inputOptions);
|
|
3203
3203
|
try {
|
|
3204
3204
|
if (write) return await build$1.write(output);
|
|
3205
|
-
else return await build$1.generate(output);
|
|
3205
|
+
else return await build$1.generate(output);
|
|
3206
3206
|
} finally {
|
|
3207
3207
|
await build$1.close();
|
|
3208
3208
|
}
|