@pplancq/react-template 2.8.0 → 2.8.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/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## @pplancq/react-template [2.8.1](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.8.0...@pplancq/react-template@2.8.1) (2026-01-29)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **react-template:** simplify poolOptions to maxWorkers ([49a80ee](https://github.com/pplancq/dev-tools/commit/49a80ee245a5ba81d5263b39c488e76bd97de951))
6
+ * **deps:** update dependency @tanstack/react-query to ^5.90.19 ([9dcea18](https://github.com/pplancq/dev-tools/commit/9dcea18c38567c6f5a7bf9d5ab361fe623b12ea5))
7
+
8
+
9
+ ### Dependencies
10
+
11
+ * **@pplancq/commitlint-config:** upgraded to 3.0.0
12
+ * **@pplancq/eslint-config:** upgraded to 6.0.0
13
+ * **@pplancq/postcss-config:** upgraded to 3.0.1
14
+ * **@pplancq/prettier-config:** upgraded to 2.0.0
15
+ * **@pplancq/stylelint-config:** upgraded to 5.0.0
16
+
1
17
  ## @pplancq/react-template [2.8.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.7.16...@pplancq/react-template@2.8.0) (2026-01-20)
2
18
 
3
19
  ### Features
package/mise.toml CHANGED
@@ -1,3 +1,3 @@
1
1
  [tools]
2
- npm = "11.7.0"
2
+ npm = "11.8.0"
3
3
  node = "24.13.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/react-template",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "license": "MIT",
5
5
  "description": "react template",
6
6
  "author": "pplancq <paul.plancq@outlook.fr>",
@@ -13,6 +13,7 @@
13
13
  "bin": {
14
14
  "template-install": "bin/template-install.js"
15
15
  },
16
+ "packageManager": "npm@11.8.0",
16
17
  "scripts": {
17
18
  "start": "rsbuild dev",
18
19
  "start:mock": "rsbuild dev --env-mode mock",
@@ -49,7 +50,7 @@
49
50
  ],
50
51
  "dependencies": {
51
52
  "@hookform/resolvers": "^5.2.2",
52
- "@tanstack/react-query": "^5.90.18",
53
+ "@tanstack/react-query": "^5.90.19",
53
54
  "@tanstack/react-query-devtools": "^5.91.2",
54
55
  "react": "^19.2.3",
55
56
  "react-dom": "^19.2.3",
@@ -72,12 +73,12 @@
72
73
  "@rsbuild/plugin-react": "^1.4.3",
73
74
  "@rsbuild/plugin-sass": "^1.4.1",
74
75
  "@testing-library/jest-dom": "^6.9.1",
75
- "@testing-library/react": "^16.3.1",
76
+ "@testing-library/react": "^16.3.2",
76
77
  "@testing-library/user-event": "^14.6.1",
77
- "@types/react": "^19.2.8",
78
+ "@types/react": "^19.2.9",
78
79
  "@types/react-dom": "^19.2.3",
79
80
  "@vitejs/plugin-react-swc": "^4.2.2",
80
- "@vitest/coverage-v8": "^4.0.17",
81
+ "@vitest/coverage-v8": "^4.0.18",
81
82
  "concurrently": "^9.2.1",
82
83
  "eslint": "^9.39.2",
83
84
  "eslint-plugin-prettier": "^5.5.5",
@@ -87,7 +88,7 @@
87
88
  "monocart-coverage-reports": "^2.12.9",
88
89
  "msw": "^2.12.7",
89
90
  "nodemon": "^3.1.11",
90
- "prettier": "^3.8.0",
91
+ "prettier": "^3.8.1",
91
92
  "rsbuild-plugin-stylelint": "^1.0.1",
92
93
  "stylelint": "^17.0.0",
93
94
  "stylelint-prettier": "^5.0.3",
@@ -95,7 +96,7 @@
95
96
  "typescript": "^5.9.3",
96
97
  "vite-plugin-svgr": "^4.5.0",
97
98
  "vite-tsconfig-paths": "^6.0.4",
98
- "vitest": "^4.0.17",
99
+ "vitest": "^4.0.18",
99
100
  "vitest-axe": "^1.0.0-pre.5",
100
101
  "vitest-sonar-reporter": "^3.0.0"
101
102
  },
package/rsbuild.config.ts CHANGED
@@ -62,7 +62,7 @@ export default defineConfig(({ env }) => {
62
62
  ],
63
63
  },
64
64
  server: {
65
- port: parseInt(process.env.PORT ?? '3000', 10),
65
+ port: Number.parseInt(process.env.PORT ?? '3000', 10),
66
66
  open: (process.env.BROWSER ?? 'false') === 'true',
67
67
  },
68
68
  html: {
package/scripts/lint.js CHANGED
@@ -6,7 +6,8 @@ const { result } = concurrently(['npm:lint:*(!fix)'], {
6
6
  maxProcesses: process.env.CI ? 1 : undefined,
7
7
  });
8
8
 
9
- result.then(
10
- () => process.exit(0),
11
- () => process.exit(1),
12
- );
9
+ try {
10
+ await result;
11
+ } catch {
12
+ process.exit(1);
13
+ }
@@ -14,7 +14,7 @@ const main = async () => {
14
14
 
15
15
  let playwrightArgs = [...args];
16
16
 
17
- if (args.indexOf('--watch') !== -1) {
17
+ if (args.includes('--watch')) {
18
18
  const filteredArgs = args.filter(a => a !== '--watch');
19
19
  runCommand('npx', [
20
20
  'nodemon',
@@ -28,7 +28,7 @@ const main = async () => {
28
28
  return;
29
29
  }
30
30
 
31
- if (playwrightArgs.indexOf('--coverage') !== -1) {
31
+ if (playwrightArgs.includes('--coverage')) {
32
32
  process.env.ENABLED_COVERAGE = 'true';
33
33
  playwrightArgs = playwrightArgs.filter(p => p !== '--coverage');
34
34
  }
@@ -36,4 +36,12 @@ const main = async () => {
36
36
  runCommand('npx', ['playwright', ...playwrightArgs]);
37
37
  };
38
38
 
39
- main().catch(e => process.exit(e.status));
39
+ try {
40
+ await main();
41
+ } catch (e) {
42
+ const status =
43
+ e && typeof e === 'object' && 'status' in e && typeof e.status === 'number' && Number.isFinite(e.status)
44
+ ? e.status
45
+ : 1;
46
+ process.exit(status);
47
+ }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- const { rmSync, readFileSync, writeFileSync, mkdirSync } = require('fs');
3
- const { resolve } = require('path');
2
+ const { rmSync, readFileSync, writeFileSync, mkdirSync } = require('node:fs');
3
+ const { resolve } = require('node:path');
4
4
 
5
5
  const resolveSrc = path => resolve(__dirname, `../src${path}`);
6
6
 
package/scripts/test.js CHANGED
@@ -14,7 +14,8 @@ const { result } = concurrently(commands, {
14
14
  maxProcesses: 1,
15
15
  });
16
16
 
17
- result.then(
18
- () => process.exit(0),
19
- () => process.exit(1),
20
- );
17
+ try {
18
+ await result;
19
+ } catch {
20
+ process.exit(1);
21
+ }
package/src/main.ts CHANGED
@@ -1,17 +1,11 @@
1
- const enableMock = async () => {
1
+ (async () => {
2
2
  if (import.meta.env.FRONT_MOCK_ENABLE === 'true') {
3
3
  const { worker } = await import('@Mocks/browser');
4
-
5
- return worker.start({
4
+ await worker.start({
6
5
  onUnhandledRequest: 'warn',
7
6
  });
8
7
  }
9
8
 
10
- return Promise.resolve();
11
- };
12
-
13
- enableMock().then(() => {
14
- import('./bootstrap').then(({ default: AppReact }) => {
15
- customElements.define('app-react', AppReact);
16
- });
17
- });
9
+ const { default: AppReact } = await import('./bootstrap');
10
+ customElements.define('app-react', AppReact);
11
+ })();
@@ -2,11 +2,13 @@ import type { FullConfig } from '@playwright/test';
2
2
  import { CoverageReport } from 'monocart-coverage-reports';
3
3
  import { coverageOptions } from '../../mrc.playwright.config';
4
4
 
5
- // eslint-disable-next-line import/no-default-export
6
- export default (config: FullConfig) => {
5
+ const globalSetup = (config: FullConfig) => {
7
6
  if (config.webServer && coverageOptions.enabled) {
8
7
  console.info('[playwright] Coverage enabled with monocart');
9
8
  const mcr = new CoverageReport(coverageOptions);
10
9
  mcr.cleanCache();
11
10
  }
12
11
  };
12
+
13
+ // eslint-disable-next-line import/no-default-export
14
+ export default globalSetup;
@@ -2,10 +2,12 @@ import type { FullConfig } from '@playwright/test';
2
2
  import { CoverageReport } from 'monocart-coverage-reports';
3
3
  import { coverageOptions } from '../../mrc.playwright.config';
4
4
 
5
- // eslint-disable-next-line import/no-default-export
6
- export default async (config: FullConfig) => {
5
+ const globalTeardown = async (config: FullConfig) => {
7
6
  if (config.webServer && coverageOptions.enabled) {
8
7
  const mcr = new CoverageReport(coverageOptions);
9
8
  await mcr.generate();
10
9
  }
11
10
  };
11
+
12
+ // eslint-disable-next-line import/no-default-export
13
+ export default globalTeardown;
package/vitest.config.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import react from '@vitejs/plugin-react-swc';
2
- import { resolve } from 'path';
2
+ import { resolve } from 'node:path';
3
3
  import { loadEnv } from 'vite';
4
4
  import svgr from 'vite-plugin-svgr';
5
5
  import viteTsconfigPaths from 'vite-tsconfig-paths';
@@ -30,12 +30,7 @@ export default defineConfig(({ mode }) => {
30
30
  junit: 'junit-report.xml',
31
31
  },
32
32
  include: ['src/**/*.(spec|test|steps).[jt]s?(x)'],
33
- poolOptions: {
34
- forks: {
35
- minForks: env.CI ? 1 : undefined,
36
- maxForks: env.CI ? 2 : undefined,
37
- },
38
- },
33
+ maxWorkers: env.CI ? 2 : undefined,
39
34
  coverage: {
40
35
  enabled: env.CI === 'true',
41
36
  reporter: ['lcovonly', 'html', 'text', 'text-summary'],