@pplancq/react-template 1.2.0 → 1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## @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)
2
+
3
+
4
+ ### Features
5
+
6
+ * **react-template:** add cleanup from @testing-library/react on vitest setup ([a981e0a](https://github.com/pplancq/dev-tools/commit/a981e0a253bda642e2a5a776400d7269a4cdd9cd))
7
+ * **react-template:** add vitest-axe for test a11y violation ([4786b4a](https://github.com/pplancq/dev-tools/commit/4786b4a7701e8601e3fee87cf26ffda6ffb4431f))
8
+
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * **@pplancq/babel-config:** upgraded to 1.0.2
14
+ * **@pplancq/commitlint-config:** upgraded to 2.1.2
15
+ * **@pplancq/eslint-config:** upgraded to 2.1.1
16
+ * **@pplancq/postcss-config:** upgraded to 1.0.2
17
+ * **@pplancq/prettier-config:** upgraded to 1.0.2
18
+ * **@pplancq/stylelint-config:** upgraded to 2.0.2
19
+ * **@pplancq/webpack-config:** upgraded to 1.1.2
20
+
1
21
  ## @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
22
 
3
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/react-template",
3
- "version": "1.2.0",
3
+ "version": "1.3.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.29.2",
38
+ "@tanstack/react-query-devtools": "^5.29.2",
39
39
  "react": "^18.2.0",
40
40
  "react-dom": "^18.2.0",
41
- "react-hook-form": "^7.51.1",
41
+ "react-hook-form": "^7.51.3",
42
42
  "react-router-dom": "^6.22.3",
43
43
  "yup": "^1.4.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@commitlint/cli": "^19.2.0",
46
+ "@commitlint/cli": "^19.2.2",
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.2",
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.2.25",
59
59
  "@vitejs/plugin-react": "^4.2.1",
60
- "@vitest/coverage-v8": "^1.4.0",
60
+ "@vitest/coverage-v8": "^1.5.0",
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.3.1",
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
+ });