tsdown 0.19.0-beta.3 → 0.19.0-beta.5
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/{src-CdIeTOkO.mjs → build-BZayr9FB.mjs} +19 -15
- package/dist/build-DN921Mon.mjs +3 -0
- package/dist/{config-DgP9n0Zr.d.mts → config-B_X6YTxy.d.mts} +10 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +7 -1
- package/dist/debug-Baqdx6K3.mjs +18 -0
- package/dist/index.d.mts +15 -4
- package/dist/index.mjs +6 -3
- package/dist/{config-mm6j0EhS.mjs → options-D-CZFay6.mjs} +7 -7
- package/dist/package-C6IsJEnG.mjs +5 -0
- package/dist/plugins.d.mts +1 -1
- package/dist/plugins.mjs +1 -1
- package/dist/run.mjs +5 -20
- package/dist/{types-Drx0i6TJ.d.mts → types-_V4oT7uO.d.mts} +1 -1
- package/package.json +5 -5
- package/dist/package-5WK85-g_.mjs +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
2
|
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
3
3
|
import { a as globalLogger, c as matchPattern, d as promiseWithResolvers, f as resolveComma, h as toArray, l as noop, m as slash, o as prettyFormat, s as importWithError, t as LogLevels } from "./logger-D_2uXZBG.mjs";
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as version } from "./package-
|
|
4
|
+
import { a as getPackageType, c as defaultCssBundleName, d as fsCopy, f as fsExists, i as loadConfigFile, l as cleanChunks, m as lowestCommonAncestor, n as mergeUserOptions, o as writeExports, p as fsRemove, r as resolveUserConfig, s as formatBytes, u as cleanOutDir } from "./options-D-CZFay6.mjs";
|
|
5
|
+
import { t as version } from "./package-C6IsJEnG.mjs";
|
|
6
6
|
import { builtinModules, isBuiltin } from "node:module";
|
|
7
7
|
import { chmod, mkdtemp, readFile, writeFile } from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
@@ -14,7 +14,6 @@ import { glob, isDynamicPattern } from "tinyglobby";
|
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
import { RE_CSS, RE_DTS, RE_JS, RE_NODE_MODULES } from "rolldown-plugin-dts/filename";
|
|
16
16
|
import { clearRequireCache } from "import-without-cache";
|
|
17
|
-
import * as Rolldown from "rolldown";
|
|
18
17
|
import { VERSION, build, watch } from "rolldown";
|
|
19
18
|
const coerce = __cjs_require("semver/functions/coerce.js");
|
|
20
19
|
const satisfies = __cjs_require("semver/functions/satisfies.js");
|
|
@@ -261,6 +260,7 @@ async function attw(options) {
|
|
|
261
260
|
const { stdout: tarballInfo } = await exec("npm", [
|
|
262
261
|
"pack",
|
|
263
262
|
"--json",
|
|
263
|
+
"--ignore-scripts",
|
|
264
264
|
"--pack-destination",
|
|
265
265
|
tempDir
|
|
266
266
|
], { nodeOptions: { cwd: options.cwd } });
|
|
@@ -891,7 +891,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
|
|
|
891
891
|
defaultHandler(level, log);
|
|
892
892
|
} : void 0,
|
|
893
893
|
devtools: devtools || void 0,
|
|
894
|
-
checks: { pluginTimings:
|
|
894
|
+
checks: { pluginTimings: debug.enabled }
|
|
895
895
|
}, config.inputOptions, [format, { cjsDts }]);
|
|
896
896
|
}
|
|
897
897
|
async function resolveOutputOptions(inputOptions, config, format, cjsDts) {
|
|
@@ -998,14 +998,26 @@ function shortcuts(restart) {
|
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
1000
|
//#endregion
|
|
1001
|
-
//#region src/
|
|
1001
|
+
//#region src/build.ts
|
|
1002
1002
|
const asyncDispose = Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose");
|
|
1003
|
+
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
1004
|
+
const pkgRoot = path.resolve(dirname, "..");
|
|
1005
|
+
const shimFile = path.resolve(pkgRoot, "esm-shims.js");
|
|
1003
1006
|
/**
|
|
1004
1007
|
* Build with tsdown.
|
|
1005
1008
|
*/
|
|
1006
1009
|
async function build$1(userOptions = {}) {
|
|
1007
1010
|
globalLogger.level = userOptions.logLevel || "info";
|
|
1008
1011
|
const { configs, files: configFiles } = await resolveConfig(userOptions);
|
|
1012
|
+
return buildWithConfigs(configs, configFiles);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Build with `ResolvedConfigs`.
|
|
1016
|
+
*
|
|
1017
|
+
* **Internal API, not for public use**
|
|
1018
|
+
* @private
|
|
1019
|
+
*/
|
|
1020
|
+
async function buildWithConfigs(configs, configFiles) {
|
|
1009
1021
|
let cleanPromise;
|
|
1010
1022
|
const clean = () => {
|
|
1011
1023
|
if (cleanPromise) return cleanPromise;
|
|
@@ -1018,7 +1030,7 @@ async function build$1(userOptions = {}) {
|
|
|
1018
1030
|
restarting = true;
|
|
1019
1031
|
await Promise.all(disposeCbs.map((cb) => cb()));
|
|
1020
1032
|
clearRequireCache();
|
|
1021
|
-
|
|
1033
|
+
buildWithConfigs(configs, configFiles);
|
|
1022
1034
|
}
|
|
1023
1035
|
const configChunksByPkg = initBundleByPkg(configs);
|
|
1024
1036
|
function done(bundle) {
|
|
@@ -1037,10 +1049,6 @@ async function build$1(userOptions = {}) {
|
|
|
1037
1049
|
}
|
|
1038
1050
|
/**
|
|
1039
1051
|
* Build a single configuration, without watch and shortcuts features.
|
|
1040
|
-
*
|
|
1041
|
-
* Internal API, not for public use
|
|
1042
|
-
*
|
|
1043
|
-
* @internal
|
|
1044
1052
|
* @param config Resolved options
|
|
1045
1053
|
*/
|
|
1046
1054
|
async function buildSingle(config, configFiles, isDualFormat, clean, restart, done) {
|
|
@@ -1138,10 +1146,6 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
|
|
|
1138
1146
|
ab = executeOnSuccess(config);
|
|
1139
1147
|
}
|
|
1140
1148
|
}
|
|
1141
|
-
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
1142
|
-
const pkgRoot = path.resolve(dirname, "..");
|
|
1143
|
-
/** @internal */
|
|
1144
|
-
const shimFile = path.resolve(pkgRoot, "esm-shims.js");
|
|
1145
1149
|
|
|
1146
1150
|
//#endregion
|
|
1147
|
-
export {
|
|
1151
|
+
export { ShebangPlugin as a, ExternalPlugin as c, WatchPlugin as i, buildWithConfigs as n, ReportPlugin as o, shimFile as r, NodeProtocolPlugin as s, build$1 as t };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { f as UserConfig, i as InlineConfig, m as UserConfigFn, p as UserConfigExport } from "./types-
|
|
1
|
+
import { f as UserConfig, i as InlineConfig, m as UserConfigFn, p as UserConfigExport, s as ResolvedConfig } from "./types-_V4oT7uO.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/config/options.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolve user config into resolved configs
|
|
7
|
+
*
|
|
8
|
+
* **Internal API, not for public use**
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
declare function resolveUserConfig(userConfig: UserConfig, inlineConfig: InlineConfig): Promise<ResolvedConfig[]>;
|
|
4
12
|
declare function mergeConfig(defaults: UserConfig, overrides: UserConfig): UserConfig;
|
|
5
13
|
declare function mergeConfig(defaults: InlineConfig, overrides: InlineConfig): InlineConfig;
|
|
6
14
|
//#endregion
|
|
@@ -13,4 +21,4 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
13
21
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
14
22
|
declare function defineConfig(options: UserConfigExport): UserConfigExport;
|
|
15
23
|
//#endregion
|
|
16
|
-
export { mergeConfig as n, defineConfig as t };
|
|
24
|
+
export { mergeConfig as n, resolveUserConfig as r, defineConfig as t };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { f as UserConfig, m as UserConfigFn, p as UserConfigExport } from "./types-
|
|
2
|
-
import { n as mergeConfig, t as defineConfig } from "./config-
|
|
1
|
+
import { f as UserConfig, m as UserConfigFn, p as UserConfigExport } from "./types-_V4oT7uO.mjs";
|
|
2
|
+
import { n as mergeConfig, t as defineConfig } from "./config-B_X6YTxy.mjs";
|
|
3
3
|
export { UserConfig, UserConfigExport, UserConfigFn, defineConfig, mergeConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as mergeConfig } from "./options-D-CZFay6.mjs";
|
|
2
2
|
|
|
3
|
+
//#region src/config.ts
|
|
4
|
+
function defineConfig(options) {
|
|
5
|
+
return options;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
3
9
|
export { defineConfig, mergeConfig };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { f as resolveComma, h as toArray } from "./logger-D_2uXZBG.mjs";
|
|
2
|
+
import { createDebug, enable, namespaces } from "obug";
|
|
3
|
+
|
|
4
|
+
//#region src/features/debug.ts
|
|
5
|
+
const debugLog = createDebug("tsdown:debug");
|
|
6
|
+
function enableDebug(debug) {
|
|
7
|
+
if (!debug) return;
|
|
8
|
+
let namespace;
|
|
9
|
+
if (debug === true) namespace = "tsdown:*";
|
|
10
|
+
else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
|
|
11
|
+
const ns = namespaces();
|
|
12
|
+
if (ns) namespace += `,${ns}`;
|
|
13
|
+
enable(namespace);
|
|
14
|
+
debugLog("Debugging enabled", namespace);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { enableDebug as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import { A as OutExtensionFactory, B as CopyOptions, C as RolldownChunk, D as ChunkAddonFunction, E as ChunkAddon, F as RolldownContext, I as TsdownHooks, L as DevtoolsOptions, M as PackageJsonWithPath, N as PackageType, O as ChunkAddonObject, P as BuildContext, R as CssOptions, S as ExportsOptions, T as AttwOptions, V as CopyOptionsFn, _ as ReportOptions, a as NoExternalFn, b as globalLogger, c as Sourcemap, d as UnusedOptions, f as UserConfig, g as Workspace, h as WithEnabled, i as InlineConfig, j as OutExtensionObject, k as OutExtensionContext, l as TreeshakingOptions, m as UserConfigFn, n as DtsOptions, o as NormalizedFormat, p as UserConfigExport, r as Format, s as ResolvedConfig, t as CIOption, u as TsdownInputOption, w as TsdownBundle, x as PublintOptions, y as Logger, z as CopyEntry } from "./types-
|
|
2
|
-
import { n as mergeConfig, t as defineConfig } from "./config-
|
|
1
|
+
import { A as OutExtensionFactory, B as CopyOptions, C as RolldownChunk, D as ChunkAddonFunction, E as ChunkAddon, F as RolldownContext, H as Arrayable, I as TsdownHooks, L as DevtoolsOptions, M as PackageJsonWithPath, N as PackageType, O as ChunkAddonObject, P as BuildContext, R as CssOptions, S as ExportsOptions, T as AttwOptions, V as CopyOptionsFn, _ as ReportOptions, a as NoExternalFn, b as globalLogger, c as Sourcemap, d as UnusedOptions, f as UserConfig, g as Workspace, h as WithEnabled, i as InlineConfig, j as OutExtensionObject, k as OutExtensionContext, l as TreeshakingOptions, m as UserConfigFn, n as DtsOptions, o as NormalizedFormat, p as UserConfigExport, r as Format, s as ResolvedConfig, t as CIOption, u as TsdownInputOption, w as TsdownBundle, x as PublintOptions, y as Logger, z as CopyEntry } from "./types-_V4oT7uO.mjs";
|
|
2
|
+
import { n as mergeConfig, r as resolveUserConfig, t as defineConfig } from "./config-B_X6YTxy.mjs";
|
|
3
3
|
import * as Rolldown from "rolldown";
|
|
4
4
|
|
|
5
|
-
//#region src/
|
|
5
|
+
//#region src/build.d.ts
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Build with tsdown.
|
|
8
9
|
*/
|
|
9
10
|
declare function build(userOptions?: InlineConfig): Promise<TsdownBundle[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Build with `ResolvedConfigs`.
|
|
13
|
+
*
|
|
14
|
+
* **Internal API, not for public use**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
declare function buildWithConfigs(configs: ResolvedConfig[], configFiles: string[]): Promise<TsdownBundle[]>;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/features/debug.d.ts
|
|
20
|
+
declare function enableDebug(debug?: boolean | Arrayable<string>): void;
|
|
10
21
|
//#endregion
|
|
11
|
-
export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, CssOptions, DevtoolsOptions, DtsOptions, ExportsOptions, Format, InlineConfig, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PublintOptions, ReportOptions, ResolvedConfig, Rolldown, RolldownChunk, RolldownContext, Sourcemap, TreeshakingOptions, TsdownBundle, TsdownHooks, TsdownInputOption, UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build, defineConfig, globalLogger, mergeConfig };
|
|
22
|
+
export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, CssOptions, DevtoolsOptions, DtsOptions, ExportsOptions, Format, InlineConfig, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PublintOptions, ReportOptions, ResolvedConfig, Rolldown, RolldownChunk, RolldownContext, Sourcemap, TreeshakingOptions, TsdownBundle, TsdownHooks, TsdownInputOption, UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { a as globalLogger } from "./logger-D_2uXZBG.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { r as resolveUserConfig, t as mergeConfig } from "./options-D-CZFay6.mjs";
|
|
3
|
+
import { defineConfig } from "./config.mjs";
|
|
4
|
+
import { n as buildWithConfigs, t as build } from "./build-BZayr9FB.mjs";
|
|
5
|
+
import { t as enableDebug } from "./debug-Baqdx6K3.mjs";
|
|
6
|
+
import * as Rolldown from "rolldown";
|
|
4
7
|
|
|
5
|
-
export { Rolldown, build,
|
|
8
|
+
export { Rolldown, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
|
@@ -552,6 +552,12 @@ async function unrunImport(id) {
|
|
|
552
552
|
//#endregion
|
|
553
553
|
//#region src/config/options.ts
|
|
554
554
|
const debug = createDebug("tsdown:config:options");
|
|
555
|
+
/**
|
|
556
|
+
* Resolve user config into resolved configs
|
|
557
|
+
*
|
|
558
|
+
* **Internal API, not for public use**
|
|
559
|
+
* @private
|
|
560
|
+
*/
|
|
555
561
|
async function resolveUserConfig(userConfig, inlineConfig) {
|
|
556
562
|
let { entry, format = ["es"], plugins = [], clean = true, logLevel = "info", failOnWarn = "ci-only", customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, skipNodeModulesBundle = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env: env$1 = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process.cwd(), name, workspace, external, noExternal, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, inlineOnly, css, fixedExtension = platform === "node", devtools = false, write = true } = userConfig;
|
|
557
563
|
const pkg = await readPackageJson(cwd);
|
|
@@ -729,10 +735,4 @@ function filterConfig(filter, configCwd, name) {
|
|
|
729
735
|
}
|
|
730
736
|
|
|
731
737
|
//#endregion
|
|
732
|
-
|
|
733
|
-
function defineConfig(options) {
|
|
734
|
-
return options;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
//#endregion
|
|
738
|
-
export { loadConfigFile as a, formatBytes as c, cleanOutDir as d, fsCopy as f, lowestCommonAncestor as h, resolveUserConfig as i, defaultCssBundleName as l, fsRemove as m, mergeConfig as n, getPackageType as o, fsExists as p, mergeUserOptions as r, writeExports as s, defineConfig as t, cleanChunks as u };
|
|
738
|
+
export { getPackageType as a, defaultCssBundleName as c, fsCopy as d, fsExists as f, loadConfigFile as i, cleanChunks as l, lowestCommonAncestor as m, mergeUserOptions as n, writeExports as o, fsRemove as p, resolveUserConfig as r, formatBytes as s, mergeConfig as t, cleanOutDir as u };
|
package/dist/plugins.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as ResolvedConfig, v as ReportPlugin, w as TsdownBundle, y as Logger } from "./types-
|
|
1
|
+
import { s as ResolvedConfig, v as ReportPlugin, w as TsdownBundle, y as Logger } from "./types-_V4oT7uO.mjs";
|
|
2
2
|
import { Plugin } from "rolldown";
|
|
3
3
|
|
|
4
4
|
//#region src/features/external.d.ts
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as ShebangPlugin, c as ExternalPlugin, i as WatchPlugin, o as ReportPlugin, s as NodeProtocolPlugin } from "./build-BZayr9FB.mjs";
|
|
2
2
|
|
|
3
3
|
export { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin, WatchPlugin };
|
package/dist/run.mjs
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as globalLogger
|
|
3
|
-
import { t as version } from "./package-
|
|
2
|
+
import { a as globalLogger } from "./logger-D_2uXZBG.mjs";
|
|
3
|
+
import { t as version } from "./package-C6IsJEnG.mjs";
|
|
4
|
+
import { t as enableDebug } from "./debug-Baqdx6K3.mjs";
|
|
4
5
|
import module from "node:module";
|
|
5
6
|
import process from "node:process";
|
|
6
7
|
import { dim } from "ansis";
|
|
7
|
-
import { createDebug, enable, namespaces } from "obug";
|
|
8
8
|
import { VERSION } from "rolldown";
|
|
9
9
|
import { x } from "tinyexec";
|
|
10
10
|
import { cac } from "cac";
|
|
11
11
|
|
|
12
|
-
//#region src/features/debug.ts
|
|
13
|
-
const debugLog = createDebug("tsdown:debug");
|
|
14
|
-
function enableDebug(cliOptions) {
|
|
15
|
-
const { debug } = cliOptions;
|
|
16
|
-
if (!debug) return;
|
|
17
|
-
let namespace;
|
|
18
|
-
if (debug === true) namespace = "tsdown:*";
|
|
19
|
-
else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
|
|
20
|
-
const ns = namespaces();
|
|
21
|
-
if (ns) namespace += `,${ns}`;
|
|
22
|
-
enable(namespace);
|
|
23
|
-
debugLog("Debugging enabled", namespace);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
12
|
//#region src/cli.ts
|
|
28
13
|
const cli = cac("tsdown");
|
|
29
14
|
cli.help().version(version);
|
|
@@ -33,7 +18,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
33
18
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--external <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
|
|
34
19
|
globalLogger.level = flags.logLevel || "info";
|
|
35
20
|
globalLogger.info(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
|
|
36
|
-
const { build: build$1 } = await import("./
|
|
21
|
+
const { build: build$1 } = await import("./build-DN921Mon.mjs");
|
|
37
22
|
if (input.length > 0) flags.entry = input;
|
|
38
23
|
await build$1(flags);
|
|
39
24
|
});
|
|
@@ -57,7 +42,7 @@ cli.command("migrate", "[deprecated] Migrate from tsup to tsdown. Use \"npx tsdo
|
|
|
57
42
|
});
|
|
58
43
|
async function runCLI() {
|
|
59
44
|
cli.parse(process.argv, { run: false });
|
|
60
|
-
enableDebug(cli.options);
|
|
45
|
+
enableDebug(cli.options.debug);
|
|
61
46
|
try {
|
|
62
47
|
await cli.runMatchedCommand();
|
|
63
48
|
} catch (error) {
|
|
@@ -1018,4 +1018,4 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
1018
1018
|
unused: false | UnusedOptions;
|
|
1019
1019
|
}>;
|
|
1020
1020
|
//#endregion
|
|
1021
|
-
export { OutExtensionFactory as A, CopyOptions as B, RolldownChunk as C, ChunkAddonFunction as D, ChunkAddon as E, RolldownContext as F, TsdownHooks as I, DevtoolsOptions as L, PackageJsonWithPath as M, PackageType as N, ChunkAddonObject as O, BuildContext as P, CssOptions as R, ExportsOptions as S, AttwOptions as T, CopyOptionsFn as V, ReportOptions as _, NoExternalFn as a, globalLogger as b, Sourcemap as c, UnusedOptions as d, UserConfig as f, Workspace as g, WithEnabled as h, InlineConfig as i, OutExtensionObject as j, OutExtensionContext as k, TreeshakingOptions as l, UserConfigFn as m, DtsOptions as n, NormalizedFormat as o, UserConfigExport as p, Format as r, ResolvedConfig as s, CIOption as t, TsdownInputOption as u, ReportPlugin as v, TsdownBundle as w, PublintOptions as x, Logger as y, CopyEntry as z };
|
|
1021
|
+
export { OutExtensionFactory as A, CopyOptions as B, RolldownChunk as C, ChunkAddonFunction as D, ChunkAddon as E, RolldownContext as F, Arrayable as H, TsdownHooks as I, DevtoolsOptions as L, PackageJsonWithPath as M, PackageType as N, ChunkAddonObject as O, BuildContext as P, CssOptions as R, ExportsOptions as S, AttwOptions as T, CopyOptionsFn as V, ReportOptions as _, NoExternalFn as a, globalLogger as b, Sourcemap as c, UnusedOptions as d, UserConfig as f, Workspace as g, WithEnabled as h, InlineConfig as i, OutExtensionObject as j, OutExtensionContext as k, TreeshakingOptions as l, UserConfigFn as m, DtsOptions as n, NormalizedFormat as o, UserConfigExport as p, Format as r, ResolvedConfig as s, CIOption as t, TsdownInputOption as u, ReportPlugin as v, TsdownBundle as w, PublintOptions as x, Logger as y, CopyEntry as z };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.0-beta.
|
|
4
|
+
"version": "0.19.0-beta.5",
|
|
5
5
|
"description": "The Elegant Bundler for Libraries",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
"import-without-cache": "^0.2.5",
|
|
83
83
|
"obug": "^2.1.1",
|
|
84
84
|
"picomatch": "^4.0.3",
|
|
85
|
-
"rolldown": "1.0.0-beta.
|
|
85
|
+
"rolldown": "1.0.0-beta.59",
|
|
86
86
|
"rolldown-plugin-dts": "^0.20.0",
|
|
87
87
|
"semver": "^7.7.3",
|
|
88
88
|
"tinyexec": "^1.0.2",
|
|
89
89
|
"tinyglobby": "^0.2.15",
|
|
90
90
|
"tree-kill": "^1.2.2",
|
|
91
91
|
"unconfig-core": "^7.4.2",
|
|
92
|
-
"unrun": "^0.2.
|
|
92
|
+
"unrun": "^0.2.23"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@arethetypeswrong/core": "^0.18.2",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"@types/node": "^25.0.3",
|
|
100
100
|
"@types/picomatch": "^4.0.2",
|
|
101
101
|
"@types/semver": "^7.7.1",
|
|
102
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
102
|
+
"@typescript/native-preview": "7.0.0-dev.20260107.1",
|
|
103
103
|
"@unocss/eslint-plugin": "^66.5.12",
|
|
104
|
-
"@vitejs/devtools": "^0.0.0-alpha.
|
|
104
|
+
"@vitejs/devtools": "^0.0.0-alpha.24",
|
|
105
105
|
"@vitest/coverage-v8": "4.0.16",
|
|
106
106
|
"@vitest/ui": "^4.0.16",
|
|
107
107
|
"@vueuse/core": "^14.1.0",
|