rsbuild-plugin-dts 0.3.2 → 0.4.0

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.js +11 -11
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -57,20 +57,20 @@ const pluginDts = (options = {})=>({
57
57
  });
58
58
  }));
59
59
  });
60
- api.onAfterBuild(async ({ isFirstCompile })=>{
61
- if (!isFirstCompile) return;
62
- promisesResult = await Promise.all(dtsPromises);
63
- });
64
60
  api.onAfterBuild({
65
- handler: ({ isFirstCompile })=>{
61
+ handler: async ({ isFirstCompile })=>{
66
62
  if (!isFirstCompile) return;
67
- for (const result of promisesResult)if ('error' === result.status) {
68
- if (options.abortOnError) throw new Error(result.errorMessage);
69
- result.errorMessage && __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.error(result.errorMessage);
70
- __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.warn('With the `abortOnError` configuration currently turned off, type errors do not cause build failures, but they do not guarantee proper type file output.');
71
- }
63
+ promisesResult = await Promise.all(dtsPromises);
72
64
  },
73
- order: 'post'
65
+ order: 'pre'
66
+ });
67
+ api.onAfterBuild(({ isFirstCompile })=>{
68
+ if (!isFirstCompile) return;
69
+ for (const result of promisesResult)if ('error' === result.status) {
70
+ if (options.abortOnError) throw new Error(result.errorMessage);
71
+ result.errorMessage && __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.error(result.errorMessage);
72
+ __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.logger.warn('With the `abortOnError` configuration currently turned off, type errors do not cause build failures, but they do not guarantee proper type file output.');
73
+ }
74
74
  });
75
75
  const killProcesses = ()=>{
76
76
  for (const childProcess of childProcesses)if (!childProcess.killed) try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-plugin-dts",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Rsbuild plugin that supports emitting declaration files for TypeScript.",
5
5
  "homepage": "https://lib.rsbuild.dev",
6
6
  "bugs": {
@@ -31,9 +31,9 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@microsoft/api-extractor": "^7.49.1",
34
- "@rsbuild/core": "1.2.0-beta.1",
34
+ "@rsbuild/core": "~1.2.3",
35
35
  "rsbuild-plugin-publint": "^0.2.1",
36
- "rslib": "npm:@rslib/core@0.3.1",
36
+ "rslib": "npm:@rslib/core@0.3.2",
37
37
  "typescript": "^5.7.3",
38
38
  "@rslib/tsconfig": "0.0.1"
39
39
  },