rolldown 1.0.0-beta.3-commit.7b515c0 → 1.0.0-beta.3-commit.306867e
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 +10 -10
- package/dist/cjs/experimental-index.cjs +3 -3
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/cjs/parse-ast-index.cjs +1 -1
- package/dist/esm/cli.mjs +10 -10
- package/dist/esm/experimental-index.mjs +3 -3
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/parallel-plugin-worker.mjs +2 -2
- package/dist/esm/parse-ast-index.mjs +1 -1
- package/dist/shared/{binding-orkvONpS.cjs → binding-B9_Bsc0_.cjs} +3 -3
- package/dist/shared/{binding-l7VLSKnB.mjs → binding-_xN4hdfO.mjs} +3 -3
- package/dist/shared/{prompt-B7tq3GL9.cjs → prompt-Dh7e4K1i.cjs} +8 -8
- package/dist/shared/{prompt-Nfm4Xz36.mjs → prompt-zTLhvFXo.mjs} +8 -8
- package/dist/shared/{src-BW4Ul1I_.mjs → src-BGJCTYiA.mjs} +70 -70
- package/dist/shared/{src-BJkjhibP.cjs → src-BL6ftzBh.cjs} +71 -71
- package/dist/types/binding.d.ts +1 -1
- package/dist/types/options/input-options.d.ts +1 -1
- package/dist/types/utils/bindingify-input-options.js +1 -1
- package/dist/types/utils/validator.js +1 -1
- package/package.json +18 -18
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError } from "./binding-
|
|
1
|
+
import { augmentCodeLocation, colors, error, import_binding, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError } from "./binding-_xN4hdfO.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
import { Worker } from "node:worker_threads";
|
|
@@ -17,7 +17,7 @@ function arraify(value) {
|
|
|
17
17
|
return Array.isArray(value) ? value : [value];
|
|
18
18
|
}
|
|
19
19
|
function isNullish(value) {
|
|
20
|
-
return value === null || value ===
|
|
20
|
+
return value === null || value === void 0;
|
|
21
21
|
}
|
|
22
22
|
function unimplemented(info) {
|
|
23
23
|
if (info) throw new Error(`unimplemented: ${info}`);
|
|
@@ -370,9 +370,9 @@ var PluginDriver = class {
|
|
|
370
370
|
};
|
|
371
371
|
function getObjectPlugins(plugins) {
|
|
372
372
|
return plugins.filter((plugin) => {
|
|
373
|
-
if (!plugin) return
|
|
374
|
-
if ("_parallel" in plugin) return
|
|
375
|
-
if (plugin instanceof BuiltinPlugin) return
|
|
373
|
+
if (!plugin) return void 0;
|
|
374
|
+
if ("_parallel" in plugin) return void 0;
|
|
375
|
+
if (plugin instanceof BuiltinPlugin) return void 0;
|
|
376
376
|
return plugin;
|
|
377
377
|
});
|
|
378
378
|
}
|
|
@@ -417,11 +417,11 @@ function bindingAssetSource(source) {
|
|
|
417
417
|
function bindingifySourcemap$1(map) {
|
|
418
418
|
if (map == null) return;
|
|
419
419
|
return { inner: typeof map === "string" ? map : {
|
|
420
|
-
file: map.file ??
|
|
420
|
+
file: map.file ?? void 0,
|
|
421
421
|
mappings: map.mappings,
|
|
422
422
|
sourceRoot: map.sourceRoot,
|
|
423
|
-
sources: map.sources?.map((s) => s ??
|
|
424
|
-
sourcesContent: map.sourcesContent?.map((s) => s ??
|
|
423
|
+
sources: map.sources?.map((s) => s ?? void 0),
|
|
424
|
+
sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
|
|
425
425
|
names: map.names
|
|
426
426
|
} };
|
|
427
427
|
}
|
|
@@ -432,7 +432,7 @@ function normalizeErrors(rawErrors) {
|
|
|
432
432
|
const errors = rawErrors.map((e) => e instanceof Error ? e : Object.assign(new Error(), {
|
|
433
433
|
kind: e.kind,
|
|
434
434
|
message: e.message,
|
|
435
|
-
stack:
|
|
435
|
+
stack: void 0
|
|
436
436
|
}));
|
|
437
437
|
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
438
438
|
for (let i = 0; i < errors.length; i++) {
|
|
@@ -599,7 +599,7 @@ function transformToRollupOutputAsset(bindingAsset, changed) {
|
|
|
599
599
|
get source() {
|
|
600
600
|
return transformAssetSource(bindingAsset.source);
|
|
601
601
|
},
|
|
602
|
-
name: bindingAsset.name ??
|
|
602
|
+
name: bindingAsset.name ?? void 0,
|
|
603
603
|
names: bindingAsset.names
|
|
604
604
|
};
|
|
605
605
|
const cache = {};
|
|
@@ -652,11 +652,11 @@ function collectChangedBundle(changed, bundle) {
|
|
|
652
652
|
modules: {},
|
|
653
653
|
imports: item.imports,
|
|
654
654
|
dynamicImports: item.dynamicImports,
|
|
655
|
-
facadeModuleId: item.facadeModuleId ||
|
|
655
|
+
facadeModuleId: item.facadeModuleId || void 0,
|
|
656
656
|
isDynamicEntry: item.isDynamicEntry,
|
|
657
657
|
moduleIds: item.moduleIds,
|
|
658
658
|
map: bindingifySourcemap$1(item.map),
|
|
659
|
-
sourcemapFilename: item.sourcemapFileName ||
|
|
659
|
+
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
660
660
|
preliminaryFilename: item.preliminaryFileName
|
|
661
661
|
});
|
|
662
662
|
}
|
|
@@ -734,7 +734,7 @@ function bindingifySideEffects(sideEffects) {
|
|
|
734
734
|
case false: return import_binding.BindingHookSideEffects.False;
|
|
735
735
|
case "no-treeshake": return import_binding.BindingHookSideEffects.NoTreeshake;
|
|
736
736
|
case null:
|
|
737
|
-
case
|
|
737
|
+
case void 0: return void 0;
|
|
738
738
|
default: throw new Error(`Unexpected side effects: ${sideEffects}`);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
@@ -779,7 +779,7 @@ var PluginContext = class extends MinimalPluginContext {
|
|
|
779
779
|
return this.data.getModuleInfo(id, this.context);
|
|
780
780
|
}
|
|
781
781
|
async resolve(source, importer, options) {
|
|
782
|
-
let receipt =
|
|
782
|
+
let receipt = void 0;
|
|
783
783
|
if (options != null) receipt = this.data.saveResolveOptions(options);
|
|
784
784
|
const res = await this.context.resolve(source, importer, {
|
|
785
785
|
custom: receipt,
|
|
@@ -796,11 +796,11 @@ var PluginContext = class extends MinimalPluginContext {
|
|
|
796
796
|
emitFile(file) {
|
|
797
797
|
if (file.type === "prebuilt-chunk") return unimplemented("PluginContext.emitFile with type prebuilt-chunk");
|
|
798
798
|
if (file.type === "chunk") return this.context.emitChunk(file);
|
|
799
|
-
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ?
|
|
800
|
-
const filename = file.fileName ?
|
|
799
|
+
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? void 0 : this.outputOptions.sanitizeFileName(file.name || "asset");
|
|
800
|
+
const filename = file.fileName ? void 0 : this.getAssetFileNames(file);
|
|
801
801
|
return this.context.emitFile({
|
|
802
802
|
...file,
|
|
803
|
-
originalFileName: file.originalFileName ||
|
|
803
|
+
originalFileName: file.originalFileName || void 0,
|
|
804
804
|
source: bindingAssetSource(file.source)
|
|
805
805
|
}, filename, fnSanitizedFileName);
|
|
806
806
|
}
|
|
@@ -873,7 +873,7 @@ function bindingPluginOrder(order) {
|
|
|
873
873
|
case "post": return import_binding.BindingPluginOrder.Post;
|
|
874
874
|
case "pre": return import_binding.BindingPluginOrder.Pre;
|
|
875
875
|
case null:
|
|
876
|
-
case
|
|
876
|
+
case void 0: return void 0;
|
|
877
877
|
default: throw new Error(`Unknown plugin order: ${order}`);
|
|
878
878
|
}
|
|
879
879
|
}
|
|
@@ -888,25 +888,25 @@ function bindingifyStringFilter(matcher) {
|
|
|
888
888
|
if (typeof matcher === "string" || matcher instanceof RegExp) return { include: [matcher] };
|
|
889
889
|
if (Array.isArray(matcher)) return { include: matcher };
|
|
890
890
|
return {
|
|
891
|
-
include: matcher.include ? arraify(matcher.include) :
|
|
892
|
-
exclude: matcher.exclude ? arraify(matcher.exclude) :
|
|
891
|
+
include: matcher.include ? arraify(matcher.include) : void 0,
|
|
892
|
+
exclude: matcher.exclude ? arraify(matcher.exclude) : void 0
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
895
|
function bindingifyResolveIdFilter(filterOption) {
|
|
896
|
-
return filterOption?.id ? bindingifyStringFilter(filterOption.id) :
|
|
896
|
+
return filterOption?.id ? bindingifyStringFilter(filterOption.id) : void 0;
|
|
897
897
|
}
|
|
898
898
|
function bindingifyLoadFilter(filterOption) {
|
|
899
|
-
return filterOption?.id ? bindingifyStringFilter(filterOption.id) :
|
|
899
|
+
return filterOption?.id ? bindingifyStringFilter(filterOption.id) : void 0;
|
|
900
900
|
}
|
|
901
901
|
function bindingifyTransformFilter(filterOption) {
|
|
902
|
-
if (!filterOption) return
|
|
902
|
+
if (!filterOption) return void 0;
|
|
903
903
|
const { id, code, moduleType } = filterOption;
|
|
904
904
|
let moduleTypeRet;
|
|
905
905
|
if (moduleType) if (Array.isArray(moduleType)) moduleTypeRet = moduleType;
|
|
906
906
|
else moduleTypeRet = moduleType.include;
|
|
907
907
|
return {
|
|
908
|
-
id: id ? bindingifyStringFilter(id) :
|
|
909
|
-
code: code ? bindingifyStringFilter(code) :
|
|
908
|
+
id: id ? bindingifyStringFilter(id) : void 0,
|
|
909
|
+
code: code ? bindingifyStringFilter(code) : void 0,
|
|
910
910
|
moduleType: moduleTypeRet
|
|
911
911
|
};
|
|
912
912
|
}
|
|
@@ -926,7 +926,7 @@ var NormalizedInputOptionsImpl = class {
|
|
|
926
926
|
return this.inner.input;
|
|
927
927
|
}
|
|
928
928
|
get cwd() {
|
|
929
|
-
return this.inner.cwd ??
|
|
929
|
+
return this.inner.cwd ?? void 0;
|
|
930
930
|
}
|
|
931
931
|
get platform() {
|
|
932
932
|
return this.inner.platform;
|
|
@@ -952,7 +952,7 @@ function bindingifyBuildEnd(args) {
|
|
|
952
952
|
const { handler, meta } = normalizeHook(hook);
|
|
953
953
|
return {
|
|
954
954
|
plugin: async (ctx, err) => {
|
|
955
|
-
await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), err ? normalizeErrors(err) :
|
|
955
|
+
await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), err ? normalizeErrors(err) : void 0);
|
|
956
956
|
},
|
|
957
957
|
meta: bindingifyPluginHookMeta(meta)
|
|
958
958
|
};
|
|
@@ -963,13 +963,13 @@ function bindingifyResolveId(args) {
|
|
|
963
963
|
const { handler, meta, options } = normalizeHook(hook);
|
|
964
964
|
return {
|
|
965
965
|
plugin: async (ctx, specifier, importer, extraOptions) => {
|
|
966
|
-
const contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) :
|
|
966
|
+
const contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) : void 0;
|
|
967
967
|
const newExtraOptions = {
|
|
968
968
|
...extraOptions,
|
|
969
969
|
custom: contextResolveOptions?.custom,
|
|
970
970
|
[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]: contextResolveOptions?.[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]
|
|
971
971
|
};
|
|
972
|
-
const ret = await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), specifier, importer ??
|
|
972
|
+
const ret = await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), specifier, importer ?? void 0, newExtraOptions);
|
|
973
973
|
if (ret == null) return;
|
|
974
974
|
if (ret === false) return {
|
|
975
975
|
id: specifier,
|
|
@@ -996,7 +996,7 @@ function bindingifyResolveDynamicImport(args) {
|
|
|
996
996
|
const { handler, meta } = normalizeHook(hook);
|
|
997
997
|
return {
|
|
998
998
|
plugin: async (ctx, specifier, importer) => {
|
|
999
|
-
const ret = await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), specifier, importer ??
|
|
999
|
+
const ret = await handler.call(new PluginContext(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel), specifier, importer ?? void 0);
|
|
1000
1000
|
if (ret == null) return;
|
|
1001
1001
|
if (ret === false) return {
|
|
1002
1002
|
id: specifier,
|
|
@@ -1024,7 +1024,7 @@ function bindingifyTransform(args) {
|
|
|
1024
1024
|
return {
|
|
1025
1025
|
plugin: async (ctx, code, id, meta$1) => {
|
|
1026
1026
|
const ret = await handler.call(new TransformPluginContext(args.outputOptions, ctx.inner(), args.plugin, args.pluginContextData, ctx, id, code, args.onLog, args.logLevel), code, id, meta$1);
|
|
1027
|
-
if (ret == null) return
|
|
1027
|
+
if (ret == null) return void 0;
|
|
1028
1028
|
if (typeof ret === "string") return { code: ret };
|
|
1029
1029
|
args.pluginContextData.updateModuleOption(id, {
|
|
1030
1030
|
meta: ret.meta || {},
|
|
@@ -1101,7 +1101,7 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
1101
1101
|
this.inner = inner;
|
|
1102
1102
|
}
|
|
1103
1103
|
get dir() {
|
|
1104
|
-
return this.inner.dir ??
|
|
1104
|
+
return this.inner.dir ?? void 0;
|
|
1105
1105
|
}
|
|
1106
1106
|
get entryFileNames() {
|
|
1107
1107
|
return mapFunctionOption(this.inner.entryFilenames, "entryFileNames");
|
|
@@ -1131,10 +1131,10 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
1131
1131
|
return this.inner.shimMissingExports;
|
|
1132
1132
|
}
|
|
1133
1133
|
get name() {
|
|
1134
|
-
return this.inner.name ??
|
|
1134
|
+
return this.inner.name ?? void 0;
|
|
1135
1135
|
}
|
|
1136
1136
|
get file() {
|
|
1137
|
-
return this.inner.file ??
|
|
1137
|
+
return this.inner.file ?? void 0;
|
|
1138
1138
|
}
|
|
1139
1139
|
get inlineDynamicImports() {
|
|
1140
1140
|
return this.inner.inlineDynamicImports;
|
|
@@ -1143,16 +1143,16 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
1143
1143
|
return this.inner.externalLiveBindings;
|
|
1144
1144
|
}
|
|
1145
1145
|
get banner() {
|
|
1146
|
-
return mapFunctionOption(this.inner.banner, "banner") ??
|
|
1146
|
+
return mapFunctionOption(this.inner.banner, "banner") ?? void 0;
|
|
1147
1147
|
}
|
|
1148
1148
|
get footer() {
|
|
1149
|
-
return mapFunctionOption(this.inner.footer, "footer") ??
|
|
1149
|
+
return mapFunctionOption(this.inner.footer, "footer") ?? void 0;
|
|
1150
1150
|
}
|
|
1151
1151
|
get intro() {
|
|
1152
|
-
return mapFunctionOption(this.inner.intro, "intro") ??
|
|
1152
|
+
return mapFunctionOption(this.inner.intro, "intro") ?? void 0;
|
|
1153
1153
|
}
|
|
1154
1154
|
get outro() {
|
|
1155
|
-
return mapFunctionOption(this.inner.outro, "outro") ??
|
|
1155
|
+
return mapFunctionOption(this.inner.outro, "outro") ?? void 0;
|
|
1156
1156
|
}
|
|
1157
1157
|
get esModule() {
|
|
1158
1158
|
return this.inner.esModule;
|
|
@@ -1467,7 +1467,7 @@ function wrapHandlers(plugin) {
|
|
|
1467
1467
|
} catch (e) {
|
|
1468
1468
|
return error(logPluginError(e, plugin.name, {
|
|
1469
1469
|
hook: hookName,
|
|
1470
|
-
id: hookName === "transform" ? args[2] :
|
|
1470
|
+
id: hookName === "transform" ? args[2] : void 0
|
|
1471
1471
|
}));
|
|
1472
1472
|
}
|
|
1473
1473
|
};
|
|
@@ -1528,7 +1528,7 @@ var PluginContextData = class {
|
|
|
1528
1528
|
//#endregion
|
|
1529
1529
|
//#region src/utils/normalize-string-or-regex.ts
|
|
1530
1530
|
function normalizedStringOrRegex(pattern) {
|
|
1531
|
-
if (!pattern) return
|
|
1531
|
+
if (!pattern) return void 0;
|
|
1532
1532
|
if (!Array.isArray(pattern)) pattern = [pattern];
|
|
1533
1533
|
return pattern;
|
|
1534
1534
|
}
|
|
@@ -1538,7 +1538,7 @@ function normalizedStringOrRegex(pattern) {
|
|
|
1538
1538
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, onLog, logLevel) {
|
|
1539
1539
|
const pluginContextData = new PluginContextData();
|
|
1540
1540
|
const plugins = rawPlugins.map((plugin) => {
|
|
1541
|
-
if ("_parallel" in plugin) return
|
|
1541
|
+
if ("_parallel" in plugin) return void 0;
|
|
1542
1542
|
if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
|
|
1543
1543
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, onLog, logLevel);
|
|
1544
1544
|
});
|
|
@@ -1554,14 +1554,14 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, onLog,
|
|
|
1554
1554
|
onLog,
|
|
1555
1555
|
treeshake: bindingifyTreeshakeOptions(inputOptions.treeshake),
|
|
1556
1556
|
moduleTypes: inputOptions.moduleTypes,
|
|
1557
|
-
define: inputOptions.define ? Object.entries(inputOptions.define) :
|
|
1557
|
+
define: inputOptions.define ? Object.entries(inputOptions.define) : void 0,
|
|
1558
1558
|
inject: bindingifyInject(inputOptions.inject),
|
|
1559
1559
|
experimental: {
|
|
1560
1560
|
strictExecutionOrder: inputOptions.experimental?.strictExecutionOrder,
|
|
1561
1561
|
disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
|
|
1562
1562
|
viteMode: inputOptions.experimental?.viteMode,
|
|
1563
1563
|
resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
|
|
1564
|
-
|
|
1564
|
+
hmr: inputOptions.experimental?.hmr
|
|
1565
1565
|
},
|
|
1566
1566
|
profilerNames: inputOptions?.profilerNames,
|
|
1567
1567
|
jsx: bindingifyJsx(inputOptions.jsx),
|
|
@@ -1593,11 +1593,11 @@ function bindingifyResolve(resolve) {
|
|
|
1593
1593
|
alias: alias ? Object.entries(alias).map(([name, replacement]) => ({
|
|
1594
1594
|
find: name,
|
|
1595
1595
|
replacements: arraify(replacement)
|
|
1596
|
-
})) :
|
|
1596
|
+
})) : void 0,
|
|
1597
1597
|
extensionAlias: extensionAlias ? Object.entries(extensionAlias).map(([name, value]) => ({
|
|
1598
1598
|
target: name,
|
|
1599
1599
|
replacements: value
|
|
1600
|
-
})) :
|
|
1600
|
+
})) : void 0,
|
|
1601
1601
|
...rest
|
|
1602
1602
|
};
|
|
1603
1603
|
}
|
|
@@ -1634,7 +1634,7 @@ function bindingifyLogLevel(logLevel) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
function bindingifyInput(input) {
|
|
1637
|
-
if (input ===
|
|
1637
|
+
if (input === void 0) return [];
|
|
1638
1638
|
if (typeof input === "string") return [{ import: input }];
|
|
1639
1639
|
if (Array.isArray(input)) return input.map((src) => ({ import: src }));
|
|
1640
1640
|
return Object.entries(input).map((value) => {
|
|
@@ -1653,7 +1653,7 @@ function bindingifyJsx(input) {
|
|
|
1653
1653
|
type: "Enable",
|
|
1654
1654
|
field0: {
|
|
1655
1655
|
runtime: mode,
|
|
1656
|
-
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource :
|
|
1656
|
+
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0,
|
|
1657
1657
|
pragma: input.factory,
|
|
1658
1658
|
pragmaFrag: input.fragment,
|
|
1659
1659
|
development: input.development,
|
|
@@ -1674,13 +1674,13 @@ function bindingifyWatch(watch$1) {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
function bindingifyTreeshakeOptions(config) {
|
|
1677
|
-
if (config === false) return
|
|
1678
|
-
if (config === true || config ===
|
|
1677
|
+
if (config === false) return void 0;
|
|
1678
|
+
if (config === true || config === void 0) return {
|
|
1679
1679
|
moduleSideEffects: true,
|
|
1680
1680
|
annotations: true
|
|
1681
1681
|
};
|
|
1682
1682
|
let normalizedConfig = { moduleSideEffects: true };
|
|
1683
|
-
if (config.moduleSideEffects ===
|
|
1683
|
+
if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
|
|
1684
1684
|
else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
|
|
1685
1685
|
external: true,
|
|
1686
1686
|
sideEffects: false
|
|
@@ -1699,7 +1699,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
1699
1699
|
const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
|
|
1700
1700
|
return {
|
|
1701
1701
|
dir,
|
|
1702
|
-
file: file == null ?
|
|
1702
|
+
file: file == null ? void 0 : file,
|
|
1703
1703
|
format: bindingifyFormat(format),
|
|
1704
1704
|
exports,
|
|
1705
1705
|
hashCharacters,
|
|
@@ -1737,7 +1737,7 @@ function bindingifyAddon(configAddon) {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
function bindingifyFormat(format) {
|
|
1739
1739
|
switch (format) {
|
|
1740
|
-
case
|
|
1740
|
+
case void 0:
|
|
1741
1741
|
case "es":
|
|
1742
1742
|
case "esm":
|
|
1743
1743
|
case "module": return "es";
|
|
@@ -1754,7 +1754,7 @@ function bindingifySourcemap(sourcemap) {
|
|
|
1754
1754
|
case true: return "file";
|
|
1755
1755
|
case "inline": return "inline";
|
|
1756
1756
|
case false:
|
|
1757
|
-
case
|
|
1757
|
+
case void 0: return void 0;
|
|
1758
1758
|
case "hidden": return "hidden";
|
|
1759
1759
|
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
1760
1760
|
}
|
|
@@ -1775,26 +1775,26 @@ function bindingifyAssetFilenames(assetFileNames) {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
|
|
1777
1777
|
//#endregion
|
|
1778
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
1779
|
-
function u$1(
|
|
1780
|
-
let
|
|
1781
|
-
return a === void 0 ?
|
|
1778
|
+
//#region ../../node_modules/.pnpm/remeda@2.20.1/node_modules/remeda/dist/chunk-D6FCK2GA.js
|
|
1779
|
+
function u$1(o, n, a) {
|
|
1780
|
+
let t$1 = (r) => o(r, ...n);
|
|
1781
|
+
return a === void 0 ? t$1 : Object.assign(t$1, {
|
|
1782
1782
|
lazy: a,
|
|
1783
1783
|
lazyArgs: n
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
|
|
1787
1787
|
//#endregion
|
|
1788
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
1789
|
-
function u(r, n,
|
|
1790
|
-
let
|
|
1791
|
-
if (
|
|
1792
|
-
if (
|
|
1788
|
+
//#region ../../node_modules/.pnpm/remeda@2.20.1/node_modules/remeda/dist/chunk-WIMGWYZL.js
|
|
1789
|
+
function u(r, n, o) {
|
|
1790
|
+
let a = r.length - n.length;
|
|
1791
|
+
if (a === 0) return r(...n);
|
|
1792
|
+
if (a === 1) return u$1(r, n, o);
|
|
1793
1793
|
throw new Error("Wrong number of arguments");
|
|
1794
1794
|
}
|
|
1795
1795
|
|
|
1796
1796
|
//#endregion
|
|
1797
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
1797
|
+
//#region ../../node_modules/.pnpm/remeda@2.20.1/node_modules/remeda/dist/chunk-5NQBDF4H.js
|
|
1798
1798
|
function t(...n) {
|
|
1799
1799
|
return u(Object.keys, n);
|
|
1800
1800
|
}
|
|
@@ -1973,10 +1973,10 @@ function createComposedPlugin(plugins) {
|
|
|
1973
1973
|
const batchedHandlers = batchedHooks.transform;
|
|
1974
1974
|
composed.transform = async function(initialCode, id, moduleType) {
|
|
1975
1975
|
let code = initialCode;
|
|
1976
|
-
let moduleSideEffects =
|
|
1976
|
+
let moduleSideEffects = void 0;
|
|
1977
1977
|
function updateOutput(newCode, newModuleSideEffects) {
|
|
1978
1978
|
code = newCode;
|
|
1979
|
-
moduleSideEffects = newModuleSideEffects ??
|
|
1979
|
+
moduleSideEffects = newModuleSideEffects ?? void 0;
|
|
1980
1980
|
}
|
|
1981
1981
|
for (const [handler, plugin] of batchedHandlers) {
|
|
1982
1982
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
@@ -2128,7 +2128,7 @@ async function initializeParallelPlugins(plugins) {
|
|
|
2128
2128
|
options
|
|
2129
2129
|
});
|
|
2130
2130
|
}
|
|
2131
|
-
if (pluginInfos.length <= 0) return
|
|
2131
|
+
if (pluginInfos.length <= 0) return void 0;
|
|
2132
2132
|
const count = Math.min(availableParallelism(), 8);
|
|
2133
2133
|
const parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);
|
|
2134
2134
|
const registryId = parallelJsPluginRegistry.id;
|
|
@@ -2269,7 +2269,7 @@ const InputOptionsSchema = v.strictObject({
|
|
|
2269
2269
|
enableComposingJsPlugins: v.optional(v.boolean()),
|
|
2270
2270
|
resolveNewUrlToAsset: v.optional(v.boolean()),
|
|
2271
2271
|
strictExecutionOrder: v.optional(v.boolean()),
|
|
2272
|
-
|
|
2272
|
+
hmr: v.optional(v.boolean())
|
|
2273
2273
|
})),
|
|
2274
2274
|
define: v.pipe(v.optional(v.record(v.string(), v.string())), v.description("Define global variables")),
|
|
2275
2275
|
inject: v.optional(v.record(v.string(), v.union([v.string(), v.tuple([v.string(), v.string()])]))),
|
|
@@ -2419,7 +2419,7 @@ function validateTreeShakingOptions(options) {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
function validateCliOptions(options) {
|
|
2421
2421
|
let parsed = v.safeParse(CliOptionsSchema, options);
|
|
2422
|
-
return [parsed.output, parsed.issues?.map((issue) => issue.path?.join(", ")).filter((v$1) => v$1 !==
|
|
2422
|
+
return [parsed.output, parsed.issues?.map((issue) => issue.path?.join(", ")).filter((v$1) => v$1 !== void 0)];
|
|
2423
2423
|
}
|
|
2424
2424
|
function getInputCliKeys() {
|
|
2425
2425
|
return v.keyof(InputCliOptionsSchema).options;
|
|
@@ -2434,7 +2434,7 @@ function getJsonSchema() {
|
|
|
2434
2434
|
//#endregion
|
|
2435
2435
|
//#region src/utils/create-bundler-option.ts
|
|
2436
2436
|
async function createBundlerOptions(inputOptions, outputOptions) {
|
|
2437
|
-
if (inputOptions.treeshake !==
|
|
2437
|
+
if (inputOptions.treeshake !== void 0) validateTreeShakingOptions(inputOptions.treeshake);
|
|
2438
2438
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
2439
2439
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
2440
2440
|
const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
|
|
@@ -2645,7 +2645,7 @@ const watch = (input) => {
|
|
|
2645
2645
|
|
|
2646
2646
|
//#endregion
|
|
2647
2647
|
//#region package.json
|
|
2648
|
-
var version = "1.0.0-beta.3-commit.
|
|
2648
|
+
var version = "1.0.0-beta.3-commit.306867e";
|
|
2649
2649
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
2650
2650
|
|
|
2651
2651
|
//#endregion
|