@bunup/dts 0.14.14 → 0.14.16

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +20 -20
  2. package/package.json +8 -8
package/dist/index.d.ts CHANGED
@@ -1,36 +1,36 @@
1
1
  import { OxcError } from "oxc-transform";
2
2
  type IsolatedDeclarationError = {
3
- error: OxcError
4
- file: string
5
- content: string
3
+ error: OxcError;
4
+ file: string;
5
+ content: string;
6
6
  };
7
7
  declare function logIsolatedDeclarationErrors(errors: IsolatedDeclarationError[]): void;
8
8
  type Naming = string | {
9
- chunk: string
9
+ chunk: string;
10
10
  };
11
11
  type Resolve = boolean | (string | RegExp)[];
12
12
  /**
13
13
  * Options for generating declaration file
14
14
  */
15
15
  type GenerateDtsOptions = {
16
- naming?: Naming
16
+ naming?: Naming;
17
17
  /**
18
18
  * Path to the preferred tsconfig.json file
19
19
  * By default, the closest tsconfig.json file will be used
20
20
  */
21
- preferredTsConfigPath?: string
21
+ preferredTsConfigPath?: string;
22
22
  /**
23
23
  * Controls which external modules should be resolved
24
24
  * - `true` to resolve all external modules
25
25
  * - Array of strings or RegExp to match specific modules
26
26
  * - `false` or `undefined` to disable external resolution
27
27
  */
28
- resolve?: Resolve
28
+ resolve?: Resolve;
29
29
  /**
30
30
  * The directory where the plugin will look for the `tsconfig.json` file and `node_modules`
31
31
  * By default, the current working directory will be used
32
32
  */
33
- cwd?: string
33
+ cwd?: string;
34
34
  /**
35
35
  * Whether to split declaration files when multiple entrypoints import the same files,
36
36
  * modules, or share types. When enabled, shared types will be extracted to separate
@@ -39,11 +39,11 @@ type GenerateDtsOptions = {
39
39
  * This helps reduce bundle size by preventing duplication of type definitions
40
40
  * across multiple entrypoints.
41
41
  */
42
- splitting?: boolean
42
+ splitting?: boolean;
43
43
  /**
44
44
  * Whether to minify the generated declaration files to reduce the size of the declaration file.
45
45
  */
46
- minify?: boolean
46
+ minify?: boolean;
47
47
  };
48
48
  type GenerateDtsResultFile = {
49
49
  /**
@@ -51,17 +51,17 @@ type GenerateDtsResultFile = {
51
51
  * - 'entry-point': The declaration file for an entry point
52
52
  * - 'chunk': A declaration file created when code splitting is enabled
53
53
  */
54
- kind: "entry-point" | "chunk"
54
+ kind: "entry-point" | "chunk";
55
55
  /**
56
56
  * The entry point that was used to generate the declaration file.
57
57
  *
58
58
  * This will only be available if the kind is 'entry-point' and not for chunk declaration files.
59
59
  */
60
- entrypoint: string | undefined
60
+ entrypoint: string | undefined;
61
61
  /**
62
62
  * If the kind is 'chunk', this is the name of the chunk file.
63
63
  */
64
- chunkFileName: string | undefined
64
+ chunkFileName: string | undefined;
65
65
  /**
66
66
  * The output path of the declaration file relative to the output directory.
67
67
  * This is the directory where you want to save the declaration file.
@@ -78,21 +78,21 @@ type GenerateDtsResultFile = {
78
78
  * @example
79
79
  * await Bun.write(`dist/${result.outputPath}`, result.dts)
80
80
  */
81
- outputPath: string
81
+ outputPath: string;
82
82
  /**
83
83
  * The parsed parts of the output path, containing the file name and extension
84
84
  * This is useful when you need to manipulate the file name or extension separately
85
85
  */
86
86
  pathInfo: {
87
87
  /** The output path relative to the output directory without the extension */
88
- outputPathWithoutExtension: string
88
+ outputPathWithoutExtension: string;
89
89
  /** The file extension including the dot (e.g. '.d.ts') */
90
- ext: string
91
- }
90
+ ext: string;
91
+ };
92
92
  /**
93
93
  * The generated declaration file
94
94
  */
95
- dts: string
95
+ dts: string;
96
96
  };
97
97
  /**
98
98
  * Result of the generateDts function
@@ -101,11 +101,11 @@ type GenerateDtsResult = {
101
101
  /**
102
102
  * The generated declaration files with their relevant information
103
103
  */
104
- files: GenerateDtsResultFile[]
104
+ files: GenerateDtsResultFile[];
105
105
  /**
106
106
  * The errors that occurred during the generation
107
107
  */
108
- errors: IsolatedDeclarationError[]
108
+ errors: IsolatedDeclarationError[];
109
109
  };
110
110
  declare function generateDts(entrypoints: string[], options?: GenerateDtsOptions): Promise<GenerateDtsResult>;
111
111
  export { logIsolatedDeclarationErrors, generateDts, IsolatedDeclarationError, GenerateDtsResult, GenerateDtsOptions };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bunup/dts",
3
3
  "description": "An extremely fast TypeScript declaration file generator and bundler that outputs to a single file.",
4
- "version": "0.14.14",
4
+ "version": "0.14.16",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -18,11 +18,11 @@
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "dependencies": {
21
- "@babel/parser": "^7.28.0",
22
- "coffi": "^0.1.31",
23
- "oxc-minify": "^0.77.2",
24
- "oxc-resolver": "^8.0.0",
25
- "oxc-transform": "^0.67.0",
21
+ "@babel/parser": "^7.28.4",
22
+ "coffi": "^0.1.37",
23
+ "oxc-minify": "^0.93.0",
24
+ "oxc-resolver": "^11.9.0",
25
+ "oxc-transform": "^0.93.0",
26
26
  "picocolors": "^1.1.1",
27
27
  "std-env": "^3.9.0",
28
28
  "ts-import-resolver": "^0.1.23"
@@ -51,7 +51,7 @@
51
51
  "funding": "https://github.com/sponsors/arshad-yaseen",
52
52
  "homepage": "https://bunup.dev",
53
53
  "peerDependencies": {
54
- "typescript": ">=4.5.0"
54
+ "typescript": "latest"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "typescript": {
@@ -59,6 +59,6 @@
59
59
  }
60
60
  },
61
61
  "devDependencies": {
62
- "@babel/types": "^7.28.2"
62
+ "@babel/types": "^7.28.4"
63
63
  }
64
64
  }