tsdown 0.21.3 → 0.21.4
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-Dh89hfzV.mjs → build-CoLhkNXE.mjs} +2 -2
- package/dist/build-dhDyu66J.mjs +2 -0
- package/dist/config.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{options-CoPog4o1.mjs → options-DoRzOC0d.mjs} +1 -0
- package/dist/{package-CaVX988O.mjs → package-BV2VRL7Z.mjs} +1 -1
- package/dist/run.mjs +2 -2
- package/package.json +8 -8
- package/dist/build-CGB4R_gC.mjs +0 -2
|
@@ -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
3
|
import { a as pkgExists, l as slash, n as importWithError, o as promiseWithResolvers, t as debounce } from "./general-CRszZCrY.mjs";
|
|
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, u as cleanChunks } from "./options-
|
|
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, u as cleanChunks } from "./options-DoRzOC0d.mjs";
|
|
5
5
|
import { r as fsRemove } from "./fs-Dd6Htx2P.mjs";
|
|
6
6
|
import { a as globalLogger, t as LogLevels } from "./logger-BU0v7CAk.mjs";
|
|
7
7
|
import { a as getShimsInject, r as DepPlugin } from "./format-DPVBd8E4.mjs";
|
|
8
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-CS1xCZMR.mjs";
|
|
9
|
-
import { t as version } from "./package-
|
|
9
|
+
import { t as version } from "./package-BV2VRL7Z.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";
|
package/dist/config.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as resolveUserConfig, t as mergeConfig } from "./options-
|
|
1
|
+
import { r as resolveUserConfig, t as mergeConfig } from "./options-DoRzOC0d.mjs";
|
|
2
2
|
import { a as globalLogger } from "./logger-BU0v7CAk.mjs";
|
|
3
3
|
import { defineConfig } from "./config.mjs";
|
|
4
|
-
import { n as buildWithConfigs, t as build } from "./build-
|
|
4
|
+
import { n as buildWithConfigs, t as build } from "./build-CoLhkNXE.mjs";
|
|
5
5
|
import { t as enableDebug } from "./debug-C4FmgzkJ.mjs";
|
|
6
6
|
import * as Rolldown from "rolldown";
|
|
7
7
|
export { Rolldown, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
|
|
@@ -246,6 +246,7 @@ async function writeExports(options, chunks, inlinedDeps) {
|
|
|
246
246
|
}
|
|
247
247
|
const original = readFileSync(pkg.packageJsonPath, "utf8");
|
|
248
248
|
let contents = JSON.stringify(updatedPkg, null, detectIndentation(original));
|
|
249
|
+
if (original.includes("\r\n")) contents = contents.replaceAll("\n", "\r\n");
|
|
249
250
|
if (original.endsWith("\n")) contents += "\n";
|
|
250
251
|
if (contents !== original) writeFileSync(pkg.packageJsonPath, contents, "utf8");
|
|
251
252
|
}
|
package/dist/run.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
3
3
|
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
4
4
|
import { a as globalLogger } from "./logger-BU0v7CAk.mjs";
|
|
5
|
-
import { t as version } from "./package-
|
|
5
|
+
import { t as version } from "./package-BV2VRL7Z.mjs";
|
|
6
6
|
import { t as enableDebug } from "./debug-C4FmgzkJ.mjs";
|
|
7
7
|
import module from "node:module";
|
|
8
8
|
import process from "node:process";
|
|
@@ -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(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
|
|
23
|
-
const { build } = await import("./build-
|
|
23
|
+
const { build } = await import("./build-dhDyu66J.mjs");
|
|
24
24
|
if (input.length > 0) flags.entry = input;
|
|
25
25
|
await build(flags);
|
|
26
26
|
});
|
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.4",
|
|
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",
|
|
54
54
|
"unplugin-unused": "^0.5.0",
|
|
55
|
-
"@tsdown/
|
|
56
|
-
"@tsdown/
|
|
55
|
+
"@tsdown/css": "0.21.4",
|
|
56
|
+
"@tsdown/exe": "0.21.4"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@arethetypeswrong/core": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"cac": "^7.0.0",
|
|
84
84
|
"defu": "^6.1.4",
|
|
85
85
|
"empathic": "^2.0.0",
|
|
86
|
-
"hookable": "^6.0
|
|
86
|
+
"hookable": "^6.1.0",
|
|
87
87
|
"import-without-cache": "^0.2.5",
|
|
88
88
|
"obug": "^2.1.1",
|
|
89
89
|
"picomatch": "^4.0.3",
|
|
@@ -110,13 +110,13 @@
|
|
|
110
110
|
"@types/node": "^25.5.0",
|
|
111
111
|
"@types/picomatch": "^4.0.2",
|
|
112
112
|
"@types/semver": "^7.7.1",
|
|
113
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
113
|
+
"@typescript/native-preview": "7.0.0-dev.20260316.1",
|
|
114
114
|
"@unocss/eslint-plugin": "^66.6.6",
|
|
115
115
|
"@vitejs/devtools": "^0.1.0",
|
|
116
116
|
"@vitest/coverage-v8": "^4.1.0",
|
|
117
117
|
"@vitest/ui": "^4.1.0",
|
|
118
118
|
"@vueuse/core": "^14.2.1",
|
|
119
|
-
"bumpp": "^11.0.
|
|
119
|
+
"bumpp": "^11.0.1",
|
|
120
120
|
"dedent": "^1.7.2",
|
|
121
121
|
"eslint": "^10.0.3",
|
|
122
122
|
"is-in-ci": "^2.0.0",
|
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
"vite": "^8.0.0",
|
|
140
140
|
"vitest": "^4.1.0",
|
|
141
141
|
"vue": "^3.5.30",
|
|
142
|
-
"@tsdown/css": "0.21.
|
|
143
|
-
"@tsdown/exe": "0.21.
|
|
142
|
+
"@tsdown/css": "0.21.4",
|
|
143
|
+
"@tsdown/exe": "0.21.4"
|
|
144
144
|
},
|
|
145
145
|
"prettier": "@sxzz/prettier-config",
|
|
146
146
|
"scripts": {
|
package/dist/build-CGB4R_gC.mjs
DELETED