Skip to content

Commit 54c00a7

Browse files
kaisalmenCGNonofr
authored andcommitted
doc: vscode/monaco-editor upgrade guide is ready
1 parent a71b340 commit 54c00a7

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

docs/vscode_monaco_upgrade.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
# How to upgrade to next vscode and monaco-editor version
1+
# How to upgrade to next vscode and monaco-editor versions
22

33
## Preparation
44

5+
- It is assumed `monaco-vscode-api`, `vscode` and `monaco-editor` repos are cloned locally on the same directory level. `monaco-editor` is not required, but helpful
6+
7+
## vscode repository
8+
59
- Get the new vscode commit from the new monaco-editor release version (in the package.json there is a `vscodeRef` field)
6-
- Open the vscode repo, reset to the previous vscodeRef commit
7-
- Apply the current patch: `patch -p1 < /path/to/monaco-vscode-api/scripts/vscode.patch`
10+
- Go to the vscode repo directory, reset to the previous vscodeRef commit
11+
- Apply the current patch: `patch -p1 < ../monaco-vscode-api/scripts/vscode.patch`
812
- `git stash`
9-
- checkout new vscodeRef commit
13+
- Checkout new vscodeRef commit
1014
- `git stash pop`
11-
- resolve conflicts, update code...
12-
- generate new patch: `git diff --staged > /path/to/monaco-vscode-api/scripts/vscode.patch`
15+
- Resolve conflicts / update code (e.g. broken imports)
16+
- Generate new patch: `git diff --staged > ../monaco-vscode-api/scripts/vscode.patch`
1317

14-
## the monaco-vscode-api side
18+
## monaco-vscode-api repository
1519

16-
- update monaco-editor (and other dependencies) and update to the new `vscodeRef`
17-
- wait for the new vscode version to be downloaded and built
20+
- Update `monaco-editor` and other dependencies and update to the new `vscodeRef` from above
21+
- Run `npx @vscode/dts dev` afterwards to update the `vscode.proposed.xxx.d.ts` files. It fixes potential errors in `api.ts`
22+
- Wait for the new vscode version to be downloaded and built
1823
- Fix errors, adapt code, build, include the `vscode.patch` into this commit
19-
- update demo
24+
- Do not hesitate to run the eslint autofix, it gets rid of the majority of your errors
25+
- Implement missing services. This is easily observable seem when running the demo (see next point)
26+
- Update demo
27+
- Update dependencies
28+
- Implement improvements dependening on the new features available from vscode (optional)
2029

21-
## Further points (needs polishing / ne integrated properly)
30+
## Hints:
2231

23-
- Do not hesitate to run the eslint autofix, it gets rid of the majority of your errors
24-
- I've just realized we need to run npx @vscode/dts dev after an update (to upate the vscode.proposed.xxx.d.ts files): it fixes the error in api.ts
25-
- The remaining errors in missing-services.ts are not hard to fix
26-
- Implement missing services (usually seem when running the demo)
32+
Use repo log viewers and check the last update branch when in doubt

0 commit comments

Comments
 (0)