tsdown 0.12.8 → 0.13.0-beta.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.
- package/dist/{config-D_2fTM9-.d.mts → config-BHQdCemQ.d.mts} +23 -4
- package/dist/config.d.mts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -1035
- package/dist/{logger-CdK2zFTY.mjs → logger-6IV2T7t1.mjs} +1 -1
- package/dist/{migrate-D3HAtePC.mjs → migrate-OhQ7vqGh.mjs} +2 -2
- package/dist/package-DN14v3FV.mjs +5 -0
- package/dist/plugins.d.mts +2 -2
- package/dist/plugins.mjs +3 -2
- package/dist/run.mjs +3 -3
- package/dist/src-DfeORvyH.mjs +1256 -0
- package/package.json +27 -26
- package/dist/package-DRxdhN87.mjs +0 -5
- package/dist/plugins-qNZNAFcS.mjs +0 -215
|
@@ -94,7 +94,7 @@ interface TsdownHooks {
|
|
|
94
94
|
* Build with tsdown.
|
|
95
95
|
*/
|
|
96
96
|
declare function build$1(userOptions?: Options$3): Promise<void>;
|
|
97
|
-
declare const
|
|
97
|
+
declare const shimFile: string;
|
|
98
98
|
type TsdownChunks = Partial<Record<NormalizedFormat, Array<OutputChunk | OutputAsset>>>;
|
|
99
99
|
/**
|
|
100
100
|
* Build a single configuration, without watch and shortcuts features.
|
|
@@ -161,8 +161,8 @@ declare function ReportPlugin(options: ReportOptions, cwd: string, cjsDts?: bool
|
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/options/types.d.ts
|
|
163
163
|
type Sourcemap = boolean | "inline" | "hidden";
|
|
164
|
-
type Format =
|
|
165
|
-
type NormalizedFormat =
|
|
164
|
+
type Format = ModuleFormat;
|
|
165
|
+
type NormalizedFormat = InternalModuleFormat;
|
|
166
166
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
167
167
|
interface Workspace {
|
|
168
168
|
/**
|
|
@@ -387,6 +387,7 @@ interface Options$3 {
|
|
|
387
387
|
* If enabled, strips the `node:` protocol prefix from import source.
|
|
388
388
|
*
|
|
389
389
|
* @default false
|
|
390
|
+
* @deprecated Use `nodeProtocol: 'strip'` instead.
|
|
390
391
|
*
|
|
391
392
|
* @example
|
|
392
393
|
* // With removeNodeProtocol enabled:
|
|
@@ -394,6 +395,23 @@ interface Options$3 {
|
|
|
394
395
|
*/
|
|
395
396
|
removeNodeProtocol?: boolean;
|
|
396
397
|
/**
|
|
398
|
+
* - If true, add `node:` prefix to built-in modules.
|
|
399
|
+
* - If 'strip', strips the `node:` protocol prefix from import source.
|
|
400
|
+
* - If false, does not modify the import source.
|
|
401
|
+
*
|
|
402
|
+
* @default false
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* // With nodeProtocol enabled:
|
|
406
|
+
* import('fs'); // becomes import('node:fs')
|
|
407
|
+
* // With nodeProtocol set to 'strip':
|
|
408
|
+
* import('node:fs'); // becomes import('fs')
|
|
409
|
+
* // With nodeProtocol set to false:
|
|
410
|
+
* import('node:fs'); // remains import('node:fs')
|
|
411
|
+
*
|
|
412
|
+
*/
|
|
413
|
+
nodeProtocol?: "strip" | boolean;
|
|
414
|
+
/**
|
|
397
415
|
* If enabled, appends hash to chunk filenames.
|
|
398
416
|
* @default true
|
|
399
417
|
*/
|
|
@@ -428,6 +446,7 @@ type ResolvedOptions = Omit<Overwrite<MarkPartial<Omit<Options$3, "publicDir" |
|
|
|
428
446
|
tsconfig: string | false;
|
|
429
447
|
pkg?: PackageJson;
|
|
430
448
|
exports: false | ExportsOptions;
|
|
449
|
+
nodeProtocol: "strip" | boolean;
|
|
431
450
|
}>, "config" | "fromVite">;
|
|
432
451
|
//#endregion
|
|
433
452
|
//#region src/config.d.ts
|
|
@@ -436,4 +455,4 @@ type ResolvedOptions = Omit<Overwrite<MarkPartial<Omit<Options$3, "publicDir" |
|
|
|
436
455
|
*/
|
|
437
456
|
declare function defineConfig(options: UserConfig | UserConfigFn): UserConfig | UserConfigFn;
|
|
438
457
|
//#endregion
|
|
439
|
-
export { BuildContext, Options$3 as Options, ReportPlugin, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build$1 as build, buildSingle, defineConfig, logger,
|
|
458
|
+
export { BuildContext, Options$3 as Options, ReportPlugin, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build$1 as build, buildSingle, defineConfig, logger, shimFile };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UserConfig, UserConfigFn, defineConfig } from "./config-
|
|
1
|
+
import { UserConfig, UserConfigFn, defineConfig } from "./config-BHQdCemQ.mjs";
|
|
2
2
|
export { UserConfig, UserConfigFn, defineConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BuildContext, Options, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build, buildSingle, defineConfig, logger,
|
|
2
|
-
export { BuildContext, Options, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build, buildSingle, defineConfig, logger,
|
|
1
|
+
import { BuildContext, Options, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build, buildSingle, defineConfig, logger, shimFile } from "./config-BHQdCemQ.mjs";
|
|
2
|
+
export { BuildContext, Options, ResolvedOptions, TsdownChunks, TsdownHooks, UserConfig, UserConfigFn, build, buildSingle, defineConfig, logger, shimFile };
|