potiuk opened a new issue, #70929:
URL: https://github.com/apache/airflow/issues/70929

   ### What
   
   `monaco-editor` cannot be upgraded past **0.55.1** until the UI's deep 
imports are migrated. Both grouped bump PRs were closed rather than merged:
   
   - #70873 (`main`)
   - #70854 (`v3-3-test`)
   
   Both failed identically on `Basic tests / React UI tests`, `CI image checks 
/ Static checks`, and `Generate constraints`.
   
   ### Why it breaks
   
   0.56.0 rewrote the package `exports` map:
   
   ```jsonc
   // 0.55.1                     // 0.56.0
   "./*": "./*"                  "./*.js": "./esm/vs/*.js",
                                 "./*":    "./esm/vs/*.js"
   ```
   
   Subpaths are now rooted *inside* `esm/vs/`, so every existing 
`monaco-editor/esm/vs/X` specifier doubles the prefix. Verified by resolving 
against 0.56.0:
   
   ```
   monaco-editor/esm/vs/editor/editor.api.js  ->  
esm/vs/esm/vs/editor/editor.api.js   (does not exist)
   monaco-editor/editor/editor.api.js         ->  esm/vs/editor/editor.api.js   
       OK
   ```
   
   One unresolvable import explains all three failures:
   
   - TypeScript cannot resolve the module, so it is `any` — **26 
`@typescript-eslint/no-unsafe-*` errors**, all in `configureMonaco.ts` and 
`pythonFStrings.test.ts`
   - Vite/Rolldown cannot resolve it — `[vite]: Rolldown failed to resolve 
import "monaco-editor/esm/vs/editor/editor.api.js"` — so the build fails and 
the dev server never starts, giving `ECONNREFUSED ::1:3000` in the React UI 
tests
   
   ### Work needed
   
   14 import sites across 3 files (`configureMonaco.ts`, 
`pythonFStrings.test.ts`, `vite-env.d.ts`):
   
   1. **Drop the `esm/vs/` prefix** from every specifier — mechanical.
   2. **Move the Python grammar**: `esm/vs/basic-languages/python/python.js` → 
`esm/vs/languages/definitions/python/python.js`, plus a new `register.js`. The 
old path no longer ships.
   3. **Codicon CSS — the unsolved part.** `codicon.css` and 
`codicon-modifiers.css` have *no* working spelling in 0.56.0: the `"./*"` 
fallback appends `.js`, so both old and new forms resolve to `codicon.css.js`. 
The files still ship, but are unreachable through the exports map. Needs a 
decision on how consumers are meant to pull codicon styles in 0.56 (bundler 
alias, direct path, or upstream guidance).
   
   Item 3 is the blocker; 1 and 2 are straightforward.
   
   ### Acceptance criteria
   
   - `monaco-editor` moves to 0.56.x on `main` with React UI tests, static 
checks, and constraints all green
   - Folding/find glyphs still render (the codicon styles are what item 3 
protects)
   - Python syntax highlighting and the f-string patching still work
   - Backported to the active release branch
   
   ### Notes
   
   `configureMonaco.ts` already carries comments about 0.53 removing 
`codiconStyles` — this package churns its internal layout regularly, so the 
migration should prefer documented public entry points over deep paths where 
possible.
   


-- 
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]

Reply via email to