@rsbuild/plugin-type-check 0.7.6 → 0.7.8

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/dist/index.cjs CHANGED
@@ -30,14 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ PLUGIN_TYPE_CHECK_NAME: () => PLUGIN_TYPE_CHECK_NAME,
33
34
  pluginTypeCheck: () => pluginTypeCheck
34
35
  });
35
36
  module.exports = __toCommonJS(src_exports);
36
37
  var import_core = require("@rsbuild/core");
37
38
  var import_shared = require("@rsbuild/shared");
39
+ var PLUGIN_TYPE_CHECK_NAME = "rsbuild:type-check";
38
40
  var pluginTypeCheck = (options = {}) => {
39
41
  return {
40
- name: "rsbuild:type-check",
42
+ name: PLUGIN_TYPE_CHECK_NAME,
41
43
  setup(api) {
42
44
  api.modifyBundlerChain(async (chain, { target, isProd }) => {
43
45
  const { enable = true, forkTsCheckerOptions } = options;
@@ -59,7 +61,7 @@ var pluginTypeCheck = (options = {}) => {
59
61
  return;
60
62
  }
61
63
  const { default: ForkTsCheckerWebpackPlugin } = await import("fork-ts-checker-webpack-plugin");
62
- const { default: json5 } = await import("@rsbuild/shared/json5");
64
+ const { default: json5 } = await import("json5");
63
65
  const { references } = json5.parse(
64
66
  import_shared.fse.readFileSync(api.context.tsconfigPath, "utf-8")
65
67
  );
@@ -105,5 +107,6 @@ var pluginTypeCheck = (options = {}) => {
105
107
  };
106
108
  // Annotate the CommonJS export names for ESM import in node:
107
109
  0 && (module.exports = {
110
+ PLUGIN_TYPE_CHECK_NAME,
108
111
  pluginTypeCheck
109
112
  });
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ type PluginTypeCheckerOptions = {
14
14
  */
15
15
  forkTsCheckerOptions?: ConfigChain<ForkTsCheckerOptions>;
16
16
  };
17
+ declare const PLUGIN_TYPE_CHECK_NAME = "rsbuild:type-check";
17
18
  declare const pluginTypeCheck: (options?: PluginTypeCheckerOptions) => RsbuildPlugin;
18
19
 
19
- export { type PluginTypeCheckerOptions, pluginTypeCheck };
20
+ export { PLUGIN_TYPE_CHECK_NAME, type PluginTypeCheckerOptions, pluginTypeCheck };
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
  throw Error('Dynamic require of "' + x + '" is not supported');
10
10
  });
11
11
 
12
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
12
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
13
13
  import { fileURLToPath } from "url";
14
14
  import path from "path";
15
15
 
@@ -22,9 +22,10 @@ import {
22
22
  fse,
23
23
  reduceConfigs
24
24
  } from "@rsbuild/shared";
25
+ var PLUGIN_TYPE_CHECK_NAME = "rsbuild:type-check";
25
26
  var pluginTypeCheck = (options = {}) => {
26
27
  return {
27
- name: "rsbuild:type-check",
28
+ name: PLUGIN_TYPE_CHECK_NAME,
28
29
  setup(api) {
29
30
  api.modifyBundlerChain(async (chain, { target, isProd }) => {
30
31
  const { enable = true, forkTsCheckerOptions } = options;
@@ -46,7 +47,7 @@ var pluginTypeCheck = (options = {}) => {
46
47
  return;
47
48
  }
48
49
  const { default: ForkTsCheckerWebpackPlugin } = await import("fork-ts-checker-webpack-plugin");
49
- const { default: json5 } = await import("@rsbuild/shared/json5");
50
+ const { default: json5 } = await import("json5");
50
51
  const { references } = json5.parse(
51
52
  fse.readFileSync(api.context.tsconfigPath, "utf-8")
52
53
  );
@@ -91,5 +92,6 @@ var pluginTypeCheck = (options = {}) => {
91
92
  };
92
93
  };
93
94
  export {
95
+ PLUGIN_TYPE_CHECK_NAME,
94
96
  pluginTypeCheck
95
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-type-check",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "TS checker plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -24,16 +24,17 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "fork-ts-checker-webpack-plugin": "9.0.2",
27
- "webpack": "^5.91.0",
28
- "@rsbuild/shared": "0.7.6"
27
+ "json5": "^2.2.3",
28
+ "webpack": "^5.92.0",
29
+ "@rsbuild/shared": "0.7.8"
29
30
  },
30
31
  "devDependencies": {
31
32
  "typescript": "^5.4.2",
32
- "@rsbuild/core": "0.7.6",
33
- "@scripts/test-helper": "0.7.6"
33
+ "@rsbuild/core": "0.7.8",
34
+ "@scripts/test-helper": "0.7.8"
34
35
  },
35
36
  "peerDependencies": {
36
- "@rsbuild/core": "^0.7.6"
37
+ "@rsbuild/core": "^0.7.8"
37
38
  },
38
39
  "publishConfig": {
39
40
  "access": "public",