tsdown 0.7.0 → 0.7.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/{external-UOzsEfbe.js → external-DZHHBSOL.js} +13 -4
- package/dist/index.js +1 -1
- package/dist/{migrate-C215d2_a.js → migrate-DSjN3NWz.js} +1 -1
- package/dist/package-BJ0L6v49.js +6 -0
- package/dist/plugins.js +1 -1
- package/dist/run.js +2 -2
- package/package.json +2 -2
- package/dist/package-D9ZwWI0B.js +0 -6
|
@@ -63,13 +63,13 @@ function getTempDtsDir(format) {
|
|
|
63
63
|
return `${TEMP_DTS_DIR}-${format}`;
|
|
64
64
|
}
|
|
65
65
|
async function bundleDts(options, jsExtension, format) {
|
|
66
|
+
debug$1("Bundle dts for %s", format);
|
|
66
67
|
const { dts: dts$1, bundleDts: bundleDts$1 } = options;
|
|
67
68
|
const ext = jsExtension.replace("j", "t");
|
|
68
69
|
const dtsOutDir = path.resolve(options.outDir, getTempDtsDir(format));
|
|
69
70
|
const dtsEntry = Object.fromEntries(Object.keys(options.entry).map((key) => [key, path.resolve(dtsOutDir, `${key}.d.${ext}`)]));
|
|
70
71
|
let outDir = options.outDir;
|
|
71
|
-
|
|
72
|
-
if (extraOutdir) outDir = path.resolve(outDir, extraOutdir);
|
|
72
|
+
if (dts$1.extraOutdir) outDir = path.resolve(outDir, dts$1.extraOutdir);
|
|
73
73
|
await build({
|
|
74
74
|
input: dtsEntry,
|
|
75
75
|
onLog(level, log, defaultHandler) {
|
|
@@ -78,10 +78,12 @@ async function bundleDts(options, jsExtension, format) {
|
|
|
78
78
|
plugins: [bundleDts$1.resolve && ResolveDtsPlugin(bundleDts$1.resolve !== true ? bundleDts$1.resolve : void 0), dts()],
|
|
79
79
|
output: {
|
|
80
80
|
dir: outDir,
|
|
81
|
-
entryFileNames: `[name].d.${ext}
|
|
81
|
+
entryFileNames: `[name].d.${ext}`,
|
|
82
|
+
chunkFileNames: `[name]-[hash].d.${ext}`
|
|
82
83
|
}
|
|
83
84
|
});
|
|
84
85
|
await fsRemove(dtsOutDir);
|
|
86
|
+
debug$1("Bundle dts done for %s", format);
|
|
85
87
|
}
|
|
86
88
|
let resolver;
|
|
87
89
|
function ResolveDtsPlugin(resolveOnly) {
|
|
@@ -96,7 +98,14 @@ function ResolveDtsPlugin(resolveOnly) {
|
|
|
96
98
|
"import",
|
|
97
99
|
"require"
|
|
98
100
|
],
|
|
99
|
-
extensions: [
|
|
101
|
+
extensions: [
|
|
102
|
+
".d.ts",
|
|
103
|
+
".d.mts",
|
|
104
|
+
".d.cts",
|
|
105
|
+
".ts",
|
|
106
|
+
".mts",
|
|
107
|
+
".cts"
|
|
108
|
+
],
|
|
100
109
|
modules: ["node_modules", "node_modules/@types"]
|
|
101
110
|
});
|
|
102
111
|
},
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineConfig } from "./config-0LDjKwZ7.js";
|
|
2
|
-
import { ExternalPlugin, bundleDts, debounce, fsExists, fsRemove, getTempDtsDir, lowestCommonAncestor, toArray } from "./external-
|
|
2
|
+
import { ExternalPlugin, bundleDts, debounce, fsExists, fsRemove, getTempDtsDir, lowestCommonAncestor, toArray } from "./external-DZHHBSOL.js";
|
|
3
3
|
import { debug, logger, setSilent } from "./logger-9p9U7Sx7.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
package/dist/plugins.js
CHANGED
package/dist/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logger, setSilent } from "./logger-9p9U7Sx7.js";
|
|
2
|
-
import { version } from "./package-
|
|
2
|
+
import { version } from "./package-BJ0L6v49.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { VERSION } from "rolldown";
|
|
5
5
|
import { dim } from "ansis";
|
|
@@ -16,7 +16,7 @@ cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).op
|
|
|
16
16
|
await build$1(flags);
|
|
17
17
|
});
|
|
18
18
|
cli.command("migrate", "Migrate from tsup to tsdown").option("-c, --cwd <dir>", "Working directory").option("-d, --dry-run", "Dry run").action(async (args) => {
|
|
19
|
-
const { migrate } = await import("./migrate-
|
|
19
|
+
const { migrate } = await import("./migrate-DSjN3NWz.js");
|
|
20
20
|
await migrate(args);
|
|
21
21
|
});
|
|
22
22
|
async function runCLI() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "An even faster bundler powered by Rolldown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"find-up-simple": "^1.0.1",
|
|
64
64
|
"oxc-resolver": "^5.0.1",
|
|
65
65
|
"rolldown": "^1.0.0-beta.7",
|
|
66
|
-
"rolldown-plugin-dts": "https://pkg.pr.new/sxzz/rolldown-plugin-dts@
|
|
66
|
+
"rolldown-plugin-dts": "https://pkg.pr.new/sxzz/rolldown-plugin-dts@7b446ed",
|
|
67
67
|
"tinyglobby": "^0.2.12",
|
|
68
68
|
"unconfig": "^7.3.1",
|
|
69
69
|
"unplugin-isolated-decl": "^0.13.5"
|