rolldown 1.0.0-beta.3-commit.7d37092 → 1.0.0-beta.3-commit.8754407

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C0p7XKwp.cjs');
3
+ const require_src = require('../shared/src-bcOJ-g3T.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-DtSwpkV3.cjs');
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C0p7XKwp.cjs');
3
+ const require_src = require('../shared/src-bcOJ-g3T.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-DtSwpkV3.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-C0p7XKwp.cjs');
1
+ const require_src = require('../shared/src-bcOJ-g3T.cjs');
2
2
  require('../shared/parse-ast-index-DtSwpkV3.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C0p7XKwp.cjs');
3
+ const require_src = require('../shared/src-bcOJ-g3T.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-DtSwpkV3.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { colors } from "../shared/parse-ast-index-CSo7-trQ.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-BeCEcphh.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-EnhBSpKs.mjs";
3
3
  import process$1, { cwd } from "node:process";
4
4
  import path, { sep } from "node:path";
5
5
  import fs from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-CSo7-trQ.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BeCEcphh.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-EnhBSpKs.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
1
  import "../shared/parse-ast-index-CSo7-trQ.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-BeCEcphh.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-EnhBSpKs.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-CSo7-trQ.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-BeCEcphh.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-EnhBSpKs.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -1098,12 +1098,89 @@ function bindingifyModuleParsed(args) {
1098
1098
  }
1099
1099
 
1100
1100
  //#endregion
1101
- //#region src/options/normalized-output-options.ts
1102
- function mapFunctionOption(option, name) {
1103
- return typeof option === "undefined" ? () => {
1104
- unsupported(`You should not take \`NormalizedOutputOptions#${name}\` and call it directly`);
1105
- } : option;
1101
+ //#region src/utils/bindingify-output-options.ts
1102
+ function bindingifyOutputOptions(outputOptions) {
1103
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1104
+ return {
1105
+ dir,
1106
+ file: file == null ? void 0 : file,
1107
+ format: bindingifyFormat(format),
1108
+ exports,
1109
+ hashCharacters,
1110
+ sourcemap: bindingifySourcemap(sourcemap),
1111
+ sourcemapDebugIds,
1112
+ sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
1113
+ sourcemapPathTransform,
1114
+ banner: bindingifyAddon(banner),
1115
+ footer: bindingifyAddon(footer),
1116
+ intro: bindingifyAddon(intro),
1117
+ outro: bindingifyAddon(outro),
1118
+ extend: outputOptions.extend,
1119
+ globals,
1120
+ esModule,
1121
+ name,
1122
+ assetFileNames: bindingifyAssetFilenames(assetFileNames),
1123
+ entryFileNames,
1124
+ chunkFileNames,
1125
+ cssEntryFileNames,
1126
+ cssChunkFileNames,
1127
+ plugins: [],
1128
+ minify: outputOptions.minify,
1129
+ externalLiveBindings: outputOptions.externalLiveBindings,
1130
+ inlineDynamicImports: outputOptions.inlineDynamicImports,
1131
+ advancedChunks: outputOptions.advancedChunks,
1132
+ polyfillRequire: outputOptions.polyfillRequire,
1133
+ target: outputOptions.target,
1134
+ sanitizeFileName
1135
+ };
1136
+ }
1137
+ function bindingifyAddon(configAddon) {
1138
+ return async (chunk) => {
1139
+ if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
1140
+ return configAddon || "";
1141
+ };
1106
1142
  }
1143
+ function bindingifyFormat(format) {
1144
+ switch (format) {
1145
+ case void 0:
1146
+ case "es":
1147
+ case "esm":
1148
+ case "module": return "es";
1149
+ case "cjs":
1150
+ case "commonjs": return "cjs";
1151
+ case "iife": return "iife";
1152
+ case "umd": return "umd";
1153
+ case "experimental-app": return "app";
1154
+ default: unimplemented(`output.format: ${format}`);
1155
+ }
1156
+ }
1157
+ function bindingifySourcemap(sourcemap) {
1158
+ switch (sourcemap) {
1159
+ case true: return "file";
1160
+ case "inline": return "inline";
1161
+ case false:
1162
+ case void 0: return void 0;
1163
+ case "hidden": return "hidden";
1164
+ default: throw new Error(`unknown sourcemap: ${sourcemap}`);
1165
+ }
1166
+ }
1167
+ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
1168
+ return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
1169
+ }
1170
+ function bindingifyAssetFilenames(assetFileNames) {
1171
+ if (typeof assetFileNames === "function") return (asset) => {
1172
+ return assetFileNames({
1173
+ names: asset.names,
1174
+ originalFileNames: asset.originalFileNames,
1175
+ source: transformAssetSource(asset.source),
1176
+ type: "asset"
1177
+ });
1178
+ };
1179
+ return assetFileNames;
1180
+ }
1181
+
1182
+ //#endregion
1183
+ //#region src/options/normalized-output-options.ts
1107
1184
  var NormalizedOutputOptionsImpl = class {
1108
1185
  constructor(inner, outputOptions, normalizedOutputPlugins) {
1109
1186
  this.inner = inner;
@@ -1180,7 +1257,7 @@ var NormalizedOutputOptionsImpl = class {
1180
1257
  return this.inner.sourcemapDebugIds;
1181
1258
  }
1182
1259
  get sourcemapIgnoreList() {
1183
- return mapFunctionOption(void 0, "sourcemapIgnoreList");
1260
+ return bindingifySourcemapIgnoreList(this.outputOptions.sourcemapIgnoreList);
1184
1261
  }
1185
1262
  get sourcemapPathTransform() {
1186
1263
  return this.outputOptions.sourcemapPathTransform;
@@ -1744,87 +1821,6 @@ function bindingifyTreeshakeOptions(config) {
1744
1821
  return normalizedConfig;
1745
1822
  }
1746
1823
 
1747
- //#endregion
1748
- //#region src/utils/bindingify-output-options.ts
1749
- function bindingifyOutputOptions(outputOptions) {
1750
- const { dir, format, exports, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1751
- return {
1752
- dir,
1753
- file: file == null ? void 0 : file,
1754
- format: bindingifyFormat(format),
1755
- exports,
1756
- hashCharacters,
1757
- sourcemap: bindingifySourcemap(sourcemap),
1758
- sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
1759
- sourcemapPathTransform,
1760
- banner: bindingifyAddon(banner),
1761
- footer: bindingifyAddon(footer),
1762
- intro: bindingifyAddon(intro),
1763
- outro: bindingifyAddon(outro),
1764
- extend: outputOptions.extend,
1765
- globals,
1766
- esModule,
1767
- name,
1768
- assetFileNames: bindingifyAssetFilenames(assetFileNames),
1769
- entryFileNames,
1770
- chunkFileNames,
1771
- cssEntryFileNames,
1772
- cssChunkFileNames,
1773
- plugins: [],
1774
- minify: outputOptions.minify,
1775
- externalLiveBindings: outputOptions.externalLiveBindings,
1776
- inlineDynamicImports: outputOptions.inlineDynamicImports,
1777
- advancedChunks: outputOptions.advancedChunks,
1778
- polyfillRequire: outputOptions.polyfillRequire,
1779
- target: outputOptions.target,
1780
- sanitizeFileName
1781
- };
1782
- }
1783
- function bindingifyAddon(configAddon) {
1784
- return async (chunk) => {
1785
- if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
1786
- return configAddon || "";
1787
- };
1788
- }
1789
- function bindingifyFormat(format) {
1790
- switch (format) {
1791
- case void 0:
1792
- case "es":
1793
- case "esm":
1794
- case "module": return "es";
1795
- case "cjs":
1796
- case "commonjs": return "cjs";
1797
- case "iife": return "iife";
1798
- case "umd": return "umd";
1799
- case "experimental-app": return "app";
1800
- default: unimplemented(`output.format: ${format}`);
1801
- }
1802
- }
1803
- function bindingifySourcemap(sourcemap) {
1804
- switch (sourcemap) {
1805
- case true: return "file";
1806
- case "inline": return "inline";
1807
- case false:
1808
- case void 0: return void 0;
1809
- case "hidden": return "hidden";
1810
- default: throw new Error(`unknown sourcemap: ${sourcemap}`);
1811
- }
1812
- }
1813
- function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
1814
- return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
1815
- }
1816
- function bindingifyAssetFilenames(assetFileNames) {
1817
- if (typeof assetFileNames === "function") return (asset) => {
1818
- return assetFileNames({
1819
- names: asset.names,
1820
- originalFileNames: asset.originalFileNames,
1821
- source: transformAssetSource(asset.source),
1822
- type: "asset"
1823
- });
1824
- };
1825
- return assetFileNames;
1826
- }
1827
-
1828
1824
  //#endregion
1829
1825
  //#region ../../node_modules/.pnpm/remeda@2.20.2/node_modules/remeda/dist/chunk-D6FCK2GA.js
1830
1826
  function u$1(o, n, a) {
@@ -2419,6 +2415,7 @@ const OutputOptionsSchema = v.strictObject({
2419
2415
  v.literal("inline"),
2420
2416
  v.literal("hidden")
2421
2417
  ])), v.description(`Generate sourcemap (\`-s inline\` for inline, or ${colors.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
2418
+ sourcemapDebugIds: v.pipe(v.optional(v.boolean()), v.description("Inject sourcemap debug IDs")),
2422
2419
  sourcemapIgnoreList: v.optional(v.union([v.boolean(), v.custom(() => true)])),
2423
2420
  sourcemapPathTransform: v.optional(v.custom(() => true)),
2424
2421
  banner: v.optional(v.union([v.string(), AddonFunctionSchema])),
@@ -2705,7 +2702,7 @@ const watch = (input) => {
2705
2702
 
2706
2703
  //#endregion
2707
2704
  //#region package.json
2708
- var version = "1.0.0-beta.3-commit.7d37092";
2705
+ var version = "1.0.0-beta.3-commit.8754407";
2709
2706
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2710
2707
 
2711
2708
  //#endregion
@@ -1100,12 +1100,89 @@ function bindingifyModuleParsed(args) {
1100
1100
  }
1101
1101
 
1102
1102
  //#endregion
1103
- //#region src/options/normalized-output-options.ts
1104
- function mapFunctionOption(option, name) {
1105
- return typeof option === "undefined" ? () => {
1106
- unsupported(`You should not take \`NormalizedOutputOptions#${name}\` and call it directly`);
1107
- } : option;
1103
+ //#region src/utils/bindingify-output-options.ts
1104
+ function bindingifyOutputOptions(outputOptions) {
1105
+ const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1106
+ return {
1107
+ dir,
1108
+ file: file == null ? void 0 : file,
1109
+ format: bindingifyFormat(format),
1110
+ exports: exports$1,
1111
+ hashCharacters,
1112
+ sourcemap: bindingifySourcemap(sourcemap),
1113
+ sourcemapDebugIds,
1114
+ sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
1115
+ sourcemapPathTransform,
1116
+ banner: bindingifyAddon(banner),
1117
+ footer: bindingifyAddon(footer),
1118
+ intro: bindingifyAddon(intro),
1119
+ outro: bindingifyAddon(outro),
1120
+ extend: outputOptions.extend,
1121
+ globals,
1122
+ esModule,
1123
+ name,
1124
+ assetFileNames: bindingifyAssetFilenames(assetFileNames),
1125
+ entryFileNames,
1126
+ chunkFileNames,
1127
+ cssEntryFileNames,
1128
+ cssChunkFileNames,
1129
+ plugins: [],
1130
+ minify: outputOptions.minify,
1131
+ externalLiveBindings: outputOptions.externalLiveBindings,
1132
+ inlineDynamicImports: outputOptions.inlineDynamicImports,
1133
+ advancedChunks: outputOptions.advancedChunks,
1134
+ polyfillRequire: outputOptions.polyfillRequire,
1135
+ target: outputOptions.target,
1136
+ sanitizeFileName
1137
+ };
1138
+ }
1139
+ function bindingifyAddon(configAddon) {
1140
+ return async (chunk) => {
1141
+ if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
1142
+ return configAddon || "";
1143
+ };
1108
1144
  }
1145
+ function bindingifyFormat(format) {
1146
+ switch (format) {
1147
+ case void 0:
1148
+ case "es":
1149
+ case "esm":
1150
+ case "module": return "es";
1151
+ case "cjs":
1152
+ case "commonjs": return "cjs";
1153
+ case "iife": return "iife";
1154
+ case "umd": return "umd";
1155
+ case "experimental-app": return "app";
1156
+ default: unimplemented(`output.format: ${format}`);
1157
+ }
1158
+ }
1159
+ function bindingifySourcemap(sourcemap) {
1160
+ switch (sourcemap) {
1161
+ case true: return "file";
1162
+ case "inline": return "inline";
1163
+ case false:
1164
+ case void 0: return void 0;
1165
+ case "hidden": return "hidden";
1166
+ default: throw new Error(`unknown sourcemap: ${sourcemap}`);
1167
+ }
1168
+ }
1169
+ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
1170
+ return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
1171
+ }
1172
+ function bindingifyAssetFilenames(assetFileNames) {
1173
+ if (typeof assetFileNames === "function") return (asset) => {
1174
+ return assetFileNames({
1175
+ names: asset.names,
1176
+ originalFileNames: asset.originalFileNames,
1177
+ source: transformAssetSource(asset.source),
1178
+ type: "asset"
1179
+ });
1180
+ };
1181
+ return assetFileNames;
1182
+ }
1183
+
1184
+ //#endregion
1185
+ //#region src/options/normalized-output-options.ts
1109
1186
  var NormalizedOutputOptionsImpl = class {
1110
1187
  constructor(inner, outputOptions, normalizedOutputPlugins) {
1111
1188
  this.inner = inner;
@@ -1182,7 +1259,7 @@ var NormalizedOutputOptionsImpl = class {
1182
1259
  return this.inner.sourcemapDebugIds;
1183
1260
  }
1184
1261
  get sourcemapIgnoreList() {
1185
- return mapFunctionOption(void 0, "sourcemapIgnoreList");
1262
+ return bindingifySourcemapIgnoreList(this.outputOptions.sourcemapIgnoreList);
1186
1263
  }
1187
1264
  get sourcemapPathTransform() {
1188
1265
  return this.outputOptions.sourcemapPathTransform;
@@ -1746,87 +1823,6 @@ function bindingifyTreeshakeOptions(config) {
1746
1823
  return normalizedConfig;
1747
1824
  }
1748
1825
 
1749
- //#endregion
1750
- //#region src/utils/bindingify-output-options.ts
1751
- function bindingifyOutputOptions(outputOptions) {
1752
- const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1753
- return {
1754
- dir,
1755
- file: file == null ? void 0 : file,
1756
- format: bindingifyFormat(format),
1757
- exports: exports$1,
1758
- hashCharacters,
1759
- sourcemap: bindingifySourcemap(sourcemap),
1760
- sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
1761
- sourcemapPathTransform,
1762
- banner: bindingifyAddon(banner),
1763
- footer: bindingifyAddon(footer),
1764
- intro: bindingifyAddon(intro),
1765
- outro: bindingifyAddon(outro),
1766
- extend: outputOptions.extend,
1767
- globals,
1768
- esModule,
1769
- name,
1770
- assetFileNames: bindingifyAssetFilenames(assetFileNames),
1771
- entryFileNames,
1772
- chunkFileNames,
1773
- cssEntryFileNames,
1774
- cssChunkFileNames,
1775
- plugins: [],
1776
- minify: outputOptions.minify,
1777
- externalLiveBindings: outputOptions.externalLiveBindings,
1778
- inlineDynamicImports: outputOptions.inlineDynamicImports,
1779
- advancedChunks: outputOptions.advancedChunks,
1780
- polyfillRequire: outputOptions.polyfillRequire,
1781
- target: outputOptions.target,
1782
- sanitizeFileName
1783
- };
1784
- }
1785
- function bindingifyAddon(configAddon) {
1786
- return async (chunk) => {
1787
- if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
1788
- return configAddon || "";
1789
- };
1790
- }
1791
- function bindingifyFormat(format) {
1792
- switch (format) {
1793
- case void 0:
1794
- case "es":
1795
- case "esm":
1796
- case "module": return "es";
1797
- case "cjs":
1798
- case "commonjs": return "cjs";
1799
- case "iife": return "iife";
1800
- case "umd": return "umd";
1801
- case "experimental-app": return "app";
1802
- default: unimplemented(`output.format: ${format}`);
1803
- }
1804
- }
1805
- function bindingifySourcemap(sourcemap) {
1806
- switch (sourcemap) {
1807
- case true: return "file";
1808
- case "inline": return "inline";
1809
- case false:
1810
- case void 0: return void 0;
1811
- case "hidden": return "hidden";
1812
- default: throw new Error(`unknown sourcemap: ${sourcemap}`);
1813
- }
1814
- }
1815
- function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
1816
- return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
1817
- }
1818
- function bindingifyAssetFilenames(assetFileNames) {
1819
- if (typeof assetFileNames === "function") return (asset) => {
1820
- return assetFileNames({
1821
- names: asset.names,
1822
- originalFileNames: asset.originalFileNames,
1823
- source: transformAssetSource(asset.source),
1824
- type: "asset"
1825
- });
1826
- };
1827
- return assetFileNames;
1828
- }
1829
-
1830
1826
  //#endregion
1831
1827
  //#region ../../node_modules/.pnpm/remeda@2.20.2/node_modules/remeda/dist/chunk-D6FCK2GA.js
1832
1828
  function u$1(o, n, a) {
@@ -2421,6 +2417,7 @@ const OutputOptionsSchema = valibot.strictObject({
2421
2417
  valibot.literal("inline"),
2422
2418
  valibot.literal("hidden")
2423
2419
  ])), valibot.description(`Generate sourcemap (\`-s inline\` for inline, or ${require_parse_ast_index.colors.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
2420
+ sourcemapDebugIds: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Inject sourcemap debug IDs")),
2424
2421
  sourcemapIgnoreList: valibot.optional(valibot.union([valibot.boolean(), valibot.custom(() => true)])),
2425
2422
  sourcemapPathTransform: valibot.optional(valibot.custom(() => true)),
2426
2423
  banner: valibot.optional(valibot.union([valibot.string(), AddonFunctionSchema])),
@@ -2707,7 +2704,7 @@ const watch = (input) => {
2707
2704
 
2708
2705
  //#endregion
2709
2706
  //#region package.json
2710
- var version = "1.0.0-beta.3-commit.7d37092";
2707
+ var version = "1.0.0-beta.3-commit.8754407";
2711
2708
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2712
2709
 
2713
2710
  //#endregion
@@ -26,14 +26,13 @@ export interface NormalizedOutputOptions {
26
26
  globals: Record<string, string> | GlobalsFunction;
27
27
  hashCharacters: 'base64' | 'base36' | 'hex';
28
28
  sourcemapDebugIds: boolean;
29
- sourcemapIgnoreList: SourcemapIgnoreListOption | undefined;
29
+ sourcemapIgnoreList: SourcemapIgnoreListOption;
30
30
  sourcemapPathTransform: SourcemapPathTransformOption | undefined;
31
31
  minify: false | BindingMinifyOptions;
32
32
  comments: 'none' | 'preserve-legal';
33
33
  polyfillRequire: boolean;
34
34
  plugins: RolldownPlugin[];
35
35
  }
36
- type UnsupportedFnRet = () => never;
37
36
  export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions {
38
37
  private inner;
39
38
  private outputOptions;
@@ -62,11 +61,10 @@ export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOpti
62
61
  get globals(): Record<string, string> | GlobalsFunction;
63
62
  get hashCharacters(): 'base64' | 'base36' | 'hex';
64
63
  get sourcemapDebugIds(): boolean;
65
- get sourcemapIgnoreList(): UnsupportedFnRet | undefined;
64
+ get sourcemapIgnoreList(): SourcemapIgnoreListOption;
66
65
  get sourcemapPathTransform(): SourcemapPathTransformOption | undefined;
67
66
  get minify(): false | BindingMinifyOptions;
68
67
  get comments(): 'none' | 'preserve-legal';
69
68
  get polyfillRequire(): boolean;
70
69
  get plugins(): RolldownPlugin[];
71
70
  }
72
- export {};
@@ -36,6 +36,7 @@ export interface OutputOptions {
36
36
  */
37
37
  format?: ModuleFormat;
38
38
  sourcemap?: boolean | 'inline' | 'hidden';
39
+ sourcemapDebugIds?: boolean;
39
40
  sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
40
41
  sourcemapPathTransform?: SourcemapPathTransformOption;
41
42
  banner?: string | AddonFunction;
@@ -55,20 +56,102 @@ export interface OutputOptions {
55
56
  globals?: Record<string, string> | GlobalsFunction;
56
57
  externalLiveBindings?: boolean;
57
58
  inlineDynamicImports?: boolean;
59
+ /**
60
+ * Allows you to do advanced chunking. Use it to reduce the number of common chunks or split out a chunk that hardly changes to obtain better caching.
61
+ */
58
62
  advancedChunks?: {
63
+ /**
64
+ * - Type: `number`
65
+ *
66
+ * Global fallback of [`{group}.minSize`](#advancedchunks-groups-minsize), if it's not specified in the group.
67
+ */
59
68
  minSize?: number;
69
+ /**
70
+ * - Type: `number`
71
+ *
72
+ * Global fallback of [`{group}.maxSize`](#advancedchunks-groups-maxsize), if it's not specified in the group.
73
+ */
60
74
  maxSize?: number;
75
+ /**
76
+ * - Type: `number`
77
+ *
78
+ * Global fallback of [`{group}.maxModuleSize`](#advancedchunks-groups-maxmodulesize), if it's not specified in the group.
79
+ */
61
80
  maxModuleSize?: number;
81
+ /**
82
+ * - Type: `number`
83
+ *
84
+ * Global fallback of [`{group}.minModuleSize`](#advancedchunks-groups-minmodulesize), if it's not specified in the group.
85
+ */
62
86
  minModuleSize?: number;
87
+ /**
88
+ * - Type: `number`
89
+ *
90
+ * Global fallback of [`{group}.minShareCount`](#advancedchunks-groups-minsharecount), if it's not specified in the group.
91
+ */
63
92
  minShareCount?: number;
93
+ /**
94
+ * Groups to be used for advanced chunking.
95
+ */
64
96
  groups?: {
97
+ /**
98
+ * - Type: `string`
99
+ *
100
+ * Name of the group. It will be also used as the name of the chunk and replaced the `[name]` placeholder in the `chunkFileNames` option.
101
+ */
65
102
  name: string;
103
+ /**
104
+ * - Type: `string | RegExp`
105
+ *
106
+ * Controls which modules are captured in this group.
107
+ *
108
+ * If `test` is a string, the module whose id contains the string will be captured.
109
+ * If `test` is a regular expression, the module whose id matches the regular expression will be captured.
110
+ * if `test` is empty, any module will be considered as matched.
111
+ */
66
112
  test?: StringOrRegExp;
113
+ /**
114
+ * - Type: `number`
115
+ *
116
+ * Priority of the group. Group with higher priority will be chosen first to match modules and create chunks. When converting the group to a chunk, modules of that group will be removed from other groups.
117
+ *
118
+ * If two groups have the same priority, the group whose index is smaller will be chosen.
119
+ */
67
120
  priority?: number;
121
+ /**
122
+ * - Type: `number`
123
+ * - Default: `0`
124
+ *
125
+ * Minimum size of the desired chunk. If accumulated size of captured modules is smaller than this value, this group will be ignored.s
126
+ */
68
127
  minSize?: number;
128
+ /**
129
+ * - Type: `number`
130
+ * - Default: `1`
131
+ *
132
+ * Controls if a module should be captured based on how many entry chunks reference it.
133
+ */
69
134
  minShareCount?: number;
135
+ /**
136
+ * - Type: `number`
137
+ * - Default: `Infinity`
138
+ *
139
+ * If final size of this group is larger than this value, this group will be spit into multiple groups that each has size closed to this value.
140
+ */
70
141
  maxSize?: number;
142
+ /**
143
+ * - Type: `number`
144
+ * - Default: `Infinity`
145
+ *
146
+ * Controls a module could only be captured if its size is smaller or equal than this value.
147
+ */
71
148
  maxModuleSize?: number;
149
+ /**
150
+ * - Type: `number`
151
+ * - Default: `0`
152
+ *
153
+ * Controls a module could only be captured if its size is larger or equal than this value.
154
+ */
72
155
  minModuleSize?: number;
73
156
  }[];
74
157
  };
@@ -1,3 +1,5 @@
1
1
  import type { BindingOutputOptions } from '../binding';
2
2
  import type { OutputOptions } from '../options/output-options';
3
+ import { SourcemapIgnoreListOption } from '../types/misc';
3
4
  export declare function bindingifyOutputOptions(outputOptions: OutputOptions): BindingOutputOptions;
5
+ export declare function bindingifySourcemapIgnoreList(sourcemapIgnoreList: OutputOptions['sourcemapIgnoreList']): SourcemapIgnoreListOption;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.3-commit.7d37092",
3
+ "version": "1.0.0-beta.3-commit.8754407",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -122,21 +122,21 @@
122
122
  "unbuild": "^3.0.0",
123
123
  "why-is-node-running": "^3.0.0",
124
124
  "@rolldown/testing": "0.0.1",
125
- "rolldown": "1.0.0-beta.3-commit.7d37092"
125
+ "rolldown": "1.0.0-beta.3-commit.8754407"
126
126
  },
127
127
  "optionalDependencies": {
128
- "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.7d37092",
129
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.7d37092",
130
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.7d37092",
131
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.7d37092",
132
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.7d37092",
133
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.7d37092",
134
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.7d37092",
135
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.7d37092",
136
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.7d37092",
137
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.7d37092",
138
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.7d37092",
139
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.7d37092"
128
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.8754407",
129
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.8754407",
130
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.8754407",
131
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.8754407",
132
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.8754407",
133
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.8754407",
134
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.8754407",
135
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.8754407",
136
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.8754407",
137
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.8754407",
138
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.8754407",
139
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.8754407"
140
140
  },
141
141
  "scripts": {
142
142
  "# Scrips for binding #": "_",