rolldown-plugin-dts 0.23.2 → 0.24.0-beta.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/README.md CHANGED
@@ -40,6 +40,18 @@ Configuration options for the plugin.
40
40
 
41
41
  ### General Options
42
42
 
43
+ #### `entry`
44
+
45
+ Glob pattern(s) to filter which files get `.d.ts` generation.
46
+
47
+ When specified, only files matching these patterns will emit `.d.ts` chunks — even if they are not Rolldown entry points. Supports negation patterns for exclusion. Patterns are matched against file paths relative to `cwd`.
48
+
49
+ ```ts
50
+ dts({
51
+ entry: ['src/**/*.ts', '!src/icons/**'],
52
+ })
53
+ ```
54
+
43
55
  #### `cwd`
44
56
 
45
57
  The directory in which the plugin will search for the `tsconfig.json` file.
@@ -1,6 +1,6 @@
1
1
  import { r as TscContext } from "./context-3rlTPR48.mjs";
2
2
  import { SourceMapInput } from "rolldown";
3
- import { TsConfigJson } from "get-tsconfig";
3
+ import { TsconfigJson } from "get-tsconfig";
4
4
  import ts from "typescript";
5
5
 
6
6
  //#region src/tsc/types.d.ts
@@ -10,7 +10,7 @@ interface TscModule {
10
10
  }
11
11
  interface TscOptions {
12
12
  tsconfig?: string;
13
- tsconfigRaw: TsConfigJson;
13
+ tsconfigRaw: TsconfigJson;
14
14
  cwd: string;
15
15
  build: boolean;
16
16
  incremental: boolean;
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from "rolldown";
2
2
  import { IsolatedDeclarationsOptions } from "rolldown/experimental";
3
- import { TsConfigJson } from "get-tsconfig";
3
+ import { TsconfigJson } from "get-tsconfig";
4
4
 
5
5
  //#region src/options.d.ts
6
6
  interface GeneralOptions {
@@ -48,13 +48,13 @@ interface GeneralOptions {
48
48
  *
49
49
  * @see https://www.typescriptlang.org/tsconfig
50
50
  */
51
- tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
51
+ tsconfigRaw?: Omit<TsconfigJson, "compilerOptions">;
52
52
  /**
53
53
  * Override the `compilerOptions` specified in `tsconfig.json`.
54
54
  *
55
55
  * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
56
56
  */
57
- compilerOptions?: TsConfigJson.CompilerOptions;
57
+ compilerOptions?: TsconfigJson.CompilerOptions;
58
58
  /**
59
59
  * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
60
60
  */
@@ -205,7 +205,7 @@ type OptionsResolved = Overwrite<Required<Omit<Options, "compilerOptions">>, {
205
205
  entry?: string[];
206
206
  tsconfig?: string;
207
207
  oxc: IsolatedDeclarationsOptions | false;
208
- tsconfigRaw: TsConfigJson;
208
+ tsconfigRaw: TsconfigJson;
209
209
  tsgo: Omit<TsgoOptions, "enabled"> | false;
210
210
  }>;
211
211
  declare function resolveOptions({
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ const picomatch = __cjs_require("picomatch");
17
17
  import { ResolverFactory, isolatedDeclarationSync } from "rolldown/experimental";
18
18
  import { tmpdir } from "node:os";
19
19
  import process from "node:process";
20
- import { getTsconfig, parseTsconfig } from "get-tsconfig";
20
+ import { getTsconfig, readTsconfig } from "get-tsconfig";
21
21
  import { createResolver } from "dts-resolver";
22
22
  //#region src/dts-input.ts
23
23
  function createDtsInputPlugin({ sideEffects }) {
@@ -942,7 +942,7 @@ function resolveOptions({ entry, cwd = process.cwd(), dtsInput = false, emitDtsO
942
942
  resolvedTsconfig = config;
943
943
  } else if (typeof tsconfig === "string") {
944
944
  tsconfig = path.resolve(cwd || process.cwd(), tsconfig);
945
- resolvedTsconfig = parseTsconfig(tsconfig);
945
+ resolvedTsconfig = readTsconfig(tsconfig).config;
946
946
  } else tsconfig = void 0;
947
947
  compilerOptions = {
948
948
  ...resolvedTsconfig?.compilerOptions,
@@ -1,5 +1,5 @@
1
1
  import { ChunkFileNamesFunction, PreRenderedChunk } from "rolldown";
2
- import { parseTsconfig } from "get-tsconfig";
2
+ import { readTsconfig } from "get-tsconfig";
3
3
 
4
4
  //#region src/filename.d.ts
5
5
  declare const RE_JS: RegExp;
@@ -17,4 +17,4 @@ declare function filename_dts_to(id: string, ext: "js" | "ts"): string;
17
17
  declare function resolveTemplateFn(fn: string | ChunkFileNamesFunction, chunk: PreRenderedChunk): string;
18
18
  declare function replaceTemplateName(template: string, name: string): string;
19
19
  //#endregion
20
- export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_ROLLDOWN_RUNTIME, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, parseTsconfig, replaceTemplateName, resolveTemplateFn };
20
+ export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_ROLLDOWN_RUNTIME, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, readTsconfig, replaceTemplateName, resolveTemplateFn };
package/dist/internal.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as RE_JSON, c as RE_TS, d as filename_js_to_dts, f as filename_to_dts, i as RE_JS, l as RE_VUE, m as resolveTemplateFn, n as RE_DTS, o as RE_NODE_MODULES, p as replaceTemplateName, r as RE_DTS_MAP, s as RE_ROLLDOWN_RUNTIME, t as RE_CSS, u as filename_dts_to } from "./filename-DQnUJlio.mjs";
2
- import { parseTsconfig } from "get-tsconfig";
3
- export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_ROLLDOWN_RUNTIME, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, parseTsconfig, replaceTemplateName, resolveTemplateFn };
2
+ import { readTsconfig } from "get-tsconfig";
3
+ export { RE_CSS, RE_DTS, RE_DTS_MAP, RE_JS, RE_JSON, RE_NODE_MODULES, RE_ROLLDOWN_RUNTIME, RE_TS, RE_VUE, filename_dts_to, filename_js_to_dts, filename_to_dts, readTsconfig, replaceTemplateName, resolveTemplateFn };
@@ -1,4 +1,4 @@
1
- import { t as tscEmit } from "./index-DAUYR4Qd.mjs";
1
+ import { t as tscEmit } from "./index-CJhxyVA1.mjs";
2
2
 
3
3
  //#region src/tsc/worker.d.ts
4
4
  declare const functions: {
package/dist/tsc.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-DAUYR4Qd.mjs";
1
+ import { i as TscResult, n as TscModule, r as TscOptions, t as tscEmit } from "./index-CJhxyVA1.mjs";
2
2
  export { TscModule, TscOptions, TscResult, tscEmit };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rolldown-plugin-dts",
3
3
  "type": "module",
4
- "version": "0.23.2",
4
+ "version": "0.24.0-beta.1",
5
5
  "description": "A Rolldown plugin to generate and bundle dts files.",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",
@@ -38,13 +38,13 @@
38
38
  "access": "public"
39
39
  },
40
40
  "engines": {
41
- "node": ">=20.19.0"
41
+ "node": ">=22.18.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@ts-macro/tsc": "^0.3.6",
45
45
  "@typescript/native-preview": ">=7.0.0-dev.20260325.1",
46
46
  "rolldown": "^1.0.0-rc.12",
47
- "typescript": "^5.0.0 || ^6.0.0",
47
+ "typescript": "^6.0.0",
48
48
  "vue-tsc": "~3.2.0"
49
49
  },
50
50
  "peerDependenciesMeta": {
@@ -69,7 +69,7 @@
69
69
  "ast-kit": "^3.0.0-beta.1",
70
70
  "birpc": "^4.0.0",
71
71
  "dts-resolver": "^2.1.3",
72
- "get-tsconfig": "^4.13.7",
72
+ "get-tsconfig": "^5.0.0-beta.4",
73
73
  "obug": "^2.1.1",
74
74
  "picomatch": "^4.0.4"
75
75
  },
@@ -77,31 +77,31 @@
77
77
  "@jridgewell/source-map": "^0.3.11",
78
78
  "@sxzz/eslint-config": "^7.8.4",
79
79
  "@sxzz/prettier-config": "^2.3.1",
80
- "@sxzz/test-utils": "^0.5.16",
81
- "@types/node": "^25.5.0",
82
- "@types/picomatch": "^4.0.2",
83
- "@typescript/native-preview": "7.0.0-dev.20260328.1",
80
+ "@sxzz/test-utils": "^0.5.18",
81
+ "@types/node": "^25.6.0",
82
+ "@types/picomatch": "^4.0.3",
83
+ "@typescript/native-preview": "7.0.0-dev.20260427.1",
84
84
  "@volar/typescript": "^2.4.28",
85
- "@vue/language-core": "^3.2.6",
85
+ "@vue/language-core": "^3.2.7",
86
86
  "arktype": "^2.2.0",
87
87
  "bumpp": "^11.0.1",
88
- "diff": "^8.0.4",
89
- "eslint": "^10.1.0",
90
- "prettier": "^3.8.1",
91
- "rolldown": "^1.0.0-rc.12",
92
- "rolldown-plugin-dts-snapshot": "^0.4.0",
88
+ "diff": "^9.0.0",
89
+ "eslint": "^10.2.1",
90
+ "prettier": "^3.8.3",
91
+ "rolldown": "^1.0.0-rc.17",
93
92
  "rolldown-plugin-require-cjs": "^0.4.0",
94
93
  "rollup-plugin-dts": "^6.4.1",
95
- "tinyglobby": "^0.2.15",
96
- "tsdown": "^0.21.6",
97
- "typescript": "^6.0.2",
98
- "vitest": "^4.1.2",
99
- "vue": "^3.5.31",
100
- "vue-tsc": "^3.2.6",
94
+ "tinyglobby": "^0.2.16",
95
+ "tsdown": "^0.22.0-beta.1",
96
+ "tsnapi": "^0.3.2",
97
+ "typescript": "^6.0.3",
98
+ "vitest": "^4.1.5",
99
+ "vue": "^3.5.33",
100
+ "vue-tsc": "^3.2.7",
101
101
  "zod": "^4.3.6"
102
102
  },
103
103
  "resolutions": {
104
- "rolldown": "^1.0.0-rc.12"
104
+ "rolldown": "^1.0.0-rc.17"
105
105
  },
106
106
  "prettier": "@sxzz/prettier-config",
107
107
  "scripts": {