@pplancq/react-template 2.0.1 → 2.1.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.
- package/CHANGELOG.md +20 -0
- package/package.json +9 -10
- package/public/mockServiceWorker.js +1 -1
- package/scripts/migrateToVite.js +2 -5
- package/src/components/Footer/__tests__/Footer.test.tsx +1 -1
- package/src/components/Header/__tests__/Header.test.tsx +1 -1
- package/src/pages/Demo/__tests__/Demo.test.tsx +1 -1
- package/src/routing/routerFactory.ts +9 -1
- package/vitest.config.mts +1 -1
- package/.babelrc.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## @pplancq/react-template [2.1.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.0.1...@pplancq/react-template@2.1.0) (2024-11-18)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **react-template:** remove babel config ([c2990a0](https://github.com/pplancq/dev-tools/commit/c2990a08061bed421d85d48d8381f5fd9096d4e5))
|
|
6
|
+
* **react-template:** replace @vitejs/plugin-react by @vitejs/plugin-react-swc ([e613869](https://github.com/pplancq/dev-tools/commit/e613869e5233833d6fe0cd4a9ab67a24ab575db2))
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **react-template:** fix warning fron react-router-dom ([6e71da3](https://github.com/pplancq/dev-tools/commit/6e71da3ac8393d2e6975bb84a388499f63947265))
|
|
11
|
+
* **deps:** update dependency react-hook-form to ^7.53.2 ([ea74c8c](https://github.com/pplancq/dev-tools/commit/ea74c8cd15493d60213c4ca6b9979e88c793f11f))
|
|
12
|
+
* **deps:** update react-query mono repo to ^5.60.2 ([d95ce29](https://github.com/pplancq/dev-tools/commit/d95ce290ca9a9730bdeb0ff330897449bf2a0f79))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* **@pplancq/eslint-config:** upgraded to 4.0.2
|
|
18
|
+
* **@pplancq/postcss-config:** upgraded to 2.1.4
|
|
19
|
+
* **@pplancq/webpack-config:** upgraded to 1.7.0
|
|
20
|
+
|
|
1
21
|
## @pplancq/react-template [2.0.1](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.0.0...@pplancq/react-template@2.0.1) (2024-11-11)
|
|
2
22
|
|
|
3
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pplancq/react-template",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "react template",
|
|
6
6
|
"author": "pplancq <paul.plancq@outlook.fr>",
|
|
@@ -37,17 +37,16 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@hookform/resolvers": "^3.9.1",
|
|
40
|
-
"@tanstack/react-query": "^5.
|
|
41
|
-
"@tanstack/react-query-devtools": "^5.
|
|
40
|
+
"@tanstack/react-query": "^5.60.2",
|
|
41
|
+
"@tanstack/react-query-devtools": "^5.60.2",
|
|
42
42
|
"react": "^18.3.1",
|
|
43
43
|
"react-dom": "^18.3.1",
|
|
44
|
-
"react-hook-form": "^7.53.
|
|
44
|
+
"react-hook-form": "^7.53.2",
|
|
45
45
|
"react-router-dom": "^6.28.0",
|
|
46
46
|
"yup": "^1.4.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@commitlint/cli": "^19.5.0",
|
|
50
|
-
"@pplancq/babel-config": "*",
|
|
51
50
|
"@pplancq/commitlint-config": "*",
|
|
52
51
|
"@pplancq/eslint-config": "*",
|
|
53
52
|
"@pplancq/postcss-config": "*",
|
|
@@ -59,23 +58,23 @@
|
|
|
59
58
|
"@testing-library/user-event": "^14.5.2",
|
|
60
59
|
"@types/react": "^18.3.12",
|
|
61
60
|
"@types/react-dom": "^18.3.1",
|
|
62
|
-
"@vitejs/plugin-react": "^
|
|
63
|
-
"@vitest/coverage-v8": "^2.1.
|
|
61
|
+
"@vitejs/plugin-react-swc": "^3.7.1",
|
|
62
|
+
"@vitest/coverage-v8": "^2.1.5",
|
|
64
63
|
"concurrently": "^9.1.0",
|
|
65
64
|
"eslint": "^9.14.0",
|
|
66
65
|
"eslint-plugin-prettier": "^5.2.1",
|
|
67
66
|
"husky": "^9.1.6",
|
|
68
67
|
"jsdom": "^25.0.1",
|
|
69
68
|
"lint-staged": "^15.2.10",
|
|
70
|
-
"msw": "^2.6.
|
|
69
|
+
"msw": "^2.6.4",
|
|
71
70
|
"prettier": "^3.3.3",
|
|
72
71
|
"stylelint": "^16.10.0",
|
|
73
72
|
"stylelint-prettier": "^5.0.2",
|
|
74
73
|
"tsc-files": "^1.1.4",
|
|
75
74
|
"typescript": "^5.6.3",
|
|
76
75
|
"vite-plugin-svgr": "^4.3.0",
|
|
77
|
-
"vite-tsconfig-paths": "^5.1.
|
|
78
|
-
"vitest": "^2.1.
|
|
76
|
+
"vite-tsconfig-paths": "^5.1.2",
|
|
77
|
+
"vitest": "^2.1.5",
|
|
79
78
|
"vitest-axe": "^1.0.0-pre.3",
|
|
80
79
|
"vitest-sonar-reporter": "^2.0.0",
|
|
81
80
|
"webpack": "^5.96.1",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.6.
|
|
11
|
+
const PACKAGE_VERSION = '2.6.5'
|
|
12
12
|
const INTEGRITY_CHECKSUM = 'ca7800994cc8bfb5eb961e037c877074'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
package/scripts/migrateToVite.js
CHANGED
|
@@ -30,11 +30,8 @@ const getPackageManager = () => {
|
|
|
30
30
|
const packageManager = getPackageManager();
|
|
31
31
|
|
|
32
32
|
console.info('\nremove webpack ...');
|
|
33
|
-
runCommand(
|
|
34
|
-
`${packageManager} remove @pplancq/webpack-config @pplancq/babel-config webpack webpack-cli webpack-dev-server`,
|
|
35
|
-
);
|
|
33
|
+
runCommand(`${packageManager} remove @pplancq/webpack-config webpack webpack-cli webpack-dev-server`);
|
|
36
34
|
rmSync(resolve(__dirname, '../webpack.config.js'));
|
|
37
|
-
rmSync(resolve(__dirname, '../babelrc.js'));
|
|
38
35
|
console.info('\ninstall vite package ...');
|
|
39
36
|
runCommand(
|
|
40
37
|
`${packageManager} ${packageManager === YARN ? 'add --dev' : 'install --save-dev'} vite vite-plugin-eslint2 vite-plugin-stylelint sass`,
|
|
@@ -42,7 +39,7 @@ runCommand(
|
|
|
42
39
|
|
|
43
40
|
writeFileSync(
|
|
44
41
|
resolve(__dirname, '../vite.config.mts'),
|
|
45
|
-
`import react from '@vitejs/plugin-react'
|
|
42
|
+
`import react from '@vitejs/plugin-react-swc'
|
|
46
43
|
import { resolve } from 'path'
|
|
47
44
|
import { defineConfig, loadEnv } from 'vite'
|
|
48
45
|
import eslintPlugin from 'vite-plugin-eslint2'
|
|
@@ -5,7 +5,7 @@ import { Footer } from '../Footer';
|
|
|
5
5
|
describe('Footer Component', () => {
|
|
6
6
|
it('should render the Footer component correctly', () => {
|
|
7
7
|
const { container } = render(
|
|
8
|
-
<Router>
|
|
8
|
+
<Router future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
|
9
9
|
<Footer />
|
|
10
10
|
</Router>,
|
|
11
11
|
);
|
|
@@ -5,7 +5,7 @@ import { Header } from '../Header';
|
|
|
5
5
|
describe('Header Component', () => {
|
|
6
6
|
it('should render the Header component correctly', () => {
|
|
7
7
|
const { container } = render(
|
|
8
|
-
<Router>
|
|
8
|
+
<Router future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
|
9
9
|
<Header />
|
|
10
10
|
</Router>,
|
|
11
11
|
);
|
|
@@ -5,7 +5,7 @@ import { Demo } from '../Demo';
|
|
|
5
5
|
describe('Demo Component', () => {
|
|
6
6
|
it('should render the Demo component correctly', () => {
|
|
7
7
|
const { container } = render(
|
|
8
|
-
<Router>
|
|
8
|
+
<Router future={{ v7_startTransition: true, v7_relativeSplatPath: true }}>
|
|
9
9
|
<Demo />
|
|
10
10
|
</Router>,
|
|
11
11
|
);
|
|
@@ -6,5 +6,13 @@ interface CreateRouterProps {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const createRouter = ({ basename }: CreateRouterProps = {}) => {
|
|
9
|
-
return createBrowserRouter(routeObject, {
|
|
9
|
+
return createBrowserRouter(routeObject, {
|
|
10
|
+
basename,
|
|
11
|
+
future: {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
+
// @ts-expect-error
|
|
14
|
+
v7_startTransition: true,
|
|
15
|
+
v7_relativeSplatPath: true,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
10
18
|
};
|
package/vitest.config.mts
CHANGED
package/.babelrc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = { extends: '@pplancq/babel-config' };
|