Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update monaco-editor-core to 1.96.3 #14726

Open
tsmaeder opened this issue Jan 15, 2025 · 3 comments · May be fixed by #14737
Open

Update monaco-editor-core to 1.96.3 #14726

tsmaeder opened this issue Jan 15, 2025 · 3 comments · May be fixed by #14737
Assignees
Labels
monaco issues related to monaco

Comments

@tsmaeder
Copy link
Contributor

Feature Description:

Uplift our version of monaco to the latest available (1.96.3)

@tsmaeder tsmaeder self-assigned this Jan 15, 2025
@tsmaeder tsmaeder added the monaco issues related to monaco label Jan 15, 2025
@tsmaeder
Copy link
Contributor Author

tsmaeder added a commit to tsmaeder/theia that referenced this issue Jan 17, 2025
Fixes eclipse-theia#14726

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <[email protected]>
@tsmaeder tsmaeder linked a pull request Jan 17, 2025 that will close this issue
2 tasks
@tsmaeder
Copy link
Contributor Author

So here's the current state of this work: I can build an ESM version of Monaco and the webpacked front- and back-ends seem to work fine with the necessary adjustments to our code. This is due to webpack transforming the import and export statements in the Monaco code to webpack_require calls when building.
However, this does not work when running the tests: The test run on nodejs and when we try to require anything from the monaco-editor-core package, it either complains that you "cannot use import outside of an ESM module" or (if we configure the module loading differently), that you "cannot require an ESM module from a CJS module".
This Problem can be solved by using babel to transpile everything to commonjs on the fly when running mocha. However, if we can transpile the code on the fly, we should also be able to compile the code from monaco to commonjs in the first place.
In fact, this is what we have been doing since adopting monaco 1.65.2 in 2022 (see #10736).

However, there remains the fact that VS Code seems to be moving toward ESM as the only module format: microsoft/vscode#226260. I believe we should consider moving to publishing Theia in ESM as well within the next year.

@tsmaeder
Copy link
Contributor Author

See #13272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant