tsdown 0.16.1 → 0.16.2

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.
@@ -1,4 +1,4 @@
1
- import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./index-CSOY_TcZ.mjs";
1
+ import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./index-BcO8yjl6.mjs";
2
2
 
3
3
  //#region src/config.d.ts
4
4
 
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./index-CSOY_TcZ.mjs";
2
- import { t as defineConfig } from "./config-8JTxhwDL.mjs";
1
+ import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./index-BcO8yjl6.mjs";
2
+ import { t as defineConfig } from "./config-BNLClkOs.mjs";
3
3
  export { UserConfig, UserConfigExport, UserConfigFn, defineConfig };
package/dist/config.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as defineConfig } from "./config-BPLXnzPK.mjs";
1
+ import { t as defineConfig } from "./config-DLSWqKoz.mjs";
2
2
 
3
3
  export { defineConfig };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as TsdownChunks, C as OutExtensionFactory, D as RolldownContext, E as BuildContext, F as AttwOptions, M as CopyEntry, N as CopyOptions, O as TsdownHooks, P as CopyOptionsFn, S as OutExtensionContext, T as PackageType, _ as Logger, a as NormalizedFormat, b as ChunkAddonFunction, c as Sourcemap, d as UserConfig, f as UserConfigExport, h as ReportOptions, i as NoExternalFn, j as DebugOptions, k as ExportsOptions, l as TreeshakingOptions, m as Workspace, n as Format, o as PublintOptions, p as UserConfigFn, r as InlineConfig, s as ResolvedConfig, t as DtsOptions, u as UnusedOptions, v as globalLogger, w as OutExtensionObject, x as ChunkAddonObject, y as ChunkAddon } from "./index-CSOY_TcZ.mjs";
2
- import { t as defineConfig } from "./config-8JTxhwDL.mjs";
1
+ import { A as TsdownChunks, C as OutExtensionFactory, D as RolldownContext, E as BuildContext, F as AttwOptions, M as CopyEntry, N as CopyOptions, O as TsdownHooks, P as CopyOptionsFn, S as OutExtensionContext, T as PackageType, _ as Logger, a as NormalizedFormat, b as ChunkAddonFunction, c as Sourcemap, d as UserConfig, f as UserConfigExport, h as ReportOptions, i as NoExternalFn, j as DebugOptions, k as ExportsOptions, l as TreeshakingOptions, m as Workspace, n as Format, o as PublintOptions, p as UserConfigFn, r as InlineConfig, s as ResolvedConfig, t as DtsOptions, u as UnusedOptions, v as globalLogger, w as OutExtensionObject, x as ChunkAddonObject, y as ChunkAddon } from "./index-BcO8yjl6.mjs";
2
+ import { t as defineConfig } from "./config-BNLClkOs.mjs";
3
3
 
4
4
  //#region src/index.d.ts
5
5
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as defineConfig } from "./config-BPLXnzPK.mjs";
2
- import { n as buildSingle, r as shimFile, t as build } from "./src-BJnxnJLO.mjs";
3
- import { a as globalLogger } from "./package-BEpC3UYZ.mjs";
1
+ import { t as defineConfig } from "./config-DLSWqKoz.mjs";
2
+ import { n as buildSingle, r as shimFile, t as build } from "./src-CX-S_cyD.mjs";
3
+ import { a as globalLogger } from "./package-DMNYxkVA.mjs";
4
4
 
5
5
  export { build, buildSingle, defineConfig, globalLogger, shimFile };
@@ -1,4 +1,4 @@
1
- import { a as globalLogger, t as version } from "./package-BEpC3UYZ.mjs";
1
+ import { a as globalLogger, t as version } from "./package-DMNYxkVA.mjs";
2
2
  import process from "node:process";
3
3
  import { bold, green, underline } from "ansis";
4
4
  import { readFile, unlink, writeFile } from "node:fs/promises";
@@ -160,7 +160,7 @@ function hue2rgb(p, q, t) {
160
160
 
161
161
  //#endregion
162
162
  //#region package.json
163
- var version = "0.16.1";
163
+ var version = "0.16.2";
164
164
 
165
165
  //#endregion
166
166
  export { globalLogger as a, debounce as c, noop as d, pkgExists as f, toArray as g, slash as h, generateColor as i, importWithError as l, resolveRegex as m, LogLevels as n, prettyFormat as o, resolveComma as p, createLogger as r, prettyName as s, version as t, matchPattern as u };
@@ -1,4 +1,4 @@
1
- import { _ as Logger, g as ReportPlugin, s as ResolvedConfig } from "./index-CSOY_TcZ.mjs";
1
+ import { _ as Logger, g as ReportPlugin, s as ResolvedConfig } from "./index-BcO8yjl6.mjs";
2
2
  import { Plugin } from "rolldown";
3
3
  import { PackageJson } from "pkg-types";
4
4
 
package/dist/plugins.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import "./config-BPLXnzPK.mjs";
2
- import { a as ReportPlugin, i as ShebangPlugin, o as NodeProtocolPlugin, s as ExternalPlugin } from "./src-BJnxnJLO.mjs";
3
- import "./package-BEpC3UYZ.mjs";
1
+ import "./config-DLSWqKoz.mjs";
2
+ import { a as ReportPlugin, i as ShebangPlugin, o as NodeProtocolPlugin, s as ExternalPlugin } from "./src-CX-S_cyD.mjs";
3
+ import "./package-DMNYxkVA.mjs";
4
4
 
5
5
  export { ExternalPlugin, NodeProtocolPlugin, ReportPlugin, ShebangPlugin };
package/dist/run.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __cjs_createRequire } from "node:module";
3
3
  const __cjs_require = __cjs_createRequire(import.meta.url);
4
- import { a as globalLogger, g as toArray, p as resolveComma, t as version } from "./package-BEpC3UYZ.mjs";
4
+ import { a as globalLogger, g as toArray, p as resolveComma, t as version } from "./package-DMNYxkVA.mjs";
5
5
  import module from "node:module";
6
6
  import process from "node:process";
7
7
  import { dim } from "ansis";
@@ -38,7 +38,7 @@ cli.command("[...files]", "Bundle files", {
38
38
  await build$1(flags);
39
39
  });
40
40
  cli.command("migrate", "Migrate from tsup to tsdown").option("-c, --cwd <dir>", "Working directory").option("-d, --dry-run", "Dry run").action(async (args) => {
41
- const { migrate } = await import("./migrate-Dzz7E7av.mjs");
41
+ const { migrate } = await import("./migrate-vnxXpCFh.mjs");
42
42
  await migrate(args);
43
43
  });
44
44
  async function runCLI() {
@@ -1,6 +1,6 @@
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 debounce, d as noop, f as pkgExists, g as toArray, h as slash, i as generateColor, l as importWithError, m as resolveRegex, n as LogLevels, o as prettyFormat, p as resolveComma, r as createLogger, s as prettyName, t as version, u as matchPattern } from "./package-BEpC3UYZ.mjs";
3
+ import { a as globalLogger, c as debounce, d as noop, f as pkgExists, g as toArray, h as slash, i as generateColor, l as importWithError, m as resolveRegex, n as LogLevels, o as prettyFormat, p as resolveComma, r as createLogger, s as prettyName, t as version, u as matchPattern } from "./package-DMNYxkVA.mjs";
4
4
  import { builtinModules, isBuiltin } from "node:module";
5
5
  import path, { dirname, join, normalize, sep } from "node:path";
6
6
  import process from "node:process";
@@ -12,7 +12,7 @@ const treeKill = __cjs_require("tree-kill");
12
12
  import { access, chmod, cp, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
13
13
  const Debug = __cjs_require("debug");
14
14
  import { createConfigCoreLoader } from "unconfig-core";
15
- import { glob } from "tinyglobby";
15
+ import { glob, isDynamicPattern } from "tinyglobby";
16
16
  import { RE_CSS, RE_DTS, RE_JS, RE_NODE_MODULES } from "rolldown-plugin-dts/filename";
17
17
  const minVersion = __cjs_require("semver/ranges/min-version.js");
18
18
  import { up } from "empathic/find";
@@ -246,14 +246,18 @@ async function resolveEntry(logger, entry, cwd, name) {
246
246
  async function toObjectEntry(entry, cwd) {
247
247
  if (typeof entry === "string") entry = [entry];
248
248
  if (!Array.isArray(entry)) return entry;
249
- const resolvedEntry = (await glob(entry, {
249
+ const isGlob = entry.some((e) => isDynamicPattern(e));
250
+ let resolvedEntry;
251
+ if (isGlob) resolvedEntry = (await glob(entry, {
250
252
  cwd,
251
- expandDirectories: false
252
- })).map((file) => path.resolve(cwd, file));
253
+ expandDirectories: false,
254
+ absolute: true
255
+ })).map((file) => path.resolve(file));
256
+ else resolvedEntry = entry;
253
257
  const base = lowestCommonAncestor(...resolvedEntry);
254
258
  return Object.fromEntries(resolvedEntry.map((file) => {
255
259
  const relative = path.relative(base, file);
256
- return [relative.slice(0, relative.length - path.extname(relative).length), file];
260
+ return [slash(relative.slice(0, relative.length - path.extname(relative).length)), file];
257
261
  }));
258
262
  }
259
263
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "The Elegant Bundler for Libraries",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@arethetypeswrong/core": "^0.18.1",
49
- "@vitejs/devtools": "^0.0.0-alpha.10",
49
+ "@vitejs/devtools": "^0.0.0-alpha.17",
50
50
  "publint": "^0.3.0",
51
51
  "typescript": "^5.0.0",
52
52
  "unplugin-lightningcss": "^0.4.0",
@@ -80,25 +80,25 @@
80
80
  "diff": "^8.0.2",
81
81
  "empathic": "^2.0.0",
82
82
  "hookable": "^5.5.3",
83
- "rolldown": "1.0.0-beta.47",
84
- "rolldown-plugin-dts": "^0.17.3",
83
+ "rolldown": "1.0.0-beta.49",
84
+ "rolldown-plugin-dts": "^0.17.5",
85
85
  "semver": "^7.7.3",
86
86
  "tinyexec": "^1.0.2",
87
87
  "tinyglobby": "^0.2.15",
88
88
  "tree-kill": "^1.2.2",
89
- "unconfig-core": "^7.4.0",
90
- "unrun": "^0.2.5"
89
+ "unconfig-core": "^7.4.1",
90
+ "unrun": "^0.2.7"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@arethetypeswrong/core": "^0.18.2",
94
- "@sxzz/eslint-config": "^7.2.8",
94
+ "@sxzz/eslint-config": "^7.2.9",
95
95
  "@sxzz/prettier-config": "^2.2.4",
96
96
  "@sxzz/test-utils": "^0.5.12",
97
97
  "@types/debug": "^4.1.12",
98
98
  "@types/node": "^24.10.0",
99
99
  "@types/semver": "^7.7.1",
100
100
  "@unocss/eslint-plugin": "^66.5.5",
101
- "@vitejs/devtools": "^0.0.0-alpha.10",
101
+ "@vitejs/devtools": "^0.0.0-alpha.17",
102
102
  "@vueuse/core": "^14.0.0",
103
103
  "bumpp": "^10.3.1",
104
104
  "eslint": "^9.39.1",
@@ -111,7 +111,7 @@
111
111
  "unocss": "^66.5.5",
112
112
  "unplugin-lightningcss": "^0.4.3",
113
113
  "unplugin-unused": "^0.5.6",
114
- "vite": "npm:rolldown-vite@latest",
114
+ "vite": "npm:rolldown-vite@^7.2.3",
115
115
  "vitest": "^4.0.8"
116
116
  },
117
117
  "engines": {