Skip to content

Commit

Permalink
chore: update for React 19 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Dec 6, 2024
1 parent 46fb92e commit 81ac375
Show file tree
Hide file tree
Showing 86 changed files with 1,257 additions and 2,148 deletions.
2 changes: 1 addition & 1 deletion common/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"univer-cli": "bin/index.ts"
},
"dependencies": {
"@typescript-eslint/parser": "^8.16.0",
"@typescript-eslint/parser": "^8.17.0",
"@vitejs/plugin-react": "^4.3.4",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-istanbul": "^2.1.8",
Expand Down
8 changes: 4 additions & 4 deletions common/shared/vite/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ export const peerDepsMap = {
react: {
global: 'React',
name: 'react',
version: '^16.9.0 || ^17.0.0 || ^18.0.0',
version: '>=16.9.0 || >=17 || >=18 || >=19',
},
'react-dom': {
global: 'ReactDOM',
name: 'react-dom',
version: '^16.9.0 || ^17.0.0 || ^18.0.0',
version: '>=16.9.0 || >=17 || >=18 || >=19',
},
rxjs: {
global: 'rxjs',
name: 'rxjs',
version: '>=7.0.0',
version: '>=7',
},
'rxjs/operators': {
global: 'rxjs.operators',
Expand All @@ -38,7 +38,7 @@ export const peerDepsMap = {
vue: {
global: 'Vue',
name: 'vue',
version: '>=3.0.0',
version: '>=3',
optional: true,
},
};
16 changes: 8 additions & 8 deletions common/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
},
"dependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-interactions": "^8.4.5",
"@storybook/addon-links": "^8.4.5",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/addon-styling-webpack": "^1.0.1",
"@storybook/addon-webpack5-compiler-swc": "^1.0.5",
"@storybook/blocks": "^8.4.5",
"@storybook/blocks": "^8.4.7",
"@storybook/icons": "^1.2.12",
"@storybook/react": "^8.4.5",
"@storybook/react-webpack5": "^8.4.5",
"@storybook/types": "^8.4.5",
"@storybook/react": "^8.4.7",
"@storybook/react-webpack5": "^8.4.7",
"@storybook/types": "^8.4.7",
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
"@univerjs/ui": "workspace:*",
"css-loader": "^7.1.2",
"less-loader": "^12.2.0",
"postcss-loader": "^8.1.1",
"storybook": "^8.4.5",
"storybook": "^8.4.7",
"storybook-addon-swc": "^1.2.0",
"style-loader": "^4.0.0",
"tsconfig-paths-webpack-plugin": "^4.2.0",
Expand Down
6 changes: 2 additions & 4 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,12 @@
"@univerjs/uniui": "workspace:*",
"@univerjs/watermark": "workspace:*",
"monaco-editor": "0.52.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-mosaic-component": "^6.1.0"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@univerjs-infra/shared": "workspace:*",
"detect-port": "^1.6.1",
"esbuild": "^0.24.0",
Expand Down
26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"url": "https://github.com/dream-num/univer/issues"
},
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.5.0 || >=9.0.0"
"node": ">=18 || <=22",
"pnpm": ">=9.0.0"
},
"scripts": {
"prepare": "husky install",
Expand All @@ -46,36 +46,40 @@
"@antfu/eslint-config": "3.11.2",
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"@eslint-react/eslint-plugin": "^1.17.1",
"@eslint-react/eslint-plugin": "^1.17.3",
"@playwright/test": "^1.49.0",
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^9.0.3",
"@storybook/react": "8.4.5",
"@storybook/react": "8.4.7",
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@univerjs-infra/shared": "workspace:*",
"@univerjs/design": "workspace:*",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "9.16.0",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-format": "^0.1.3",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-no-barrel-import": "^0.0.2",
"eslint-plugin-no-penetrating-import": "^0.0.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-react-hooks": "5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"release-it": "^17.10.0",
"serve": "^14.2.4",
"tsx": "^4.19.2",
"turbo": "^2.3.3",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
},
"resolutions": {
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
},
"lint-staged": {
"*": "eslint --fix"
}
Expand Down
24 changes: 3 additions & 21 deletions packages-experimental/action-recorder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"build": "univer-cli build"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
"react": ">=16.9.0 || >=17 || >=18 || >=19",
"rxjs": ">=7"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -78,28 +78,10 @@
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"less": "^4.2.1",
"react": "18.3.1",
"react": "19.0.0",
"rxjs": "^7.8.1",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./locale/*": {
"import": "./lib/es/locale/*.js",
"require": "./lib/cjs/locale/*.js",
"types": "./lib/types/locale/*.d.ts"
},
"./lib/*": "./lib/*"
}
}
21 changes: 4 additions & 17 deletions packages-experimental/debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"build": "univer-cli build --skipUMD"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
"react": ">=16.9.0 || >=17 || >=18 || >=19",
"rxjs": ">=7"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -70,7 +70,7 @@
"clsx": "^2.1.1"
},
"optionalDependencies": {
"vue": ">=3.0.0"
"vue": ">=3"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
Expand All @@ -80,19 +80,6 @@
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8",
"vue": "^3.5.12"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
"vue": "^3.5.13"
}
}
15 changes: 1 addition & 14 deletions packages-experimental/uni-docs-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"build": "univer-cli build"
},
"peerDependencies": {
"rxjs": ">=7.0.0"
"rxjs": ">=7"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -76,18 +76,5 @@
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
}
22 changes: 2 additions & 20 deletions packages-experimental/uni-formula-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"build": "univer-cli build"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
"react": ">=16.9.0 || >=17 || >=18 || >=19",
"rxjs": ">=7"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -87,23 +87,5 @@
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./locale/*": {
"import": "./lib/es/locale/*.js",
"require": "./lib/cjs/locale/*.js",
"types": "./lib/types/locale/*.d.ts"
},
"./lib/*": "./lib/*"
}
}
13 changes: 0 additions & 13 deletions packages-experimental/uni-formula/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,5 @@
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
}
17 changes: 2 additions & 15 deletions packages-experimental/uni-sheets-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"build": "univer-cli build"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
"react": ">=16.9.0 || >=17 || >=18 || >=19",
"rxjs": ">=7"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -80,18 +80,5 @@
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
}
19 changes: 3 additions & 16 deletions packages-experimental/uni-slides-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"build": "univer-cli build"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0"
"react": ">=16.9.0 || >=17 || >=18 || >=19"
},
"dependencies": {
"@univerjs/core": "workspace:*",
Expand All @@ -71,25 +71,12 @@
"@univerjs-infra/shared": "workspace:*",
"less": "^4.2.1",
"postcss": "^8.4.49",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"rxjs": "^7.8.1",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
},
"space": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
}
Loading

0 comments on commit 81ac375

Please sign in to comment.