Skip to content

Commit b4cc17f

Browse files
authored
chore: migrate repo to react 19 (#1027)
1 parent 15438af commit b4cc17f

8 files changed

Lines changed: 1905 additions & 447 deletions

File tree

importer/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"glob": "^8.0.1",
3939
"lodash": "4.17.21",
4040
"mkdirp": "^1.0.4",
41-
"react": "~17.0.1",
4241
"shx": "^0.3.2",
4342
"svgo": "2.8.2",
4443
"yargs": "^14.2.3"

package-lock.json

Lines changed: 1877 additions & 404 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,33 @@
2323
"format:check": "nx format:check"
2424
},
2525
"devDependencies": {
26+
"@griffel/webpack-extraction-plugin": "0.5.14",
27+
"@griffel/webpack-loader": "2.2.23",
2628
"@nx/js": "21.6.10",
29+
"@types/react": "19.1.13",
30+
"@types/react-dom": "19.1.9",
31+
"css-loader": "7.1.4",
2732
"eslint": "8.57.1",
2833
"husky": "9.1.7",
34+
"jest-diff": "^30.2.0",
35+
"jsdom": "^21.1.0",
36+
"mini-css-extract-plugin": "2.10.1",
37+
"monosize": "0.7.1",
38+
"monosize-bundler-webpack": "0.2.1",
2939
"nano-staged": "0.9.0",
3040
"nx": "21.6.10",
3141
"patch-package": "8.0.1",
3242
"prettier": "3.6.2",
33-
"@types/react": "^17.0.2",
34-
"react": "17.0.2",
35-
"react-dom": "17.0.2",
43+
"react": "19.2.3",
44+
"react-dom": "19.2.3",
3645
"react-window": "^1.8.10",
3746
"storybook": "9.1.16",
3847
"typescript": "5.0.4",
3948
"typescript-eslint": "7.18.0",
40-
"monosize": "0.7.1",
41-
"monosize-bundler-webpack": "0.2.1",
42-
"@griffel/webpack-loader": "2.2.23",
43-
"@griffel/webpack-extraction-plugin": "0.5.14",
44-
"mini-css-extract-plugin": "2.10.1",
45-
"css-loader": "7.1.4",
46-
"jest-diff": "^30.2.0",
47-
"jsdom": "^21.1.0",
48-
"vitest": "^3.2.4"
49+
"vitest": "^3.2.4",
50+
"@testing-library/dom": "10.4.1",
51+
"@testing-library/jest-dom": "6.9.1",
52+
"@testing-library/react": "16.3.2"
4953
},
5054
"optionalDependencies": {
5155
"@esbuild/linux-x64": "0.25.12",
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import { fileURLToPath } from 'node:url';
2-
import { dirname } from 'node:path';
31
import type { StorybookConfig } from '@storybook/react-webpack5';
42

53
const config: StorybookConfig = {
64
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)', '../stories/**/*.mdx'],
75

8-
addons: [getAbsolutePath('@storybook/addon-docs'), getAbsolutePath('@storybook/addon-webpack5-compiler-swc')],
6+
addons: ['@storybook/addon-docs', '@storybook/addon-webpack5-compiler-swc'],
97

108
framework: {
11-
name: getAbsolutePath('@storybook/react-webpack5'),
9+
name: '@storybook/react-webpack5',
1210
options: {},
1311
},
1412

@@ -19,17 +17,6 @@ const config: StorybookConfig = {
1917
docs: {
2018
docsMode: true,
2119
},
22-
23-
webpackFinal: async (config) => {
24-
const docsiteNodeModules = new URL('../node_modules', import.meta.url).pathname;
25-
config.resolve = config.resolve || {};
26-
config.resolve.modules = [docsiteNodeModules, ...(config.resolve.modules || ['node_modules'])];
27-
return config;
28-
},
2920
};
3021

3122
export default config;
32-
33-
function getAbsolutePath(value: string): any {
34-
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
35-
}

packages/icon-app/webpack.config.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ module.exports = {
1313
resolve: {
1414
// Add `.ts` and `.tsx` as a resolvable extension.
1515
extensions: ['.ts', '.tsx', '.js'],
16-
alias: {
17-
// Force React and React-DOM to use the versions installed in icon-app (React 19)
18-
// This prevents version conflicts with react-icons package which uses React 17
19-
react: path.resolve(__dirname, 'node_modules/react'),
20-
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
21-
// Ensure React/jsx-runtime uses the correct version
22-
'react/jsx-runtime': path.resolve(__dirname, 'node_modules/react/jsx-runtime'),
23-
'react/jsx-dev-runtime': path.resolve(__dirname, 'node_modules/react/jsx-dev-runtime'),
24-
},
2516
},
2617
mode: 'development',
2718
module: {

packages/react-icons/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,13 @@
4040
"@babel/core": "^7.16.0",
4141
"@griffel/babel-preset": "^1.8.1",
4242
"@griffel/eslint-plugin": "^2.0.2",
43-
"@testing-library/jest-dom": "^6.9.1",
44-
"@testing-library/react": "^12.1.2",
4543
"@types/react": "^17.0.2",
4644
"concurrently": "^9.2.0",
4745
"eslint": "8.57.1",
4846
"eslint-plugin-react-hooks": "^5.2.0",
4947
"glob": "^7.2.0",
5048
"lodash": "^4.17.21",
5149
"mkdirp": "^1.0.4",
52-
"react": "^17.0.1",
53-
"react-dom": "^17.0.2",
5450
"renamer": "^2.0.1",
5551
"svgo": "2.8.2",
5652
"typescript": "4.1.6",

packages/react-icons/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
"moduleResolution": "node",
1414
"jsx": "react",
1515
"esModuleInterop": true,
16-
"allowSyntheticDefaultImports": true
16+
"allowSyntheticDefaultImports": true,
17+
"baseUrl": ".",
18+
"paths": {
19+
"react": ["./node_modules/@types/react"]
20+
}
1721
},
1822
"include": ["src"],
1923
"exclude": [

packages/react-native-icons/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
"sourceMap": true,
2525
"jsx": "react-native",
2626
"resolveJsonModule": true,
27-
"allowSyntheticDefaultImports": true
27+
"allowSyntheticDefaultImports": true,
28+
"baseUrl": ".",
29+
"paths": {
30+
"react": ["./node_modules/@types/react"]
31+
}
2832
},
2933
"include": ["src"],
3034
"exclude": ["lib", "lib-cjs", "node_modules"]

0 commit comments

Comments
 (0)