@pplancq/react-template 1.2.0 → 1.4.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 CHANGED
@@ -12,25 +12,26 @@
12
12
  # /!\ DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE OR ANY VERSIONED FILE. /!\
13
13
 
14
14
  # Enables/disables launching the browser when npm start is run.
15
- # Default is false.
15
+ # Default is false
16
16
  #BROWSER=false
17
17
 
18
18
  # Sets the port for the development web server.
19
- # Default is 3000.
19
+ # Default is 3000
20
20
  #PORT=3000
21
21
 
22
22
  # Allows you to deactivate the stylelint plugin
23
23
  # Default is false
24
24
  #DISABLE_STYLELINT_PLUGIN=false
25
25
 
26
- # Permet de désactiver le plugin eslint
26
+ # Allows you to deactivate the eslint plugin
27
27
  # Default is false
28
28
  #DISABLE_ESLINT_PLUGIN=false
29
29
 
30
+ # Allows you to deactivate the sourcemap
31
+ # Default is false
32
+ #DISABLE_SOURCE_MAP=false
33
+
30
34
  # Sets the prefix for environment variables that will be passed to the frontend.
31
35
  # Access environment variables using import.meta.env.FRONT_FOO in the code.
32
- # Default is FRONT_.
36
+ # Default is FRONT_
33
37
  #ENV_PREFIX=FRONT_
34
-
35
-
36
-
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## @pplancq/react-template [1.4.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@1.3.0...@pplancq/react-template@1.4.0) (2024-05-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **webpack-config:** add an environment variable to disable source map generation ([61bf247](https://github.com/pplancq/dev-tools/commit/61bf2476cb59a81d23ac8ade2d370adff58a1730))
7
+
8
+
9
+
10
+ ### Dependencies
11
+
12
+ * **@pplancq/webpack-config:** upgraded to 1.3.0
13
+
14
+ ## @pplancq/react-template [1.3.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@1.2.0...@pplancq/react-template@1.3.0) (2024-04-16)
15
+
16
+
17
+ ### Features
18
+
19
+ * **react-template:** add cleanup from @testing-library/react on vitest setup ([a981e0a](https://github.com/pplancq/dev-tools/commit/a981e0a253bda642e2a5a776400d7269a4cdd9cd))
20
+ * **react-template:** add vitest-axe for test a11y violation ([4786b4a](https://github.com/pplancq/dev-tools/commit/4786b4a7701e8601e3fee87cf26ffda6ffb4431f))
21
+
22
+
23
+
24
+ ### Dependencies
25
+
26
+ * **@pplancq/babel-config:** upgraded to 1.0.2
27
+ * **@pplancq/commitlint-config:** upgraded to 2.1.2
28
+ * **@pplancq/eslint-config:** upgraded to 2.1.1
29
+ * **@pplancq/postcss-config:** upgraded to 1.0.2
30
+ * **@pplancq/prettier-config:** upgraded to 1.0.2
31
+ * **@pplancq/stylelint-config:** upgraded to 2.0.2
32
+ * **@pplancq/webpack-config:** upgraded to 1.1.2
33
+
1
34
  ## @pplancq/react-template [1.2.0](https://github.com/pplancq/dev-tools/compare/@pplancq/react-template@1.1.2...@pplancq/react-template@1.2.0) (2024-03-18)
2
35
 
3
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/react-template",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "license": "MIT",
5
5
  "description": "react template",
6
6
  "author": "pplancq <paul.plancq@outlook.fr>",
@@ -34,16 +34,16 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@hookform/resolvers": "^3.3.2",
37
- "@tanstack/react-query": "^5.25.0",
38
- "@tanstack/react-query-devtools": "^5.28.4",
37
+ "@tanstack/react-query": "^5.32.1",
38
+ "@tanstack/react-query-devtools": "^5.32.0",
39
39
  "react": "^18.2.0",
40
- "react-dom": "^18.2.0",
41
- "react-hook-form": "^7.51.1",
42
- "react-router-dom": "^6.22.3",
40
+ "react-dom": "^18.3.1",
41
+ "react-hook-form": "^7.51.3",
42
+ "react-router-dom": "^6.23.0",
43
43
  "yup": "^1.4.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@commitlint/cli": "^19.2.0",
46
+ "@commitlint/cli": "^19.3.0",
47
47
  "@pplancq/babel-config": "*",
48
48
  "@pplancq/commitlint-config": "*",
49
49
  "@pplancq/eslint-config": "*",
@@ -52,12 +52,12 @@
52
52
  "@pplancq/stylelint-config": "*",
53
53
  "@pplancq/webpack-config": "*",
54
54
  "@testing-library/jest-dom": "^6.1.5",
55
- "@testing-library/react": "^14.1.2",
55
+ "@testing-library/react": "^15.0.5",
56
56
  "@testing-library/user-event": "^14.5.1",
57
- "@types/react": "^18.2.67",
58
- "@types/react-dom": "^18.2.22",
57
+ "@types/react": "^18.2.79",
58
+ "@types/react-dom": "^18.3.0",
59
59
  "@vitejs/plugin-react": "^4.2.1",
60
- "@vitest/coverage-v8": "^1.4.0",
60
+ "@vitest/coverage-v8": "^1.5.2",
61
61
  "concurrently": "^8.2.2",
62
62
  "eslint": "^8.57.0",
63
63
  "eslint-plugin-prettier": "^5.1.3",
@@ -65,21 +65,22 @@
65
65
  "jsdom": "^24.0.0",
66
66
  "lint-staged": "^15.2.0",
67
67
  "prettier": "^3.2.5",
68
- "stylelint": "^16.2.1",
68
+ "stylelint": "^16.4.0",
69
69
  "stylelint-prettier": "^5.0.0",
70
70
  "tsc-files": "^1.1.4",
71
- "typescript": "^5.4.2",
71
+ "typescript": "^5.4.5",
72
72
  "vite-plugin-svgr": "^4.2.0",
73
73
  "vite-tsconfig-paths": "^4.3.2",
74
74
  "vitest": "^1.0.4",
75
+ "vitest-axe": "^1.0.0-pre.3",
75
76
  "vitest-sonar-reporter": "^2.0.0",
76
- "webpack": "^5.90.3",
77
+ "webpack": "^5.91.0",
77
78
  "webpack-cli": "^5.1.4",
78
- "webpack-dev-server": "^4.15.1"
79
+ "webpack-dev-server": "^4.15.2"
79
80
  },
80
81
  "volta": {
81
- "node": "20.10.0",
82
- "npm": "10.2.5"
82
+ "node": "20.12.2",
83
+ "npm": "10.5.2"
83
84
  },
84
85
  "browserslist": {
85
86
  "production": [
@@ -0,0 +1,12 @@
1
+ import { render } from '@testing-library/react';
2
+ import { expect } from 'vitest';
3
+ import { axe } from 'vitest-axe';
4
+ import { Logo } from '../Logo';
5
+
6
+ describe('<Logo />', () => {
7
+ it('should', async () => {
8
+ const { container } = render(<Logo src="foo" alt="bar" />);
9
+
10
+ expect(await axe(container)).toHaveNoViolations();
11
+ });
12
+ });
package/tsconfig.json CHANGED
@@ -6,7 +6,13 @@
6
6
  "dom.iterable",
7
7
  "esnext"
8
8
  ],
9
- "types": ["./src/react-app-env.d.ts", "@pplancq/webpack-config", "vitest/globals", "@testing-library/jest-dom/vitest"],
9
+ "types": [
10
+ "./src/react-app-env.d.ts",
11
+ "@pplancq/webpack-config",
12
+ "vitest/globals",
13
+ "@testing-library/jest-dom/vitest",
14
+ "vitest-axe/extend-expect"
15
+ ],
10
16
  "allowJs": true,
11
17
  "skipLibCheck": true,
12
18
  "esModuleInterop": true,
package/vitest.setup.ts CHANGED
@@ -1 +1,10 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import '@testing-library/jest-dom/vitest';
3
+ import { cleanup } from '@testing-library/react';
4
+ import * as matchers from 'vitest-axe/matchers';
5
+
6
+ expect.extend(matchers);
7
+
8
+ afterEach(() => {
9
+ cleanup();
10
+ });