chore(deps): upgrade monaco-editor to 0.56.0 - #226
Merged
Merged
Conversation
0.56.0 replaces the identity `exports` map (`"./*": "./*"`) with
`"./*": "./esm/vs/*.js"`, so every deep import that still spelled the prefix
resolved to `esm/vs/esm/vs/…` and broke the build. It also moved the
worker-backed language services from `vs/language/<x>/monaco.contribution.js`
to typed namespaces on the package entry.
That second change lets the code get simpler rather than merely adapt: the four
`*Defaults` we disable are now read straight off `monaco` with real types, so
the hand-written LangServiceDefaults shape, the cast through unknown (the old
.d.ts was an empty `export {}`) and the by-name lookup are all gone.
Re-checked both suppressed Monaco errors against 0.56.0: still present, so the
suppression stays. `Missing requestHandler` is still a plain Promise.reject from
editorWebWorker.$fmr, and `TextModel got disposed` still goes through
onUnexpectedError in diffEditorWidget -- an unhandledrejection and a window
error respectively, which is what the two listeners catch. Recorded in the
comment so the next upgrade re-checks instead of assuming.
Security: monaco's pinned dompurify moves 3.2.7 -> 3.4.8, dropping the copy
behind 16 open advisories down to 4. Not enough to close the tracking issue
(#208) -- newer advisories widened the range past 3.4.11, and one has no fix in
any published version -- but its premise changed, so the issue is updated with
the revised bar rather than left stale.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change to adapt to
0.56.0 replaces the identity
exportsmap with a rewriting one:So every deep import that still spelled the prefix now resolves to
esm/vs/esm/vs/…— the build fails outright rather than degrading, which at least makes it loud.0.56.0 also moved the worker-backed language services from
vs/language/<x>/monaco.contribution.jsto typed namespaces on the package entry. That lets this get simpler rather than merely adapted: the four*Defaultswe disable are now read straight offmonaco, with real types. Gone with it — a hand-writtenLangServiceDefaultsinterface, a cast throughunknown(the old.d.tswas an emptyexport {}), and a by-name lookup that existed only to survive that untyped access.Legacy editor issues — re-checked, not assumed
Both suppressed Monaco errors are still present in 0.56.0, so the suppression stays:
Missing requestHandler or method:Promise.rejectineditorWebWorker.$fmr→ unhandledrejectionTextModel got disposed before DiffEditorWidget model got resetonUnexpectedError(new BugIndicatingError(...))indiffEditorWidget→ window errorBoth still surface through exactly the two listeners we have, so neither the suppression nor its shape needed changing. The finding is recorded in the source comment, so the next upgrade re-checks rather than assuming — a suppression that outlives its cause silently swallows a message that has become meaningful again.
Security: #208 shrinks substantially, but does not close
Monaco''s pinned
dompurifymoves 3.2.7 → 3.4.8, so the vulnerable 3.2.7 copy is gone and the 16 alerts tracked in #208 collapse to 4.It does not close, and the issue''s own close condition turned out to be the wrong bar: newer advisories widened the affected range past 3.4.11, so even mermaid''s copy is in scope now. Three of the four need
dompurify≥ 3.4.12 (another monaco release); the fourth (GHSA-55q2-fjhq-7xh7) has no fix in any published version. #208 is updated with the revised bar rather than left stale.Note:
npm auditproposes "fixing" this by moving monaco to 0.53.0 — a downgrade to an older, more vulnerable copy. Not taken. Per repo policy nooverrideseither.Verification
lint/typecheck/test/buildall pass — and the build is a meaningful signal here, since the breaking change manifests as a module-resolution failure.Not verified in the running app. Worth a look before merging, as these are the parts a resolution/API change would hit while still building: the diff renders with syntax coloring, switching files quickly does not spam the console (the suppression still catching what it should), and the inline code context in a comment still loads.