@rolldown/browser 1.0.0-beta.7-commit.cef50bd → 1.0.0-beta.7-commit.46fbc61

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/browser.mjs CHANGED
@@ -5,7 +5,7 @@ import "@valibot/to-json-schema";
5
5
  import * as v from "valibot";
6
6
 
7
7
  //#region package.json
8
- var version = "1.0.0-beta.7-commit.cef50bd";
8
+ var version = "1.0.0-beta.7-commit.46fbc61";
9
9
 
10
10
  //#endregion
11
11
  //#region src/builtin-plugin/utils.ts
@@ -712,7 +712,7 @@ const InputOptionsSchema = v.strictObject({
712
712
  dropLabels: v.pipe(v.optional(v.array(v.string())), v.description("Remove labeled statements with these label names")),
713
713
  checks: v.optional(ChecksOptionsSchema),
714
714
  keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name")),
715
- debug: v.pipe(v.optional(v.object({ buildId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
715
+ debug: v.pipe(v.optional(v.object({ sessionId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
716
716
  });
717
717
  const InputCliOverrideSchema = v.strictObject({
718
718
  external: v.pipe(v.optional(v.array(v.string())), v.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
@@ -1095,7 +1095,7 @@ function bindingPluginOrder(order) {
1095
1095
  }
1096
1096
 
1097
1097
  //#endregion
1098
- //#region ../../node_modules/.pnpm/oxc-parser@0.63.0/node_modules/oxc-parser/wrap.mjs
1098
+ //#region ../../node_modules/.pnpm/oxc-parser@0.64.0/node_modules/oxc-parser/wrap.mjs
1099
1099
  function wrap$1(result) {
1100
1100
  let program, module, comments, errors;
1101
1101
  return {
@@ -1211,8 +1211,9 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
1211
1211
  await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
1212
1212
  resolveFn();
1213
1213
  });
1214
- } finally {
1214
+ } catch (e) {
1215
1215
  data.loadModulePromiseMap.delete(id);
1216
+ throw e;
1216
1217
  }
1217
1218
  return promise;
1218
1219
  }
@@ -2151,7 +2152,7 @@ var PluginContextData = class {
2151
2152
  moduleOptionMap = new Map();
2152
2153
  resolveOptionsMap = new Map();
2153
2154
  loadModulePromiseMap = new Map();
2154
- meta = null;
2155
+ renderedChunkMeta = null;
2155
2156
  updateModuleOption(id, option) {
2156
2157
  const existing = this.moduleOptionMap.get(id);
2157
2158
  if (existing) {
@@ -2217,10 +2218,14 @@ var PluginContextData = class {
2217
2218
  this.resolveOptionsMap.delete(receipt);
2218
2219
  }
2219
2220
  setRenderChunkMeta(meta) {
2220
- this.meta = meta;
2221
+ this.renderedChunkMeta = meta;
2221
2222
  }
2222
2223
  getRenderChunkMeta() {
2223
- return this.meta;
2224
+ return this.renderedChunkMeta;
2225
+ }
2226
+ clear() {
2227
+ this.renderedChunkMeta = null;
2228
+ this.loadModulePromiseMap.clear();
2224
2229
  }
2225
2230
  };
2226
2231
 
@@ -2280,7 +2285,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
2280
2285
  return ret;
2281
2286
  },
2282
2287
  makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
2283
- debug: inputOptions.debug
2288
+ debug: inputOptions.debug,
2289
+ invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData)
2284
2290
  };
2285
2291
  }
2286
2292
  function bindingifyHmr(hmr) {
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
2
- const require_src = require('./shared/src-BUK_6w8K.cjs');
3
- require('./shared/parse-ast-index-C29iO6Jv.cjs');
2
+ const require_src = require('./shared/src-DoypqT02.cjs');
3
+ require('./shared/parse-ast-index-Rn-i2y3M.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const ansis = require_chunk.__toESM(require("ansis"));
6
6
  const node_process = require_chunk.__toESM(require("node:process"));
@@ -1268,7 +1268,9 @@ var Emitter = class {
1268
1268
  removeListener(ev, fn) {
1269
1269
  const list = this.listeners[ev];
1270
1270
  const i$1 = list.indexOf(fn);
1271
+ /* c8 ignore start */
1271
1272
  if (i$1 === -1) return;
1273
+ /* c8 ignore stop */
1272
1274
  if (i$1 === 0 && list.length === 1) list.length = 0;
1273
1275
  else list.splice(i$1, 1);
1274
1276
  }
@@ -1303,7 +1305,9 @@ var SignalExitFallback = class extends SignalExitBase {
1303
1305
  unload() {}
1304
1306
  };
1305
1307
  var SignalExit = class extends SignalExitBase {
1308
+ /* c8 ignore start */
1306
1309
  #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
1310
+ /* c8 ignore stop */
1307
1311
  #emitter = new Emitter();
1308
1312
  #process;
1309
1313
  #originalProcessEmit;
@@ -1317,11 +1321,14 @@ var SignalExit = class extends SignalExitBase {
1317
1321
  for (const sig of signals) this.#sigListeners[sig] = () => {
1318
1322
  const listeners = this.#process.listeners(sig);
1319
1323
  let { count } = this.#emitter;
1324
+ /* c8 ignore start */
1320
1325
  const p = process$3;
1321
1326
  if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
1327
+ /* c8 ignore stop */
1322
1328
  if (listeners.length === count) {
1323
1329
  this.unload();
1324
1330
  const ret = this.#emitter.emit("exit", null, sig);
1331
+ /* c8 ignore start */
1325
1332
  const s$1 = sig === "SIGHUP" ? this.#hupSig : sig;
1326
1333
  if (!ret) process$3.kill(process$3.pid, s$1);
1327
1334
  }
@@ -1330,7 +1337,9 @@ var SignalExit = class extends SignalExitBase {
1330
1337
  this.#originalProcessEmit = process$3.emit;
1331
1338
  }
1332
1339
  onExit(cb, opts) {
1340
+ /* c8 ignore start */
1333
1341
  if (!processOk(this.#process)) return () => {};
1342
+ /* c8 ignore stop */
1334
1343
  if (this.#loaded === false) this.load();
1335
1344
  const ev = opts?.alwaysLast ? "afterExit" : "exit";
1336
1345
  this.#emitter.on(ev, cb);
@@ -1359,18 +1368,23 @@ var SignalExit = class extends SignalExitBase {
1359
1368
  this.#loaded = false;
1360
1369
  signals.forEach((sig) => {
1361
1370
  const listener = this.#sigListeners[sig];
1371
+ /* c8 ignore start */
1362
1372
  if (!listener) throw new Error("Listener not defined for signal: " + sig);
1373
+ /* c8 ignore stop */
1363
1374
  try {
1364
1375
  this.#process.removeListener(sig, listener);
1365
1376
  } catch (_$1) {}
1377
+ /* c8 ignore stop */
1366
1378
  });
1367
1379
  this.#process.emit = this.#originalProcessEmit;
1368
1380
  this.#process.reallyExit = this.#originalProcessReallyExit;
1369
1381
  this.#emitter.count -= 1;
1370
1382
  }
1371
1383
  #processReallyExit(code) {
1384
+ /* c8 ignore start */
1372
1385
  if (!processOk(this.#process)) return 0;
1373
1386
  this.#process.exitCode = code || 0;
1387
+ /* c8 ignore stop */
1374
1388
  this.#emitter.emit("exit", this.#process.exitCode, null);
1375
1389
  return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
1376
1390
  }
@@ -1378,8 +1392,11 @@ var SignalExit = class extends SignalExitBase {
1378
1392
  const og = this.#originalProcessEmit;
1379
1393
  if (ev === "exit" && processOk(this.#process)) {
1380
1394
  if (typeof args[0] === "number") this.#process.exitCode = args[0];
1395
+ /* c8 ignore start */
1381
1396
  const ret = og.call(this.#process, ev, ...args);
1397
+ /* c8 ignore start */
1382
1398
  this.#emitter.emit("exit", this.#process.exitCode, null);
1399
+ /* c8 ignore stop */
1383
1400
  return ret;
1384
1401
  } else return og.call(this.#process, ev, ...args);
1385
1402
  }
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { __commonJS, __esm } from "./shared/chunk-BuCFLigr.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-Bf2s4YPZ.mjs";
3
- import "./shared/parse-ast-index-GcZLh6_d.mjs";
1
+ import { __commonJS, __esm } from "./shared/chunk-nENTdJ2K.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-whyHz3p3.mjs";
3
+ import "./shared/parse-ast-index-CaKd8BTZ.mjs";
4
4
  import path, { sep } from "node:path";
5
5
  import colors from "ansis";
6
6
  import process$1, { cwd } from "node:process";
@@ -760,7 +760,7 @@ function createConsola(options$1 = {}) {
760
760
  defaults: { level },
761
761
  stdout: process.stdout,
762
762
  stderr: process.stderr,
763
- prompt: (...args) => import("./shared/prompt-B3VJLbs9.mjs").then((m) => m.prompt(...args)),
763
+ prompt: (...args) => import("./shared/prompt-D713KUcE.mjs").then((m) => m.prompt(...args)),
764
764
  reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
765
765
  ...options$1
766
766
  });
@@ -1310,7 +1310,9 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1310
1310
  removeListener(ev, fn) {
1311
1311
  const list = this.listeners[ev];
1312
1312
  const i$1 = list.indexOf(fn);
1313
+ /* c8 ignore start */
1313
1314
  if (i$1 === -1) return;
1315
+ /* c8 ignore stop */
1314
1316
  if (i$1 === 0 && list.length === 1) list.length = 0;
1315
1317
  else list.splice(i$1, 1);
1316
1318
  }
@@ -1345,7 +1347,9 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1345
1347
  unload() {}
1346
1348
  };
1347
1349
  SignalExit = class extends SignalExitBase {
1350
+ /* c8 ignore start */
1348
1351
  #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
1352
+ /* c8 ignore stop */
1349
1353
  #emitter = new Emitter();
1350
1354
  #process;
1351
1355
  #originalProcessEmit;
@@ -1359,11 +1363,14 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1359
1363
  for (const sig of signals) this.#sigListeners[sig] = () => {
1360
1364
  const listeners = this.#process.listeners(sig);
1361
1365
  let { count } = this.#emitter;
1366
+ /* c8 ignore start */
1362
1367
  const p = process$3;
1363
1368
  if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
1369
+ /* c8 ignore stop */
1364
1370
  if (listeners.length === count) {
1365
1371
  this.unload();
1366
1372
  const ret = this.#emitter.emit("exit", null, sig);
1373
+ /* c8 ignore start */
1367
1374
  const s$1 = sig === "SIGHUP" ? this.#hupSig : sig;
1368
1375
  if (!ret) process$3.kill(process$3.pid, s$1);
1369
1376
  }
@@ -1372,7 +1379,9 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1372
1379
  this.#originalProcessEmit = process$3.emit;
1373
1380
  }
1374
1381
  onExit(cb, opts) {
1382
+ /* c8 ignore start */
1375
1383
  if (!processOk(this.#process)) return () => {};
1384
+ /* c8 ignore stop */
1376
1385
  if (this.#loaded === false) this.load();
1377
1386
  const ev = opts?.alwaysLast ? "afterExit" : "exit";
1378
1387
  this.#emitter.on(ev, cb);
@@ -1401,18 +1410,23 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1401
1410
  this.#loaded = false;
1402
1411
  signals.forEach((sig) => {
1403
1412
  const listener = this.#sigListeners[sig];
1413
+ /* c8 ignore start */
1404
1414
  if (!listener) throw new Error("Listener not defined for signal: " + sig);
1415
+ /* c8 ignore stop */
1405
1416
  try {
1406
1417
  this.#process.removeListener(sig, listener);
1407
1418
  } catch (_$1) {}
1419
+ /* c8 ignore stop */
1408
1420
  });
1409
1421
  this.#process.emit = this.#originalProcessEmit;
1410
1422
  this.#process.reallyExit = this.#originalProcessReallyExit;
1411
1423
  this.#emitter.count -= 1;
1412
1424
  }
1413
1425
  #processReallyExit(code) {
1426
+ /* c8 ignore start */
1414
1427
  if (!processOk(this.#process)) return 0;
1415
1428
  this.#process.exitCode = code || 0;
1429
+ /* c8 ignore stop */
1416
1430
  this.#emitter.emit("exit", this.#process.exitCode, null);
1417
1431
  return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
1418
1432
  }
@@ -1420,8 +1434,11 @@ var init_mjs = __esm({ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/
1420
1434
  const og = this.#originalProcessEmit;
1421
1435
  if (ev === "exit" && processOk(this.#process)) {
1422
1436
  if (typeof args[0] === "number") this.#process.exitCode = args[0];
1437
+ /* c8 ignore start */
1423
1438
  const ret = og.call(this.#process, ev, ...args);
1439
+ /* c8 ignore start */
1424
1440
  this.#emitter.emit("exit", this.#process.exitCode, null);
1441
+ /* c8 ignore stop */
1425
1442
  return ret;
1426
1443
  } else return og.call(this.#process, ev, ...args);
1427
1444
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
3
- const require_src = require('./shared/src-BUK_6w8K.cjs');
4
- require('./shared/parse-ast-index-C29iO6Jv.cjs');
3
+ const require_src = require('./shared/src-DoypqT02.cjs');
4
+ require('./shared/parse-ast-index-Rn-i2y3M.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
7
7
 
@@ -74,6 +74,7 @@ Object.defineProperty(exports, 'moduleRunnerTransform', {
74
74
  }
75
75
  });
76
76
  exports.replacePlugin = replacePlugin
77
+ exports.reportPlugin = require_src.reportPlugin
77
78
  exports.scan = experimental_scan
78
79
  Object.defineProperty(exports, 'transform', {
79
80
  enumerable: true,
@@ -1,5 +1,5 @@
1
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-Bf2s4YPZ.mjs";
2
- import "./shared/parse-ast-index-GcZLh6_d.mjs";
1
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-whyHz3p3.mjs";
2
+ import "./shared/parse-ast-index-CaKd8BTZ.mjs";
3
3
  import { moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
4
4
  import { pathToFileURL } from "node:url";
5
5
 
@@ -64,4 +64,4 @@ init_compose_js_plugins();
64
64
  init_constructors();
65
65
 
66
66
  //#endregion
67
- export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
67
+ export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- const require_src = require('./shared/src-BUK_6w8K.cjs');
2
- require('./shared/parse-ast-index-C29iO6Jv.cjs');
1
+ const require_src = require('./shared/src-DoypqT02.cjs');
2
+ require('./shared/parse-ast-index-Rn-i2y3M.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
5
5
  exports.build = require_src.build
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-Bf2s4YPZ.mjs";
2
- import "./shared/parse-ast-index-GcZLh6_d.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-whyHz3p3.mjs";
2
+ import "./shared/parse-ast-index-CaKd8BTZ.mjs";
3
3
 
4
4
  init_src();
5
5
  export { VERSION, build, defineConfig, rolldown, watch, withFilter };
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
2
- const require_src = require('./shared/src-BUK_6w8K.cjs');
3
- require('./shared/parse-ast-index-C29iO6Jv.cjs');
2
+ const require_src = require('./shared/src-DoypqT02.cjs');
3
+ require('./shared/parse-ast-index-Rn-i2y3M.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
@@ -1,6 +1,6 @@
1
- import { __commonJS } from "./shared/chunk-BuCFLigr.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-Bf2s4YPZ.mjs";
3
- import "./shared/parse-ast-index-GcZLh6_d.mjs";
1
+ import { __commonJS } from "./shared/chunk-nENTdJ2K.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-whyHz3p3.mjs";
3
+ import "./shared/parse-ast-index-CaKd8BTZ.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
6
6
 
@@ -1,4 +1,3 @@
1
-
2
1
  //#region src/plugin/parallel-plugin-implementation.ts
3
2
  function defineParallelPluginImplementation(plugin) {
4
3
  return plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-C29iO6Jv.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-Rn-i2y3M.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
@@ -1,4 +1,4 @@
1
- import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-GcZLh6_d.mjs";
1
+ import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-CaKd8BTZ.mjs";
2
2
 
3
3
  init_parse_ast_index();
4
4
  export { parseAst, parseAstAsync };
@@ -1,4 +1,3 @@
1
-
2
1
  //#region rolldown:runtime
3
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
3
  var __esm = (fn, res) => function() {
@@ -1,4 +1,4 @@
1
- import { __esm } from "./chunk-BuCFLigr.mjs";
1
+ import { __esm } from "./chunk-nENTdJ2K.mjs";
2
2
  import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
3
3
  import colors from "ansis";
4
4
 
@@ -184,7 +184,7 @@ var init_logs = __esm({ "src/log/logs.ts"() {
184
184
  } });
185
185
 
186
186
  //#endregion
187
- //#region ../../node_modules/.pnpm/oxc-parser@0.63.0/node_modules/oxc-parser/wrap.mjs
187
+ //#region ../../node_modules/.pnpm/oxc-parser@0.64.0/node_modules/oxc-parser/wrap.mjs
188
188
  function wrap$1(result) {
189
189
  let program, module, comments, errors;
190
190
  return {
@@ -220,7 +220,7 @@ function jsonParseAst(ast) {
220
220
  return value;
221
221
  });
222
222
  }
223
- var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.63.0/node_modules/oxc-parser/wrap.mjs"() {} });
223
+ var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.64.0/node_modules/oxc-parser/wrap.mjs"() {} });
224
224
 
225
225
  //#endregion
226
226
  //#region src/parse-ast-index.ts
@@ -176,7 +176,7 @@ function augmentCodeLocation(properties, pos, source, id) {
176
176
  }
177
177
 
178
178
  //#endregion
179
- //#region ../../node_modules/.pnpm/oxc-parser@0.63.0/node_modules/oxc-parser/wrap.mjs
179
+ //#region ../../node_modules/.pnpm/oxc-parser@0.64.0/node_modules/oxc-parser/wrap.mjs
180
180
  function wrap$1(result) {
181
181
  let program, module$1, comments, errors;
182
182
  return {
@@ -1,4 +1,4 @@
1
- import { __esm } from "./chunk-BuCFLigr.mjs";
1
+ import { __esm } from "./chunk-nENTdJ2K.mjs";
2
2
  import process$1, { stdin, stdout } from "node:process";
3
3
  import { WriteStream } from "node:tty";
4
4
  import f from "node:readline";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-Dc32QXFI.cjs');
3
- const require_parse_ast_index = require('./parse-ast-index-C29iO6Jv.cjs');
3
+ const require_parse_ast_index = require('./parse-ast-index-Rn-i2y3M.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
5
5
  const node_path = require_chunk.__toESM(require("node:path"));
6
6
  const ansis = require_chunk.__toESM(require("ansis"));
@@ -10,7 +10,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
10
10
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
11
11
 
12
12
  //#region package.json
13
- var version = "1.0.0-beta.7-commit.cef50bd";
13
+ var version = "1.0.0-beta.7-commit.46fbc61";
14
14
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
15
15
 
16
16
  //#endregion
@@ -47,6 +47,9 @@ function dynamicImportVarsPlugin() {
47
47
  function importGlobPlugin(config) {
48
48
  return new BuiltinPlugin("builtin:import-glob", config);
49
49
  }
50
+ function reportPlugin(config) {
51
+ return new BuiltinPlugin("builtin:report", config);
52
+ }
50
53
  function manifestPlugin(config) {
51
54
  return new BuiltinPlugin("builtin:manifest", config);
52
55
  }
@@ -611,7 +614,7 @@ const InputOptionsSchema = valibot.strictObject({
611
614
  dropLabels: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Remove labeled statements with these label names")),
612
615
  checks: valibot.optional(ChecksOptionsSchema),
613
616
  keepNames: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Keep function/class name")),
614
- debug: valibot.pipe(valibot.optional(valibot.object({ buildId: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Used to name the build.")) })), valibot.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
617
+ debug: valibot.pipe(valibot.optional(valibot.object({ sessionId: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Used to name the build.")) })), valibot.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
615
618
  });
616
619
  const InputCliOverrideSchema = valibot.strictObject({
617
620
  external: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
@@ -1054,8 +1057,9 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
1054
1057
  await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
1055
1058
  resolveFn();
1056
1059
  });
1057
- } finally {
1060
+ } catch (e) {
1058
1061
  data.loadModulePromiseMap.delete(id);
1062
+ throw e;
1059
1063
  }
1060
1064
  return promise;
1061
1065
  }
@@ -1994,7 +1998,7 @@ var PluginContextData = class {
1994
1998
  moduleOptionMap = new Map();
1995
1999
  resolveOptionsMap = new Map();
1996
2000
  loadModulePromiseMap = new Map();
1997
- meta = null;
2001
+ renderedChunkMeta = null;
1998
2002
  updateModuleOption(id, option) {
1999
2003
  const existing = this.moduleOptionMap.get(id);
2000
2004
  if (existing) {
@@ -2060,10 +2064,14 @@ var PluginContextData = class {
2060
2064
  this.resolveOptionsMap.delete(receipt);
2061
2065
  }
2062
2066
  setRenderChunkMeta(meta) {
2063
- this.meta = meta;
2067
+ this.renderedChunkMeta = meta;
2064
2068
  }
2065
2069
  getRenderChunkMeta() {
2066
- return this.meta;
2070
+ return this.renderedChunkMeta;
2071
+ }
2072
+ clear() {
2073
+ this.renderedChunkMeta = null;
2074
+ this.loadModulePromiseMap.clear();
2067
2075
  }
2068
2076
  };
2069
2077
 
@@ -2123,7 +2131,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
2123
2131
  return ret;
2124
2132
  },
2125
2133
  makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
2126
- debug: inputOptions.debug
2134
+ debug: inputOptions.debug,
2135
+ invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData)
2127
2136
  };
2128
2137
  }
2129
2138
  function bindingifyHmr(hmr) {
@@ -3097,6 +3106,12 @@ Object.defineProperty(exports, 'normalizedStringOrRegex', {
3097
3106
  return normalizedStringOrRegex;
3098
3107
  }
3099
3108
  });
3109
+ Object.defineProperty(exports, 'reportPlugin', {
3110
+ enumerable: true,
3111
+ get: function () {
3112
+ return reportPlugin;
3113
+ }
3114
+ });
3100
3115
  Object.defineProperty(exports, 'rolldown', {
3101
3116
  enumerable: true,
3102
3117
  get: function () {
@@ -1,5 +1,5 @@
1
- import { __esm } from "./chunk-BuCFLigr.mjs";
2
- import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-GcZLh6_d.mjs";
1
+ import { __esm } from "./chunk-nENTdJ2K.mjs";
2
+ import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-CaKd8BTZ.mjs";
3
3
  import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
4
4
  import path from "node:path";
5
5
  import colors from "ansis";
@@ -9,7 +9,7 @@ import { availableParallelism } from "node:os";
9
9
  import { Worker } from "node:worker_threads";
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.7-commit.cef50bd";
12
+ var version = "1.0.0-beta.7-commit.46fbc61";
13
13
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -41,6 +41,9 @@ function dynamicImportVarsPlugin() {
41
41
  function importGlobPlugin(config) {
42
42
  return new BuiltinPlugin("builtin:import-glob", config);
43
43
  }
44
+ function reportPlugin(config) {
45
+ return new BuiltinPlugin("builtin:report", config);
46
+ }
44
47
  function manifestPlugin(config) {
45
48
  return new BuiltinPlugin("builtin:manifest", config);
46
49
  }
@@ -704,7 +707,7 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
704
707
  dropLabels: v.pipe(v.optional(v.array(v.string())), v.description("Remove labeled statements with these label names")),
705
708
  checks: v.optional(ChecksOptionsSchema),
706
709
  keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name")),
707
- debug: v.pipe(v.optional(v.object({ buildId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
710
+ debug: v.pipe(v.optional(v.object({ sessionId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
708
711
  });
709
712
  InputCliOverrideSchema = v.strictObject({
710
713
  external: v.pipe(v.optional(v.array(v.string())), v.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
@@ -1141,8 +1144,9 @@ var init_plugin_context = __esm({ "src/plugin/plugin-context.ts"() {
1141
1144
  await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
1142
1145
  resolveFn();
1143
1146
  });
1144
- } finally {
1147
+ } catch (e$5) {
1145
1148
  data.loadModulePromiseMap.delete(id);
1149
+ throw e$5;
1146
1150
  }
1147
1151
  return promise;
1148
1152
  }
@@ -2147,7 +2151,7 @@ var init_plugin_context_data = __esm({ "src/plugin/plugin-context-data.ts"() {
2147
2151
  moduleOptionMap = new Map();
2148
2152
  resolveOptionsMap = new Map();
2149
2153
  loadModulePromiseMap = new Map();
2150
- meta = null;
2154
+ renderedChunkMeta = null;
2151
2155
  updateModuleOption(id, option) {
2152
2156
  const existing = this.moduleOptionMap.get(id);
2153
2157
  if (existing) {
@@ -2213,10 +2217,14 @@ var init_plugin_context_data = __esm({ "src/plugin/plugin-context-data.ts"() {
2213
2217
  this.resolveOptionsMap.delete(receipt);
2214
2218
  }
2215
2219
  setRenderChunkMeta(meta) {
2216
- this.meta = meta;
2220
+ this.renderedChunkMeta = meta;
2217
2221
  }
2218
2222
  getRenderChunkMeta() {
2219
- return this.meta;
2223
+ return this.renderedChunkMeta;
2224
+ }
2225
+ clear() {
2226
+ this.renderedChunkMeta = null;
2227
+ this.loadModulePromiseMap.clear();
2220
2228
  }
2221
2229
  };
2222
2230
  } });
@@ -2278,7 +2286,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
2278
2286
  return ret;
2279
2287
  },
2280
2288
  makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
2281
- debug: inputOptions.debug
2289
+ debug: inputOptions.debug,
2290
+ invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData)
2282
2291
  };
2283
2292
  }
2284
2293
  function bindingifyHmr(hmr) {
@@ -4372,4 +4381,4 @@ var init_src = __esm({ "src/index.ts"() {
4372
4381
  } });
4373
4382
 
4374
4383
  //#endregion
4375
- export { BuiltinPlugin, PluginContextData, VERSION, arraify, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_misc, init_normalize_string_or_regex, init_plugin_context_data, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };
4384
+ export { BuiltinPlugin, PluginContextData, VERSION, arraify, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_misc, init_normalize_string_or_regex, init_plugin_context_data, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };
@@ -242,7 +242,8 @@ export type BindingBuiltinPluginName = 'builtin:wasm-helper'|
242
242
  'builtin:replace'|
243
243
  'builtin:vite-resolve'|
244
244
  'builtin:module-federation'|
245
- 'builtin:isolated-declaration';
245
+ 'builtin:isolated-declaration'|
246
+ 'builtin:report';
246
247
 
247
248
  export interface BindingBundlerOptions {
248
249
  inputOptions: BindingInputOptions
@@ -265,7 +266,7 @@ export interface BindingChecksOptions {
265
266
  }
266
267
 
267
268
  export interface BindingDebugOptions {
268
- buildId?: string
269
+ sessionId?: string
269
270
  }
270
271
 
271
272
  export interface BindingDeferSyncScanData {
@@ -419,6 +420,7 @@ export interface BindingInputOptions {
419
420
  deferSyncScanData?: undefined | (() => BindingDeferSyncScanData[])
420
421
  makeAbsoluteExternalsRelative?: BindingMakeAbsoluteExternalsRelative
421
422
  debug?: BindingDebugOptions
423
+ invalidateJsSideCache?: () => void
422
424
  }
423
425
 
424
426
  export interface BindingIsolatedDeclarationPluginConfig {
@@ -662,6 +664,10 @@ export interface BindingReplacePluginConfig {
662
664
  sourcemap?: boolean
663
665
  }
664
666
 
667
+ export interface BindingReportPluginConfig {
668
+ isTty: boolean
669
+ }
670
+
665
671
  export type BindingResolvedExternal =
666
672
  | { type: 'Bool', field0: boolean }
667
673
  | { type: 'Absolute' }
@@ -1,4 +1,4 @@
1
- import { BindingBuildImportAnalysisPluginConfig, type BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, type BindingViteResolvePluginConfig } from '../binding';
1
+ import { BindingBuildImportAnalysisPluginConfig, type BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingReportPluginConfig, type BindingViteResolvePluginConfig } from '../binding';
2
2
  export declare class BuiltinPlugin {
3
3
  name: BindingBuiltinPluginName;
4
4
  _options?: unknown | undefined;
@@ -7,6 +7,7 @@ export declare class BuiltinPlugin {
7
7
  export declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
8
8
  export declare function dynamicImportVarsPlugin(): BuiltinPlugin;
9
9
  export declare function importGlobPlugin(config?: BindingGlobImportPluginConfig): BuiltinPlugin;
10
+ export declare function reportPlugin(config?: BindingReportPluginConfig): BuiltinPlugin;
10
11
  export declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
11
12
  export declare function wasmHelperPlugin(): BuiltinPlugin;
12
13
  export declare function wasmFallbackPlugin(): BuiltinPlugin;
@@ -3,7 +3,7 @@ export { moduleRunnerTransform, transform } from './binding';
3
3
  export type { TransformOptions, TransformResult } from './binding';
4
4
  export { defineParallelPlugin } from './plugin/parallel-plugin';
5
5
  export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins';
6
- export { buildImportAnalysisPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, } from './builtin-plugin/constructors';
6
+ export { buildImportAnalysisPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, } from './builtin-plugin/constructors';
7
7
  export { aliasPlugin } from './builtin-plugin/alias-plugin';
8
8
  export { replacePlugin } from './builtin-plugin/replace-plugin';
9
9
  export { transformPlugin } from './builtin-plugin/transform-plugin';
@@ -173,7 +173,7 @@ export interface InputOptions {
173
173
  checks?: ChecksOptions;
174
174
  makeAbsoluteExternalsRelative?: MakeAbsoluteExternalsRelative;
175
175
  debug?: {
176
- buildId?: string;
176
+ sessionId?: string;
177
177
  };
178
178
  }
179
179
  interface OverwriteInputOptionsForCli {
@@ -0,0 +1,29 @@
1
+ export declare enum HookUsageKind {
2
+ buildStart = 1,
3
+ resolveId = 2,
4
+ resolveDynamicImport = 4,
5
+ load = 8,
6
+ transform = 16,
7
+ moduleParsed = 32,
8
+ buildEnd = 64,
9
+ renderStart = 128,
10
+ renderError = 256,
11
+ renderChunk = 512,
12
+ augmentChunkHash = 1024,
13
+ generateBundle = 2048,
14
+ writeBundle = 4096,
15
+ closeBundle = 8192,
16
+ watchChange = 16384,
17
+ closeWatcher = 32768,
18
+ transformAst = 65536,
19
+ banner = 131072,
20
+ footer = 262144,
21
+ intro = 524288,
22
+ outro = 1048576
23
+ }
24
+ export declare class HookUsage {
25
+ bitflag: bigint;
26
+ constructor(bitflag: bigint);
27
+ union(kind: HookUsageKind): void;
28
+ inner(): number;
29
+ }
@@ -7,7 +7,7 @@ export declare class PluginContextData {
7
7
  moduleOptionMap: Map<string, ModuleOptions>;
8
8
  resolveOptionsMap: Map<number, PluginContextResolveOptions>;
9
9
  loadModulePromiseMap: Map<string, Promise<void>>;
10
- meta: RenderedChunkMeta | null;
10
+ renderedChunkMeta: RenderedChunkMeta | null;
11
11
  updateModuleOption(id: string, option: ModuleOptions): ModuleOptions;
12
12
  getModuleOption(id: string): ModuleOptions;
13
13
  getModuleInfo(id: string, context: BindingPluginContext): ModuleInfo | null;
@@ -18,4 +18,5 @@ export declare class PluginContextData {
18
18
  removeSavedResolveOptions(receipt: number): void;
19
19
  setRenderChunkMeta(meta: RenderedChunkMeta): void;
20
20
  getRenderChunkMeta(): RenderedChunkMeta | null;
21
+ clear(): void;
21
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.7-commit.cef50bd",
3
+ "version": "1.0.0-beta.7-commit.46fbc61",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -59,14 +59,14 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@napi-rs/wasm-runtime": "^0.2.8",
62
- "@oxc-project/types": "0.63.0",
62
+ "@oxc-project/types": "0.64.0",
63
63
  "@valibot/to-json-schema": "1.0.0",
64
64
  "ansis": "^3.17.0",
65
65
  "pathe": "^2.0.3",
66
66
  "valibot": "1.0.0"
67
67
  },
68
68
  "peerDependencies": {
69
- "@oxc-project/runtime": "0.63.0"
69
+ "@oxc-project/runtime": "0.64.0"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@oxc-project/runtime": {