@pplancq/react-template 2.2.0 → 2.3.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/.env +4 -0
- package/CHANGELOG.md +20 -0
- package/_gitignore +1 -0
- package/package.json +22 -21
- package/public/mockServiceWorker.js +15 -3
package/.env
CHANGED
|
@@ -37,6 +37,10 @@ ESLINT_CONFIG_TYPE='flat'
|
|
|
37
37
|
# Default is false
|
|
38
38
|
#DISABLE_SOURCE_MAP=false
|
|
39
39
|
|
|
40
|
+
# Sets the public URL or path for production environment.
|
|
41
|
+
# Default is 'http://localhost'
|
|
42
|
+
#PUBLIC_URL='http://localhost'
|
|
43
|
+
|
|
40
44
|
# Sets the prefix for environment variables that will be passed to the frontend.
|
|
41
45
|
# Access environment variables using import.meta.env.FRONT_FOO in the code.
|
|
42
46
|
# Default is FRONT_
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## @pplancq/react-template [2.3.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.2.0...@pplancq/react-template@2.3.0) (2024-12-09)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **webpack-config:** add PUBLIC_URL for sets the public URL or path for production environment ([e13e338](https://github.com/pplancq/dev-tools/commit/e13e33832953c44e9048ff68603f1865fcc01efd))
|
|
6
|
+
* **deps:** update react to v19 ([8ee050e](https://github.com/pplancq/dev-tools/commit/8ee050ed8d3ef2125bcf7e661239c4796bc9a4a4))
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **deps:** update dependency react-router to ^7.0.2 ([d47859e](https://github.com/pplancq/dev-tools/commit/d47859e67fa72c228d1483921f594ffc58d8f470))
|
|
11
|
+
* **deps:** update dependency yup to ^1.5.0 ([2ff356e](https://github.com/pplancq/dev-tools/commit/2ff356e6c823bc7fe9fee32f27c2a06057cbddd9))
|
|
12
|
+
* **deps:** update react-query mono repo to ^5.62.0 ([75cd49b](https://github.com/pplancq/dev-tools/commit/75cd49be2678b1a0b64cb076c051fb8b88d18c84))
|
|
13
|
+
* **deps:** update react-query mono repo to ^5.62.2 ([de08f42](https://github.com/pplancq/dev-tools/commit/de08f42859b3a0262642cfcd0a8ab69f32573095))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* **@pplancq/eslint-config:** upgraded to 4.0.4
|
|
19
|
+
* **@pplancq/webpack-config:** upgraded to 1.8.0
|
|
20
|
+
|
|
1
21
|
## @pplancq/react-template [2.2.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@2.1.0...@pplancq/react-template@2.2.0) (2024-11-26)
|
|
2
22
|
|
|
3
23
|
### Features
|
package/_gitignore
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pplancq/react-template",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "react template",
|
|
6
6
|
"author": "pplancq <paul.plancq@outlook.fr>",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"package:check": "npm exec --yes package-lock-utd@1.1.3",
|
|
27
27
|
"remove:demo": "node ./scripts/removeDemo.js",
|
|
28
28
|
"migrate:vite": "node ./scripts/migrateToVite.js",
|
|
29
|
-
"_prepare": "husky"
|
|
29
|
+
"_prepare": "husky",
|
|
30
|
+
"postinstall": "msw init"
|
|
30
31
|
},
|
|
31
32
|
"bugs": {
|
|
32
33
|
"url": "https://github.com/pplancq/dev-tools/issues"
|
|
@@ -37,13 +38,13 @@
|
|
|
37
38
|
],
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"@hookform/resolvers": "^3.9.1",
|
|
40
|
-
"@tanstack/react-query": "^5.
|
|
41
|
-
"@tanstack/react-query-devtools": "^5.
|
|
42
|
-
"react": "^
|
|
43
|
-
"react-dom": "^
|
|
41
|
+
"@tanstack/react-query": "^5.62.2",
|
|
42
|
+
"@tanstack/react-query-devtools": "^5.62.2",
|
|
43
|
+
"react": "^19.0.0",
|
|
44
|
+
"react-dom": "^19.0.0",
|
|
44
45
|
"react-hook-form": "^7.53.2",
|
|
45
|
-
"react-router": "^7.0.
|
|
46
|
-
"yup": "^1.
|
|
46
|
+
"react-router": "^7.0.2",
|
|
47
|
+
"yup": "^1.5.0"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@commitlint/cli": "^19.6.0",
|
|
@@ -54,30 +55,30 @@
|
|
|
54
55
|
"@pplancq/stylelint-config": "*",
|
|
55
56
|
"@pplancq/webpack-config": "*",
|
|
56
57
|
"@testing-library/jest-dom": "^6.6.3",
|
|
57
|
-
"@testing-library/react": "^16.0
|
|
58
|
+
"@testing-library/react": "^16.1.0",
|
|
58
59
|
"@testing-library/user-event": "^14.5.2",
|
|
59
|
-
"@types/react": "^
|
|
60
|
-
"@types/react-dom": "^
|
|
61
|
-
"@vitejs/plugin-react-swc": "^3.7.
|
|
62
|
-
"@vitest/coverage-v8": "^2.1.
|
|
60
|
+
"@types/react": "^19.0.1",
|
|
61
|
+
"@types/react-dom": "^19.0.1",
|
|
62
|
+
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
63
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
63
64
|
"concurrently": "^9.1.0",
|
|
64
|
-
"eslint": "^9.
|
|
65
|
+
"eslint": "^9.16.0",
|
|
65
66
|
"eslint-plugin-prettier": "^5.2.1",
|
|
66
67
|
"husky": "^9.1.7",
|
|
67
68
|
"jsdom": "^25.0.1",
|
|
68
69
|
"lint-staged": "^15.2.10",
|
|
69
|
-
"msw": "^2.6.
|
|
70
|
-
"prettier": "^3.
|
|
71
|
-
"stylelint": "^16.
|
|
70
|
+
"msw": "^2.6.7",
|
|
71
|
+
"prettier": "^3.4.2",
|
|
72
|
+
"stylelint": "^16.11.0",
|
|
72
73
|
"stylelint-prettier": "^5.0.2",
|
|
73
74
|
"tsc-files": "^1.1.4",
|
|
74
75
|
"typescript": "^5.7.2",
|
|
75
76
|
"vite-plugin-svgr": "^4.3.0",
|
|
76
77
|
"vite-tsconfig-paths": "^5.1.3",
|
|
77
|
-
"vitest": "^2.1.
|
|
78
|
+
"vitest": "^2.1.8",
|
|
78
79
|
"vitest-axe": "^1.0.0-pre.3",
|
|
79
80
|
"vitest-sonar-reporter": "^2.0.0",
|
|
80
|
-
"webpack": "^5.
|
|
81
|
+
"webpack": "^5.97.1",
|
|
81
82
|
"webpack-cli": "^5.1.4",
|
|
82
83
|
"webpack-dev-server": "^5.1.0"
|
|
83
84
|
},
|
|
@@ -85,8 +86,8 @@
|
|
|
85
86
|
"node": ">=20.12.2"
|
|
86
87
|
},
|
|
87
88
|
"volta": {
|
|
88
|
-
"node": "22.
|
|
89
|
-
"npm": "10.9.
|
|
89
|
+
"node": "22.12.0",
|
|
90
|
+
"npm": "10.9.2"
|
|
90
91
|
},
|
|
91
92
|
"browserslist": {
|
|
92
93
|
"production": [
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.6.
|
|
12
|
-
const INTEGRITY_CHECKSUM = '
|
|
11
|
+
const PACKAGE_VERSION = '2.6.8'
|
|
12
|
+
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
|
15
15
|
|
|
@@ -199,7 +199,19 @@ async function getResponse(event, client, requestId) {
|
|
|
199
199
|
// Remove the "accept" header value that marked this request as passthrough.
|
|
200
200
|
// This prevents request alteration and also keeps it compliant with the
|
|
201
201
|
// user-defined CORS policies.
|
|
202
|
-
headers.
|
|
202
|
+
const acceptHeader = headers.get('accept')
|
|
203
|
+
if (acceptHeader) {
|
|
204
|
+
const values = acceptHeader.split(',').map((value) => value.trim())
|
|
205
|
+
const filteredValues = values.filter(
|
|
206
|
+
(value) => value !== 'msw/passthrough',
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
if (filteredValues.length > 0) {
|
|
210
|
+
headers.set('accept', filteredValues.join(', '))
|
|
211
|
+
} else {
|
|
212
|
+
headers.delete('accept')
|
|
213
|
+
}
|
|
214
|
+
}
|
|
203
215
|
|
|
204
216
|
return fetch(requestClone, { headers })
|
|
205
217
|
}
|