Repository navigation
fix(web): polyfill Blob.stream() pour jsdom (test coloration Markdown rouge sur main) - #299
Merged
Merged
Conversation
…n wasm via Blob.stream)
shiki 4.6.0 (publié le 2026-11-02) charge le wasm oniguruma gzip inliné avec
new Blob([...]).stream().pipeThrough(new DecompressionStream('gzip')). jsdom n'implémente
pas Blob.stream() : l'erreur était avalée par highlightCode → pas de coloration → test
« code coloré en jetons » en timeout. Les navigateurs ont Blob.stream() : la prod n'est
pas touchée. Le lockfile (shiki 4.4.3) n'étant pas en phase avec package.json (^4.5.0),
npm install en CI a pris la nouvelle version.
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.
Cause : shiki 4.6.0 publié le 02/11 à 05:36 (heure de Paris).
@shikijs/engine-onigurumacharge désormais son wasm gzip inliné vianew Blob([…]).stream().pipeThrough(new DecompressionStream('gzip')). jsdom n'implémente pasBlob.stream()→TypeError: (intermediate value).stream is not a function, avalée parhighlightCode→ pas dedata-highlighted→ timeout du test.Pourquoi la CI a pris 4.6.0 :
package-lock.jsonpointe shiki 4.4.3 alors quepackage.jsondemande^4.5.0; le lockfile est ignoré pour ce paquet etnpm installrésout la dernière version.Correctif : polyfill
Blob.prototype.stream(basé surarrayBuffer()) danssrc/test/setup.ts, uniquement si absent. Les navigateurs supportentBlob.stream(): le code de prod ne change pas.Reproduit en local (copie autonome de apps/web,
npm install && npm run build && npm test) : 1 échec avant, 187/187 après.Suivi conseillé (hors PR) : resynchroniser
package-lock.jsonavecpackage.json.