The @theia/monaco extension contributes the integration of the monaco-editor.
This includes:
This package is intended to be the interface between the @theia/monaco-editor-core package, the project's bundling of the monaco-editor-core package published by the VSCode
team, and the rest of the application. When we uplift to a new version of monaco-editor-core, this package will need to be checked particularly thoroughly. To facilitate that
process, the steps for undertaking a Monaco uplift are outlined here.
At the time of this writing the latest release tag is
1.96.3, and the uplift branch ismonaco-uplift-1.96.3
As you resolve conflicts and make changes to the VSCode repo, make sure you end up with a single commit on the uplift branch to make it easier for the next person to rebase.
npm install and npm run gulp editor-distro.build/monaco/package.jsonmodel and a file named model.ts in the same folder.For initial testing, it's easier to point dependencies to your local VSCode.
monaco-editor-core using the steps above.@theia/monaco-editor-core in package.jsons and replace their version with "link:<path to your local build of monaco-editor-core>".Using
link:means that if you subsequently make changes on the VSCode side, you only need to rebuild VSCode and then rebuild Theia to see the effects.
node_modules and npm install and build Theia.bindMonacoPreferenceExtractor function in examples/api-samples/src/browser/monaco-editor-preferences/monaco-editor-preference-extractor.ts and run the commands there. Fix the EditorGeneratedPreferenceSchema as necessary, and add or remove validations from the MonacoFrontendApplicationContribution as appropriate.If you add these, mark them with @monaco-uplift - that'll make them easier to find in the future. Better: if you can remove them, do! Typically, the cause is mixing imports from private API and public API. Often public API fails to satisfy private declarations.
It may also be necessary to update our various
vscodedependencies to match the current state of VSCode. It may not be necessary to upgrade all (or any) of these to successfully adopt a new Monaco version, but if something is misbehaving inexplicably, checking dependencies is a reasonable place to start. Check on:
vscode-debugprotocolvscode-languageserver-protocolvscode-onigurumavscode-proxy-agentvscode-ripgrepvscode-textmatevscode-uri
Once you believe that everything is in working order, you'll need to publish the new @theia/monaco-editor-core for testing. The instructions for doing so are
here. Once the package is published, point your package.jsons at the testing version and make
sure everything still works, then make a PR.
"Theia" is a trademark of the Eclipse Foundation https://www.eclipse.org/theia
See here for a detailed documentation.