tsdown 0.17.0 → 0.17.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/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { A as OutExtensionObject, C as TsdownBundle, D as ChunkAddonObject, E as ChunkAddonFunction, F as TsdownHooks, I as DebugOptions, L as CopyEntry, M as PackageType, N as BuildContext, O as OutExtensionContext, P as RolldownContext, R as CopyOptions, S as RolldownChunk, T as ChunkAddon, _ as ReportOptions, a as NoExternalFn, b as globalLogger, c as ResolvedConfig, d as UnusedOptions, f as UserConfig, g as Workspace, h as WithEnabled, i as InlineConfig, j as PackageJsonWithPath, k as OutExtensionFactory, l as Sourcemap, m as UserConfigFn, n as DtsOptions, o as NormalizedFormat, p as UserConfigExport, r as Format, s as PublintOptions, t as CIOption, u as TreeshakingOptions, w as AttwOptions, x as ExportsOptions, y as Logger, z as CopyOptionsFn } from "./index-BQZ2CZuJ.mjs";
2
2
  import { t as defineConfig } from "./config-DPU-roRC.mjs";
3
+ import * as Rolldown from "rolldown";
3
4
 
4
5
  //#region src/index.d.ts
5
-
6
6
  /**
7
7
  * Build with tsdown.
8
8
  */
@@ -19,4 +19,4 @@ declare function buildSingle(config: ResolvedConfig, configFiles: string[], isDu
19
19
  /** @internal */
20
20
  declare const shimFile: string;
21
21
  //#endregion
22
- export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, DebugOptions, DtsOptions, ExportsOptions, Format, InlineConfig, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PublintOptions, ReportOptions, ResolvedConfig, RolldownChunk, RolldownContext, Sourcemap, TreeshakingOptions, TsdownBundle, TsdownHooks, UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build, buildSingle, defineConfig, globalLogger, shimFile };
22
+ export { AttwOptions, BuildContext, CIOption, ChunkAddon, ChunkAddonFunction, ChunkAddonObject, CopyEntry, CopyOptions, CopyOptionsFn, DebugOptions, DtsOptions, ExportsOptions, Format, InlineConfig, type Logger, NoExternalFn, NormalizedFormat, OutExtensionContext, OutExtensionFactory, OutExtensionObject, PackageJsonWithPath, PackageType, PublintOptions, ReportOptions, ResolvedConfig, Rolldown, RolldownChunk, RolldownContext, Sourcemap, TreeshakingOptions, TsdownBundle, TsdownHooks, UnusedOptions, UserConfig, UserConfigExport, UserConfigFn, WithEnabled, Workspace, build, buildSingle, defineConfig, globalLogger, shimFile };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as defineConfig } from "./config-DLSWqKoz.mjs";
2
- import { n as buildSingle, r as shimFile, t as build } from "./src-v58M1R6D.mjs";
3
- import { a as globalLogger } from "./package-D-MHLh9E.mjs";
2
+ import { i as shimFile, n as build, r as buildSingle, t as Rolldown } from "./src-78jOn3e-.mjs";
3
+ import { a as globalLogger } from "./package-Bc4LTP6j.mjs";
4
4
 
5
- export { build, buildSingle, defineConfig, globalLogger, shimFile };
5
+ export { Rolldown, build, buildSingle, defineConfig, globalLogger, shimFile };
@@ -161,7 +161,7 @@ function hue2rgb(p, q, t) {
161
161
 
162
162
  //#endregion
163
163
  //#region package.json
164
- var version = "0.17.0";
164
+ var version = "0.17.1";
165
165
 
166
166
  //#endregion
167
167
  export { globalLogger as a, importWithError as c, pkgExists as d, promiseWithResolvers as f, toArray as g, slash as h, generateColor as i, matchPattern as l, resolveRegex as m, LogLevels as n, prettyFormat as o, resolveComma as p, createLogger as r, prettyName as s, version as t, noop as u };
package/dist/plugins.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ShebangPlugin, c as ExternalPlugin, i as WatchPlugin, o as ReportPlugin, s as NodeProtocolPlugin } from "./src-v58M1R6D.mjs";
2
- import "./package-D-MHLh9E.mjs";
1
+ import { a as WatchPlugin, c as NodeProtocolPlugin, l as ExternalPlugin, o as ShebangPlugin, s as ReportPlugin } from "./src-78jOn3e-.mjs";
2
+ import "./package-Bc4LTP6j.mjs";
3
3
 
4
4
  export { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin, WatchPlugin };
package/dist/run.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as globalLogger, g as toArray, p as resolveComma, t as version } from "./package-D-MHLh9E.mjs";
2
+ import { a as globalLogger, g as toArray, p as resolveComma, t as version } from "./package-Bc4LTP6j.mjs";
3
3
  import module from "node:module";
4
4
  import { dim } from "ansis";
5
5
  import { VERSION } from "rolldown";
@@ -1,11 +1,12 @@
1
1
  import { createRequire as __cjs_createRequire } from "node:module";
2
2
  const __cjs_require = __cjs_createRequire(import.meta.url);
3
- import { a as globalLogger, c as importWithError, d as pkgExists, f as promiseWithResolvers, g as toArray, h as slash, i as generateColor, l as matchPattern, m as resolveRegex, n as LogLevels, o as prettyFormat, p as resolveComma, r as createLogger, s as prettyName, t as version, u as noop } from "./package-D-MHLh9E.mjs";
3
+ import { a as globalLogger, c as importWithError, d as pkgExists, f as promiseWithResolvers, g as toArray, h as slash, i as generateColor, l as matchPattern, m as resolveRegex, n as LogLevels, o as prettyFormat, p as resolveComma, r as createLogger, s as prettyName, t as version, u as noop } from "./package-Bc4LTP6j.mjs";
4
4
  import { builtinModules, isBuiltin } from "node:module";
5
5
  import path, { dirname, join, normalize, sep } from "node:path";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import { blue, bold, dim, green, underline } from "ansis";
8
8
  import { clearRequireCache, init, isSupported } from "import-without-cache";
9
+ import * as Rolldown from "rolldown";
9
10
  import { VERSION, build, watch } from "rolldown";
10
11
  import { createDebug } from "obug";
11
12
  import { access, chmod, cp, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
@@ -238,7 +239,7 @@ function resolveClean(clean, outDir, cwd) {
238
239
  if (clean.some((item) => path.resolve(item) === cwd)) throw new Error("Cannot clean the current working directory. Please specify a different path to clean option.");
239
240
  return clean;
240
241
  }
241
- async function cleanupChunks(outDir, chunks) {
242
+ async function cleanChunks(outDir, chunks) {
242
243
  await Promise.all(chunks.map(async (chunk) => {
243
244
  const filePath = path.resolve(outDir, chunk.fileName);
244
245
  debug$8("Removing chunk file", filePath);
@@ -1576,7 +1577,7 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
1576
1577
  watcher$1.on("event", async (event) => {
1577
1578
  switch (event.code) {
1578
1579
  case "START":
1579
- await cleanupChunks(config.outDir, chunks);
1580
+ if (config.clean) await cleanChunks(config.outDir, chunks);
1580
1581
  chunks.length = 0;
1581
1582
  hasError = false;
1582
1583
  break;
@@ -1631,4 +1632,4 @@ const pkgRoot = path.resolve(dirname$1, "..");
1631
1632
  const shimFile = path.resolve(pkgRoot, "esm-shims.js");
1632
1633
 
1633
1634
  //#endregion
1634
- export { ShebangPlugin as a, ExternalPlugin as c, WatchPlugin as i, buildSingle as n, ReportPlugin as o, shimFile as r, NodeProtocolPlugin as s, build$1 as t };
1635
+ export { WatchPlugin as a, NodeProtocolPlugin as c, shimFile as i, ExternalPlugin as l, build$1 as n, ShebangPlugin as o, buildSingle as r, ReportPlugin as s, Rolldown as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsdown",
3
3
  "type": "module",
4
- "version": "0.17.0",
4
+ "version": "0.17.1",
5
5
  "description": "The Elegant Bundler for Libraries",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@arethetypeswrong/core": "^0.18.1",
52
- "@vitejs/devtools": "^0.0.0-alpha.18",
52
+ "@vitejs/devtools": "^0.0.0-alpha.19",
53
53
  "publint": "^0.3.0",
54
54
  "typescript": "^5.0.0",
55
55
  "unplugin-lightningcss": "^0.4.0",
@@ -83,13 +83,13 @@
83
83
  "import-without-cache": "^0.2.2",
84
84
  "obug": "^2.1.1",
85
85
  "rolldown": "1.0.0-beta.53",
86
- "rolldown-plugin-dts": "^0.18.2",
86
+ "rolldown-plugin-dts": "^0.18.3",
87
87
  "semver": "^7.7.3",
88
88
  "tinyexec": "^1.0.2",
89
89
  "tinyglobby": "^0.2.15",
90
90
  "tree-kill": "^1.2.2",
91
- "unconfig-core": "^7.4.1",
92
- "unrun": "^0.2.16"
91
+ "unconfig-core": "^7.4.2",
92
+ "unrun": "^0.2.17"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@arethetypeswrong/core": "^0.18.2",
@@ -98,9 +98,9 @@
98
98
  "@sxzz/test-utils": "^0.5.13",
99
99
  "@types/node": "^24.10.1",
100
100
  "@types/semver": "^7.7.1",
101
- "@typescript/native-preview": "7.0.0-dev.20251204.1",
101
+ "@typescript/native-preview": "7.0.0-dev.20251207.1",
102
102
  "@unocss/eslint-plugin": "^66.5.10",
103
- "@vitejs/devtools": "^0.0.0-alpha.18",
103
+ "@vitejs/devtools": "^0.0.0-alpha.19",
104
104
  "@vitest/coverage-v8": "4.0.15",
105
105
  "@vueuse/core": "^14.1.0",
106
106
  "bumpp": "^10.3.2",