tsdown 0.21.6 → 0.21.7
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/{build-MDnn2xGL.mjs → build-DU-BFLB1.mjs} +27 -11
- package/dist/{config-CgCV7Kdu.d.mts → config-BJiwtsMo.d.mts} +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/{debug-C4FmgzkJ.mjs → debug-BmAPbhgA.mjs} +1 -1
- package/dist/{format-DXnmiQIy.mjs → format-_3CEX8E7.mjs} +5 -2
- package/dist/{general-CRszZCrY.mjs → general-D3muxt2f.mjs} +3 -11
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/internal.d.mts +2 -2
- package/dist/internal.mjs +1 -1
- package/dist/{logger-BU0v7CAk.mjs → logger-uV8l1UFa.mjs} +1 -1
- package/dist/{options-B1Ye5hV8.mjs → options-j2tUAf6W.mjs} +4 -4
- package/dist/{package-lMx2nkh2.mjs → package-CBgnLfjl.mjs} +1 -1
- package/dist/plugins.d.mts +2 -2
- package/dist/plugins.mjs +2 -2
- package/dist/run.mjs +4 -4
- package/dist/{types-qUp2BCEq.d.mts → types-DD-uKQPn.d.mts} +10 -4
- package/dist/{watch-BHPVmWIr.mjs → watch-ZJbRq-K8.mjs} +3 -3
- package/package.json +9 -9
- package/dist/build-C1dAKhHj.mjs +0 -2
- /package/dist/{detect-DN3DXXYt.mjs → detect-h8ZFBH96.mjs} +0 -0
- /package/dist/{logger-DtCm1ySP.d.mts → logger-DLaktdLm.d.mts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
2
|
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as getPackageType, c as isGlobEntry, d as cleanOutDir, i as loadConfigFile, l as toObjectEntry, n as mergeUserOptions, o as writeExports, r as resolveUserConfig, s as buildExe, t as mergeConfig, u as cleanChunks } from "./options-B1Ye5hV8.mjs";
|
|
3
|
+
import { a as getPackageType, c as isGlobEntry, d as cleanOutDir, i as loadConfigFile, l as toObjectEntry, n as mergeUserOptions, o as writeExports, r as resolveUserConfig, s as buildExe, t as mergeConfig, u as cleanChunks } from "./options-j2tUAf6W.mjs";
|
|
5
4
|
import { r as fsRemove } from "./fs-Dd6Htx2P.mjs";
|
|
6
|
-
import { a as
|
|
7
|
-
import { a as
|
|
8
|
-
import { a as
|
|
9
|
-
import { t as
|
|
5
|
+
import { a as pkgExists, l as slash, n as importWithError, o as promiseWithResolvers, t as debounce } from "./general-D3muxt2f.mjs";
|
|
6
|
+
import { a as globalLogger, t as LogLevels } from "./logger-uV8l1UFa.mjs";
|
|
7
|
+
import { a as getShimsInject, r as DepsPlugin } from "./format-_3CEX8E7.mjs";
|
|
8
|
+
import { a as ReportPlugin, i as ShebangPlugin, n as endsWithConfig, o as NodeProtocolPlugin, r as addOutDirToChunks, s as copy, t as WatchPlugin } from "./watch-ZJbRq-K8.mjs";
|
|
9
|
+
import { t as version } from "./package-CBgnLfjl.mjs";
|
|
10
10
|
import { mkdtemp, readFile, readdir, writeFile } from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import process from "node:process";
|
|
@@ -25,6 +25,18 @@ import { Hookable } from "hookable";
|
|
|
25
25
|
const treeKill = __cjs_require("tree-kill");
|
|
26
26
|
import { formatWithOptions, inspect } from "node:util";
|
|
27
27
|
import { importGlobPlugin } from "rolldown/experimental";
|
|
28
|
+
//#region \0rolldown/runtime.js
|
|
29
|
+
var __defProp = Object.defineProperty;
|
|
30
|
+
var __exportAll = (all, no_symbols) => {
|
|
31
|
+
let target = {};
|
|
32
|
+
for (var name in all) __defProp(target, name, {
|
|
33
|
+
get: all[name],
|
|
34
|
+
enumerable: true
|
|
35
|
+
});
|
|
36
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
28
40
|
//#region src/config/workspace.ts
|
|
29
41
|
const debug$4 = createDebug("tsdown:config:workspace");
|
|
30
42
|
const DEFAULT_EXCLUDE_WORKSPACE = [
|
|
@@ -192,7 +204,7 @@ async function attw(options, tarball) {
|
|
|
192
204
|
if (invalidRules.length) options.logger.warn(`attw config option 'ignoreRules' contains invalid value '${invalidRules.join(", ")}'.`);
|
|
193
205
|
const t = performance.now();
|
|
194
206
|
debug$2("Running attw check");
|
|
195
|
-
const attwCore = await importWithError("@arethetypeswrong/core"
|
|
207
|
+
const attwCore = options.attw.module || await importWithError("@arethetypeswrong/core");
|
|
196
208
|
const pkg = attwCore.createPackageFromTarballData(tarball);
|
|
197
209
|
const checkResult = await attwCore.checkPackage(pkg, attwOptions);
|
|
198
210
|
let errorMessage;
|
|
@@ -244,8 +256,8 @@ async function publint(options, tarball) {
|
|
|
244
256
|
}
|
|
245
257
|
const t = performance.now();
|
|
246
258
|
debug$1("Running publint");
|
|
247
|
-
const { publint } = await importWithError("publint"
|
|
248
|
-
const { formatMessage } = await importWithError("publint/utils"
|
|
259
|
+
const { publint } = options.publint.module?.[0] || await importWithError("publint");
|
|
260
|
+
const { formatMessage } = options.publint.module?.[1] || await importWithError("publint/utils");
|
|
249
261
|
const { messages } = await publint({
|
|
250
262
|
...options.publint,
|
|
251
263
|
pack: { tarball: tarball.buffer }
|
|
@@ -322,7 +334,7 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
322
334
|
async function packTarball(packageJsonPath) {
|
|
323
335
|
const pkgDir = path.dirname(packageJsonPath);
|
|
324
336
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
325
|
-
const { detect } = await import("./detect-
|
|
337
|
+
const { detect } = await import("./detect-h8ZFBH96.mjs");
|
|
326
338
|
try {
|
|
327
339
|
const detected = await detect({ cwd: pkgDir });
|
|
328
340
|
if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
|
|
@@ -669,6 +681,10 @@ function shortcuts(restart) {
|
|
|
669
681
|
}
|
|
670
682
|
//#endregion
|
|
671
683
|
//#region src/build.ts
|
|
684
|
+
var build_exports = /* @__PURE__ */ __exportAll({
|
|
685
|
+
build: () => build$1,
|
|
686
|
+
buildWithConfigs: () => buildWithConfigs
|
|
687
|
+
});
|
|
672
688
|
const asyncDispose = Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose");
|
|
673
689
|
/**
|
|
674
690
|
* Build with tsdown.
|
|
@@ -832,4 +848,4 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
|
|
|
832
848
|
}
|
|
833
849
|
}
|
|
834
850
|
//#endregion
|
|
835
|
-
export { buildWithConfigs as n, build$1 as t };
|
|
851
|
+
export { buildWithConfigs as n, build_exports as r, build$1 as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as UserConfig, f as UserConfigExport, i as InlineConfig, o as ResolvedConfig, p as UserConfigFn } from "./types-
|
|
1
|
+
import { d as UserConfig, f as UserConfigExport, i as InlineConfig, o as ResolvedConfig, p as UserConfigFn } from "./types-DD-uKQPn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/config/options.d.ts
|
|
4
4
|
/**
|
package/dist/config.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./types-
|
|
2
|
-
import { n as mergeConfig, t as defineConfig } from "./config-
|
|
1
|
+
import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./types-DD-uKQPn.mjs";
|
|
2
|
+
import { n as mergeConfig, t as defineConfig } from "./config-BJiwtsMo.mjs";
|
|
3
3
|
export { UserConfig, UserConfigExport, UserConfigFn, defineConfig, mergeConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as resolveComma, u as toArray } from "./general-
|
|
1
|
+
import { s as resolveComma, u as toArray } from "./general-D3muxt2f.mjs";
|
|
2
2
|
import { createDebug, enable, namespaces } from "obug";
|
|
3
3
|
//#region src/features/debug.ts
|
|
4
4
|
const debugLog = createDebug("tsdown:debug");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveRegex, l as slash, r as matchPattern, u as toArray } from "./general-
|
|
1
|
+
import { c as resolveRegex, l as slash, r as matchPattern, u as toArray } from "./general-D3muxt2f.mjs";
|
|
2
2
|
import { isBuiltin } from "node:module";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
@@ -127,7 +127,10 @@ function DepsPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBund
|
|
|
127
127
|
async function externalStrategy(id, importer, resolved) {
|
|
128
128
|
if (id === shimFile) return false;
|
|
129
129
|
if (alwaysBundle?.(id, importer)) return "no-external";
|
|
130
|
-
if (skipNodeModulesBundle && resolved && (resolved.external || RE_NODE_MODULES.test(resolved.id)))
|
|
130
|
+
if (skipNodeModulesBundle && resolved && (resolved.external || RE_NODE_MODULES.test(resolved.id))) {
|
|
131
|
+
const resolvedDep = await resolveDepSubpath(id, resolved);
|
|
132
|
+
return resolvedDep ? [true, resolvedDep] : true;
|
|
133
|
+
}
|
|
131
134
|
if (deps) {
|
|
132
135
|
if (deps.includes(id) || deps.some((dep) => id.startsWith(`${dep}/`))) {
|
|
133
136
|
const resolvedDep = await resolveDepSubpath(id, resolved);
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
|
-
const
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
-
const picomatch = __cjs_require("picomatch");
|
|
6
|
-
//#region \0rolldown/runtime.js
|
|
7
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
8
|
-
//#endregion
|
|
2
|
+
const picomatch = __cjs_createRequire(import.meta.url)("picomatch");
|
|
9
3
|
//#region src/utils/general.ts
|
|
10
4
|
function toArray(val, defaultValue) {
|
|
11
5
|
if (Array.isArray(val)) return val;
|
|
@@ -41,11 +35,9 @@ function pkgExists(moduleName) {
|
|
|
41
35
|
} catch {}
|
|
42
36
|
return false;
|
|
43
37
|
}
|
|
44
|
-
async function importWithError(moduleName
|
|
45
|
-
let resolved;
|
|
46
|
-
if (resolvePaths) resolved = pathToFileURL(__require.resolve(moduleName, { paths: resolvePaths })).href;
|
|
38
|
+
async function importWithError(moduleName) {
|
|
47
39
|
try {
|
|
48
|
-
return await import(
|
|
40
|
+
return await import(moduleName);
|
|
49
41
|
} catch (error) {
|
|
50
42
|
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
51
43
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as Arrayable, n as Logger, r as globalLogger } from "./logger-
|
|
2
|
-
import { A as RolldownContext, B as TsdownBundle, C as ChunkAddonObject, D as PackageJsonWithPath, E as OutExtensionObject, F as DepsConfig, H as CopyOptions, L as NoExternalFn, M as ExeOptions, N as SeaConfig, O as PackageType, P as DevtoolsOptions, R as ResolvedDepsConfig, S as ChunkAddonFunction, T as OutExtensionFactory, U as CopyOptionsFn, V as CopyEntry, a as NormalizedFormat, b as AttwOptions, c as TreeshakingOptions, d as UserConfig, f as UserConfigExport, g as ReportOptions, h as Workspace, i as InlineConfig, j as TsdownHooks, k as BuildContext, l as TsdownInputOption, m as WithEnabled, n as DtsOptions, o as ResolvedConfig, p as UserConfigFn, r as Format, s as Sourcemap, t as CIOption, u as UnusedOptions, v as PublintOptions, w as OutExtensionContext, x as ChunkAddon, y as ExportsOptions, z as RolldownChunk } from "./types-
|
|
3
|
-
import { n as mergeConfig, r as resolveUserConfig, t as defineConfig } from "./config-
|
|
1
|
+
import { i as Arrayable, n as Logger, r as globalLogger } from "./logger-DLaktdLm.mjs";
|
|
2
|
+
import { A as RolldownContext, B as TsdownBundle, C as ChunkAddonObject, D as PackageJsonWithPath, E as OutExtensionObject, F as DepsConfig, H as CopyOptions, L as NoExternalFn, M as ExeOptions, N as SeaConfig, O as PackageType, P as DevtoolsOptions, R as ResolvedDepsConfig, S as ChunkAddonFunction, T as OutExtensionFactory, U as CopyOptionsFn, V as CopyEntry, a as NormalizedFormat, b as AttwOptions, c as TreeshakingOptions, d as UserConfig, f as UserConfigExport, g as ReportOptions, h as Workspace, i as InlineConfig, j as TsdownHooks, k as BuildContext, l as TsdownInputOption, m as WithEnabled, n as DtsOptions, o as ResolvedConfig, p as UserConfigFn, r as Format, s as Sourcemap, t as CIOption, u as UnusedOptions, v as PublintOptions, w as OutExtensionContext, x as ChunkAddon, y as ExportsOptions, z as RolldownChunk } from "./types-DD-uKQPn.mjs";
|
|
3
|
+
import { n as mergeConfig, r as resolveUserConfig, t as defineConfig } from "./config-BJiwtsMo.mjs";
|
|
4
4
|
import * as Rolldown from "rolldown";
|
|
5
5
|
|
|
6
6
|
//#region src/build.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as buildWithConfigs, t as build } from "./build-DU-BFLB1.mjs";
|
|
2
|
+
import { r as resolveUserConfig, t as mergeConfig } from "./options-j2tUAf6W.mjs";
|
|
3
|
+
import { a as globalLogger } from "./logger-uV8l1UFa.mjs";
|
|
3
4
|
import { defineConfig } from "./config.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { t as enableDebug } from "./debug-C4FmgzkJ.mjs";
|
|
5
|
+
import { t as enableDebug } from "./debug-BmAPbhgA.mjs";
|
|
6
6
|
import * as Rolldown from "rolldown";
|
|
7
7
|
export { Rolldown, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Logger, o as MarkPartial, s as Overwrite } from "./logger-
|
|
1
|
+
import { n as Logger, o as MarkPartial, s as Overwrite } from "./logger-DLaktdLm.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/fs.d.ts
|
|
4
4
|
declare function fsExists(path: string): Promise<boolean>;
|
|
@@ -7,6 +7,6 @@ declare function fsRemove(path: string): Promise<void>;
|
|
|
7
7
|
//#region src/utils/general.d.ts
|
|
8
8
|
declare function toArray<T>(val: T | T[] | null | undefined, defaultValue?: T): T[];
|
|
9
9
|
declare function resolveComma<T extends string>(arr: T[]): T[];
|
|
10
|
-
declare function importWithError<T>(moduleName: string
|
|
10
|
+
declare function importWithError<T>(moduleName: string): Promise<T>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { type Logger, type MarkPartial, type Overwrite, fsExists, fsRemove, importWithError, resolveComma, toArray };
|
package/dist/internal.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as importWithError, s as resolveComma, u as toArray } from "./general-CRszZCrY.mjs";
|
|
2
1
|
import { n as fsExists, r as fsRemove } from "./fs-Dd6Htx2P.mjs";
|
|
2
|
+
import { n as importWithError, s as resolveComma, u as toArray } from "./general-D3muxt2f.mjs";
|
|
3
3
|
export { fsExists, fsRemove, importWithError, resolveComma, toArray };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
2
|
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
3
|
-
import { a as pkgExists, c as resolveRegex, l as slash, n as importWithError, r as matchPattern, s as resolveComma, u as toArray } from "./general-CRszZCrY.mjs";
|
|
4
3
|
import { a as lowestCommonAncestor, i as fsStat, n as fsExists, o as stripExtname, r as fsRemove } from "./fs-Dd6Htx2P.mjs";
|
|
5
|
-
import { a as
|
|
6
|
-
import { i as
|
|
4
|
+
import { a as pkgExists, c as resolveRegex, l as slash, n as importWithError, r as matchPattern, s as resolveComma, u as toArray } from "./general-D3muxt2f.mjs";
|
|
5
|
+
import { a as globalLogger, i as getNameLabel, n as createLogger, r as generateColor } from "./logger-uV8l1UFa.mjs";
|
|
6
|
+
import { i as resolveDepsConfig, n as formatBytes, t as detectIndentation } from "./format-_3CEX8E7.mjs";
|
|
7
7
|
import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import process, { env } from "node:process";
|
|
@@ -11,7 +11,6 @@ import { blue, bold, dim, red, underline } from "ansis";
|
|
|
11
11
|
import { createDefu } from "defu";
|
|
12
12
|
import { createDebug } from "obug";
|
|
13
13
|
import { glob, isDynamicPattern } from "tinyglobby";
|
|
14
|
-
import { pathToFileURL } from "node:url";
|
|
15
14
|
const picomatch = __cjs_require("picomatch");
|
|
16
15
|
import { RE_CSS, RE_DTS, RE_NODE_MODULES } from "rolldown-plugin-dts/internal";
|
|
17
16
|
import { tmpdir } from "node:os";
|
|
@@ -21,6 +20,7 @@ import { readFileSync, writeFileSync } from "node:fs";
|
|
|
21
20
|
const minVersion = __cjs_require("semver/ranges/min-version.js");
|
|
22
21
|
import { up } from "empathic/find";
|
|
23
22
|
import { up as up$1 } from "empathic/package";
|
|
23
|
+
import { pathToFileURL } from "node:url";
|
|
24
24
|
import { init, isSupported } from "import-without-cache";
|
|
25
25
|
import { createConfigCoreLoader } from "unconfig-core";
|
|
26
26
|
//#region node_modules/.pnpm/is-in-ci@2.0.0/node_modules/is-in-ci/index.js
|
package/dist/plugins.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Logger } from "./logger-
|
|
2
|
-
import { B as TsdownBundle, I as DepsPlugin, _ as ReportPlugin } from "./types-
|
|
1
|
+
import { n as Logger } from "./logger-DLaktdLm.mjs";
|
|
2
|
+
import { B as TsdownBundle, I as DepsPlugin, _ as ReportPlugin } from "./types-DD-uKQPn.mjs";
|
|
3
3
|
import { Plugin } from "rolldown";
|
|
4
4
|
|
|
5
5
|
//#region src/features/node-protocol.d.ts
|
package/dist/plugins.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as DepsPlugin } from "./format-
|
|
2
|
-
import { a as ReportPlugin, i as ShebangPlugin, o as NodeProtocolPlugin, t as WatchPlugin } from "./watch-
|
|
1
|
+
import { r as DepsPlugin } from "./format-_3CEX8E7.mjs";
|
|
2
|
+
import { a as ReportPlugin, i as ShebangPlugin, o as NodeProtocolPlugin, t as WatchPlugin } from "./watch-ZJbRq-K8.mjs";
|
|
3
3
|
export { DepsPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin, WatchPlugin };
|
package/dist/run.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
3
3
|
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
4
|
-
import { a as globalLogger } from "./logger-
|
|
5
|
-
import { t as version } from "./package-
|
|
6
|
-
import { t as enableDebug } from "./debug-
|
|
4
|
+
import { a as globalLogger } from "./logger-uV8l1UFa.mjs";
|
|
5
|
+
import { t as version } from "./package-CBgnLfjl.mjs";
|
|
6
|
+
import { t as enableDebug } from "./debug-BmAPbhgA.mjs";
|
|
7
7
|
import module from "node:module";
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
import { blue, hex, yellow } from "ansis";
|
|
@@ -20,7 +20,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
20
20
|
}).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("--deps.never-bundle <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("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").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) => {
|
|
21
21
|
globalLogger.level = flags.logLevel || "info";
|
|
22
22
|
globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
|
|
23
|
-
const { build } = await import("./build-
|
|
23
|
+
const { build } = await import("./build-DU-BFLB1.mjs").then((n) => n.r);
|
|
24
24
|
if (input.length > 0) flags.entry = input;
|
|
25
25
|
await build(flags);
|
|
26
26
|
});
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { a as Awaitable, i as Arrayable, n as Logger, o as MarkPartial, s as Overwrite, t as LogLevel } from "./logger-
|
|
1
|
+
import { a as Awaitable, i as Arrayable, n as Logger, o as MarkPartial, s as Overwrite, t as LogLevel } from "./logger-DLaktdLm.mjs";
|
|
2
2
|
import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, TreeshakingOptions } from "rolldown";
|
|
3
3
|
import { Hookable } from "hookable";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
|
-
import * as _tsdown_css0 from "@tsdown/css";
|
|
5
|
+
import * as _$_tsdown_css0 from "@tsdown/css";
|
|
6
6
|
import { StartOptions } from "@vitejs/devtools/cli-commands";
|
|
7
7
|
import { ExeExtensionOptions } from "@tsdown/exe";
|
|
8
|
+
import * as _$_arethetypeswrong_core0 from "@arethetypeswrong/core";
|
|
8
9
|
import { CheckPackageOptions } from "@arethetypeswrong/core";
|
|
10
|
+
import * as _$publint from "publint";
|
|
9
11
|
import { Options } from "publint";
|
|
12
|
+
import * as _$publint_utils0 from "publint/utils";
|
|
10
13
|
import { Options as Options$1 } from "rolldown-plugin-dts";
|
|
11
14
|
import { Options as UnusedOptions } from "unplugin-unused";
|
|
12
15
|
|
|
@@ -520,6 +523,7 @@ type ChunkAddon = ChunkAddonObject | ChunkAddonFunction | string;
|
|
|
520
523
|
//#endregion
|
|
521
524
|
//#region src/features/pkg/attw.d.ts
|
|
522
525
|
interface AttwOptions extends CheckPackageOptions {
|
|
526
|
+
module?: typeof _$_arethetypeswrong_core0;
|
|
523
527
|
/**
|
|
524
528
|
* Profiles select a set of resolution modes to require/ignore. All are evaluated but failures outside
|
|
525
529
|
* of those required are ignored.
|
|
@@ -657,7 +661,9 @@ interface ExportsOptions {
|
|
|
657
661
|
}
|
|
658
662
|
//#endregion
|
|
659
663
|
//#region src/features/pkg/publint.d.ts
|
|
660
|
-
interface PublintOptions extends Omit<Options, "pack" | "pkgDir"> {
|
|
664
|
+
interface PublintOptions extends Omit<Options, "pack" | "pkgDir"> {
|
|
665
|
+
module?: [typeof _$publint, typeof _$publint_utils0];
|
|
666
|
+
}
|
|
661
667
|
//#endregion
|
|
662
668
|
//#region src/features/report.d.ts
|
|
663
669
|
interface ReportOptions {
|
|
@@ -1107,7 +1113,7 @@ interface UserConfig {
|
|
|
1107
1113
|
* **[experimental]** CSS options.
|
|
1108
1114
|
* Requires `@tsdown/css` to be installed.
|
|
1109
1115
|
*/
|
|
1110
|
-
css?: _tsdown_css0.CssOptions;
|
|
1116
|
+
css?: _$_tsdown_css0.CssOptions;
|
|
1111
1117
|
/**
|
|
1112
1118
|
* @deprecated Use `css.inject` instead.
|
|
1113
1119
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as noop, s as resolveComma, u as toArray } from "./general-CRszZCrY.mjs";
|
|
2
1
|
import { n as fsExists, t as fsCopy } from "./fs-Dd6Htx2P.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { i as noop, s as resolveComma, u as toArray } from "./general-D3muxt2f.mjs";
|
|
3
|
+
import { o as prettyFormat } from "./logger-uV8l1UFa.mjs";
|
|
4
|
+
import { n as formatBytes } from "./format-_3CEX8E7.mjs";
|
|
5
5
|
import { builtinModules } from "node:module";
|
|
6
6
|
import { chmod } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.21.
|
|
4
|
+
"version": "0.21.7",
|
|
5
5
|
"description": "The Elegant Bundler for Libraries",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"publint": "^0.3.0",
|
|
53
53
|
"typescript": "^5.0.0 || ^6.0.0",
|
|
54
54
|
"unplugin-unused": "^0.5.0",
|
|
55
|
-
"@tsdown/css": "0.21.
|
|
56
|
-
"@tsdown/exe": "0.21.
|
|
55
|
+
"@tsdown/css": "0.21.7",
|
|
56
|
+
"@tsdown/exe": "0.21.7"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@arethetypeswrong/core": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"obug": "^2.1.1",
|
|
89
89
|
"picomatch": "^4.0.4",
|
|
90
90
|
"rolldown": "1.0.0-rc.12",
|
|
91
|
-
"rolldown-plugin-dts": "^0.23.
|
|
91
|
+
"rolldown-plugin-dts": "^0.23.2",
|
|
92
92
|
"semver": "^7.7.4",
|
|
93
93
|
"tinyexec": "^1.0.4",
|
|
94
94
|
"tinyglobby": "^0.2.15",
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@arethetypeswrong/core": "^0.18.2",
|
|
106
|
-
"@sxzz/eslint-config": "^7.8.
|
|
106
|
+
"@sxzz/eslint-config": "^7.8.4",
|
|
107
107
|
"@sxzz/prettier-config": "^2.3.1",
|
|
108
|
-
"@sxzz/test-utils": "^0.5.
|
|
108
|
+
"@sxzz/test-utils": "^0.5.16",
|
|
109
109
|
"@types/node": "^25.5.0",
|
|
110
110
|
"@types/picomatch": "^4.0.2",
|
|
111
111
|
"@types/semver": "^7.7.1",
|
|
112
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
112
|
+
"@typescript/native-preview": "7.0.0-dev.20260328.1",
|
|
113
113
|
"@unocss/eslint-plugin": "^66.6.7",
|
|
114
114
|
"@vitejs/devtools": "^0.1.11",
|
|
115
115
|
"@vitest/coverage-v8": "^4.1.2",
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"vite": "^8.0.3",
|
|
139
139
|
"vitest": "^4.1.2",
|
|
140
140
|
"vue": "^3.5.31",
|
|
141
|
-
"@tsdown/css": "0.21.
|
|
142
|
-
"@tsdown/exe": "0.21.
|
|
141
|
+
"@tsdown/css": "0.21.7",
|
|
142
|
+
"@tsdown/exe": "0.21.7"
|
|
143
143
|
},
|
|
144
144
|
"prettier": "@sxzz/prettier-config",
|
|
145
145
|
"scripts": {
|
package/dist/build-C1dAKhHj.mjs
DELETED
|
File without changes
|
|
File without changes
|