tsdown 0.9.3 → 0.9.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/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { defineConfig } from "./config-yiJy1jd0.js";
2
- import { ExternalPlugin, ReportPlugin, ShebangPlugin, debounce, fsExists, fsRemove, getPackageType, lowestCommonAncestor, normalizeFormat, readPackageJson, toArray } from "./plugins-BvgcOKes.js";
2
+ import { ExternalPlugin, ReportPlugin, ShebangPlugin, debounce, fsExists, fsRemove, getPackageType, lowestCommonAncestor, normalizeFormat, readPackageJson, toArray } from "./plugins-x9xHcxDm.js";
3
3
  import { debug, logger, setSilent } from "./logger-Dt3D6T-U.js";
4
4
  import path from "node:path";
5
5
  import process from "node:process";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
+ import { blue, bold, dim, green, underline } from "ansis";
7
8
  import { build as build$1 } from "rolldown";
8
9
  import { transformPlugin } from "rolldown/experimental";
9
10
  import { exec } from "tinyexec";
@@ -11,7 +12,6 @@ import { readdir, stat } from "node:fs/promises";
11
12
  import Debug from "debug";
12
13
  import { glob } from "tinyglobby";
13
14
  import { findUp } from "find-up-simple";
14
- import { blue, bold, dim, underline } from "ansis";
15
15
  import readline from "node:readline";
16
16
  import { loadConfig } from "unconfig";
17
17
 
@@ -432,7 +432,7 @@ async function buildSingle(config) {
432
432
  if (hasErrors) return;
433
433
  if (config.publint) if (pkg) await publint(pkg);
434
434
  else logger.warn("publint is enabled but package.json is not found");
435
- logger.success(`${first ? "Build" : "Rebuild"} complete in ${Math.round(performance.now() - startTime)}ms`);
435
+ logger.success(`${first ? "Build" : "Rebuild"} complete in ${green(`${Math.round(performance.now() - startTime)}ms`)}`);
436
436
  if (typeof onSuccess === "string") {
437
437
  const p = exec(onSuccess, [], { nodeOptions: {
438
438
  shell: true,
@@ -1,4 +1,4 @@
1
- import { version } from "./package-C_4Rg-Ho.js";
1
+ import { version } from "./package-BgsbkBlA.js";
2
2
  import process from "node:process";
3
3
  import { readFile, unlink, writeFile } from "node:fs/promises";
4
4
  import consola$1 from "consola";
@@ -0,0 +1,5 @@
1
+ //#region package.json
2
+ var version = "0.9.4";
3
+
4
+ //#endregion
5
+ export { version };
@@ -1,12 +1,12 @@
1
1
  import { debug, logger } from "./logger-Dt3D6T-U.js";
2
2
  import path, { dirname, normalize, sep } from "node:path";
3
+ import { blue, bold, dim, green, underline, yellow } from "ansis";
3
4
  import { access, chmod, readFile, rm } from "node:fs/promises";
4
5
  import Debug from "debug";
5
6
  import { findUp } from "find-up-simple";
6
7
  import { Buffer } from "node:buffer";
7
8
  import { promisify } from "node:util";
8
9
  import { brotliCompress, gzip } from "node:zlib";
9
- import { blue, bold, dim, green, underline, yellow } from "ansis";
10
10
 
11
11
  //#region src/utils/fs.ts
12
12
  function fsExists(path$1) {
package/dist/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ExternalPlugin, ReportPlugin, ShebangPlugin } from "./plugins-BvgcOKes.js";
1
+ import { ExternalPlugin, ReportPlugin, ShebangPlugin } from "./plugins-x9xHcxDm.js";
2
2
  import "./logger-Dt3D6T-U.js";
3
3
 
4
4
  export { ExternalPlugin, ReportPlugin, ShebangPlugin };
package/dist/run.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { logger, setSilent } from "./logger-Dt3D6T-U.js";
3
- import { version } from "./package-C_4Rg-Ho.js";
3
+ import { version } from "./package-BgsbkBlA.js";
4
4
  import process from "node:process";
5
- import { VERSION } from "rolldown";
6
5
  import { dim } from "ansis";
6
+ import { VERSION } from "rolldown";
7
7
  import { cac } from "cac";
8
8
 
9
9
  //#region src/cli.ts
10
10
  const cli = cac("tsdown");
11
11
  cli.help().version(version);
12
- 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("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").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("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files", { default: false }).option("--publint", "Enable publint", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).action(async (input, flags) => {
12
+ 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("--external <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").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("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files", { default: false }).option("--publint", "Enable publint", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).action(async (input, flags) => {
13
13
  setSilent(!!flags.silent);
14
14
  logger.info(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
15
15
  const { build: build$1 } = await import("./index.js");
@@ -17,7 +17,7 @@ cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).op
17
17
  await build$1(flags);
18
18
  });
19
19
  cli.command("migrate", "Migrate from tsup to tsdown").option("-c, --cwd <dir>", "Working directory").option("-d, --dry-run", "Dry run").action(async (args) => {
20
- const { migrate } = await import("./migrate-BB2Nt65I.js");
20
+ const { migrate } = await import("./migrate-DRASxtab.js");
21
21
  await migrate(args);
22
22
  });
23
23
  async function runCLI() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "The Elegant Bundler for Libraries",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +0,0 @@
1
- //#region package.json
2
- var version = "0.9.3";
3
-
4
- //#endregion
5
- export { version };