rolldown 1.1.1 → 1.1.3

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.
Files changed (33) hide show
  1. package/dist/cli.mjs +25 -14
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/experimental-index.d.mts +15 -5
  5. package/dist/experimental-index.mjs +21 -16
  6. package/dist/filter-index.d.mts +1 -1
  7. package/dist/index.d.mts +2 -2
  8. package/dist/index.mjs +4 -4
  9. package/dist/parallel-plugin-worker.mjs +2 -2
  10. package/dist/parallel-plugin.d.mts +1 -1
  11. package/dist/parse-ast-index.d.mts +1 -1
  12. package/dist/parse-ast-index.mjs +1 -1
  13. package/dist/plugins-index.d.mts +3 -3
  14. package/dist/plugins-index.mjs +2 -2
  15. package/dist/shared/{binding-DgGsNpT9.d.mts → binding-B1q9aYT-.d.mts} +65 -142
  16. package/dist/shared/{binding-CfwqjDbP.mjs → binding-Dh6LYCIB.mjs} +39 -34
  17. package/dist/shared/{bindingify-input-options-B7_WBoOp.mjs → bindingify-input-options-CzVhGygm.mjs} +1329 -1330
  18. package/dist/shared/{constructors-DnT9y_13.mjs → constructors-688OwP2q.mjs} +2 -5
  19. package/dist/shared/{constructors-Bx1tSad6.d.mts → constructors-awZ1VNvg.d.mts} +3 -4
  20. package/dist/shared/{define-config-ChOOV2QZ.d.mts → define-config-sxBscJ3M.d.mts} +1 -1
  21. package/dist/shared/{error-C0TrL0_H.mjs → error-B68YLzl3.mjs} +1 -1
  22. package/dist/shared/{load-config-BDGEgD4M.mjs → load-config-BvPPEM7l.mjs} +1 -1
  23. package/dist/shared/{normalize-string-or-regex-DGbe3BlX.mjs → normalize-string-or-regex-BpXHYeN4.mjs} +1 -1
  24. package/dist/shared/{parse-yrGA-p2H.mjs → parse-CTgsjpo8.mjs} +2 -2
  25. package/dist/shared/{prompt-DYnaB1Nb.mjs → prompt-B1Yc1NPt.mjs} +5 -5
  26. package/dist/shared/{resolve-tsconfig-D3YLh9ff.mjs → resolve-tsconfig-BkhP9bkX.mjs} +2 -2
  27. package/dist/shared/{rolldown-Bkyb2CgX.mjs → rolldown-Brph2NSU.mjs} +1 -1
  28. package/dist/shared/{rolldown-build-abS241_6.mjs → rolldown-build-DR0wzp0V.mjs} +24 -56
  29. package/dist/shared/{transform-C-XSNVrd.d.mts → transform-CEmFsvJW.d.mts} +1 -1
  30. package/dist/shared/{watch-eT_pxdfY.mjs → watch-FrHSqg24.mjs} +4 -4
  31. package/dist/utils-index.d.mts +3 -3
  32. package/dist/utils-index.mjs +6 -6
  33. package/package.json +23 -23
@@ -1,4 +1,4 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DGbe3BlX.mjs";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-BpXHYeN4.mjs";
2
2
  //#region src/builtin-plugin/constructors.ts
3
3
  function viteModulePreloadPolyfillPlugin(config) {
4
4
  return new BuiltinPlugin("builtin:vite-module-preload-polyfill", config);
@@ -16,9 +16,6 @@ function viteImportGlobPlugin(config) {
16
16
  function viteReporterPlugin(config) {
17
17
  return new BuiltinPlugin("builtin:vite-reporter", config);
18
18
  }
19
- function viteWasmFallbackPlugin() {
20
- return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-wasm-fallback"));
21
- }
22
19
  function viteLoadFallbackPlugin() {
23
20
  return new BuiltinPlugin("builtin:vite-load-fallback");
24
21
  }
@@ -65,4 +62,4 @@ function viteReactRefreshWrapperPlugin(config) {
65
62
  return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-react-refresh-wrapper", config));
66
63
  }
67
64
  //#endregion
68
- export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
65
+ export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWebWorkerPostPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
@@ -1,5 +1,5 @@
1
- import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-DgGsNpT9.mjs";
2
- import { P as BuiltinPlugin, Ut as StringOrRegExp } from "./define-config-ChOOV2QZ.mjs";
1
+ import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-B1q9aYT-.mjs";
2
+ import { P as BuiltinPlugin, Ut as StringOrRegExp } from "./define-config-sxBscJ3M.mjs";
3
3
 
4
4
  //#region src/builtin-plugin/constructors.d.ts
5
5
  declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
@@ -10,7 +10,6 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
10
10
  declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
11
11
  declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
12
12
  declare function viteReporterPlugin(config: BindingViteReporterPluginConfig): BuiltinPlugin;
13
- declare function viteWasmFallbackPlugin(): BuiltinPlugin;
14
13
  declare function viteLoadFallbackPlugin(): BuiltinPlugin;
15
14
  declare function viteJsonPlugin(config: BindingViteJsonPluginConfig): BuiltinPlugin;
16
15
  declare function viteBuildImportAnalysisPlugin(config: BindingViteBuildImportAnalysisPluginConfig): BuiltinPlugin;
@@ -34,4 +33,4 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
34
33
  declare function oxcRuntimePlugin(): BuiltinPlugin;
35
34
  declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
36
35
  //#endregion
37
- export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWasmFallbackPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
36
+ export { viteDynamicImportVarsPlugin as a, viteLoadFallbackPlugin as c, viteReporterPlugin as d, viteResolvePlugin as f, viteBuildImportAnalysisPlugin as i, viteModulePreloadPolyfillPlugin as l, isolatedDeclarationPlugin as n, viteImportGlobPlugin as o, viteWebWorkerPostPlugin as p, oxcRuntimePlugin as r, viteJsonPlugin as s, esmExternalRequirePlugin as t, viteReactRefreshWrapperPlugin as u };
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BSNejiLS.mjs";
2
- import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, t as BindingBuiltinPluginName, u as BindingMagicString, z as PreRenderedChunk } from "./binding-DgGsNpT9.mjs";
2
+ import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, t as BindingBuiltinPluginName, u as BindingMagicString, z as PreRenderedChunk } from "./binding-B1q9aYT-.mjs";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
  import { Program } from "@oxc-project/types";
5
5
 
@@ -1,4 +1,4 @@
1
- import { t as require_binding } from "./binding-CfwqjDbP.mjs";
1
+ import { t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
2
  //#region src/types/sourcemap.ts
3
3
  function bindingifySourcemap(map) {
4
4
  if (map == null) return;
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-Bkyb2CgX.mjs";
1
+ import { t as rolldown } from "./rolldown-Brph2NSU.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { readdir } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CfwqjDbP.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
2
  import { c as logPluginError, n as error } from "./logs-aMKUxRpj.mjs";
3
3
  //#region src/builtin-plugin/utils.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CfwqjDbP.mjs";
2
- //#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/wrap.js
1
+ import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
+ //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
4
4
  function wrap(result) {
5
5
  let program, module, comments, errors;
@@ -1,4 +1,4 @@
1
- import process$1, { stdin, stdout } from "node:process";
1
+ import g$1, { stdin, stdout } from "node:process";
2
2
  import { WriteStream } from "node:tty";
3
3
  import f from "node:readline";
4
4
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
@@ -331,7 +331,7 @@ function sD() {
331
331
  }
332
332
  }), r;
333
333
  }
334
- const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u) => A$1(u)), _ = (t, u, F) => {
334
+ const iD = sD(), v = /* @__PURE__ */ new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u) => A$1(u)), _ = (t, u, F) => {
335
335
  const e = [...u];
336
336
  let s = false, i = false, D = A$1(T$1(t[t.length - 1]));
337
337
  for (const [C, o] of e.entries()) {
@@ -399,7 +399,7 @@ function G(t, u, F) {
399
399
  `);
400
400
  }
401
401
  const c = {
402
- actions: new Set([
402
+ actions: /* @__PURE__ */ new Set([
403
403
  "up",
404
404
  "down",
405
405
  "left",
@@ -408,7 +408,7 @@ const c = {
408
408
  "enter",
409
409
  "cancel"
410
410
  ]),
411
- aliases: new Map([
411
+ aliases: /* @__PURE__ */ new Map([
412
412
  ["k", "up"],
413
413
  ["j", "down"],
414
414
  ["h", "left"],
@@ -646,7 +646,7 @@ var PD = class extends x {
646
646
  }
647
647
  };
648
648
  function ce() {
649
- return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
649
+ return g$1.platform !== "win32" ? g$1.env.TERM !== "linux" : !!g$1.env.CI || !!g$1.env.WT_SESSION || !!g$1.env.TERMINUS_SUBLIME || g$1.env.ConEmuTask === "{cmd::Cmder}" || g$1.env.TERM_PROGRAM === "Terminus-Sublime" || g$1.env.TERM_PROGRAM === "vscode" || g$1.env.TERM === "xterm-256color" || g$1.env.TERM === "alacritty" || g$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
650
650
  }
651
651
  const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"), W = u("▲", "x"), C = u("✔", "√"), o = u(""), d = u(""), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), w = (t) => {
652
652
  switch (t) {
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CfwqjDbP.mjs";
2
- import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-C0TrL0_H.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
+ import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-B68YLzl3.mjs";
3
3
  //#region src/utils/minify.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-abS241_6.mjs";
1
+ import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-DR0wzp0V.mjs";
2
2
  //#region src/api/rolldown/index.ts
3
3
  /**
4
4
  * The API compatible with Rollup's `rollup` function.
@@ -1,13 +1,13 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CfwqjDbP.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
2
  import { i as logInputHookInOutputPlugin, n as error } from "./logs-aMKUxRpj.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-DGbe3BlX.mjs";
4
- import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-B7_WBoOp.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-BpXHYeN4.mjs";
4
+ import { a as transformModuleInfo, c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as PluginContextData, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-CzVhGygm.mjs";
5
5
  import { i as unimplemented } from "./misc-CoQm4NHO.mjs";
6
- import { i as unwrapBindingResult } from "./error-C0TrL0_H.mjs";
6
+ import { i as unwrapBindingResult } from "./error-B68YLzl3.mjs";
7
7
  import { Worker } from "node:worker_threads";
8
8
  import path, { sep } from "node:path";
9
9
  import { formatWithOptions, styleText } from "node:util";
10
- import process$1 from "node:process";
10
+ import g$1 from "node:process";
11
11
  import * as tty from "node:tty";
12
12
  import os from "node:os";
13
13
  //#region src/log/logger.ts
@@ -1470,43 +1470,7 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
1470
1470
  plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
1471
1471
  styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
1472
1472
  taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1473
- })), /* @__PURE__ */ description("Third-party plugins to use")),
1474
- reactCompiler: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
1475
- compilationMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1476
- /* @__PURE__ */ literal("infer"),
1477
- /* @__PURE__ */ literal("syntax"),
1478
- /* @__PURE__ */ literal("annotation"),
1479
- /* @__PURE__ */ literal("all")
1480
- ])),
1481
- panicThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1482
- /* @__PURE__ */ literal("none"),
1483
- /* @__PURE__ */ literal("critical_errors"),
1484
- /* @__PURE__ */ literal("all_errors")
1485
- ])),
1486
- target: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1487
- /* @__PURE__ */ literal("17"),
1488
- /* @__PURE__ */ literal("18"),
1489
- /* @__PURE__ */ literal("19")
1490
- ])),
1491
- noEmit: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1492
- outputMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1493
- /* @__PURE__ */ literal("client"),
1494
- /* @__PURE__ */ literal("ssr"),
1495
- /* @__PURE__ */ literal("lint")
1496
- ])),
1497
- ignoreUseNoForget: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1498
- flowSuppressions: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1499
- enableReanimated: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1500
- isDev: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1501
- filename: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1502
- eslintSuppressionRules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
1503
- customOptOutDirectives: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
1504
- gating: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1505
- source: /* @__PURE__ */ string(),
1506
- importSpecifierName: /* @__PURE__ */ string()
1507
- })),
1508
- dynamicGating: /* @__PURE__ */ optional(/* @__PURE__ */ object({ source: /* @__PURE__ */ string() }))
1509
- })]))
1473
+ })), /* @__PURE__ */ description("Third-party plugins to use"))
1510
1474
  });
1511
1475
  const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
1512
1476
  usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
@@ -1957,15 +1921,14 @@ __decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
1957
1921
  //#region src/types/chunking-context.ts
1958
1922
  var ChunkingContextImpl = class {
1959
1923
  context;
1960
- constructor(context) {
1924
+ pluginContextData;
1925
+ constructor(context, pluginContextData) {
1961
1926
  this.context = context;
1927
+ this.pluginContextData = pluginContextData;
1962
1928
  }
1963
1929
  getModuleInfo(moduleId) {
1964
1930
  const bindingInfo = this.context.getModuleInfo(moduleId);
1965
- if (bindingInfo) return transformModuleInfo(bindingInfo, {
1966
- moduleSideEffects: null,
1967
- meta: {}
1968
- });
1931
+ if (bindingInfo) return transformModuleInfo(bindingInfo, this.pluginContextData.getModuleOption(moduleId));
1969
1932
  return null;
1970
1933
  }
1971
1934
  };
@@ -2816,9 +2779,9 @@ function stringWidth$1(string, options = {}) {
2816
2779
  return width;
2817
2780
  }
2818
2781
  function isUnicodeSupported() {
2819
- const { env } = process$1;
2782
+ const { env } = g$1;
2820
2783
  const { TERM, TERM_PROGRAM } = env;
2821
- if (process$1.platform !== "win32") return TERM !== "linux";
2784
+ if (g$1.platform !== "win32") return TERM !== "linux";
2822
2785
  return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2823
2786
  }
2824
2787
  const TYPE_COLOR_MAP = {
@@ -2905,7 +2868,7 @@ function createConsola(options = {}) {
2905
2868
  defaults: { level },
2906
2869
  stdout: process.stdout,
2907
2870
  stderr: process.stderr,
2908
- prompt: (...args) => import("./prompt-DYnaB1Nb.mjs").then((m) => m.prompt(...args)),
2871
+ prompt: (...args) => import("./prompt-B1Yc1NPt.mjs").then((m) => m.prompt(...args)),
2909
2872
  reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
2910
2873
  ...options
2911
2874
  });
@@ -2945,10 +2908,10 @@ function createTestingLogger() {
2945
2908
  }
2946
2909
  //#endregion
2947
2910
  //#region src/utils/bindingify-output-options.ts
2948
- function bindingifyOutputOptions(outputOptions) {
2911
+ function bindingifyOutputOptions(outputOptions, pluginContextData) {
2949
2912
  const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
2950
2913
  if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
2951
- const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
2914
+ const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks, pluginContextData);
2952
2915
  return {
2953
2916
  dir,
2954
2917
  file: file == null ? void 0 : file,
@@ -3042,7 +3005,7 @@ function bindingifyComments(comments) {
3042
3005
  if (typeof comments === "boolean") return comments;
3043
3006
  return comments;
3044
3007
  }
3045
- function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks) {
3008
+ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks, pluginContextData) {
3046
3009
  let inlineDynamicImports;
3047
3010
  let effectiveChunksOption;
3048
3011
  if (codeSplitting === false) {
@@ -3075,6 +3038,10 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3075
3038
  else if (manualChunks != null) effectiveChunksOption = { groups: [{ name(moduleId, ctx) {
3076
3039
  return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
3077
3040
  } }] };
3041
+ if (inlineDynamicImports === true && effectiveChunksOption != null) {
3042
+ logger.warn("`advancedChunks` option is ignored because `inlineDynamicImports: true` disables code splitting.");
3043
+ effectiveChunksOption = void 0;
3044
+ }
3078
3045
  let advancedChunksResult;
3079
3046
  if (effectiveChunksOption != null) {
3080
3047
  const { groups, ...restOptions } = effectiveChunksOption;
@@ -3084,7 +3051,7 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3084
3051
  const { name, ...restGroup } = group;
3085
3052
  return {
3086
3053
  ...restGroup,
3087
- name: typeof name === "function" ? (id, ctx) => name(id, new ChunkingContextImpl(ctx)) : name
3054
+ name: typeof name === "function" ? (id, ctx) => name(id, new ChunkingContextImpl(ctx, pluginContextData)) : name
3088
3055
  };
3089
3056
  })
3090
3057
  };
@@ -3170,10 +3137,11 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
3170
3137
  const parallelPluginInitResult = await initializeParallelPlugins(plugins);
3171
3138
  if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
3172
3139
  try {
3140
+ const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins);
3173
3141
  return {
3174
3142
  bundlerOptions: {
3175
- inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode),
3176
- outputOptions: bindingifyOutputOptions(outputOptions),
3143
+ inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode),
3144
+ outputOptions: bindingifyOutputOptions(outputOptions, pluginContextData),
3177
3145
  parallelPluginsRegistry: parallelPluginInitResult?.registry
3178
3146
  },
3179
3147
  inputOptions,
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
2
- import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-DgGsNpT9.mjs";
2
+ import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-B1q9aYT-.mjs";
3
3
 
4
4
  //#region src/utils/resolve-tsconfig.d.ts
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CfwqjDbP.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
2
  import { o as logMultipleWatcherOption } from "./logs-aMKUxRpj.mjs";
3
- import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-B7_WBoOp.mjs";
3
+ import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-CzVhGygm.mjs";
4
4
  import { t as arraify } from "./misc-CoQm4NHO.mjs";
5
- import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-abS241_6.mjs";
6
- import { t as aggregateBindingErrorsIntoJsError } from "./error-C0TrL0_H.mjs";
5
+ import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-DR0wzp0V.mjs";
6
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-B68YLzl3.mjs";
7
7
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
8
8
  /**
9
9
  * This is not the set of all possible signals.
@@ -1,9 +1,9 @@
1
- import { _ as BindingTsconfigRawOptions, g as BindingTsconfigCompilerOptions } from "./shared/binding-DgGsNpT9.mjs";
2
- import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-C-XSNVrd.mjs";
1
+ import { _ as BindingTsconfigRawOptions, g as BindingTsconfigCompilerOptions } from "./shared/binding-B1q9aYT-.mjs";
2
+ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-CEmFsvJW.mjs";
3
3
  import * as ESTree from "@oxc-project/types";
4
4
  import { Program } from "@oxc-project/types";
5
5
 
6
- //#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
6
+ //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
7
7
  interface VisitorObject$1 {
8
8
  DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
9
9
  "DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
@@ -1,6 +1,6 @@
1
- import { n as parseSync, t as parse } from "./shared/parse-yrGA-p2H.mjs";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-D3YLh9ff.mjs";
3
- //#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-CTgsjpo8.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-BkhP9bkX.mjs";
3
+ //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
4
4
  function walkNode(node, visitors) {
5
5
  if (node == null) return;
6
6
  if (Array.isArray(node)) {
@@ -2010,9 +2010,9 @@ function walkTSUnionType(node, visitors) {
2010
2010
  exit !== null && exit(node);
2011
2011
  }
2012
2012
  //#endregion
2013
- //#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2013
+ //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2014
2014
  /** Mapping from node type name to node type ID */
2015
- const NODE_TYPE_IDS_MAP = new Map([
2015
+ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
2016
2016
  ["DebuggerStatement", 0],
2017
2017
  ["EmptyStatement", 1],
2018
2018
  ["Literal", 2],
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
2180
2180
  ["TSUnionType", 164]
2181
2181
  ]);
2182
2182
  //#endregion
2183
- //#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/visit/visitor.js
2183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/visit/visitor.js
2184
2184
  let compiledVisitor;
2185
2185
  function createCompiledVisitor() {
2186
2186
  compiledVisitor = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -53,12 +53,12 @@
53
53
  "registry": "https://registry.npmjs.org/"
54
54
  },
55
55
  "dependencies": {
56
- "@oxc-project/types": "=0.135.0",
56
+ "@oxc-project/types": "=0.137.0",
57
57
  "@rolldown/pluginutils": "^1.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@napi-rs/cli": "^3.7.1",
61
- "@napi-rs/wasm-runtime": "^1.1.5",
60
+ "@napi-rs/cli": "^3.7.2",
61
+ "@napi-rs/wasm-runtime": "^1.1.6",
62
62
  "@oxc-node/cli": "^0.1.0",
63
63
  "@rollup/plugin-json": "^6.1.0",
64
64
  "buble": "^0.20.0",
@@ -66,16 +66,16 @@
66
66
  "consola": "^3.4.2",
67
67
  "execa": "^9.2.0",
68
68
  "glob": "^13.0.0",
69
- "oxc-parser": "=0.135.0",
69
+ "oxc-parser": "=0.137.0",
70
70
  "pathe": "^2.0.3",
71
71
  "remeda": "^2.34.1",
72
- "rolldown-plugin-dts": "^0.25.2",
72
+ "rolldown-plugin-dts": "^0.26.0",
73
73
  "rollup": "^4.60.4",
74
74
  "signal-exit": "4.1.0",
75
75
  "source-map": "0.7.6",
76
76
  "typescript": "^6.0.0",
77
77
  "valibot": "1.4.1",
78
- "rolldown": "1.1.1"
78
+ "rolldown": "1.1.3"
79
79
  },
80
80
  "napi": {
81
81
  "binaryName": "rolldown-binding",
@@ -111,28 +111,28 @@
111
111
  "node": "^20.19.0 || >=22.12.0"
112
112
  },
113
113
  "optionalDependencies": {
114
- "@rolldown/binding-darwin-x64": "1.1.1",
115
- "@rolldown/binding-win32-x64-msvc": "1.1.1",
116
- "@rolldown/binding-linux-x64-gnu": "1.1.1",
117
- "@rolldown/binding-linux-x64-musl": "1.1.1",
118
- "@rolldown/binding-freebsd-x64": "1.1.1",
119
- "@rolldown/binding-linux-arm-gnueabihf": "1.1.1",
120
- "@rolldown/binding-linux-arm64-gnu": "1.1.1",
121
- "@rolldown/binding-darwin-arm64": "1.1.1",
122
- "@rolldown/binding-linux-arm64-musl": "1.1.1",
123
- "@rolldown/binding-openharmony-arm64": "1.1.1",
124
- "@rolldown/binding-win32-arm64-msvc": "1.1.1",
125
- "@rolldown/binding-android-arm64": "1.1.1",
126
- "@rolldown/binding-wasm32-wasi": "1.1.1",
127
- "@rolldown/binding-linux-s390x-gnu": "1.1.1",
128
- "@rolldown/binding-linux-ppc64-gnu": "1.1.1"
114
+ "@rolldown/binding-darwin-x64": "1.1.3",
115
+ "@rolldown/binding-win32-x64-msvc": "1.1.3",
116
+ "@rolldown/binding-linux-x64-gnu": "1.1.3",
117
+ "@rolldown/binding-linux-x64-musl": "1.1.3",
118
+ "@rolldown/binding-freebsd-x64": "1.1.3",
119
+ "@rolldown/binding-linux-arm-gnueabihf": "1.1.3",
120
+ "@rolldown/binding-linux-arm64-gnu": "1.1.3",
121
+ "@rolldown/binding-darwin-arm64": "1.1.3",
122
+ "@rolldown/binding-linux-arm64-musl": "1.1.3",
123
+ "@rolldown/binding-openharmony-arm64": "1.1.3",
124
+ "@rolldown/binding-win32-arm64-msvc": "1.1.3",
125
+ "@rolldown/binding-android-arm64": "1.1.3",
126
+ "@rolldown/binding-wasm32-wasi": "1.1.3",
127
+ "@rolldown/binding-linux-s390x-gnu": "1.1.3",
128
+ "@rolldown/binding-linux-ppc64-gnu": "1.1.3"
129
129
  },
130
130
  "scripts": {
131
131
  "# Scrips for binding #": "_",
132
132
  "artifacts": "napi artifacts --cwd ./src --package-json-path ../package.json -o=../artifacts --npm-dir ../npm",
133
133
  "build-binding": "oxnode ./build-binding.ts",
134
134
  "build-binding:release": "pnpm build-binding --release",
135
- "build-binding:profile": "pnpm build-binding --profile profile",
135
+ "build-binding:profile": "pnpm build-binding --profile profile --features chrome-tracing",
136
136
  "build-binding:wasi": "pnpm build-binding --target wasm32-wasip1-threads",
137
137
  "build-binding:wasi:release": "pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads",
138
138
  "# Scrips for node #": "_",