tsdown 0.2.9 → 0.2.11
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-uGOHYulu.js → external-NHKSS1J8.js} +2 -2
- package/dist/index.js +1 -2
- package/dist/plugins.js +1 -1
- package/dist/run.js +3 -6
- package/dist/utils/types.d.ts +3 -0
- package/package.json +12 -12
|
@@ -2,11 +2,11 @@ import { isBuiltin } from "node:module";
|
|
|
2
2
|
|
|
3
3
|
//#region src/features/external.ts
|
|
4
4
|
function ExternalPlugin(pkg, platform) {
|
|
5
|
-
const deps = pkg && getProductionDeps(pkg);
|
|
5
|
+
const deps = pkg && Array.from(getProductionDeps(pkg));
|
|
6
6
|
return {
|
|
7
7
|
name: "tsdown:external",
|
|
8
8
|
resolveId(id) {
|
|
9
|
-
let shouldExternal = deps
|
|
9
|
+
let shouldExternal = deps && deps.some((dep) => id === dep || id.startsWith(`${dep}/`));
|
|
10
10
|
shouldExternal ||= platform === "node" && isBuiltin(id);
|
|
11
11
|
if (shouldExternal) {
|
|
12
12
|
return {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logger } from "./logger-e0Fr5WMR.js";
|
|
2
|
-
import { ExternalPlugin } from "./external-
|
|
2
|
+
import { ExternalPlugin } from "./external-NHKSS1J8.js";
|
|
3
3
|
import { default as process, default as process$1, default as process$2 } from "node:process";
|
|
4
4
|
import { rolldown } from "rolldown";
|
|
5
5
|
import { IsolatedDecl } from "unplugin-isolated-decl";
|
|
@@ -227,7 +227,6 @@ async function build(userOptions = {}) {
|
|
|
227
227
|
await watchBuild(resolved, writeBundle);
|
|
228
228
|
} else {
|
|
229
229
|
await build$1.destroy();
|
|
230
|
-
process.exit(0);
|
|
231
230
|
}
|
|
232
231
|
async function writeBundle(first) {
|
|
233
232
|
if (!first) startTime = performance.now();
|
package/dist/plugins.js
CHANGED
package/dist/run.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { logger } from "./logger-e0Fr5WMR.js";
|
|
2
2
|
import { default as process } from "node:process";
|
|
3
|
+
import { VERSION as rolldownVersion } from "rolldown";
|
|
3
4
|
import { default as pc } from "picocolors";
|
|
4
5
|
import { cac } from "cac";
|
|
5
6
|
|
|
6
|
-
//#region node_modules/.pnpm/rolldown@0.12.2-snapshot-374cd3d-20240819002934/node_modules/rolldown/package.json
|
|
7
|
-
const version$1 = "0.12.2-snapshot-374cd3d-20240819002934";
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
7
|
//#region package.json
|
|
11
|
-
const version = "0.2.
|
|
8
|
+
const version = "0.2.11";
|
|
12
9
|
|
|
13
10
|
//#endregion
|
|
14
11
|
//#region src/cli.ts
|
|
@@ -16,7 +13,7 @@ async function runCLI() {
|
|
|
16
13
|
const cli = cac("tsdown");
|
|
17
14
|
cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).option("-c, --config <filename>", "Use a custom config file").option("--no-config", "Disable config file").option("--format <format>", "Bundle format: esm, cjs, iife", { default: "esm" }).option("--clean", "Clean output directory").option("--minify", "Minify output").option("--silent", "Suppress non-error logs").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--watch", "Watch mode").action(async (input, flags) => {
|
|
18
15
|
logger.level = flags.silent ? 0 : 3;
|
|
19
|
-
logger.info(`tsdown ${pc.dim(`v${version}`)} powered by rolldown ${pc.dim(`v${
|
|
16
|
+
logger.info(`tsdown ${pc.dim(`v${version}`)} powered by rolldown ${pc.dim(`v${rolldownVersion}`)}`);
|
|
20
17
|
const { build } = await import("./index.js");
|
|
21
18
|
if (input.length > 0) flags.entry = input;
|
|
22
19
|
await build(flags);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "An even faster bundler powered by Rolldown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,24 +42,24 @@
|
|
|
42
42
|
"cac": "^6.7.14",
|
|
43
43
|
"chokidar": "^3.6.0",
|
|
44
44
|
"consola": "^3.2.3",
|
|
45
|
-
"picocolors": "^1.0
|
|
46
|
-
"pkg-types": "^1.
|
|
47
|
-
"rolldown": "
|
|
48
|
-
"tinyglobby": "^0.2.
|
|
45
|
+
"picocolors": "^1.1.0",
|
|
46
|
+
"pkg-types": "^1.2.0",
|
|
47
|
+
"rolldown": "https://pkg.pr.new/rolldown@c2e77b5",
|
|
48
|
+
"tinyglobby": "^0.2.5",
|
|
49
49
|
"unconfig": "^0.5.5",
|
|
50
|
-
"unplugin-isolated-decl": "^0.4.
|
|
50
|
+
"unplugin-isolated-decl": "^0.4.7"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@sxzz/eslint-config": "^
|
|
53
|
+
"@sxzz/eslint-config": "^4.1.4",
|
|
54
54
|
"@sxzz/prettier-config": "^2.0.2",
|
|
55
|
-
"@types/node": "^
|
|
56
|
-
"bumpp": "^9.5.
|
|
57
|
-
"eslint": "^9.9.
|
|
55
|
+
"@types/node": "^22.5.3",
|
|
56
|
+
"bumpp": "^9.5.2",
|
|
57
|
+
"eslint": "^9.9.1",
|
|
58
58
|
"execa": "^9.3.1",
|
|
59
|
-
"fdir": "^6.
|
|
59
|
+
"fdir": "^6.3.0",
|
|
60
60
|
"prettier": "^3.3.3",
|
|
61
61
|
"tsup": "^8.2.4",
|
|
62
|
-
"tsx": "^4.
|
|
62
|
+
"tsx": "^4.19.0",
|
|
63
63
|
"typescript": "~5.5.4",
|
|
64
64
|
"vitest": "^2.0.5"
|
|
65
65
|
},
|