tsdown 0.2.6 → 0.2.8

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
@@ -5,7 +5,7 @@ import { rolldown } from "rolldown";
5
5
  import { IsolatedDecl } from "unplugin-isolated-decl";
6
6
  import { access, readdir, rm, stat } from "node:fs/promises";
7
7
  import { default as path, default as path$1, default as path$2, default as path$3 } from "node:path";
8
- import { default as glob, default as glob$1 } from "fast-glob";
8
+ import { glob, glob as glob$1 } from "tinyglobby";
9
9
  import { readPackageJSON } from "pkg-types";
10
10
  import { loadConfig } from "unconfig";
11
11
 
@@ -144,7 +144,7 @@ async function normalizeOptions(options) {
144
144
  ...await loadConfigFile(options),
145
145
  ...options
146
146
  };
147
- let { entry, format = ["es"], plugins = [], external, clean = false, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts = false, minify, alias, watch = false, inputOptions, outputOptions } = options;
147
+ let { entry, format = ["es"], plugins = [], external, clean = false, silent = false, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts = false, minify, alias, watch = false, inputOptions, outputOptions } = options;
148
148
  entry = await resolveEntry(entry);
149
149
  format = toArray(format, "es");
150
150
  if (clean === true) clean = [];
@@ -155,6 +155,7 @@ async function normalizeOptions(options) {
155
155
  format,
156
156
  outDir,
157
157
  clean,
158
+ silent,
158
159
  alias,
159
160
  treeshake,
160
161
  platform,
package/dist/options.d.ts CHANGED
@@ -11,6 +11,7 @@ export interface Options {
11
11
  external?: External;
12
12
  outDir?: string;
13
13
  clean?: boolean | string[];
14
+ silent?: boolean;
14
15
  config?: boolean | string;
15
16
  sourcemap?: Sourcemap;
16
17
  alias?: Record<string, string>;
package/dist/run.js CHANGED
@@ -1,16 +1,22 @@
1
1
  import { logger } from "./logger-e0Fr5WMR.js";
2
2
  import { default as process } from "node:process";
3
3
  import { cac } from "cac";
4
+ import { default as pc } from "picocolors";
4
5
 
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
5
10
  //#region package.json
6
- const version = "0.2.6";
11
+ const version = "0.2.8";
7
12
 
8
13
  //#endregion
9
14
  //#region src/cli.ts
10
15
  async function runCLI() {
11
16
  const cli = cac("tsdown");
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("-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) => {
13
- logger.info(`tsdown v${version}`);
17
+ 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
+ logger.level = flags.silent ? 0 : 3;
19
+ logger.info(`tsdown ${pc.gray(`v${version}`)} powered by rolldown ${pc.gray(`v${version$1}`)}`);
14
20
  const { build } = await import("./index.js");
15
21
  if (input.length > 0) flags.entry = input;
16
22
  await build(flags);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "An even faster bundler powered by Rolldown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,19 +42,20 @@
42
42
  "cac": "^6.7.14",
43
43
  "chokidar": "^3.6.0",
44
44
  "consola": "^3.2.3",
45
- "fast-glob": "^3.3.2",
45
+ "picocolors": "^1.0.1",
46
46
  "pkg-types": "^1.1.3",
47
47
  "rolldown": "nightly",
48
+ "tinyglobby": "^0.2.2",
48
49
  "unconfig": "^0.5.5",
49
50
  "unplugin-isolated-decl": "^0.4.5"
50
51
  },
51
52
  "devDependencies": {
52
- "@sxzz/eslint-config": "^3.17.0",
53
+ "@sxzz/eslint-config": "^3.17.3",
53
54
  "@sxzz/prettier-config": "^2.0.2",
54
- "@types/node": "^20.14.15",
55
- "bumpp": "^9.4.2",
55
+ "@types/node": "^20.16.1",
56
+ "bumpp": "^9.5.1",
56
57
  "eslint": "^9.9.0",
57
- "execa": "^9.3.0",
58
+ "execa": "^9.3.1",
58
59
  "fdir": "^6.2.0",
59
60
  "prettier": "^3.3.3",
60
61
  "tsup": "^8.2.4",