aglinxinyuan opened a new issue, #4996:
URL: https://github.com/apache/texera/issues/4996
## Summary
Bring the frontend's Monaco / VS Code language-client stack up to
`monaco-languageclient` v10 (was v8.8.3) and the matching
`@codingame/monaco-vscode-*` v25.1.2 ecosystem. v10 reorganised the public API
around three composable wrappers (`MonacoVscodeApiWrapper` + `EditorApp` +
`LanguageClientWrapper`), so the editor component is rewritten against the new
shape, and the build/test pipeline picks up the codingame v25 quirks the new
packages introduce.
## Why
- v8.8.3 has been EOL'd by upstream; new feature work and security fixes
target the v10 line.
- The codingame v25 stack ships pre-built worker entries, native `Worker(new
URL(...))` syntax, Constructable Stylesheets-based CSS, and a `whenReady()`
activation handshake — all of which the older builder workarounds did not
anticipate.
- Several adjacent dependencies (R UDF extension, redundant `@codingame`
declarations, dead `vscode` resolution) become superfluous once the new API is
in place.
## Scope
| Area | What changes |
|---|---|
| API rewrite | `code-editor.component.ts` swaps the v8 single-wrapper
config for the v10 `MonacoVscodeApiWrapper` + `EditorApp` +
`LanguageClientWrapper` triplet, plus a `whenReady()`/forceTokenization
handshake to fix a TextMate first-paint race. |
| Worker bundling | Three thin trampoline files in `workers/` re-export the
codingame worker entries — `new Worker(new URL("./relative", import.meta.url))`
is the only shape webpack 5 will treat as a worker entry point AND that esbuild
can resolve at spec pre-bundle time. |
| Build pipeline | `custom-webpack.config.js` patches
`license-webpack-plugin` to tolerate the codingame submodules' empty
`descriptionFileRoot`, adds a `oneOf` CSS rule with `exportType:
'css-style-sheet'`, and aliases the codingame asset packages back to the real
`css-loader` / `style-loader` install. |
| Test pipeline | `jsdom-svg-polyfill.ts` registers a Node ESM loader hook
(inline as a `data:` URL — no sidecar `.mjs`) that swallows transitive `.css`
imports, and stubs the Constructable Stylesheets / `CSS.escape` / `matchMedia`
/ `requestIdleCallback` / WebSocket APIs jsdom doesn't ship. |
| Dependency cleanup | Drop ~6 codingame side-deps that v10 either ships
transitively or no longer needs (textmate-service-override,
theme-defaults-default-extension, R default extension, the `vscode` package
alias and resolution, `webpack-bundle-analyzer`). Retire R UDF editor support
entirely (no upstream codingame R extension exists). |
## Verification plan
- [ ] `yarn install` resolves the v10 + v25.1.2 graph cleanly
- [ ] `yarn build` exits 0; worker chunks are bundled (~1.3 MB textmate /
~518 KB extension-host / ~220 KB editor)
- [ ] `yarn test` stays at 63 / 269 spec parity
- [ ] Smoke-test the Python UDF editor: language detected, syntax colours
render on first paint, debugger breakpoints work, multi-user collaborative
cursors still appear via the y-monaco binding
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]