tsdown 0.22.1 → 0.22.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.
@@ -6,7 +6,7 @@ import { a as pkgExists, l as slash, n as importWithError, o as promiseWithResol
6
6
  import { a as globalLogger, t as LogLevels } from "./logger-BxuhTmAE.mjs";
7
7
  import { a as shimsDefine, i as getShimsInject, n as DepsPlugin, o as shimsPlugin } from "./format-DMceewlS.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-C3ocHLCt.mjs";
9
- import { n as version } from "./debug-CiHXNOc4.mjs";
9
+ import { n as version } from "./debug-DQISqjIY.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";
@@ -1,4 +1,4 @@
1
- import { d as UserConfig, f as UserConfigExport, i as InlineConfig, o as ResolvedConfig, p as UserConfigFn } from "./types-BezgYwPk.mjs";
1
+ import { d as UserConfig, f as UserConfigExport, i as InlineConfig, o as ResolvedConfig, p as UserConfigFn } from "./types-F1pJie3k.mjs";
2
2
 
3
3
  //#region src/config/options.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 "./types-BezgYwPk.mjs";
2
- import { n as mergeConfig, t as defineConfig } from "./config-CeytBssC.mjs";
1
+ import { d as UserConfig, f as UserConfigExport, p as UserConfigFn } from "./types-F1pJie3k.mjs";
2
+ import { n as mergeConfig, t as defineConfig } from "./config-BJZDmsYq.mjs";
3
3
  export { type UserConfig, type UserConfigExport, type UserConfigFn, defineConfig, mergeConfig };
@@ -1,7 +1,7 @@
1
1
  import { s as resolveComma, u as toArray } from "./general-Cp4NiJNK.mjs";
2
2
  import { createDebug, enable, namespaces } from "obug";
3
3
  //#region package.json
4
- var version = "0.22.1";
4
+ var version = "0.22.2";
5
5
  //#endregion
6
6
  //#region src/features/debug.ts
7
7
  const debugLog = createDebug("tsdown:debug");
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as Arrayable, i as globalLogger, r as Logger } from "./index-C0LaRpVv.mjs";
2
- import { A as PackageType, B as ResolvedDepsConfig, C as ChunkAddon, D as OutExtensionFactory, E as OutExtensionContext, F as SeaConfig, G as CopyOptionsFn, H as TsdownBundle, I as DevtoolsOptions, L as DepsConfig, M as RolldownContext, N as TsdownHooks, O as OutExtensionObject, P as ExeOptions, S as AttwOptions, T as ChunkAddonObject, U as CopyEntry, V as RolldownChunk, W as CopyOptions, a as NormalizedFormat, b as PublintOptions, c as TreeshakingOptions, d as UserConfig, f as UserConfigExport, g as ReportOptions, h as Workspace, i as InlineConfig, j as BuildContext, k as PackageJsonWithPath, l as TsdownInputOption, m as WithEnabled, n as DtsOptions, o as ResolvedConfig, p as UserConfigFn, r as Format, s as Sourcemap, t as CIOption, u as UnusedOptions, v as TsdownPlugin, w as ChunkAddonFunction, x as ExportsOptions, y as TsdownPluginOption, z as NoExternalFn } from "./types-BezgYwPk.mjs";
3
- import { n as mergeConfig, r as resolveUserConfig, t as defineConfig } from "./config-CeytBssC.mjs";
2
+ import { A as PackageType, B as ResolvedDepsConfig, C as ChunkAddon, D as OutExtensionFactory, E as OutExtensionContext, F as SeaConfig, G as CopyOptionsFn, H as TsdownBundle, I as DevtoolsOptions, L as DepsConfig, M as RolldownContext, N as TsdownHooks, O as OutExtensionObject, P as ExeOptions, S as AttwOptions, T as ChunkAddonObject, U as CopyEntry, V as RolldownChunk, W as CopyOptions, a as NormalizedFormat, b as PublintOptions, c as TreeshakingOptions, d as UserConfig, f as UserConfigExport, g as ReportOptions, h as Workspace, i as InlineConfig, j as BuildContext, k as PackageJsonWithPath, l as TsdownInputOption, m as WithEnabled, n as DtsOptions, o as ResolvedConfig, p as UserConfigFn, r as Format, s as Sourcemap, t as CIOption, u as UnusedOptions, v as TsdownPlugin, w as ChunkAddonFunction, x as ExportsOptions, y as TsdownPluginOption, z as NoExternalFn } from "./types-F1pJie3k.mjs";
3
+ import { n as mergeConfig, r as resolveUserConfig, t as defineConfig } from "./config-BJZDmsYq.mjs";
4
4
  import * as Rolldown from "rolldown";
5
5
 
6
6
  //#region src/build.d.ts
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { n as buildWithConfigs, t as build } from "./build-BZshaq8i.mjs";
1
+ import { n as buildWithConfigs, t as build } from "./build-BxT2lm9L.mjs";
2
2
  import { r as resolveUserConfig, t as mergeConfig } from "./options-DWGUHu4D.mjs";
3
3
  import { a as globalLogger } from "./logger-BxuhTmAE.mjs";
4
4
  import { defineConfig } from "./config.mjs";
5
- import { t as enableDebug } from "./debug-CiHXNOc4.mjs";
5
+ import { t as enableDebug } from "./debug-DQISqjIY.mjs";
6
6
  import * as Rolldown from "rolldown";
7
7
  export { Rolldown, build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig };
@@ -1,5 +1,5 @@
1
1
  import { r as Logger } from "./index-C0LaRpVv.mjs";
2
- import { H as TsdownBundle, R as DepsPlugin, _ as ReportPlugin } from "./types-BezgYwPk.mjs";
2
+ import { H as TsdownBundle, R as DepsPlugin, _ as ReportPlugin } from "./types-F1pJie3k.mjs";
3
3
  import { Plugin } from "rolldown";
4
4
 
5
5
  //#region src/features/node-protocol.d.ts
package/dist/run.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as globalLogger } from "./logger-BxuhTmAE.mjs";
3
- import { n as version, t as enableDebug } from "./debug-CiHXNOc4.mjs";
3
+ import { n as version, t as enableDebug } from "./debug-DQISqjIY.mjs";
4
4
  import module from "node:module";
5
5
  import process from "node:process";
6
6
  import { blue, hex } from "ansis";
@@ -13,10 +13,10 @@ cli.help().version(version);
13
13
  cli.command("[...files]", "Bundle files", {
14
14
  ignoreOptionDefaultValue: true,
15
15
  allowUnknownOptions: true
16
- }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, 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) => {
16
+ }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, 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 package exports for package.json").action(async (input, flags) => {
17
17
  globalLogger.level = flags.logLevel || "info";
18
18
  globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
19
- const { build } = await import("./build-BZshaq8i.mjs").then((n) => n.r);
19
+ const { build } = await import("./build-BxT2lm9L.mjs").then((n) => n.r);
20
20
  if (input.length > 0) flags.entry = input;
21
21
  await build(flags);
22
22
  });
@@ -1033,8 +1033,8 @@ interface UserConfig {
1033
1033
  /**
1034
1034
  * Generate package exports for `package.json`.
1035
1035
  *
1036
- * This will set the `main`, `module`, `types`, `exports` fields in `package.json`
1037
- * to point to the generated files.
1036
+ * This will set the `exports` field in `package.json` to point to the
1037
+ * generated files.
1038
1038
  *
1039
1039
  * @default false
1040
1040
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsdown",
3
3
  "type": "module",
4
- "version": "0.22.1",
4
+ "version": "0.22.2",
5
5
  "description": "The Elegant Bundler for Libraries",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -54,8 +54,8 @@
54
54
  "typescript": "^5.0.0 || ^6.0.0",
55
55
  "unplugin-unused": "^0.5.0",
56
56
  "unrun": "*",
57
- "@tsdown/exe": "0.22.1",
58
- "@tsdown/css": "0.22.1"
57
+ "@tsdown/exe": "0.22.2",
58
+ "@tsdown/css": "0.22.2"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@arethetypeswrong/core": {
@@ -87,7 +87,7 @@
87
87
  }
88
88
  },
89
89
  "dependencies": {
90
- "ansis": "^4.3.0",
90
+ "ansis": "^4.3.1",
91
91
  "cac": "^7.0.0",
92
92
  "defu": "^6.1.7",
93
93
  "empathic": "^2.0.1",
@@ -95,11 +95,11 @@
95
95
  "import-without-cache": "^0.4.0",
96
96
  "obug": "^2.1.1",
97
97
  "picomatch": "^4.0.4",
98
- "rolldown": "^1.0.2",
99
- "rolldown-plugin-dts": "^0.25.1",
100
- "semver": "^7.8.0",
101
- "tinyexec": "^1.1.2",
102
- "tinyglobby": "^0.2.16",
98
+ "rolldown": "~1.1.0",
99
+ "rolldown-plugin-dts": "^0.25.2",
100
+ "semver": "^7.8.1",
101
+ "tinyexec": "^1.2.4",
102
+ "tinyglobby": "^0.2.17",
103
103
  "tree-kill": "^1.2.2",
104
104
  "unconfig-core": "^7.5.0"
105
105
  },
@@ -109,26 +109,26 @@
109
109
  "pkg-types": "2.3.1"
110
110
  },
111
111
  "devDependencies": {
112
- "@arethetypeswrong/core": "^0.18.2",
112
+ "@arethetypeswrong/core": "^0.18.3",
113
113
  "@sxzz/eslint-config": "^8.1.0",
114
114
  "@sxzz/prettier-config": "^2.3.1",
115
115
  "@sxzz/test-utils": "^0.5.18",
116
116
  "@types/node": "^25.9.1",
117
117
  "@types/picomatch": "^4.0.3",
118
118
  "@types/semver": "^7.7.1",
119
- "@typescript/native-preview": "7.0.0-dev.20260521.1",
119
+ "@typescript/native-preview": "7.0.0-dev.20260603.1",
120
120
  "@unocss/eslint-plugin": "^66.7.0",
121
- "@vitejs/devtools": "^0.2.0",
122
- "@vitest/coverage-v8": "^4.1.7",
123
- "@vitest/ui": "^4.1.7",
121
+ "@vitejs/devtools": "^0.3.1",
122
+ "@vitest/coverage-v8": "^4.1.8",
123
+ "@vitest/ui": "^4.1.8",
124
124
  "@vueuse/core": "^14.3.0",
125
125
  "actionspack": "^0.1.5",
126
- "baseline-browser-mapping": "^2.10.31",
126
+ "baseline-browser-mapping": "^2.10.33",
127
127
  "bumpp": "^11.1.0",
128
128
  "dedent": "^1.7.2",
129
- "eslint": "^10.4.0",
129
+ "eslint": "^10.4.1",
130
130
  "is-in-ci": "^2.0.0",
131
- "memfs": "^4.57.2",
131
+ "memfs": "^4.57.5",
132
132
  "package-manager-detector": "^1.6.0",
133
133
  "pkg-types": "^2.3.1",
134
134
  "postcss": "^8.5.15",
@@ -136,9 +136,9 @@
136
136
  "prettier": "^3.8.3",
137
137
  "publint": "^0.3.21",
138
138
  "rolldown-plugin-require-cjs": "^0.4.0",
139
- "sass": "^1.99.0",
139
+ "sass": "^1.100.0",
140
140
  "tsnapi": "^0.3.3",
141
- "tsx": "^4.22.3",
141
+ "tsx": "^4.22.4",
142
142
  "typescript": "~6.0.3",
143
143
  "unocss": "^66.7.0",
144
144
  "unplugin-ast": "^0.17.0",
@@ -146,11 +146,11 @@
146
146
  "unplugin-unused": "^0.5.7",
147
147
  "unplugin-vue": "^7.2.0",
148
148
  "unrun": "^0.3.0",
149
- "vite": "^8.0.14",
150
- "vitest": "^4.1.7",
151
- "vue": "^3.5.34",
152
- "@tsdown/css": "0.22.1",
153
- "@tsdown/exe": "0.22.1"
149
+ "vite": "^8.0.16",
150
+ "vitest": "^4.1.8",
151
+ "vue": "^3.5.35",
152
+ "@tsdown/css": "0.22.2",
153
+ "@tsdown/exe": "0.22.2"
154
154
  },
155
155
  "prettier": "@sxzz/prettier-config",
156
156
  "scripts": {