tsdown 0.13.2 → 0.13.4
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/README.md +1 -1
- package/dist/{config-CZj6NGiw.d.mts → config-CEEvti7D.d.mts} +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/index.d.mts +4 -17
- package/dist/index.mjs +3 -3
- package/dist/{logger-6IV2T7t1.mjs → logger-CGMSjTLn.mjs} +51 -27
- package/dist/{migrate-mIs6mjET.mjs → migrate-BghKfLMP.mjs} +20 -20
- package/dist/package-C-PL6-Mh.mjs +5 -0
- package/dist/plugins.d.mts +2 -2
- package/dist/plugins.mjs +2 -2
- package/dist/run.mjs +11 -11
- package/dist/{src-C8dUJ_Mj.mjs → src-D6AiyRka.mjs} +634 -586
- package/dist/{types-DIH2hGTd.d.mts → types-QuuoDTDl.d.mts} +45 -8
- package/package.json +7 -7
- package/dist/package-Dg3yzWpE.mjs +0 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "ansis";
|
|
1
2
|
import { BuildOptions, ExternalOption, InputOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, OutputAsset, OutputChunk, OutputOptions, Plugin } from "rolldown";
|
|
2
3
|
import { Hookable } from "hookable";
|
|
3
4
|
import { CheckPackageOptions } from "@arethetypeswrong/core";
|
|
@@ -122,6 +123,19 @@ type ChunkAddonFunction = (ctx: {
|
|
|
122
123
|
}) => ChunkAddonObject | undefined;
|
|
123
124
|
type ChunkAddon = ChunkAddonObject | ChunkAddonFunction;
|
|
124
125
|
//#endregion
|
|
126
|
+
//#region src/utils/logger.d.ts
|
|
127
|
+
type LogType = "error" | "warn" | "info";
|
|
128
|
+
type LogLevel = LogType | "silent";
|
|
129
|
+
interface Logger {
|
|
130
|
+
level: LogLevel;
|
|
131
|
+
info: (...args: any[]) => void;
|
|
132
|
+
warn: (...args: any[]) => void;
|
|
133
|
+
warnOnce: (...args: any[]) => void;
|
|
134
|
+
error: (...args: any[]) => void;
|
|
135
|
+
success: (...args: any[]) => void;
|
|
136
|
+
}
|
|
137
|
+
declare const globalLogger: Logger;
|
|
138
|
+
//#endregion
|
|
125
139
|
//#region src/features/report.d.ts
|
|
126
140
|
interface ReportOptions {
|
|
127
141
|
/**
|
|
@@ -137,7 +151,7 @@ interface ReportOptions {
|
|
|
137
151
|
*/
|
|
138
152
|
maxCompressSize?: number;
|
|
139
153
|
}
|
|
140
|
-
declare function ReportPlugin(options: ReportOptions, cwd: string, cjsDts?: boolean, name?: string, isMultiFormat?: boolean): Plugin;
|
|
154
|
+
declare function ReportPlugin(options: ReportOptions, logger: Logger, cwd: string, cjsDts?: boolean, name?: string, isMultiFormat?: boolean): Plugin;
|
|
141
155
|
//#endregion
|
|
142
156
|
//#region src/options/types.d.ts
|
|
143
157
|
type Sourcemap = boolean | "inline" | "hidden";
|
|
@@ -204,6 +218,8 @@ interface Options {
|
|
|
204
218
|
clean?: boolean | string[];
|
|
205
219
|
/** @default false */
|
|
206
220
|
minify?: boolean | "dce-only" | MinifyOptions;
|
|
221
|
+
footer?: ChunkAddon;
|
|
222
|
+
banner?: ChunkAddon;
|
|
207
223
|
/**
|
|
208
224
|
* Specifies the compilation target environment(s).
|
|
209
225
|
*
|
|
@@ -259,6 +275,10 @@ interface Options {
|
|
|
259
275
|
* `fixedExtension` will be overridden by this option.
|
|
260
276
|
*/
|
|
261
277
|
outExtensions?: OutExtensionFactory;
|
|
278
|
+
/**
|
|
279
|
+
* @default true
|
|
280
|
+
*/
|
|
281
|
+
cjsDefault?: boolean;
|
|
262
282
|
outputOptions?: OutputOptions | ((options: OutputOptions, format: NormalizedFormat, context: {
|
|
263
283
|
cjsDts: boolean;
|
|
264
284
|
}) => Awaitable<OutputOptions | void | null>);
|
|
@@ -275,15 +295,32 @@ interface Options {
|
|
|
275
295
|
* ```
|
|
276
296
|
*/
|
|
277
297
|
loader?: ModuleTypes;
|
|
278
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* @default false
|
|
300
|
+
* @deprecated Use `logLevel` instead.
|
|
301
|
+
*/
|
|
279
302
|
silent?: boolean;
|
|
280
303
|
/**
|
|
304
|
+
* Log level.
|
|
305
|
+
* @default 'info'
|
|
306
|
+
*/
|
|
307
|
+
logLevel?: LogLevel;
|
|
308
|
+
/**
|
|
309
|
+
* If true, fails the build on warnings.
|
|
310
|
+
* @default false
|
|
311
|
+
*/
|
|
312
|
+
failOnWarn?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Custom logger.
|
|
315
|
+
*/
|
|
316
|
+
customLogger?: Logger;
|
|
317
|
+
/**
|
|
281
318
|
* Config file path
|
|
282
319
|
*/
|
|
283
320
|
config?: boolean | string;
|
|
284
321
|
/** @default false */
|
|
285
|
-
watch?: boolean | string
|
|
286
|
-
ignoreWatch?: string |
|
|
322
|
+
watch?: boolean | Arrayable<string>;
|
|
323
|
+
ignoreWatch?: Arrayable<string | RegExp>;
|
|
287
324
|
/**
|
|
288
325
|
* You can specify command to be executed after a successful build, specially useful for Watch mode
|
|
289
326
|
*/
|
|
@@ -413,8 +450,6 @@ interface Options {
|
|
|
413
450
|
* Filter workspace packages. This option is only available in workspace mode.
|
|
414
451
|
*/
|
|
415
452
|
filter?: RegExp | string | string[];
|
|
416
|
-
footer?: ChunkAddon;
|
|
417
|
-
banner?: ChunkAddon;
|
|
418
453
|
}
|
|
419
454
|
/**
|
|
420
455
|
* Options without specifying config file path.
|
|
@@ -422,7 +457,7 @@ interface Options {
|
|
|
422
457
|
type UserConfig = Arrayable<Omit<Options, "config" | "filter">>;
|
|
423
458
|
type UserConfigFn = (cliOptions: Options) => Awaitable<UserConfig>;
|
|
424
459
|
type NormalizedUserConfig = Exclude<UserConfig, any[]>;
|
|
425
|
-
type ResolvedOptions = Omit<Overwrite<MarkPartial<Omit<Options, "publicDir" | "workspace" | "filter">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "external" | "noExternal" | "onSuccess" | "fixedExtension" | "outExtensions" | "hooks" | "removeNodeProtocol" | "copy" | "loader" | "name" | "bundle" | "banner" | "footer">, {
|
|
460
|
+
type ResolvedOptions = Omit<Overwrite<MarkPartial<Omit<Options, "publicDir" | "workspace" | "filter" | "silent" | "logLevel" | "failOnWarn" | "customLogger">, "globalName" | "inputOptions" | "outputOptions" | "minify" | "define" | "alias" | "external" | "noExternal" | "onSuccess" | "fixedExtension" | "outExtensions" | "hooks" | "removeNodeProtocol" | "copy" | "loader" | "name" | "bundle" | "banner" | "footer">, {
|
|
426
461
|
format: NormalizedFormat[];
|
|
427
462
|
target?: string[];
|
|
428
463
|
clean: string[];
|
|
@@ -432,6 +467,8 @@ type ResolvedOptions = Omit<Overwrite<MarkPartial<Omit<Options, "publicDir" | "w
|
|
|
432
467
|
pkg?: PackageJson;
|
|
433
468
|
exports: false | ExportsOptions;
|
|
434
469
|
nodeProtocol: "strip" | boolean;
|
|
470
|
+
logger: Logger;
|
|
471
|
+
ignoreWatch: Array<string | RegExp>;
|
|
435
472
|
}>, "config" | "fromVite">;
|
|
436
473
|
//#endregion
|
|
437
|
-
export { type AttwOptions, type BuildContext, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DtsOptions, type ExportsOptions, Format, ModuleTypes, NormalizedFormat, NormalizedUserConfig, Options, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageType, type PublintOptions, type ReportOptions, ReportPlugin, ResolvedOptions, type RolldownContext, Sourcemap, type TsdownChunks, type TsdownHooks, type UnusedOptions, UserConfig, UserConfigFn, Workspace };
|
|
474
|
+
export { type AttwOptions, type BuildContext, type ChunkAddon, type ChunkAddonFunction, type ChunkAddonObject, type CopyEntry, type CopyOptions, type CopyOptionsFn, type DtsOptions, type ExportsOptions, Format, Logger, ModuleTypes, NormalizedFormat, NormalizedUserConfig, Options, type OutExtensionContext, type OutExtensionFactory, type OutExtensionObject, type PackageType, type PublintOptions, type ReportOptions, ReportPlugin, ResolvedOptions, type RolldownContext, Sourcemap, type TsdownChunks, type TsdownHooks, type UnusedOptions, UserConfig, UserConfigFn, Workspace, globalLogger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "The Elegant Bundler for Libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"diff": "^8.0.2",
|
|
75
75
|
"empathic": "^2.0.0",
|
|
76
76
|
"hookable": "^5.5.3",
|
|
77
|
-
"rolldown": "^1.0.0-beta.
|
|
78
|
-
"rolldown-plugin-dts": "^0.15.
|
|
77
|
+
"rolldown": "^1.0.0-beta.31",
|
|
78
|
+
"rolldown-plugin-dts": "^0.15.6",
|
|
79
79
|
"semver": "^7.7.2",
|
|
80
80
|
"tinyexec": "^1.0.1",
|
|
81
81
|
"tinyglobby": "^0.2.14",
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"@sxzz/prettier-config": "^2.2.3",
|
|
89
89
|
"@sxzz/test-utils": "^0.5.9",
|
|
90
90
|
"@types/debug": "^4.1.12",
|
|
91
|
-
"@types/node": "^24.
|
|
91
|
+
"@types/node": "^24.2.0",
|
|
92
92
|
"@types/semver": "^7.7.0",
|
|
93
|
-
"@unocss/eslint-plugin": "^66.4.
|
|
93
|
+
"@unocss/eslint-plugin": "^66.4.2",
|
|
94
94
|
"@vueuse/core": "^13.6.0",
|
|
95
95
|
"bumpp": "^10.2.2",
|
|
96
96
|
"eslint": "^9.32.0",
|
|
97
97
|
"lightningcss": "^1.30.1",
|
|
98
|
-
"oxc-minify": "^0.
|
|
98
|
+
"oxc-minify": "^0.81.0",
|
|
99
99
|
"pkg-types": "^2.2.0",
|
|
100
100
|
"prettier": "^3.6.2",
|
|
101
101
|
"publint": "^0.3.12",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"typedoc-plugin-markdown": "^4.8.0",
|
|
105
105
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
106
106
|
"typescript": "~5.9.2",
|
|
107
|
-
"unocss": "^66.4.
|
|
107
|
+
"unocss": "^66.4.2",
|
|
108
108
|
"unplugin-lightningcss": "^0.4.1",
|
|
109
109
|
"unplugin-unused": "^0.5.1",
|
|
110
110
|
"vite": "npm:rolldown-vite@latest",
|