tsdown 0.11.11 → 0.11.12

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 { UserConfig, UserConfigFn } from "./types-DnZA5gez.js";
1
+ import { UserConfig, UserConfigFn } from "./types-CsOn0For.js";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  /**
package/dist/config.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { UserConfig, UserConfigFn } from "./types-DnZA5gez.js";
2
- import { defineConfig$1 as defineConfig } from "./config-BMza8hkb.js";
1
+ import { UserConfig, UserConfigFn } from "./types-CsOn0For.js";
2
+ import { defineConfig$1 as defineConfig } from "./config-GQTSGL72.js";
3
3
  export { UserConfig, UserConfigFn, defineConfig };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { BuildContext, Options, ResolvedOptions, TsdownHooks, UserConfig, UserConfigFn } from "./types-DnZA5gez.js";
2
- import { defineConfig$1 as defineConfig } from "./config-BMza8hkb.js";
1
+ import { BuildContext, Options, ResolvedOptions, TsdownHooks, UserConfig, UserConfigFn } from "./types-CsOn0For.js";
2
+ import { defineConfig$1 as defineConfig } from "./config-GQTSGL72.js";
3
3
  import "ansis";
4
4
  import { InternalModuleFormat } from "rolldown";
5
5
 
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ import process from "node:process";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import { blue, bold, dim, green, underline } from "ansis";
8
8
  import { build as build$1 } from "rolldown";
9
- import { transformPlugin } from "rolldown/experimental";
10
9
  import { exec } from "tinyexec";
11
10
  import Debug from "debug";
12
11
  import { glob } from "tinyglobby";
@@ -768,19 +767,11 @@ async function getBuildOptions(config, format, cjsDts, isMultiFormat) {
768
767
  const { Unused } = await import("unplugin-unused");
769
768
  plugins.push(Unused.rolldown(unused === true ? {} : unused));
770
769
  }
771
- if (target) plugins.push(transformPlugin({
772
- include: /\.[cm]?[jt]sx?$/,
773
- exclude: /\.d\.[cm]?ts$/,
774
- transformOptions: { target }
775
- }), RuntimeHelperCheckPlugin(target));
770
+ if (target) plugins.push(RuntimeHelperCheckPlugin(target));
776
771
  plugins.push(ShebangPlugin(cwd, name, isMultiFormat));
777
772
  }
778
773
  if (report && !logger.silent) plugins.push(ReportPlugin(report, cwd, cjsDts, name, isMultiFormat));
779
- if (target) plugins.push(
780
- // Use Lightning CSS to handle CSS input. This is a temporary solution
781
- // until Rolldown supports CSS syntax lowering natively.
782
- await LightningCSSPlugin({ target })
783
- );
774
+ if (target) plugins.push(await LightningCSSPlugin({ target }));
784
775
  plugins.push(userPlugins);
785
776
  const inputOptions = await mergeUserOptions({
786
777
  input: entry,
@@ -811,6 +802,7 @@ async function getBuildOptions(config, format, cjsDts, isMultiFormat) {
811
802
  name: config.globalName,
812
803
  sourcemap,
813
804
  dir: outDir,
805
+ target,
814
806
  minify,
815
807
  entryFileNames,
816
808
  chunkFileNames
@@ -1,5 +1,5 @@
1
1
  import { logger } from "./logger-BdIBA2vO.js";
2
- import { version } from "./package-bNkOwuDn.js";
2
+ import { version } from "./package-DQpXq2zc.js";
3
3
  import process from "node:process";
4
4
  import { bold, green, underline } from "ansis";
5
5
  import { readFile, unlink, writeFile } from "node:fs/promises";
@@ -0,0 +1,5 @@
1
+ //#region package.json
2
+ var version = "0.11.12";
3
+
4
+ //#endregion
5
+ export { version };
package/dist/plugins.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReportPlugin$1 as ReportPlugin, ResolvedOptions } from "./types-DnZA5gez.js";
1
+ import { ReportPlugin$1 as ReportPlugin, ResolvedOptions } from "./types-CsOn0For.js";
2
2
  import { Plugin } from "rolldown";
3
3
  import { PackageJson } from "pkg-types";
4
4
 
@@ -7,6 +7,9 @@ declare function ExternalPlugin(options: ResolvedOptions): Plugin;
7
7
 
8
8
  //#endregion
9
9
  //#region src/features/shebang.d.ts
10
+ /*
11
+ * Production deps should be excluded from the bundle
12
+ */
10
13
  declare function ShebangPlugin(cwd: string, name?: string, isMultiFormat?: boolean): Plugin;
11
14
 
12
15
  //#endregion
package/dist/run.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { logger, resolveComma, toArray } from "./logger-BdIBA2vO.js";
3
- import { version } from "./package-bNkOwuDn.js";
3
+ import { version } from "./package-DQpXq2zc.js";
4
4
  import module from "node:module";
5
5
  import process from "node:process";
6
6
  import { dim } from "ansis";
@@ -22,7 +22,7 @@ cli.command("[...files]", "Bundle files", {
22
22
  await build$1(flags);
23
23
  });
24
24
  cli.command("migrate", "Migrate from tsup to tsdown").option("-c, --cwd <dir>", "Working directory").option("-d, --dry-run", "Dry run").action(async (args) => {
25
- const { migrate } = await import("./migrate-BsizCuv-.js");
25
+ const { migrate } = await import("./migrate-DFC9EXfl.js");
26
26
  await migrate(args);
27
27
  });
28
28
  async function runCLI() {
@@ -115,6 +115,7 @@ interface Workspace {
115
115
  * Options for tsdown.
116
116
  */
117
117
  interface Options$3 {
118
+ /// build options
118
119
  entry?: InputOption;
119
120
  external?: ExternalOption;
120
121
  noExternal?: Arrayable<string | RegExp> | ((id: string, importer: string | undefined) => boolean | null | undefined | void);
@@ -123,6 +124,7 @@ interface Options$3 {
123
124
  /** @default 'node' */
124
125
  platform?: "node" | "neutral" | "browser";
125
126
  inputOptions?: InputOptions | ((options: InputOptions, format: NormalizedFormat) => Awaitable<InputOptions | void | null>);
127
+ /// output options
126
128
  /** @default ['es'] */
127
129
  format?: Format | Format[];
128
130
  globalName?: string;
@@ -219,6 +221,7 @@ interface Options$3 {
219
221
  * @default false
220
222
  */
221
223
  fromVite?: boolean | "vitest";
224
+ /// addons
222
225
  /**
223
226
  * Emit TypeScript declaration files (.d.ts).
224
227
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.11.11",
3
+ "version": "0.11.12",
4
4
  "description": "The Elegant Bundler for Libraries",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -69,8 +69,8 @@
69
69
  "diff": "^8.0.1",
70
70
  "empathic": "^1.1.0",
71
71
  "hookable": "^5.5.3",
72
- "rolldown": "1.0.0-beta.8-commit.d95f99e",
73
- "rolldown-plugin-dts": "^0.13.1",
72
+ "rolldown": "1.0.0-beta.9",
73
+ "rolldown-plugin-dts": "^0.13.2",
74
74
  "semver": "^7.7.2",
75
75
  "tinyexec": "^1.0.1",
76
76
  "tinyglobby": "^0.2.13",
@@ -82,7 +82,7 @@
82
82
  "@sxzz/prettier-config": "^2.2.1",
83
83
  "@sxzz/test-utils": "^0.5.6",
84
84
  "@types/debug": "^4.1.12",
85
- "@types/node": "^22.15.18",
85
+ "@types/node": "^22.15.19",
86
86
  "@types/semver": "^7.7.0",
87
87
  "@unocss/eslint-plugin": "^66.1.2",
88
88
  "bumpp": "^10.1.1",
@@ -101,7 +101,7 @@
101
101
  "vite": "^6.3.5",
102
102
  "vitepress": "^1.6.3",
103
103
  "vitepress-plugin-group-icons": "^1.5.5",
104
- "vitepress-plugin-llms": "^1.1.4",
104
+ "vitepress-plugin-llms": "^1.2.0",
105
105
  "vitest": "^3.1.3",
106
106
  "vue": "^3.5.14"
107
107
  },
@@ -121,6 +121,6 @@
121
121
  "docs:dev": "vitepress dev docs",
122
122
  "docs:build": "vitepress build docs",
123
123
  "docs:preview": "vitepress preview docs",
124
- "docs:generate": "./docs/.vitepress/scripts/docs-generate.sh"
124
+ "docs:generate": "node --import @oxc-node/core/register ./docs/.vitepress/scripts/docs-generate.ts"
125
125
  }
126
126
  }
@@ -1,5 +0,0 @@
1
- //#region package.json
2
- var version = "0.11.11";
3
-
4
- //#endregion
5
- export { version };