@rsbuild/plugin-type-check 1.3.0 → 1.3.2

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
@@ -42,7 +42,6 @@ __webpack_require__.d(__webpack_exports__, {
42
42
  const external_node_fs_namespaceObject = require("node:fs");
43
43
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
44
44
  const external_node_module_namespaceObject = require("node:module");
45
- const core_namespaceObject = require("@rsbuild/core");
46
45
  const external_deepmerge_namespaceObject = require("deepmerge");
47
46
  var external_deepmerge_default = /*#__PURE__*/ __webpack_require__.n(external_deepmerge_namespaceObject);
48
47
  const external_json5_namespaceObject = require("json5");
@@ -54,6 +53,7 @@ const PLUGIN_TYPE_CHECK_NAME = 'rsbuild:type-check';
54
53
  const pluginTypeCheck = (options = {})=>({
55
54
  name: PLUGIN_TYPE_CHECK_NAME,
56
55
  setup (api) {
56
+ const logger = api.logger ?? console;
57
57
  const NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/;
58
58
  const checkedTsconfig = new Map();
59
59
  api.modifyBundlerChain(async (chain, { isProd, environment, CHAIN_ID })=>{
@@ -72,7 +72,7 @@ const pluginTypeCheck = (options = {})=>({
72
72
  ]
73
73
  });
74
74
  } catch (err) {
75
- core_namespaceObject.logger.warn('"typescript" is not found in current project, Type checker will not work.');
75
+ logger.warn('"typescript" is not found in current project, Type checker will not work.');
76
76
  return;
77
77
  }
78
78
  const { references } = external_json5_default().parse(external_node_fs_default().readFileSync(tsconfigPath, 'utf-8'));
@@ -102,7 +102,7 @@ const pluginTypeCheck = (options = {})=>({
102
102
  config: tsCheckerOptions,
103
103
  mergeFn: external_deepmerge_default()
104
104
  });
105
- if (isProd) core_namespaceObject.logger.info('Type checker is enabled. It may take some time.');
105
+ if (isProd) logger.info('Type checker is enabled. It may take some time.');
106
106
  chain.plugin(CHAIN_ID.PLUGIN.TS_CHECKER).use(external_ts_checker_rspack_plugin_namespaceObject.TsCheckerRspackPlugin, [
107
107
  mergedOptions
108
108
  ]);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type RsbuildPlugin } from '@rsbuild/core';
1
+ import type { RsbuildPlugin } from '@rsbuild/core';
2
2
  import { type ConfigChain } from 'reduce-configs';
3
3
  import { TsCheckerRspackPlugin } from 'ts-checker-rspack-plugin';
4
4
  type TsCheckerOptions = NonNullable<ConstructorParameters<typeof TsCheckerRspackPlugin>[0]>;
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import node_fs from "node:fs";
2
2
  import { createRequire } from "node:module";
3
- import { logger } from "@rsbuild/core";
4
3
  import deepmerge from "deepmerge";
5
4
  import json5 from "json5";
6
5
  import { reduceConfigs } from "reduce-configs";
@@ -10,6 +9,7 @@ const PLUGIN_TYPE_CHECK_NAME = 'rsbuild:type-check';
10
9
  const pluginTypeCheck = (options = {})=>({
11
10
  name: PLUGIN_TYPE_CHECK_NAME,
12
11
  setup (api) {
12
+ const logger = api.logger ?? console;
13
13
  const NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/;
14
14
  const checkedTsconfig = new Map();
15
15
  api.modifyBundlerChain(async (chain, { isProd, environment, CHAIN_ID })=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-type-check",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "repository": "https://github.com/rspack-contrib/rsbuild-plugin-type-check",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,20 +36,20 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "deepmerge": "^4.3.1",
39
- "ts-checker-rspack-plugin": "^1.2.0",
39
+ "ts-checker-rspack-plugin": "^1.2.1",
40
40
  "json5": "^2.2.3",
41
41
  "reduce-configs": "^1.1.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@biomejs/biome": "^1.9.4",
45
- "@playwright/test": "^1.56.1",
46
- "@rsbuild/core": "^1.6.0",
47
- "@rslib/core": "^0.17.0",
45
+ "@playwright/test": "^1.57.0",
46
+ "@rsbuild/core": "^1.6.11",
47
+ "@rslib/core": "^0.18.2",
48
48
  "@types/fs-extra": "^11.0.4",
49
- "@types/node": "^24.9.2",
49
+ "@types/node": "^24.10.1",
50
50
  "fs-extra": "^11.3.2",
51
- "nano-staged": "^0.8.0",
52
- "playwright": "^1.56.1",
51
+ "nano-staged": "^0.9.0",
52
+ "playwright": "^1.57.0",
53
53
  "simple-git-hooks": "^2.13.1",
54
54
  "typescript": "^5.9.3"
55
55
  },
@@ -61,7 +61,7 @@
61
61
  "optional": true
62
62
  }
63
63
  },
64
- "packageManager": "pnpm@10.20.0",
64
+ "packageManager": "pnpm@10.24.0",
65
65
  "publishConfig": {
66
66
  "access": "public",
67
67
  "registry": "https://registry.npmjs.org/"