Skip to content

Commit 33ee2fd

Browse files
authored
Merge pull request #1893 from input-output-hk/dlachaume/1813/create-repository-dependencies-upgrade-runbook
Create repository dependencies upgrade runbook
2 parents 062d150 + 458391b commit 33ee2fd

File tree

3 files changed

+141
-0
lines changed

3 files changed

+141
-0
lines changed

docs/runbook/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ This page gathers the available guides to operate a Mithril network.
2323
| **Publish packages to npm manually** | [manual-publish-npm](./manual-publish-npm/README.md) | Manually publish packages to npm registry. |
2424
| **Client multi-platform test** | [test-client-multiplatform](./test-client-multiplatform/README.md) | Run multi-platform client CLI binaries, docker and WASM package tests. |
2525
| **Maintain the networks configuration file** | [maintain-networks-configuration-file](./maintain-networks-configuration-file/README.md) | Maintain the `networks.json` file |
26+
| **Upgrade the repository dependencies** | [upgrade-repository-dependencies](./upgrade-repository-dependencies/README.md) | Upgrade the project's dependencies in the repository |
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Upgrade the project's dependencies in the repository
2+
3+
## Introduction
4+
5+
This runbook provides step-by-step instructions to upgrade the dependencies in the repository, including Rust crates, documentation, and JavaScript packages.
6+
7+
## Steps
8+
9+
### Upgrade Rust outdated dependencies
10+
11+
We recommand using [Dependi](https://dependi.io/) VS Code extension to identify and update outdated dependencies.
12+
13+
To do this, verify the dependencies in the `Cargo.toml` file for each Rust crate in the repository.
14+
15+
- Bring up the Command Palette with `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS).
16+
- Type `dependi` and select `Update All Dependencies to Latest Version`.
17+
18+
![Run dependi](./img/run-dependi.png)
19+
20+
Create a dedicated commit, e.g.:
21+
22+
```bash
23+
chore: update Rust dependencies
24+
```
25+
26+
Next, ensure that upgrading the dependencies has not introduced any breaking changes in the codebase.
27+
28+
If breaking changes are introduced, resolve them, and then create a dedicated commit, e.g.:
29+
30+
```bash
31+
fix: resolve breaking changes introduced by upgrading 'crate_name' from 'x.0.99' to 'x.1.0'
32+
```
33+
34+
### Bump Rust crates versions
35+
36+
Increment the patch versions in the `Cargo.toml` by 1 (eg. from `x.x.1` to `x.x.2`) for each Rust crate in the repository.
37+
38+
Create a dedicated commit, e.g:
39+
40+
```bash
41+
chore: bump crates versions
42+
```
43+
44+
### Upgrade the documentation website dependencies
45+
46+
From the root of the repository, run:
47+
48+
```bash
49+
cd docs/website
50+
make upgrade
51+
```
52+
53+
Create a dedicated commit, e.g.:
54+
55+
```bash
56+
chore: upgrade doc dependencies
57+
58+
By running 'make upgrade' command.
59+
```
60+
61+
### Upgrade the explorer dependencies
62+
63+
From the root of the repository, run:
64+
65+
```bash
66+
cd mithril-explorer
67+
make upgrade
68+
```
69+
70+
Create a dedicated commit, e.g.:
71+
72+
```bash
73+
chore: upgrade explorer dependencies
74+
75+
By running 'make upgrade' command.
76+
```
77+
78+
### Upgrade `www/` and `www-test/` dependencies
79+
80+
From the root of the repository, run:
81+
82+
```bash
83+
cd mithril-client-wasm
84+
make upgrade-www-deps
85+
```
86+
87+
Create a dedicated commit, e.g.:
88+
89+
```bash
90+
chore: upgrade mithril client wasm 'www' and 'www-test' dependencies
91+
92+
By running 'make upgrade-www-deps' command.
93+
```
94+
95+
### Bump Javascript packages versions
96+
97+
Increment the patch versions in the `package.json` by 1 (eg. from `x.x.1` to `x.x.2`) for each Javascript package in the repository (`www`, `www-test` and `mithril-explorer`, `docs/website`).
98+
99+
Then, from the root of the repository, run the commands:
100+
101+
```bash
102+
cd mithril-client-wasm
103+
make www-install && make www-test-install
104+
```
105+
106+
```bash
107+
cd mithril-explorer
108+
make install
109+
```
110+
111+
```bash
112+
cd docs/website
113+
make install
114+
```
115+
116+
Create a dedicated commit, e.g.:
117+
118+
```bash
119+
chore: bump mithril client wasm 'www' and 'www-test' dependencies
120+
121+
By running:
122+
- 'make www-install' command in 'mithril-client-wasm'.
123+
- 'make www-test-install' command in 'mithril-client-wasm'.
124+
- 'make install' command in 'mithril-explorer'.
125+
- 'make install' command in 'docs/website'.
126+
```
127+
128+
### Upgrade Nix Flake dependencies
129+
130+
```bash
131+
nix flake update
132+
```
133+
134+
Create a dedicated commit, e.g.:
135+
136+
```bash
137+
chore: update nix flake dependencies
138+
139+
By running 'nix flake update' command.
140+
```
103 KB
Loading

0 commit comments

Comments
 (0)