Skip to content

Commit a673853

Browse files
committed
[repo] Document the process of upgrading Docusaurus
1 parent a778c5b commit a673853

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

UPGRADING.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Upgrading Docusaurus
2+
3+
The Moodle Developer resources is generated using an Open Source project, [Docusaurus](https://docusaurus.io/).
4+
5+
Docusaurus periodically releases new versions which are announced on their website, and in the console when starting the Docusaurus development server.
6+
7+
When new versions are released, we aim to update as soon as possible.
8+
9+
## Process
10+
11+
Prior to upgrading you should check the release notes for any potential issues. The full [changelog](https://docusaurus.io/changelog) links to the release notes for each version of Docusaurus.
12+
13+
When starting the Docusaurus server, Yarn will provide instructions if there is a new version, for example:
14+
15+
```
16+
╭──────────────────────────────────────────────────────────────────────────────────────╮
17+
│ │
18+
│ Update available 2.0.0-beta.18 → 2.0.0-beta.21 │
19+
│ │
20+
│ To upgrade Docusaurus packages with the latest version, run the following │
21+
│ command: │
22+
│ `yarn upgrade @docusaurus/core@latest @docusaurus/plugin-pwa@latest │
23+
│ @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest` │
24+
│ │
25+
╰──────────────────────────────────────────────────────────────────────────────────────╯
26+
```
27+
28+
To upgrade the software, the provided command should be run:
29+
30+
```
31+
yarn upgrade @docusaurus/core@latest @docusaurus/plugin-pwa@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest
32+
```
33+
34+
After running the `yarn upgrade` you should check for any issues (especially those highlighted in the releases notes).
35+
36+
Finally, you should run a `yarn clear && yarn build` to completely rebuild the documentation and check for errors.
37+
38+
You should also look out specifically for infrastructure changes, such as a bump
39+
in the required NodeJS version (found in `.nvmrc` and `netlify.toml` files).

0 commit comments

Comments
 (0)