unplugin-isolated-decl 0.14.3 → 0.14.5

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
@@ -9,7 +9,10 @@
9
9
  - 🚀 **Fast**: Generates `.d.ts` files significantly faster than `tsc`.
10
10
  - 🎨 **Transformer**: Support Oxc, SWC, and TypeScript transformer.
11
11
  - 📦 **Zero Config**: No configuration required, works out of the box.
12
- - ✨ **Bundler Support**: Works with Vite, Rollup, esbuild and Farm. (PR of Webpack/Rspack support is welcome)
12
+ - ✨ **Bundler Support**: Works with Vite, Rollup, esbuild and Farm.
13
+
14
+ > [!TIP]
15
+ > For Rolldown users, you can use the [`rolldown-plugin-dts`](https://github.com/sxzz/rolldown-plugin-dts) for a more powerful and flexible solution.
13
16
 
14
17
  ## Installation
15
18
 
@@ -1,8 +1,8 @@
1
1
  import type * as OxcTypes from "@oxc-project/types";
2
2
  import type MagicString from "magic-string";
3
3
  export type OxcImport = (OxcTypes.ImportDeclaration | OxcTypes.ExportAllDeclaration | OxcTypes.ExportNamedDeclaration) & {
4
- source: OxcTypes.StringLiteral
5
- shouldAddIndex?: boolean
4
+ source: OxcTypes.StringLiteral;
5
+ shouldAddIndex?: boolean;
6
6
  };
7
7
  export declare function filterImports(program: OxcTypes.Program): OxcImport[];
8
8
  export declare function rewriteImports(s: MagicString, imports: OxcImport[], entryMap: Record<string, string> | undefined, inputBase: string, entryFileNames: string, srcFilename: string): string;
@@ -5,9 +5,9 @@ import type { FilterPattern } from "unplugin-utils";
5
5
  * Represents the options for the plugin.
6
6
  */
7
7
  export type Options = {
8
- include?: FilterPattern
9
- exclude?: FilterPattern
10
- enforce?: "pre" | "post" | undefined
8
+ include?: FilterPattern;
9
+ exclude?: FilterPattern;
10
+ enforce?: "pre" | "post" | undefined;
11
11
  /**
12
12
  * Whether to generate declaration source maps.
13
13
  *
@@ -15,40 +15,40 @@ export type Options = {
15
15
  *
16
16
  * @link https://www.typescriptlang.org/tsconfig/#declarationMap
17
17
  */
18
- sourceMap?: boolean
19
- ignoreErrors?: boolean
18
+ sourceMap?: boolean;
19
+ ignoreErrors?: boolean;
20
20
  /** An extra directory layer for output files. */
21
- extraOutdir?: string
21
+ extraOutdir?: string;
22
22
  /** Patch `export default` in `.d.cts` to `export = ` */
23
- patchCjsDefaultExport?: boolean
23
+ patchCjsDefaultExport?: boolean;
24
24
  /** Base directory for input files. */
25
- inputBase?: string
26
- rewriteImports?: (id: string, importer: string) => string | void | null | undefined
25
+ inputBase?: string;
26
+ rewriteImports?: (id: string, importer: string) => string | void | null | undefined;
27
27
  } & ({
28
28
  /**
29
29
  * @default 'oxc'
30
30
  */
31
- transformer?: "oxc"
32
- transformOptions?: Omit<IsolatedDeclarationsOptions, "sourceMap">
31
+ transformer?: "oxc";
32
+ transformOptions?: Omit<IsolatedDeclarationsOptions, "sourceMap">;
33
33
  } | {
34
34
  /**
35
35
  * `@swc/core` should be installed yourself.
36
36
  */
37
- transformer?: "swc"
37
+ transformer?: "swc";
38
38
  } | {
39
39
  /**
40
40
  * `typescript` should be installed yourself.
41
41
  */
42
- transformer?: "typescript"
42
+ transformer?: "typescript";
43
43
  /** Only for typescript transformer */
44
- transformOptions?: TranspileOptions
44
+ transformOptions?: TranspileOptions;
45
45
  });
46
46
  type Overwrite<
47
47
  T,
48
48
  U
49
49
  > = Pick<T, Exclude<keyof T, keyof U>> & U;
50
50
  export type OptionsResolved = Overwrite<Required<Options> & {
51
- transformOptions?: any
51
+ transformOptions?: any;
52
52
  }, Pick<Options, "enforce" | "extraOutdir" | "rewriteImports" | "inputBase">>;
53
53
  export declare function resolveOptions(options: Options): OptionsResolved;
54
54
  export {};
@@ -3,7 +3,7 @@ export declare const debug: Debug.Debugger;
3
3
  export declare function lowestCommonAncestor(...filepaths: string[]): string;
4
4
  export declare function stripExt(filename: string): string;
5
5
  export declare function resolveEntry(input: string | string[] | Record<string, string>, userInputBase?: string): {
6
- entryMap: Record<string, string> | undefined
7
- inputBase: string
6
+ entryMap: Record<string, string> | undefined;
7
+ inputBase: string;
8
8
  };
9
9
  export declare function shouldAddIndex(id: string, resolved: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-isolated-decl",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
4
4
  "description": "A blazing-fast tool for generating isolated declarations.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -63,35 +63,36 @@
63
63
  "dependencies": {
64
64
  "debug": "^4.4.1",
65
65
  "magic-string": "^0.30.17",
66
- "oxc-parser": "^0.72.2",
67
- "oxc-transform": "^0.72.2",
66
+ "oxc-parser": "^0.75.0",
67
+ "oxc-transform": "^0.75.0",
68
68
  "unplugin": "^2.3.5",
69
69
  "unplugin-utils": "^0.2.4"
70
70
  },
71
71
  "devDependencies": {
72
- "@farmfe/core": "^1.7.5",
73
- "@oxc-project/types": "^0.72.2",
72
+ "@farmfe/core": "^1.7.8",
73
+ "@oxc-project/types": "^0.75.0",
74
74
  "@rollup/plugin-alias": "^5.1.1",
75
- "@swc/core": "^1.11.31",
76
- "@sxzz/eslint-config": "^7.0.2",
77
- "@sxzz/prettier-config": "^2.2.1",
75
+ "@swc/core": "^1.12.9",
76
+ "@sxzz/eslint-config": "^7.0.4",
77
+ "@sxzz/prettier-config": "^2.2.3",
78
78
  "@sxzz/test-utils": "^0.5.6",
79
79
  "@types/debug": "^4.1.12",
80
- "@types/node": "^22.15.29",
81
- "bumpp": "^10.1.1",
80
+ "@types/node": "^24.0.9",
81
+ "bumpp": "^10.2.0",
82
82
  "esbuild": "^0.25.5",
83
- "eslint": "^9.28.0",
83
+ "eslint": "^9.30.0",
84
84
  "fast-glob": "^3.3.3",
85
- "prettier": "^3.5.3",
86
- "rolldown": "1.0.0-beta.8-commit.534fde3",
87
- "rollup": "^4.41.1",
85
+ "prettier": "^3.6.2",
86
+ "publint": "^0.3.12",
87
+ "rolldown": "^1.0.0-beta.23",
88
+ "rollup": "^4.44.1",
88
89
  "tinyglobby": "^0.2.14",
89
- "tsdown": "^0.12.6",
90
- "tsx": "^4.19.4",
90
+ "tsdown": "^0.12.9",
91
+ "tsx": "^4.20.3",
91
92
  "typescript": "^5.8.3",
92
- "unplugin-oxc": "^0.4.5",
93
- "vite": "^6.3.5",
94
- "vitest": "^3.2.1"
93
+ "unplugin-oxc": "^0.4.6",
94
+ "vite": "^7.0.0",
95
+ "vitest": "^3.2.4"
95
96
  },
96
97
  "engines": {
97
98
  "node": ">=20.18.0"