Skip to content

Commit c7af427

Browse files
authored
fix(deps): Update dependencides (#525)
Update dependencies and migrate code for updated libraries. - Update react to 19 and migrate to the new jsx transform. It also migrates react-test-renderer and @testing-library/react-hooks to @testing-library/react. - Update eslint to 9 and migrate configurations to the the flat config file format. - Update vitest and migrate mock clear methods.
1 parent 54310e4 commit c7af427

File tree

75 files changed

+3203
-2004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3203
-2004
lines changed

.eslintignore

-2
This file was deleted.

.eslintrc

-57
This file was deleted.

e2e/lib/fixture.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const test = base.extend<Fixture>({
5858
text: string,
5959
options?: { delay?: number },
6060
) => {
61-
await originalType(text, { delay: options?.delay ?? 10 });
61+
await originalType(text, { delay: options?.delay ?? 50 });
6262
};
6363
await use(page);
6464
},

eslint.config.mjs

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import prettierRecommended from "eslint-plugin-prettier/recommended";
4+
import react from "eslint-plugin-react";
5+
import stylex from "@stylexjs/eslint-plugin";
6+
import tseslint from "typescript-eslint";
7+
8+
const ignoreConfig = {
9+
ignores: ["**/*.d.ts", "./dist/**/*.js"],
10+
};
11+
12+
const mainConfig = {
13+
ignores: ["scripts/**/*.mjs"],
14+
settings: {
15+
react: {
16+
version: "detect",
17+
},
18+
},
19+
plugins: {
20+
react,
21+
"@stylexjs": stylex,
22+
},
23+
languageOptions: {
24+
globals: {
25+
...globals.browser,
26+
...globals.node,
27+
},
28+
},
29+
rules: {
30+
"@typescript-eslint/explicit-module-boundary-types": "off",
31+
"@typescript-eslint/consistent-type-imports": "error",
32+
"@typescript-eslint/no-import-type-side-effects": "error",
33+
"@typescript-eslint/no-empty-function": "off",
34+
"@typescript-eslint/no-explicit-any": "off",
35+
"@typescript-eslint/no-non-null-assertion": "off",
36+
"@typescript-eslint/no-unused-expressions": "off",
37+
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
38+
"no-restricted-exports": [
39+
"error",
40+
{
41+
restrictDefaultExports: {
42+
direct: true,
43+
named: true,
44+
},
45+
},
46+
],
47+
"no-console": "error",
48+
},
49+
};
50+
51+
const scriptConfig = {
52+
files: ["script/**/*.mjs"],
53+
rules: {
54+
"no-console": "off",
55+
},
56+
};
57+
58+
const eslintConfig = {
59+
files: ["./eslint.config.mjs"],
60+
rules: {
61+
"no-restricted-exports": "off",
62+
},
63+
};
64+
65+
export default tseslint.config(
66+
ignoreConfig,
67+
js.configs.recommended,
68+
tseslint.configs.recommended,
69+
mainConfig,
70+
prettierRecommended,
71+
scriptConfig,
72+
eslintConfig,
73+
);

package.json

+23-25
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,40 @@
3030
"inversify": "^6.0.2",
3131
"inversify-binding-decorators": "^4.0.0",
3232
"prismjs": "^1.29.0",
33-
"react": "18.2.0",
34-
"react-dom": "18.2.0",
35-
"tslib": "^2.6.2",
36-
"typescript": "5.3.3",
33+
"react": "19.1.0",
34+
"react-dom": "19.1.0",
35+
"tslib": "^2.8.1",
36+
"typescript": "5.8.3",
3737
"zod": "^3.22.2"
3838
},
3939
"devDependencies": {
40-
"@playwright/test": "1.40.1",
41-
"@stylexjs/dev-runtime": "^0.5.1",
42-
"@stylexjs/esbuild-plugin": "^0.5.1",
43-
"@stylexjs/eslint-plugin": "^0.5.1",
44-
"@stylexjs/stylex": "^0.5.1",
45-
"@testing-library/react-hooks": "^8.0.1",
40+
"@eslint/js": "^9.26.0",
41+
"@playwright/test": "1.52.0",
42+
"@stylexjs/dev-runtime": "^0.11.1",
43+
"@stylexjs/esbuild-plugin": "^0.11.1",
44+
"@stylexjs/eslint-plugin": "^0.11.1",
45+
"@stylexjs/stylex": "^0.11.1",
46+
"@testing-library/react": "^16.3.0",
4647
"@types/chrome": "^0.0.233",
4748
"@types/node": "^20.6.0",
4849
"@types/prismjs": "^1.26.1",
49-
"@types/react": "^18.2.46",
50-
"@types/react-dom": "^18.2.18",
51-
"@types/react-test-renderer": "^18.0.7",
52-
"@typescript-eslint/eslint-plugin": "^7.0.1",
53-
"@typescript-eslint/parser": "^7.0.1",
50+
"@types/react": "^19.1.2",
51+
"@types/react-dom": "^19.1.2",
5452
"esbuild": "^0.20.1",
55-
"eslint": "8.56.0",
56-
"eslint-config-prettier": "9.1.0",
57-
"eslint-plugin-prettier": "5.1.2",
58-
"eslint-plugin-react": "7.33.2",
59-
"eslint-plugin-standard": "^5.0.0",
53+
"eslint": "9.26.0",
54+
"eslint-config-prettier": "10.1.2",
55+
"eslint-plugin-prettier": "5.2.6",
56+
"eslint-plugin-react": "7.37.5",
6057
"fastify": "^4.23.2",
61-
"jsdom": "^24.0.0",
58+
"globals": "^16.0.0",
59+
"jsdom": "^26.1.0",
6260
"jszip": "^3.7.0",
6361
"nodemon": "^2.0.22",
6462
"playwright-webextext": "^0.0.4",
65-
"prettier": "3.1.1",
66-
"prettier-eslint": "16.2.0",
67-
"react-test-renderer": "18.2.0",
68-
"vitest": "^1.6.0",
63+
"prettier": "3.5.3",
64+
"prettier-eslint": "16.4.1",
65+
"typescript-eslint": "^8.31.1",
66+
"vitest": "^3.1.2",
6967
"webext-agent": "^0.2.0"
7068
},
7169
"engines": {

0 commit comments

Comments
 (0)