Skip to content

Commit 67766df

Browse files
committed
docs: v4 migration guide
1 parent 2923478 commit 67766df

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

docs/pages/migration/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"migration-v3": "Migrating to v3"
2+
"migration-v3": "Migrating to v3",
3+
"migration-v4": "Migrating to v4"
34
}

docs/pages/migration/migration-v4.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Migrating from v3 to v4
2+
3+
### Updating your dependencies
4+
5+
- Update `@mui/material` to `^6.0.0`
6+
7+
For `MUI` users, you can also check the [MUI v6 migration guide](https://mui.com/material-ui/migration/upgrade-to-v6/).
8+
9+
#### Update version
10+
11+
```bash
12+
npm install @textea/json-viewer@^4.0.0
13+
```
14+
15+
#### Install peer dependencies
16+
17+
This package is using [Material-UI](https://mui.com/) as the base component library, so you need to install it and its peer dependencies.
18+
Starting from v3, these dependencies are no longer included in the package's dependencies.
19+
20+
```bash
21+
npm install @mui/material @emotion/react @emotion/styled
22+
```
23+
24+
### Handling breaking changes
25+
26+
#### Check browser compatibility
27+
28+
This package was set to support `ES5` by default, but it's no longer the case.\
29+
Since V3 and V4, as this package is using `Material-UI`, we have adjusted the browser compatibility to match the [Material-UI's one](https://mui.com/getting-started/supported-platforms/).
30+
31+
MUI 6 also removed support for IE 11, so this package will no longer support IE 11. If you need to support IE 11, you can stay on v3. Note that it will not receive updates or bug fixes in the future.
32+
33+
#### Minimum TypeScript version
34+
35+
The minimum supported version of TypeScript has been increased from `v3.5` to `v4.7`.
36+
37+
#### Use `defineDataType` instead of `createDataType`
38+
39+
`createDataType` has been deprecated in v3 and removed in v4. Use `defineDataType` instead.
40+
41+
For more information, please refer to [V3 migration guide](/migration/migration-v3#use-definedatatype-instead-of-createdatatype).

0 commit comments

Comments
 (0)