rsbuild-plugin-dts 0.13.0 → 0.13.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 +2 -0
- package/dist/tsgo.js +4 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -104,6 +104,8 @@ pluginDts({
|
|
|
104
104
|
|
|
105
105
|
Whether to generate declaration files with building the project references. This is equivalent to using the `--build` flag with the `tsc` command. See [Project References](https://www.typescriptlang.org/docs/handbook/project-references.html) for more details.
|
|
106
106
|
|
|
107
|
+
When the project references are configured but the referenced project has not been built separately (for example, the source code of other projects is directly referenced in monorepo, but the corresponding declaration file is missing in the project), this option needs to be enabled to ensure that the declaration files of referenced projects can be generated correctly, thereby ensuring the integrity of the type system.
|
|
108
|
+
|
|
107
109
|
When this option is enabled, you must explicitly set `declarationDir` or `outDir` in `tsconfig.json` in order to meet the build requirements.
|
|
108
110
|
|
|
109
111
|
### abortOnError
|
package/dist/tsgo.js
CHANGED
|
@@ -2,6 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import promises from "node:fs/promises";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import node_path from "node:path";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
5
6
|
import { logger } from "@rsbuild/core";
|
|
6
7
|
import picocolors from "picocolors";
|
|
7
8
|
import { getTimeCost, globDtsFiles, processDtsFiles, renameDtsFile, updateDeclarationMapContent } from "./utils.js";
|
|
@@ -10,7 +11,9 @@ const logPrefixTsgo = picocolors.dim('[tsgo]');
|
|
|
10
11
|
const getTsgoBinPath = async ()=>{
|
|
11
12
|
const tsgoPkgPath = tsgo_require.resolve("@typescript/native-preview/package.json");
|
|
12
13
|
const libPath = node_path.resolve(node_path.dirname(tsgoPkgPath), './lib/getExePath.js');
|
|
13
|
-
|
|
14
|
+
let fileUrl;
|
|
15
|
+
fileUrl = 'win32' === process.platform ? pathToFileURL(libPath).href : libPath;
|
|
16
|
+
return import(fileUrl).then((mod)=>{
|
|
14
17
|
const getExePath = mod.default;
|
|
15
18
|
return getExePath();
|
|
16
19
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsbuild-plugin-dts",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Rsbuild plugin that supports emitting declaration files for TypeScript.",
|
|
5
5
|
"homepage": "https://rslib.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@ast-grep/napi": "0.37.0",
|
|
29
|
-
"magic-string": "^0.30.
|
|
29
|
+
"magic-string": "^0.30.19",
|
|
30
30
|
"picocolors": "1.1.1",
|
|
31
31
|
"tinyglobby": "^0.2.15",
|
|
32
32
|
"tsconfig-paths": "^4.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@microsoft/api-extractor": "^7.52.11",
|
|
36
|
-
"@rsbuild/core": "~1.5.
|
|
37
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
36
|
+
"@rsbuild/core": "~1.5.5",
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20250909.1",
|
|
38
38
|
"rsbuild-plugin-publint": "^0.3.3",
|
|
39
|
-
"rslib": "npm:@rslib/core@0.
|
|
39
|
+
"rslib": "npm:@rslib/core@0.13.0",
|
|
40
40
|
"typescript": "^5.9.2",
|
|
41
41
|
"@rslib/tsconfig": "0.0.1"
|
|
42
42
|
},
|