@voidzero-dev/vite-plus-core 0.2.9 → 0.3.1

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 (66) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +34 -5
  5. package/dist/rolldown/experimental-index.mjs +36 -9
  6. package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
  7. package/dist/rolldown/experimental-runtime.d.ts +2 -2
  8. package/dist/rolldown/experimental-runtime.mjs +2 -2
  9. package/dist/rolldown/filter-index.d.mts +1 -1
  10. package/dist/rolldown/filter-index.mjs +1 -3
  11. package/dist/rolldown/index.d.mts +3 -3
  12. package/dist/rolldown/index.mjs +4 -4
  13. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  14. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  15. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  16. package/dist/rolldown/parse-ast-index.mjs +1 -1
  17. package/dist/rolldown/plugins-index.d.mts +3 -3
  18. package/dist/rolldown/plugins-index.mjs +2 -2
  19. package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-DZuNHVw4.d.mts} +88 -5
  20. package/dist/rolldown/shared/{binding-CKyeQZen.mjs → binding-DmImI4pj.mjs} +29 -27
  21. package/dist/rolldown/shared/{bindingify-input-options-44iPAymO.mjs → bindingify-input-options-BYClWKnj.mjs} +11 -9
  22. package/dist/rolldown/shared/{constructors-XaIbWpwJ.d.mts → constructors-BM20b11r.d.mts} +2 -2
  23. package/dist/rolldown/shared/{constructors-6Zc-JFd7.mjs → constructors-mRbcbLyX.mjs} +1 -1
  24. package/dist/rolldown/shared/{create-bundler-option-e1FU0w0P.mjs → create-bundler-option-CHTBktos.mjs} +49 -6
  25. package/dist/rolldown/shared/{define-config-DVsXPNaU.d.mts → define-config-DNX0WekP.d.mts} +46 -7
  26. package/dist/rolldown/shared/{error-BzLGqhSQ.mjs → error-BP8lJHle.mjs} +1 -1
  27. package/dist/rolldown/shared/{load-config-C6QXSnoS.mjs → load-config-Cx5fx_8Q.mjs} +1 -1
  28. package/dist/rolldown/shared/{normalize-string-or-regex-DYjJ67tj.mjs → normalize-string-or-regex-Dm69lpQ-.mjs} +1 -1
  29. package/dist/rolldown/shared/{parse-uDDyc1el.mjs → parse-8sr82jSR.mjs} +2 -2
  30. package/dist/rolldown/shared/{resolve-tsconfig-Bcd82vVT.mjs → resolve-tsconfig-BlNGaH3Y.mjs} +10 -6
  31. package/dist/rolldown/shared/{rolldown-CCbQNGZt.mjs → rolldown-CaX_Wmqc.mjs} +5 -4
  32. package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform-CVse9_mH.d.mts} +8 -4
  33. package/dist/rolldown/shared/{watch-vuOCmvFs.mjs → watch-YKfJgIxz.mjs} +4 -4
  34. package/dist/rolldown/utils-index.d.mts +3 -3
  35. package/dist/rolldown/utils-index.mjs +5 -5
  36. package/dist/tsdown/{build-D_enfyvD-Dg1eKRD4.js → build-JVmLFaZt-kqQJ2U7s.js} +1705 -239
  37. package/dist/tsdown/debug-CpC4hV25-tvH_Dsg5.js +247 -0
  38. package/dist/tsdown/{detect-DGhJGEqb-6CTf16BW.js → detect-Bg-d8iUV-KfbO7neP.js} +10 -12
  39. package/dist/tsdown/{dist-DyXLnzyh.js → dist-Cuw3Ngo4.js} +1226 -893
  40. package/dist/tsdown/index-types.d.ts +277 -355
  41. package/dist/tsdown/index.js +4 -4
  42. package/dist/tsdown/internal-D-JfB5uT.js +29 -0
  43. package/dist/tsdown/internal-lhH-5yya.js +62 -0
  44. package/dist/tsdown/{main-DiierkER.js → main-CyNcZUzu.js} +8 -214
  45. package/dist/tsdown/{resolver-cwLsPb2o-Dk4xdAGE.js → resolver-DE0_sy8o-ZQqHQjRu.js} +4 -4
  46. package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
  47. package/dist/tsdown/run.js +44 -8
  48. package/dist/tsdown/{src-drVPfX63.js → src-BWidcM5N.js} +5 -5
  49. package/dist/tsdown/{tsc-JnMl2z7d.js → tsc-ChjRhsoQ.js} +26 -20
  50. package/dist/tsdown/tsdown-css.js +17 -11
  51. package/dist/tsdown/tsdown-exe.js +16 -5
  52. package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +141 -0
  53. package/dist/vite/client/bundledDevClient.mjs +69 -19
  54. package/dist/vite/client/client.mjs +4 -4
  55. package/dist/vite/node/chunks/build.js +21 -21
  56. package/dist/vite/node/chunks/lib.js +2 -2
  57. package/dist/vite/node/chunks/node.js +159 -114
  58. package/dist/vite/node/chunks/postcss-import.js +13 -16
  59. package/dist/vite/node/index.d.ts +58 -55
  60. package/dist/vite/node/module-runner.d.ts +13 -13
  61. package/dist/vite/node/module-runner.js +3 -4
  62. package/package.json +30 -30
  63. package/dist/tsdown/debug-CKcBYQLP-C3NhYhrk.js +0 -157
  64. package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
  65. package/dist/tsdown/internal-DKworeK4.js +0 -3
  66. package/dist/tsdown/target-Bab3CUeB-DQ0pKhCv.js +0 -582
@@ -1,113 +1,11 @@
1
+ import { TransformOptions } from "lightningcss";
1
2
  import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
2
3
  import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, RolldownPlugin, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
3
- import { StartOptions } from "@vitejs/devtools/cli-commands";
4
- import { CheckPackageOptions } from "@arethetypeswrong/core";
5
- import { Options } from "publint";
6
- import { TransformOptions } from "lightningcss";
7
- import { FileExtensionInfo } from "typescript";
8
4
  import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
9
- import { Options as UnusedOptions } from "unplugin-unused";
10
- //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
11
- type HookCallback = (...arguments_: any) => Promise<void> | void;
12
- type HookKeys<T> = keyof T & string;
13
- type DeprecatedHook<T> = {
14
- message?: string;
15
- to: HookKeys<T>;
16
- };
17
- type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
18
- type Strings<T> = Exclude<keyof T, number | symbol>;
19
- type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never; };
20
- type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
21
- type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
22
- type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never; }>;
23
- type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key; }>;
24
- type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never; }>;
25
- type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never; };
26
- type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>; }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key]; }>;
27
- type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
28
- type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
29
- name: key;
30
- args: Parameters<HT[key]>;
31
- context: Record<string, any>;
32
- }; }[keyof HT];
33
- declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
34
- private _hooks;
35
- private _before?;
36
- private _after?;
37
- private _deprecatedHooks;
38
- private _deprecatedMessages?;
39
- constructor();
40
- hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
41
- allowDeprecated?: boolean;
42
- }): () => void;
43
- hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
44
- removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
45
- clearHook<NameT extends HookNameT>(name: NameT): void;
46
- deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
47
- deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
48
- addHooks(configHooks: NestedHooks<HooksT>): () => void;
49
- removeHooks(configHooks: NestedHooks<HooksT>): void;
50
- removeAllHooks(): void;
51
- callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
52
- callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
53
- callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
54
- beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
55
- afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
56
- }
57
- type CreateTask = (name?: string) => {
58
- run: (function_: () => Promise<any> | any) => Promise<any> | any;
59
- };
60
- declare global {
61
- interface Console {
62
- createTask?: CreateTask;
63
- }
64
- }
65
- //#endregion
66
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.22.14_tsdown@0.22.14/node_modules/@tsdown/exe/dist/index.d.mts
67
- //#region src/platform.d.ts
68
- type ExePlatform = "win" | "darwin" | "linux";
69
- type ExeArch = "x64" | "arm64";
70
- interface ExeTarget {
71
- platform: ExePlatform;
72
- arch: ExeArch;
73
- /**
74
- * Node.js version to use for the executable.
75
- *
76
- * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
77
- * `"latest"` / `"latest-lts"` which resolve the version automatically from
78
- * {@link https://nodejs.org/dist/index.json}.
79
- *
80
- * The minimum required version is 25.7.0, which is when ESM entry point
81
- * support was added to Node.js SEA.
82
- */
83
- nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
84
- }
85
- interface ExeExtensionOptions {
86
- /**
87
- * Cross-platform targets for building executables.
88
- * Requires `@tsdown/exe` to be installed.
89
- * When specified, builds an executable for each target platform/arch combination.
90
- *
91
- * @example
92
- * ```ts
93
- * targets: [
94
- * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
95
- * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
96
- * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
97
- * ]
98
- * ```
99
- */
100
- targets?: ExeTarget[];
101
- getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
102
- /**
103
- * @default 'https://nodejs.org/dist/index.json'
104
- */
105
- nodeDistIndexUrl?: string;
106
- }
107
- //#endregion
108
- //#region ../../node_modules/.pnpm/@tsdown+css@0.22.14_jiti@2.7.0_postcss-import@16.1.1_postcss@8.5.25__postcss@8.5.25_sas_6a16dd13a926d2b2137531bbae459a0e/node_modules/@tsdown/css/dist/index.d.mts
5
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.26__postcss-modules@9.0_5274324ff2ff6c48cc66985619453a8b/node_modules/@tsdown/css/dist/index.d.mts
109
6
  //#region src/options.d.ts
110
7
  type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
8
+ type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
111
9
  interface CSSModulesOptions {
112
10
  /**
113
11
  * Controls the scoping behavior.
@@ -130,7 +28,7 @@ interface CSSModulesOptions {
130
28
  /**
131
29
  * Transform convention for exported class names.
132
30
  */
133
- localsConvention?: "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly";
31
+ localsConvention?: CSSModulesLocalsConvention;
134
32
  /**
135
33
  * Whether to include global class names in the export.
136
34
  */
@@ -140,7 +38,7 @@ interface CSSModulesOptions {
140
38
  */
141
39
  getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
142
40
  }
143
- interface CssOptions {
41
+ interface CssOptions$1 {
144
42
  /**
145
43
  * Enable/disable CSS code splitting.
146
44
  * When set to `false`, all CSS in the entire project will be extracted into
@@ -260,17 +158,86 @@ interface StylusPreprocessorOptions {
260
158
  [key: string]: any;
261
159
  }
262
160
  //#endregion
263
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.13_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_19173df252fb1b72b750fe1e656588b8/node_modules/rolldown-plugin-dts/dist/volar-Cxz5qLKE.d.mts
264
- //#region src/volar.d.ts
265
- interface VolarPlugin {
161
+ //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.d.mts
162
+ type HookCallback = (...arguments_: any) => Promise<void> | void;
163
+ type HookKeys<T> = keyof T & string;
164
+ type DeprecatedHook<T> = {
165
+ message?: string;
166
+ to: HookKeys<T>;
167
+ };
168
+ type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
169
+ type Strings<T> = Exclude<keyof T, number | symbol>;
170
+ type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never; };
171
+ type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
172
+ type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
173
+ type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never; }>;
174
+ type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key; }>;
175
+ type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never; }>;
176
+ type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never; };
177
+ type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>>; }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key]; }>;
178
+ type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
179
+ type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
180
+ name: key;
181
+ args: Parameters<HT[key]>;
182
+ context: Record<string, any>;
183
+ }; }[keyof HT];
184
+ declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
185
+ private _hooks;
186
+ private _before?;
187
+ private _after?;
188
+ private _deprecatedHooks;
189
+ private _deprecatedMessages?;
190
+ constructor();
191
+ hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
192
+ allowDeprecated?: boolean;
193
+ }): () => void;
194
+ hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
195
+ removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
196
+ clearHook<NameT extends HookNameT>(name: NameT): void;
197
+ deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
198
+ deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
199
+ addHooks(configHooks: NestedHooks<HooksT>): () => void;
200
+ removeHooks(configHooks: NestedHooks<HooksT>): void;
201
+ removeAllHooks(): void;
202
+ callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
203
+ callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
204
+ callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
205
+ beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
206
+ afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
207
+ }
208
+ type CreateTask = (name?: string) => {
209
+ run: (function_: () => Promise<any> | any) => Promise<any> | any;
210
+ };
211
+ declare global {
212
+ interface Console {
213
+ createTask?: CreateTask;
214
+ }
215
+ }
216
+ //#endregion
217
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/custom-language-CFzWzq69.d.mts
218
+ //#region src/custom-language.d.ts
219
+ /** @ts-ignore - TS 7 mismatch */
220
+ type FileExtensionInfo = import("typescript").FileExtensionInfo;
221
+ /**
222
+ * Describes a non-standard source language, such as Vue or Astro.
223
+ *
224
+ * If the language is supported via Volar, {@linkcode volarTypeScript} and
225
+ * {@linkcode createVolarPlugins} must both be provided.
226
+ */
227
+ interface CustomLanguage {
228
+ /** Patterns that identify files written in this language. */
266
229
  extensionPatterns: RegExp[];
230
+ /** Extra file extensions passed to the TypeScript compiler. */
267
231
  tsFileExtensionInfos?: FileExtensionInfo[];
268
- volarTypeScript?: typeof import("@volar/typescript");
269
- create?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
232
+ /** Maps a source filename to the TypeScript filename used for declarations. */
270
233
  toTsFilename?: (id: string) => string;
234
+ /** @ts-ignore - optional dep */
235
+ volarTypeScript?: typeof import("@volar/typescript");
236
+ /** @ts-ignore - optional dep */
237
+ createVolarPlugins?: Parameters<(typeof import("@volar/typescript"))["proxyCreateProgram"]>[2];
271
238
  }
272
239
  //#endregion
273
- //#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.5/node_modules/get-tsconfig/dist/index.d.mts
240
+ //#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.6/node_modules/get-tsconfig/dist/index.d.mts
274
241
  declare namespace TsConfigJson {
275
242
  namespace CompilerOptions {
276
243
  type JSX = 'preserve' | 'react' | 'react-jsx' | 'react-jsxdev' | 'react-native';
@@ -1133,7 +1100,13 @@ type TsConfigJson = {
1133
1100
  references?: TsConfigJson.References[];
1134
1101
  };
1135
1102
  //#endregion
1136
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.13_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_19173df252fb1b72b750fe1e656588b8/node_modules/rolldown-plugin-dts/dist/index.d.mts
1103
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/index.d.mts
1104
+ //#region src/tsc/vue.d.ts
1105
+ interface VueLanguageOptions {
1106
+ /** @ts-ignore - optional dep */
1107
+ vueCompilerOptions?: Partial<import("@vue/language-core").VueCompilerOptions>;
1108
+ }
1109
+ //#endregion
1137
1110
  //#region src/options.d.ts
1138
1111
  interface Logger$1 {
1139
1112
  info: (...args: any[]) => void;
@@ -1142,238 +1115,230 @@ interface Logger$1 {
1142
1115
  }
1143
1116
  interface GeneralOptions {
1144
1117
  /**
1145
- * The generator used to produce `.d.ts` files.
1118
+ * The generator used to produce declaration files.
1146
1119
  *
1147
- * - `'tsc'`: The TypeScript 5.x/6.x compiler. Supports all TypeScript features.
1148
- * - `'oxc'`: {@link https://oxc.rs Oxc}'s isolated declaration generator. Much
1149
- * faster than `tsc`, but only supports code that satisfies
1120
+ * - `'tsc'` supports the full TypeScript type system.
1121
+ * - `'oxc'` is faster but requires code compatible with
1150
1122
  * [`isolatedDeclarations`](https://www.typescriptlang.org/tsconfig/#isolatedDeclarations).
1151
- * - `'tsgo'`: **[Experimental]** The TypeScript Go compiler
1152
- * ({@link https://github.com/microsoft/typescript-go tsgo}). May not support
1153
- * all TypeScript features yet.
1123
+ * - `'tsgo'` uses the experimental TypeScript Go compiler.
1154
1124
  *
1155
- * When unset, the generator is inferred:
1156
- * - `'oxc'` if {@link Options.oxc oxc} options are provided or
1157
- * `isolatedDeclarations` is enabled in `compilerOptions`.
1158
- * - `'tsgo'` if TypeScript 7.0 (or `@typescript/native-preview`) is installed,
1159
- * or {@link Options.tsgo tsgo} options are provided.
1160
- * - `'tsc'` otherwise, and always when {@link TscOptions.vue vue} is enabled.
1125
+ * When omitted, the plugin selects `'oxc'` for `isolatedDeclarations`,
1126
+ * `'tsgo'` for TypeScript 7, and `'tsc'` otherwise. Volar-based custom
1127
+ * languages require `'tsc'`.
1161
1128
  *
1162
- * @default 'tsc'
1129
+ * @default Inferred from the TypeScript configuration and installed compiler.
1163
1130
  */
1164
1131
  generator?: "tsc" | "oxc" | "tsgo";
1165
1132
  /**
1166
- * Glob pattern(s) to filter which entry files get `.d.ts` generation.
1133
+ * Glob pattern(s) that select source files for declaration generation.
1167
1134
  *
1168
- * When specified, only entry files matching these patterns will emit `.d.ts` chunks.
1169
- * When not specified, all entries get `.d.ts` generation.
1170
- *
1171
- * Supports negation patterns (e.g., `['**', '!src/icons/**']`) for exclusion.
1172
- * Patterns are matched against file paths relative to `cwd`.
1135
+ * Patterns are relative to {@link cwd} and may be negated with `!`. Matching
1136
+ * files are emitted even when they are not Rolldown entry points.
1173
1137
  *
1174
1138
  * @example
1175
- * entry: 'src/index.ts'
1139
+ * ```ts
1176
1140
  * entry: ['src/*.ts', '!src/internal/**']
1141
+ * ```
1177
1142
  */
1178
1143
  entry?: string | string[];
1179
1144
  /**
1180
- * The directory in which the plugin will search for the `tsconfig.json` file.
1145
+ * Base directory for config discovery, glob matching, and relative paths.
1146
+ *
1147
+ * @default process.cwd()
1181
1148
  */
1182
1149
  cwd?: string;
1183
1150
  /**
1184
- * Set to `true` if your entry files are `.d.ts` files instead of `.ts` files.
1151
+ * Treats entry files as existing declarations instead of source files.
1185
1152
  *
1186
- * When enabled, the plugin will skip generating a `.d.ts` file for the entry point.
1153
+ * @default false
1187
1154
  */
1188
1155
  dtsInput?: boolean;
1189
1156
  /**
1190
- * If `true`, the plugin will emit only `.d.ts` files and remove all other output chunks.
1157
+ * Removes non-declaration chunks from the output.
1191
1158
  *
1192
- * This is especially useful when generating `.d.ts` files for the CommonJS format as part of a separate build step.
1159
+ * @default false
1193
1160
  */
1194
1161
  emitDtsOnly?: boolean;
1195
1162
  /**
1196
- * The path to the `tsconfig.json` file.
1163
+ * A `tsconfig.json` path, resolved relative to {@link cwd}.
1197
1164
  *
1198
- * If set to `false`, the plugin will ignore any `tsconfig.json` file.
1199
- * You can still specify `compilerOptions` directly in the options.
1200
- *
1201
- * @default 'tsconfig.json'
1165
+ * When omitted or `true`, the nearest config is discovered from {@link cwd}.
1166
+ * Set to `false` to disable config loading.
1202
1167
  */
1203
1168
  tsconfig?: string | boolean;
1204
- /**
1205
- * Pass a raw `tsconfig.json` object directly to the plugin.
1206
- *
1207
- * @see https://www.typescriptlang.org/tsconfig
1208
- */
1169
+ /** Raw `tsconfig.json` values merged over the loaded config. */
1209
1170
  tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
1210
1171
  /**
1211
- * Override the `compilerOptions` specified in `tsconfig.json`.
1212
- *
1213
- * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
1172
+ * Compiler options merged over those loaded from `tsconfig.json`.
1214
1173
  */
1215
1174
  compilerOptions?: TsConfigJson.CompilerOptions;
1216
1175
  /**
1217
- * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
1176
+ * Emits declaration maps (`.d.ts.map`).
1177
+ *
1178
+ * @default The value of `compilerOptions.declarationMap`.
1218
1179
  */
1219
1180
  sourcemap?: boolean;
1220
1181
  /**
1221
- * Specifies a resolver to resolve type definitions, especially for `node_modules`.
1182
+ * Resolver used for declaration imports, including packages in `node_modules`.
1222
1183
  *
1223
- * - `'oxc'`: Uses Oxc's module resolution, which is faster and more efficient.
1224
- * - `'tsc'`: Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.
1184
+ * Use `'tsc'` when a project depends on TypeScript-specific resolution
1185
+ * behavior; otherwise `'oxc'` is faster.
1225
1186
  *
1226
1187
  * @default 'oxc'
1227
1188
  */
1228
1189
  resolver?: "oxc" | "tsc";
1229
1190
  /**
1230
- * Determines how the default export is emitted.
1191
+ * Converts a single default export to `export =` for CommonJS consumers.
1192
+ * This does not add support for CommonJS-style declaration input.
1231
1193
  *
1232
- * If set to `true`, and you are only exporting a single item using `export default ...`,
1233
- * the output will use `export = ...` instead of the standard ES module syntax.
1234
- * This is useful for compatibility with CommonJS.
1235
- * This only controls the output format and does not enable support for
1236
- * CommonJS-style `.d.ts` input.
1194
+ * @default false
1237
1195
  */
1238
1196
  cjsDefault?: boolean;
1239
1197
  /**
1240
- * Indicates whether the generated `.d.ts` files have side effects.
1241
- * - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
1242
- * - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
1198
+ * Marks declaration modules as having side effects during tree-shaking.
1243
1199
  *
1244
1200
  * @default false
1245
1201
  */
1246
1202
  sideEffects?: boolean;
1203
+ /**
1204
+ * Logger used for plugin messages.
1205
+ *
1206
+ * @default console
1207
+ */
1247
1208
  logger?: Logger$1;
1248
1209
  }
1249
1210
  interface TscOptions {
1250
1211
  /**
1251
- * Build mode for the TypeScript compiler:
1252
- *
1253
- * - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
1254
- * - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
1212
+ * Uses TypeScript build mode (`tsc -b`) and follows project references.
1255
1213
  *
1256
1214
  * @default false
1257
1215
  */
1258
1216
  build?: boolean;
1259
1217
  /**
1260
- * If your tsconfig.json has
1261
- * [`references`](https://www.typescriptlang.org/tsconfig/#references) option,
1262
- * `rolldown-plugin-dts` will use [`tsc
1263
- * -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
1264
- * to build the project and all referenced projects before emitting `.d.ts`
1265
- * files.
1266
- *
1267
- * In such case, if this option is `true`, `rolldown-plugin-dts` will write
1268
- * down all built files into your disk, including
1269
- * [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1270
- * and other built files. This is equivalent to running `tsc -b` in your
1271
- * project.
1272
- *
1273
- * Otherwise, if this option is `false`, `rolldown-plugin-dts` will write
1274
- * built files only into memory and leave a small footprint in your disk.
1275
- *
1276
- * Enabling this option will decrease the build time by caching previous build
1277
- * results. This is helpful when you have a large project with multiple
1278
- * referenced projects.
1279
- *
1280
- * By default, `incremental` is `true` if your tsconfig has
1281
- * [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
1282
- * [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
1283
- * enabled.
1218
+ * Persists build-mode outputs, including `.tsbuildinfo`, to disk for reuse.
1219
+ * When disabled, build outputs stay in memory.
1284
1220
  *
1285
- * This option is only used when {@link Options.oxc} is
1286
- * `false`.
1221
+ * @default Enabled when the config sets `incremental` or `tsBuildInfoFile`.
1287
1222
  */
1288
1223
  incremental?: boolean;
1289
1224
  /**
1290
- * If `true`, the plugin will generate `.d.ts` files using `vue-tsc`.
1225
+ * Registers the built-in Vue language integration using `vue-tsc`.
1226
+ *
1227
+ * This is a shortcut for a preconfigured {@link Options.customLanguages}
1228
+ * entry and requires the `tsc` generator.
1229
+ *
1230
+ * @default false
1291
1231
  */
1292
- vue?: boolean;
1232
+ vue?: boolean | VueLanguageOptions;
1293
1233
  /**
1294
- * If `true`, the plugin will launch a separate process for `tsc` or `vue-tsc`.
1295
- * This enables processing multiple projects in parallel.
1234
+ * Runs `tsc` or `vue-tsc` in a separate process.
1235
+ *
1236
+ * @default false
1296
1237
  */
1297
1238
  parallel?: boolean;
1298
1239
  /**
1299
- * If `true`, the plugin will prepare all files listed in `tsconfig.json` for `tsc` or `vue-tsc`.
1240
+ * Loads every file listed by `tsconfig.json` into the TypeScript program.
1241
+ *
1242
+ * Useful when one config covers multiple packages or entry points.
1300
1243
  *
1301
- * This is especially useful when you have a single `tsconfig.json` for multiple projects in a monorepo.
1244
+ * @default false
1302
1245
  */
1303
1246
  eager?: boolean;
1304
1247
  /**
1305
- * If `true`, the plugin will create a new isolated context for each build,
1306
- * ensuring that previously generated `.d.ts` code and caches are not reused.
1307
- *
1308
- * By default, the plugin may reuse internal caches or incremental build artifacts
1309
- * to speed up repeated builds. Enabling this option forces a clean context,
1310
- * guaranteeing that all type definitions are generated from scratch.
1248
+ * Uses an isolated TypeScript cache instead of the shared global context.
1311
1249
  *
1312
1250
  * @default false
1313
1251
  */
1314
1252
  newContext?: boolean;
1315
1253
  /**
1316
- * If `true`, the plugin will emit `.d.ts` files for `.js` files as well.
1317
- * This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
1254
+ * Generates declarations for JavaScript files with JSDoc types.
1318
1255
  *
1319
- * Enabled by default when `allowJs` in compilerOptions is `true`.
1320
- * This option is only used when {@link Options.oxc} is
1321
- * `false`.
1256
+ * @default Enabled when `allowJs` or `checkJs` is set.
1322
1257
  */
1323
1258
  emitJs?: boolean;
1324
1259
  }
1325
- interface Options$1 extends GeneralOptions, TscOptions {
1260
+ /** Configuration accepted by {@link dts}. */
1261
+ interface Options extends GeneralOptions, TscOptions {
1326
1262
  /**
1327
- * If `true`, the plugin will generate `.d.ts` files using Oxc,
1328
- * which is significantly faster than the TypeScript compiler.
1263
+ * Options for the `oxc` generator.
1329
1264
  *
1330
- * This option is automatically enabled when `isolatedDeclarations` in `compilerOptions` is set to `true`.
1265
+ * The top-level {@link GeneralOptions.sourcemap sourcemap} option controls
1266
+ * declaration maps.
1331
1267
  */
1332
- oxc?: boolean | Omit<IsolatedDeclarationsOptions, "sourcemap">;
1268
+ oxc?: Omit<IsolatedDeclarationsOptions, "sourcemap">;
1333
1269
  /**
1334
- * **[Experimental]** Enables DTS generation using `tsgo`.
1335
- *
1336
- * This is automatically enabled when the TypeScript Go compiler (v7+) is
1337
- * installed as the `typescript` package. Otherwise, make sure
1338
- * `@typescript/native-preview` is installed as a dependency, or provide a
1339
- * custom path to the `tsgo` binary using the `path` option.
1270
+ * **[Experimental]** Options for the `tsgo` generator.
1340
1271
  *
1341
- * **Note:** TypeScript 7.0 does not yet have a stable API and is experimental.
1342
- * This option is not yet recommended for production environments, and some
1343
- * options (such as `tsconfigRaw` and `isolatedDeclarations`) will be
1344
- * unavailable when it is enabled.
1272
+ * Used when {@link GeneralOptions.generator generator} is `'tsgo'` or
1273
+ * TypeScript 7 is detected.
1274
+ */
1275
+ tsgo?: TsgoOptions;
1276
+ /**
1277
+ * Registers non-standard source languages such as Vue or Astro.
1345
1278
  *
1279
+ * If a language is supported via {@link https://volarjs.dev Volar},
1280
+ * {@link CustomLanguage.volarTypeScript} and
1281
+ * {@link CustomLanguage.createVolarPlugins} are both required. Volar
1282
+ * languages require `tsc`; `tsgo` does not support custom languages.
1346
1283
  *
1347
- * ```ts
1348
- * // Use tsgo from `@typescript/native-preview` dependency
1349
- * tsgo: true
1350
- *
1351
- * // Use custom tsgo path (e.g., managed by Nix)
1352
- * tsgo: { path: '/path/to/tsgo' }
1353
- * ```
1284
+ * @experimental
1354
1285
  */
1355
- tsgo?: boolean | TsgoOptions;
1286
+ customLanguages?: CustomLanguage[];
1287
+ }
1288
+ interface TsgoOptions {
1289
+ /** Path to a custom `tsgo` executable. */
1290
+ path?: string;
1291
+ }
1292
+ //#endregion
1293
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
1294
+ //#region src/platform.d.ts
1295
+ type ExePlatform = "win" | "darwin" | "linux";
1296
+ type ExeArch = "x64" | "arm64";
1297
+ interface ExeTarget {
1298
+ platform: ExePlatform;
1299
+ arch: ExeArch;
1356
1300
  /**
1357
- * Registers custom {@link https://volarjs.dev Volar} language plugins,
1358
- * allowing the `tsc` generator to process non-standard file types (such as
1359
- * `.vue`) when generating `.d.ts` files. Multiple plugins can be provided and
1360
- * are applied together.
1301
+ * Node.js version to use for the executable.
1361
1302
  *
1362
- * Enabling this option forces the `tsc` generator and is not supported with
1363
- * TypeScript 7.0.
1303
+ * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
1304
+ * `"latest"` / `"latest-lts"` which resolve the version automatically from
1305
+ * {@link https://nodejs.org/dist/index.json}.
1364
1306
  *
1365
- * @experimental The API may change in future versions.
1307
+ * The minimum required version is 25.7.0, which is when ESM entry point
1308
+ * support was added to Node.js SEA.
1366
1309
  */
1367
- volarPlugins?: VolarPlugin[];
1310
+ nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
1368
1311
  }
1369
- interface TsgoOptions {
1312
+ interface ExeExtensionOptions$1 {
1313
+ /**
1314
+ * Cross-platform targets for building executables.
1315
+ * Requires `@tsdown/exe` to be installed.
1316
+ * When specified, builds an executable for each target platform/arch combination.
1317
+ *
1318
+ * @example
1319
+ * ```ts
1320
+ * targets: [
1321
+ * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
1322
+ * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
1323
+ * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
1324
+ * ]
1325
+ * ```
1326
+ */
1327
+ targets?: ExeTarget[];
1370
1328
  /**
1371
- * Custom path to the `tsgo` binary.
1329
+ * Customize the download URL for Node.js binaries, e.g. to use a mirror.
1330
+ * Defaults to downloading from {@link https://nodejs.org/dist/}.
1372
1331
  */
1373
- path?: string;
1332
+ getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
1333
+ /**
1334
+ * URL of the Node.js release index used to resolve the `latest` and
1335
+ * `latest-lts` versions.
1336
+ * @default 'https://nodejs.org/dist/index.json'
1337
+ */
1338
+ nodeDistIndexUrl?: string;
1374
1339
  }
1375
1340
  //#endregion
1376
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/types-DP3_0kws.d.mts
1341
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
1377
1342
  //#region src/utils/types.d.ts
1378
1343
  type Overwrite<T, U> = Omit<T, keyof U> & U;
1379
1344
  type Awaitable<T> = T | Promise<T>;
@@ -1420,6 +1385,13 @@ interface TsdownBundle extends AsyncDisposable {
1420
1385
  config: ResolvedConfig;
1421
1386
  inlinedDeps: Map<string, Set<string>>;
1422
1387
  }
1388
+ interface TsdownHandle {
1389
+ bundles: TsdownBundle[];
1390
+ watch: {
1391
+ restart: () => Promise<TsdownHandle>;
1392
+ close: () => Promise<void>;
1393
+ };
1394
+ }
1423
1395
  //#endregion
1424
1396
  //#region src/utils/logger.d.ts
1425
1397
  type LogType = "error" | "warn" | "info";
@@ -1469,8 +1441,9 @@ interface DepsConfig {
1469
1441
  * Whitelist of dependencies allowed to be bundled from `node_modules`.
1470
1442
  * Throws an error if any unlisted dependency is bundled.
1471
1443
  *
1472
- * - `undefined` (default): Show warnings for bundled dependencies.
1473
- * - `false`: Suppress all warnings about bundled dependencies.
1444
+ * - `undefined` (default): Log an info-level hint if any `node_modules`
1445
+ * dependencies are bundled.
1446
+ * - `false`: Disable the hint and all checks about bundled dependencies.
1474
1447
  *
1475
1448
  * Note: Be sure to include all required sub-dependencies as well.
1476
1449
  */
@@ -1486,24 +1459,11 @@ interface DepsConfig {
1486
1459
  * `require` calls are not detected.
1487
1460
  */
1488
1461
  onlyImport?: Arrayable<string | RegExp>;
1489
- /**
1490
- * @deprecated Use {@linkcode onlyBundle} instead.
1491
- */
1492
- onlyAllowBundle?: Arrayable<string | RegExp> | false;
1493
- /**
1494
- * Skip bundling all `node_modules` dependencies.
1495
- *
1496
- * **Note:** This option cannot be used together with {@linkcode alwaysBundle}.
1497
- *
1498
- * @default false
1499
- * @deprecated Use {@linkcode neverBundle | neverBundle: true} instead.
1500
- */
1501
- skipNodeModulesBundle?: boolean;
1502
1462
  /**
1503
1463
  * Resolve dependency subpath imports to their actual package-relative paths
1504
1464
  * when externalizing packages without an `exports` field.
1505
1465
  *
1506
- * @default true
1466
+ * @default false
1507
1467
  */
1508
1468
  resolveDepSubpath?: boolean;
1509
1469
  /**
@@ -1511,7 +1471,7 @@ interface DepsConfig {
1511
1471
  */
1512
1472
  dts?: Pick<DepsConfig, "alwaysBundle" | "neverBundle">;
1513
1473
  }
1514
- interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "skipNodeModulesBundle" | "resolveDepSubpath"> {
1474
+ interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "resolveDepSubpath"> {
1515
1475
  alwaysBundle?: NoExternalFn;
1516
1476
  onlyBundle?: Array<string | RegExp> | false;
1517
1477
  onlyImport?: Array<string | RegExp>;
@@ -1522,6 +1482,8 @@ interface ResolvedDepsConfig extends Pick<DepsConfig, "neverBundle" | "skipNodeM
1522
1482
  }
1523
1483
  //#endregion
1524
1484
  //#region src/features/devtools.d.ts
1485
+ /** @ts-ignore - optional dep */
1486
+ type StartOptions = import("@vitejs/devtools/cli-commands").StartOptions;
1525
1487
  interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
1526
1488
  /**
1527
1489
  * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
@@ -1536,6 +1498,8 @@ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
1536
1498
  */
1537
1499
  clean?: boolean;
1538
1500
  }
1501
+ /** @ts-ignore - optional dep */
1502
+ type ExeExtensionOptions = ExeExtensionOptions$1;
1539
1503
  interface ExeOptions extends ExeExtensionOptions {
1540
1504
  seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
1541
1505
  /**
@@ -1552,7 +1516,7 @@ interface ExeOptions extends ExeExtensionOptions {
1552
1516
  /**
1553
1517
  * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
1554
1518
  *
1555
- * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning, enabling code cache). These can be overridden.
1519
+ * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling the experimental SEA warning). These can be overridden.
1556
1520
  */
1557
1521
  interface SeaConfig {
1558
1522
  main?: string;
@@ -1617,9 +1581,7 @@ interface TsdownHooks {
1617
1581
  }) => void | Promise<void>;
1618
1582
  }
1619
1583
  //#endregion
1620
- //#region node_modules/.pnpm/pkg-types@2.3.1/node_modules/pkg-types/dist/index.d.mts
1621
- //#endregion
1622
- //#region src/packagejson/types.d.ts
1584
+ //#region node_modules/.pnpm/pkg-types@2.3.2/node_modules/pkg-types/dist/index.d.mts
1623
1585
  interface PackageJson {
1624
1586
  /**
1625
1587
  * The name is what your thing is called.
@@ -1947,7 +1909,10 @@ type ChunkAddonFunction = (ctx: {
1947
1909
  type ChunkAddon = ChunkAddonObject | ChunkAddonFunction | string;
1948
1910
  //#endregion
1949
1911
  //#region src/features/pkg/attw.d.ts
1912
+ /** @ts-ignore - optional dep */
1913
+ type CheckPackageOptions = import("@arethetypeswrong/core").CheckPackageOptions;
1950
1914
  interface AttwOptions extends CheckPackageOptions {
1915
+ /** @ts-ignore - optional dep */
1951
1916
  module?: typeof import("@arethetypeswrong/core");
1952
1917
  /**
1953
1918
  * Profiles select a set of resolution modes to require/ignore. All are evaluated but failures outside
@@ -2055,10 +2020,10 @@ interface ExportsOptions {
2055
2020
  */
2056
2021
  exclude?: (RegExp | string)[];
2057
2022
  /**
2058
- * Generate legacy fields (`main` and `module`) for older Node.js and bundlers
2059
- * that do not support package `exports` field.
2023
+ * Generate legacy fields (`main`, `module`, and `types`) for older Node.js
2024
+ * versions and bundlers that do not support the package `exports` field.
2060
2025
  *
2061
- * Defaults to false, if only ESM builds are included, true otherwise.
2026
+ * Defaults to `false` if only ESM builds are included, `true` otherwise.
2062
2027
  *
2063
2028
  * @see {@link https://github.com/publint/publint/issues/24}
2064
2029
  */
@@ -2174,7 +2139,10 @@ interface ExportsOptions {
2174
2139
  }
2175
2140
  //#endregion
2176
2141
  //#region src/features/pkg/publint.d.ts
2177
- interface PublintOptions extends Omit<Options, "pack" | "pkgDir"> {
2142
+ /** @ts-ignore - optional dep */
2143
+ type Options$1 = import("publint").Options;
2144
+ interface PublintOptions extends Omit<Options$1, "pack" | "pkgDir"> {
2145
+ /** @ts-ignore - optional dep */
2178
2146
  module?: [typeof import("publint"), typeof import("publint/utils")];
2179
2147
  }
2180
2148
  //#endregion
@@ -2252,34 +2220,19 @@ interface ReportOptions {
2252
2220
  * @default 1_000_000 // 1 MB
2253
2221
  */
2254
2222
  maxCompressSize?: number;
2255
- }
2256
- type ConcurrencyExecutor = <T>(task: () => Promise<T>) => Promise<T>;
2257
- //#endregion
2258
- //#region src/config/types.d.ts
2259
- interface DtsOptions extends Options$1 {
2260
2223
  /**
2261
- * When building dual ESM+CJS formats, generate a `.d.cts` re-export stub
2262
- * instead of running a full second TypeScript compilation pass.
2263
- *
2264
- * The stub re-exports everything from the corresponding `.d.mts` file,
2265
- * ensuring CJS and ESM consumers share the same type declarations. This
2266
- * eliminates the TypeScript "dual module hazard" where separate `.d.cts`
2267
- * and `.d.mts` declarations cause `TS2352` ("neither type sufficiently
2268
- * overlaps") errors when casting between types derived from the same class.
2269
- *
2270
- * Only applies when building both `esm` and `cjs` formats simultaneously.
2271
- *
2272
- * @remarks
2273
- * The generated `.d.cts` stub uses a relative path to re-export from the
2274
- * corresponding `.d.mts` file, so both formats must be emitted to the
2275
- * **same** `outDir`. Splitting CJS and ESM outputs into separate
2276
- * format-specific directories (e.g. `dist/cjs` and `dist/esm`) is not
2277
- * supported with this option, because the re-export path would be invalid.
2224
+ * Only report the total size, skipping the per-file breakdown.
2225
+ * Useful for libraries that emit many files in unbundle mode.
2278
2226
  *
2279
2227
  * @default false
2280
2228
  */
2281
- cjsReexport?: boolean;
2229
+ summary?: boolean;
2282
2230
  }
2231
+ type ConcurrencyExecutor = <T>(task: () => Promise<T>) => Promise<T>;
2232
+ //#endregion
2233
+ //#region src/config/types.d.ts
2234
+ /** @ts-ignore - optional dep */
2235
+ type UnusedOptions = import("unplugin-unused").Options;
2283
2236
  type Sourcemap = boolean | "inline" | "hidden";
2284
2237
  type Format = ModuleFormat;
2285
2238
  type NormalizedFormat = InternalModuleFormat;
@@ -2327,6 +2280,8 @@ type WithEnabled<T> = boolean | undefined | CIOption | (T & {
2327
2280
  */
2328
2281
  enabled?: boolean | CIOption;
2329
2282
  });
2283
+ /** @ts-ignore - optional dep */
2284
+ type CssOptions = CssOptions$1;
2330
2285
  /**
2331
2286
  * Options for tsdown.
2332
2287
  */
@@ -2422,6 +2377,13 @@ interface UserConfig {
2422
2377
  envPrefix?: string | string[];
2423
2378
  define?: Record<string, string>;
2424
2379
  /**
2380
+ * Inject CJS `__dirname` and `__filename` shims into ESM output.
2381
+ * Only applies when {@linkcode platform} is set to `node`.
2382
+ *
2383
+ * Note: `import.meta.url`, `import.meta.dirname`, and `import.meta.filename`
2384
+ * are always shimmed in CJS output, regardless of this option.
2385
+ *
2386
+ * @see https://tsdown.dev/options/shims
2425
2387
  * @default false
2426
2388
  */
2427
2389
  shims?: boolean;
@@ -2490,7 +2452,8 @@ interface UserConfig {
2490
2452
  checks?: ChecksOptions & {
2491
2453
  /**
2492
2454
  * If the config includes the `cjs` format and
2493
- * one of its target >= node 20.19.0 / 22.12.0,
2455
+ * one of its targets is a Node.js version that supports `require(esm)`
2456
+ * (`^20.19.0 || >=22.12.0`),
2494
2457
  * warn the user about the deprecation of CommonJS.
2495
2458
  *
2496
2459
  * @default true
@@ -2664,12 +2627,13 @@ interface UserConfig {
2664
2627
  /**
2665
2628
  * Enables generation of TypeScript declaration files (`.d.ts`).
2666
2629
  *
2667
- * By default, this option is auto-detected based on your project's `package.json`:
2630
+ * By default, this option is auto-detected:
2668
2631
  * - If {@linkcode exe} is enabled, declaration file generation is disabled by default.
2669
- * - If the `types` field is present, or if the main `exports` contains a `types` entry, declaration file generation is enabled by default.
2632
+ * - If the `types` or `typings` field is present in `package.json`, or if its `exports` field contains a `types` entry, declaration file generation is enabled by default.
2633
+ * - Otherwise, if the resolved `tsconfig.json` has `declaration: true`, declaration file generation is enabled by default.
2670
2634
  * - Otherwise, declaration file generation is disabled by default.
2671
2635
  */
2672
- dts?: WithEnabled<DtsOptions>;
2636
+ dts?: WithEnabled<Options>;
2673
2637
  /**
2674
2638
  * Enable unused dependencies check with `unplugin-unused`
2675
2639
  * Requires `unplugin-unused` to be installed.
@@ -2745,59 +2709,15 @@ interface UserConfig {
2745
2709
  */
2746
2710
  workspace?: Workspace | Arrayable<string> | true;
2747
2711
  /**
2712
+ * Cannot be combined with `deps.neverBundle`; setting both throws an error.
2748
2713
  * @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle} instead.
2749
2714
  */
2750
2715
  external?: ExternalOption;
2751
2716
  /**
2717
+ * Cannot be combined with `deps.alwaysBundle`; setting both throws an error.
2752
2718
  * @deprecated Use {@linkcode DepsConfig.alwaysBundle | deps.alwaysBundle} instead.
2753
2719
  */
2754
2720
  noExternal?: Arrayable<string | RegExp> | NoExternalFn;
2755
- /**
2756
- * @deprecated Use {@linkcode DepsConfig.onlyBundle | deps.onlyBundle} instead.
2757
- */
2758
- inlineOnly?: Arrayable<string | RegExp> | false;
2759
- /**
2760
- * @deprecated Use {@linkcode DepsConfig.neverBundle | deps.neverBundle: true} instead.
2761
- * @default false
2762
- */
2763
- skipNodeModulesBundle?: boolean;
2764
- /**
2765
- * Remove the `node:` prefix from built-in Node.js module imports.
2766
- * When enabled, rewrites import sources like `node:fs` to `fs`.
2767
- *
2768
- * @default false
2769
- * @deprecated Use {@linkcode nodeProtocol | nodeProtocol: 'strip'} instead.
2770
- *
2771
- * @example
2772
- * <caption>`removeNodeProtocol: true` — remove the `node:` prefix</caption>
2773
- *
2774
- * ```ts
2775
- * // Input
2776
- * import 'node:fs'
2777
- *
2778
- * // Output
2779
- * import 'fs'
2780
- * ```
2781
- */
2782
- removeNodeProtocol?: boolean;
2783
- /**
2784
- * @deprecated Use {@linkcode unbundle} instead.
2785
- * @default true
2786
- */
2787
- bundle?: boolean;
2788
- /**
2789
- * @deprecated Use {@linkcode outExtensions} instead.
2790
- */
2791
- outExtension?: OutExtensionFactory;
2792
- /**
2793
- * @deprecated Use {@linkcode CssOptions.inject | css.inject} instead.
2794
- */
2795
- injectStyle?: boolean;
2796
- /**
2797
- * @alias copy
2798
- * @deprecated Alias for {@linkcode copy}, will be removed in the future.
2799
- */
2800
- publicDir?: CopyOptions | CopyOptionsFn;
2801
2721
  }
2802
2722
  interface InlineConfig extends UserConfig {
2803
2723
  /**
@@ -2818,12 +2738,14 @@ interface InlineConfig extends UserConfig {
2818
2738
  */
2819
2739
  concurrency?: number;
2820
2740
  }
2821
- type UserConfigFn = (inlineConfig: InlineConfig, context: {
2741
+ interface UserConfigFnContext {
2822
2742
  ci: boolean;
2823
2743
  rootConfig?: UserConfig;
2824
- }) => Awaitable<Arrayable<UserConfig>>;
2744
+ watch: TsdownHandle["watch"];
2745
+ }
2746
+ type UserConfigFn = (inlineConfig: InlineConfig, context: UserConfigFnContext) => Awaitable<Arrayable<UserConfig>>;
2825
2747
  type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>;
2826
- type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "publicDir" | "bundle" | "injectStyle" | "removeNodeProtocol" | "outExtension" | "external" | "noExternal" | "inlineOnly" | "skipNodeModulesBundle" | "logLevel" | "failOnWarn" | "suppressWarnings" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks" | "css">, {
2748
+ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "fromVite" | "external" | "noExternal" | "logLevel" | "failOnWarn" | "suppressWarnings" | "customLogger" | "envFile" | "envPrefix">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "onSuccess" | "outExtensions" | "hooks" | "copy" | "loader" | "name" | "banner" | "footer" | "checks" | "css">, {
2827
2749
  /**
2828
2750
  * Resolved entry map (after glob expansion)
2829
2751
  */
@@ -2847,7 +2769,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
2847
2769
  root: string;
2848
2770
  configDeps: Set<string>;
2849
2771
  runBuild: ConcurrencyExecutor;
2850
- dts: false | DtsOptions;
2772
+ dts: false | Options;
2851
2773
  report: false | ReportOptions;
2852
2774
  tsconfig: false | string;
2853
2775
  exports: false | ExportsOptions;
@@ -2858,7 +2780,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
2858
2780
  exe: false | ExeOptions;
2859
2781
  }>;
2860
2782
  //#endregion
2861
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/config-Dnbs_AoW.d.mts
2783
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
2862
2784
  //#region src/config/options.d.ts
2863
2785
  /**
2864
2786
  * Resolve user config into resolved configs
@@ -2879,19 +2801,19 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
2879
2801
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
2880
2802
  declare function defineConfig(options: UserConfigExport): UserConfigExport;
2881
2803
  //#endregion
2882
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/index.d.mts
2804
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/index.d.mts
2883
2805
  //#region src/build.d.ts
2884
2806
  /**
2885
2807
  * Build with tsdown.
2886
2808
  */
2887
- declare function build$1(inlineConfig?: InlineConfig): Promise<TsdownBundle[]>;
2809
+ declare function build$1(inlineConfig?: InlineConfig): Promise<TsdownHandle>;
2888
2810
  /**
2889
2811
  * Build with `ResolvedConfigs`.
2890
2812
  *
2891
2813
  * **Internal API, not for public use**
2892
2814
  * @private
2893
2815
  */
2894
- declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>, _restart: () => void): Promise<TsdownBundle[]>;
2816
+ declare function buildWithConfigs(configs: ResolvedConfig[], configDeps: Set<string>, rebuild: () => Promise<TsdownHandle>): Promise<TsdownHandle>;
2895
2817
  //#endregion
2896
2818
  //#region src/features/debug.d.ts
2897
2819
  declare function enableDebug(debug?: boolean | Arrayable<string>): void;
@@ -2899,4 +2821,4 @@ declare function enableDebug(debug?: boolean | Arrayable<string>): void;
2899
2821
  //#region src/index.d.ts
2900
2822
  declare const version: string;
2901
2823
  //#endregion
2902
- export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
2824
+ export { type AttwOptions, type BuildContext, CIOption, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DepsConfig, type DevtoolsOptions, type Options as DtsOptions, type ExeOptions, type ExportsOptions, Format, InlineConfig, type Logger, type NoExternalFn, NormalizedFormat, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageJsonWithPath, type PackageType, type PublintOptions, type ReportOptions, ResolvedConfig, type ResolvedDepsConfig, Rolldown, type RolldownChunk, type RolldownContext, type SeaConfig, Sourcemap, type TreeshakingOptions, type TsdownBundle, type TsdownHandle, type TsdownHooks, TsdownInputOption, type TsdownPlugin, type TsdownPluginOption, type UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnContext, WithEnabled, Workspace, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };