Skip to content

Commit b889570

Browse files
[docs] Ease migration to v5 (#45991)
1 parent 738af86 commit b889570

File tree

8 files changed

+38
-30
lines changed

8 files changed

+38
-30
lines changed

docs/data/joy/getting-started/installation/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Run one of the following commands to add Joy UI to your project:
88

99
<codeblock storageKey="package-manager">
10+
1011
```bash npm
1112
npm install @mui/joy @emotion/react @emotion/styled
1213
```
@@ -45,6 +46,7 @@ Add it to your project via [Fontsource](https://fontsource.org/), or with the Go
4546
Run one of the following commands to add Inter through Fontsource to your Joy UI project:
4647

4748
<codeblock storageKey="package-manager">
49+
4850
```bash npm
4951
npm install @fontsource/inter
5052
```

docs/data/material/components/about-the-lab/about-the-lab.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ To install and save in your `package.json` dependencies, run one of the followin
2222
<codeblock storageKey="package-manager">
2323

2424
```bash npm
25-
npm install @mui/lab @mui/material
25+
npm install @mui/lab@^5.0.0-alpha @mui/material@^5.0.0
2626
```
2727

2828
```bash yarn
29-
yarn add @mui/lab @mui/material
29+
yarn add @mui/lab@^5.0.0-alpha @mui/material@^5.0.0
3030
```
3131

3232
```bash pnpm
33-
pnpm add @mui/lab @mui/material
33+
pnpm add @mui/lab@^5.0.0-alpha @mui/material@^5.0.0
3434
```
3535

3636
</codeblock>

docs/data/material/components/icons/icons.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ You can [search the full list of these icons](/material-ui/material-icons/).
2727
Run one of the following commands to install it and save it to your `package.json` dependencies:
2828

2929
<codeblock storageKey="package-manager">
30+
3031
```bash npm
31-
npm install @mui/icons-material
32+
npm install @mui/icons-material@^5.0.0
3233
```
3334

3435
```bash yarn
35-
yarn add @mui/icons-material
36+
yarn add @mui/icons-material@^5.0.0
3637
```
3738

3839
```bash pnpm
39-
pnpm add @mui/icons-material
40+
pnpm add @mui/icons-material@^5.0.0
4041
```
4142

4243
</codeblock>

docs/data/material/components/material-icons/material-icons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Use one of the following commands to install it:
2121
<codeblock storageKey="package-manager">
2222

2323
```bash npm
24-
npm install @mui/icons-material @mui/material @emotion/styled @emotion/react
24+
npm install @mui/icons-material@^5.0.0 @mui/material@^5.0.0 @emotion/styled @emotion/react
2525
```
2626

2727
```bash yarn
28-
yarn add @mui/icons-material @mui/material @emotion/styled @emotion/react
28+
yarn add @mui/icons-material@^5.0.0 @mui/material@^5.0.0 @emotion/styled @emotion/react
2929
```
3030

3131
```bash pnpm
32-
pnpm add @mui/icons-material @mui/material @emotion/styled @emotion/react
32+
pnpm add @mui/icons-material@^5.0.0 @mui/material@^5.0.0 @emotion/styled @emotion/react
3333
```
3434

3535
</codeblock>

docs/data/material/getting-started/installation/installation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ Run one of the following commands to add Material UI to your project:
99
<codeblock storageKey="package-manager">
1010

1111
```bash npm
12-
npm install @mui/material @emotion/react @emotion/styled
12+
npm install @mui/material@^5.0.0 @emotion/react @emotion/styled
1313
```
1414

1515
```bash yarn
16-
yarn add @mui/material @emotion/react @emotion/styled
16+
yarn add @mui/material@^5.0.0 @emotion/react @emotion/styled
1717
```
1818

1919
```bash pnpm
20-
pnpm add @mui/material @emotion/react @emotion/styled
20+
pnpm add @mui/material@^5.0.0 @emotion/react @emotion/styled
2121
```
2222

2323
</codeblock>
2424

25+
If you wish to use the latest version, remove the `@^5.0.0` suffix.
26+
2527
### Peer dependencies
2628

2729
<!-- #react-peer-version -->

docs/data/material/integrations/nextjs/nextjs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Then, run one of the following commands to install the dependencies:
1414
<codeblock storageKey="package-manager">
1515

1616
```bash npm
17-
npm install @mui/material-nextjs @emotion/cache
17+
npm install @mui/material-nextjs@^5.0.0 @emotion/cache
1818
```
1919

2020
```bash yarn
21-
yarn add @mui/material-nextjs @emotion/cache
21+
yarn add @mui/material-nextjs@^5.0.0 @emotion/cache
2222
```
2323

2424
```bash pnpm
25-
pnpm add @mui/material-nextjs @emotion/cache
25+
pnpm add @mui/material-nextjs@^5.0.0 @emotion/cache
2626
```
2727

2828
</codeblock>
@@ -156,15 +156,15 @@ Then, run one of the following commands to install the dependencies:
156156
<codeblock storageKey="package-manager">
157157

158158
```bash npm
159-
npm install @mui/material-nextjs @emotion/cache @emotion/server
159+
npm install @mui/material-nextjs@^5.0.0 @emotion/cache @emotion/server
160160
```
161161

162162
```bash yarn
163-
yarn add @mui/material-nextjs @emotion/cache @emotion/server
163+
yarn add @mui/material-nextjs@^5.0.0 @emotion/cache @emotion/server
164164
```
165165

166166
```bash pnpm
167-
pnpm add @mui/material-nextjs @emotion/cache @emotion/server
167+
pnpm add @mui/material-nextjs@^5.0.0 @emotion/cache @emotion/server
168168
```
169169

170170
</codeblock>

docs/data/material/migration/migration-v4/migration-v4.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,13 @@ Make sure that your application is still running without errors, and commit the
148148
Install the Material UI v5 packages.
149149

150150
<codeblock storageKey="package-manager">
151+
151152
```bash npm
152-
npm install @mui/material @mui/styles
153+
npm install @mui/material@^5.0.0 @mui/styles@^5.0.0
153154
```
154155

155156
```bash yarn
156-
yarn add @mui/material @mui/styles
157+
yarn add @mui/material@^5.0.0 @mui/styles@^5.0.0
157158
```
158159

159160
</codeblock>
@@ -163,25 +164,27 @@ If you're using `@material-ui/lab` or `@material-ui/icons`, you will need to ins
163164
### `@material-ui/lab`
164165

165166
<codeblock storageKey="package-manager">
167+
166168
```bash npm
167-
npm install @mui/lab
169+
npm install @mui/lab@^5.0.0-alpha
168170
```
169171

170172
```bash yarn
171-
yarn add @mui/lab
173+
yarn add @mui/lab@^5.0.0-alpha
172174
```
173175

174176
</codeblock>
175177

176178
### `@material-ui/icons`
177179

178180
<codeblock storageKey="package-manager">
181+
179182
```bash npm
180-
npm install @mui/icons-material
183+
npm install @mui/icons-material@^5.0.0
181184
```
182185

183186
```bash yarn
184-
yarn add @mui/icons-material
187+
yarn add @mui/icons-material@^5.0.0
185188
```
186189

187190
</codeblock>

docs/data/system/getting-started/installation/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Run one of the following commands to add MUI System to your project:
99
<codeblock storageKey="package-manager">
1010

1111
```bash npm
12-
npm install @mui/system @emotion/react @emotion/styled
12+
npm install @mui/system@^5.0.0 @emotion/react @emotion/styled
1313
```
1414

1515
```bash yarn
16-
yarn add @mui/system @emotion/react @emotion/styled
16+
yarn add @mui/system@^5.0.0 @emotion/react @emotion/styled
1717
```
1818

1919
```bash pnpm
20-
pnpm add @mui/system @emotion/react @emotion/styled
20+
pnpm add @mui/system@^5.0.0 @emotion/react @emotion/styled
2121
```
2222

2323
</codeblock>
@@ -42,15 +42,15 @@ If you want to use [styled-components](https://styled-components.com/) instead,
4242
<codeblock storageKey="package-manager">
4343

4444
```bash npm
45-
npm install @mui/system @mui/styled-engine-sc styled-components
45+
npm install @mui/system@^5.0.0 @mui/styled-engine-sc@^5.0.0 styled-components
4646
```
4747

4848
```bash yarn
49-
yarn add @mui/system @mui/styled-engine-sc styled-components
49+
yarn add @mui/system@^5.0.0 @mui/styled-engine-sc@^5.0.0 styled-components
5050
```
5151

5252
```bash pnpm
53-
pnpm add @mui/system @mui/styled-engine-sc styled-components
53+
pnpm add @mui/system@^5.0.0 @mui/styled-engine-sc@^5.0.0 styled-components
5454
```
5555

5656
</codeblock>

0 commit comments

Comments
 (0)