diff --git a/docs/references/engine-js-compat.md b/docs/references/engine-js-compat.md index d8af55e09..9fd1a1f8f 100644 --- a/docs/references/engine-js-compat.md +++ b/docs/references/engine-js-compat.md @@ -2,9 +2,9 @@ Compatibility reference of all built-in grammars with the [JavaScript RegExp engine](/guide/regex-engines#javascript-regexp-engine-experimental). -> Genreated on Monday, September 16, 2024 +> Genreated on Sunday, September 29, 2024 > -> Version `1.17.6` +> Version `1.20.0` > > Runtime: Node.js v20.12.2 @@ -13,9 +13,9 @@ Compatibility reference of all built-in grammars with the [JavaScript RegExp eng | | Count | | :-------------- | ---------------------------: | | Total Languages | 213 | -| Supported | [172](#supported-languages) | +| Supported | [175](#supported-languages) | | Mismatched | [23](#mismatched-languages) | -| Unsupported | [18](#unsupported-languages) | +| Unsupported | [15](#unsupported-languages) | ## Supported Languages @@ -31,8 +31,9 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the | apl | ✅ OK | 917 | - | | | applescript | ✅ OK | 152 | - | | | ara | ✅ OK | 54 | - | | +| asciidoc | ✅ OK | 262 | - | | | asm | ✅ OK | 297 | - | | -| astro | ✅ OK | 1090 | - | | +| astro | ✅ OK | 613 | - | | | awk | ✅ OK | 36 | - | | | ballerina | ✅ OK | 230 | - | | | bat | ✅ OK | 58 | - | | @@ -86,6 +87,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the | graphql | ✅ OK | 448 | - | | | groovy | ✅ OK | 133 | - | | | hack | ✅ OK | 948 | - | | +| haml | ✅ OK | 562 | - | | | handlebars | ✅ OK | 699 | - | | | haxe | ✅ OK | 174 | - | | | hcl | ✅ OK | 67 | - | | @@ -141,7 +143,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the | qml | ✅ OK | 408 | - | | | qmldir | ✅ OK | 7 | - | | | qss | ✅ OK | 31 | - | | -| r | ✅ OK | 73 | - | | +| r | ✅ OK | 71 | - | | | racket | ✅ OK | 69 | - | | | raku | ✅ OK | 52 | - | | | reg | ✅ OK | 9 | - | | @@ -162,14 +164,14 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the | sql | ✅ OK | 67 | - | | | ssh-config | ✅ OK | 12 | - | | | stylus | ✅ OK | 107 | - | | -| svelte | ✅ OK | 1491 | - | | +| svelte | ✅ OK | 636 | - | | | system-verilog | ✅ OK | 102 | - | | | systemd | ✅ OK | 32 | - | | | tasl | ✅ OK | 23 | - | | | tcl | ✅ OK | 34 | - | | | templ | ✅ OK | 673 | - | | | terraform | ✅ OK | 68 | - | | -| tex | ✅ OK | 108 | - | | +| tex | ✅ OK | 106 | - | | | toml | ✅ OK | 44 | - | | | ts-tags | ✅ OK | 997 | - | | | tsv | ✅ OK | 1 | - | | @@ -185,12 +187,13 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the | verilog | ✅ OK | 33 | - | | | vhdl | ✅ OK | 82 | - | | | viml | ✅ OK | 72 | - | | -| vue | ✅ OK | 1597 | - | | -| vue-html | ✅ OK | 1620 | - | | +| vue | ✅ OK | 692 | - | | +| vue-html | ✅ OK | 716 | - | | | vyper | ✅ OK | 238 | - | | | wasm | ✅ OK | 78 | - | | | wenyan | ✅ OK | 18 | - | | | wgsl | ✅ OK | 44 | - | | +| wikitext | ✅ OK | 104 | - | | | xml | ✅ OK | 169 | - | | | xsl | ✅ OK | 171 | - | | | yaml | ✅ OK | 48 | - | | @@ -218,15 +221,15 @@ Languages that does not throw with the JavaScript RegExp engine, but will produc | elixir | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=elixir) | 708 | - | 179 | | erlang | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=erlang) | 147 | - | 470 | | glsl | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=glsl) | 186 | - | 306 | -| haml | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=haml) | 1612 | - | 48 | | kusto | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=kusto) | 60 | - | 40 | +| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 283 | - | 25 | | markdown | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=markdown) | 118 | - | 78 | | mermaid | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=mermaid) | 129 | - | 38 | | nginx | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=nginx) | 378 | - | 4 | | objective-cpp | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=objective-cpp) | 309 | - | 172 | | php | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=php) | 1131 | - | 605 | | po | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=po) | 23 | - | 336 | -| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 1013 | - | 164 | +| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 686 | - | 164 | | ruby | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=ruby) | 1307 | - | 1 | | shellscript | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=shellscript) | 148 | - | 56 | | smalltalk | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=smalltalk) | 35 | - | 40 | @@ -241,11 +244,8 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that | Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff | | ---------- | :------------------------------------------------------------------------- | ----------------: | --------------: | ---: | | ada | ✅ OK | 201 | 1 | | -| wikitext | ✅ OK | 5217 | 86 | | -| asciidoc | ✅ OK | 4390 | 91 | | | blade | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=blade) | 1124 | 2 | | | rst | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=rst) | 1835 | 22 | 62 | -| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 2451 | 48 | 25 | | powershell | ❌ Error | 87 | 1 | | | wolfram | ❌ Error | 500 | 1 | 12 | | mdx | ❌ Error | 193 | 4 | | @@ -255,6 +255,6 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that | apex | ❌ Error | 173 | 14 | 242 | | haskell | ❌ Error | 136 | 21 | 12 | | cpp | ❌ Error | 490 | 22 | 25 | -| julia | ❌ Error | 1143 | 27 | 49 | +| julia | ❌ Error | 1141 | 27 | 49 | | csharp | ❌ Error | 276 | 33 | 232 | | razor | ❌ Error | 922 | 35 | 26 | diff --git a/packages/shiki/test/dist.test.ts b/packages/shiki/test/dist.test.ts new file mode 100644 index 000000000..033f7fd14 --- /dev/null +++ b/packages/shiki/test/dist.test.ts @@ -0,0 +1,13 @@ +import { expect, it } from 'vitest' +// eslint-disable-next-line antfu/no-import-dist +import { createHighlighter } from '../dist/index.mjs' + +it('should works', async () => { + const shiki = await createHighlighter({ + themes: ['vitesse-light'], + langs: ['javascript'], + }) + + expect(shiki.codeToHtml('console.log', { lang: 'js', theme: 'vitesse-light' })) + .toMatchInlineSnapshot(`"
console.log
"`) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c792d3d4..b571c7a32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,8 +85,8 @@ catalogs: specifier: ^0.1.2 version: 0.1.2 esno: - specifier: ^4.7.0 - version: 4.7.0 + specifier: ^4.8.0 + version: 4.8.0 fast-glob: specifier: ^3.3.2 version: 3.3.2 @@ -196,8 +196,8 @@ catalogs: specifier: ^1.17.27 version: 1.17.27 tm-themes: - specifier: ^1.8.5 - version: 1.8.5 + specifier: ^1.8.6 + version: 1.8.6 twoslash: specifier: ^0.2.12 version: 0.2.12 @@ -332,7 +332,7 @@ importers: version: 0.1.2(eslint@9.11.1(jiti@2.0.0)) esno: specifier: 'catalog:' - version: 4.7.0 + version: 4.8.0 fast-glob: specifier: 'catalog:' version: 3.3.2 @@ -658,7 +658,7 @@ importers: version: 1.17.27 tm-themes: specifier: 'catalog:' - version: 1.8.5 + version: 1.8.6 vscode-oniguruma: specifier: ^1.7.0 version: 1.7.0 @@ -3047,7 +3047,7 @@ packages: resolution: {integrity: sha512-P7qDB/RckdKETpBM4CtjHRQ5qXByPmFhRi86sN3E+J+tySchq+RSOGGhI2hDIefmmKFuTi/1ACjqsnDJDDDfzg==} engines: {node: '>=18'} peerDependencies: - eslint: ^9.11.1 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 eslint-plugin-jsonc@2.16.0: resolution: {integrity: sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==} @@ -3070,7 +3070,7 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: astro-eslint-parser: ^1.0.2 - eslint: ^9.11.1 + eslint: '>=8.0.0' svelte: '>=3.0.0' svelte-eslint-parser: ^0.41.1 vue-eslint-parser: '>=9.0.0' @@ -3155,8 +3155,8 @@ packages: jiti: optional: true - esno@4.7.0: - resolution: {integrity: sha512-81owrjxIxOwqcABt20U09Wn8lpBo9K6ttqbGvQcB3VYNLJyaV1fvKkDtpZd3Rj5BX3WXiGiJCjUevKQGNICzJg==} + esno@4.8.0: + resolution: {integrity: sha512-acMtooReAQGzLU0zcuEDHa8S62meh5aIyi8jboYxyvAePdmuWx2Mpwmt0xjwO0bs9/SXf+dvXJ0QJoDWw814Iw==} hasBin: true espree@10.1.0: @@ -4945,8 +4945,8 @@ packages: tm-grammars@1.17.27: resolution: {integrity: sha512-tRL0QH4YqJQSAViTMWSfzpG7zYWCyDoHzVApcUxlw91xxfY6RAxN5vEdKLJPL5edVuKLnshH9/x7nMYvZ2qjuw==} - tm-themes@1.8.5: - resolution: {integrity: sha512-d2jaV9NI7e4KsXTh3JuIs9S0FOxKj9rkLZITrKFJd4pMVT0dZ6PbbOP8Ti6/h39N5kWiuP+K/tFGiP+R3oiyeA==} + tm-themes@1.8.6: + resolution: {integrity: sha512-gl0qBBxWw2tCfHOCy9ash10uxkYakkjyCBUhfnXr1G6Jw+8JxRXlymTBrTgRSx4x+YlyOj0DGU5O9bNUs0PqSw==} to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} @@ -7994,7 +7994,7 @@ snapshots: transitivePeerDependencies: - supports-color - esno@4.7.0: + esno@4.8.0: dependencies: tsx: 4.19.1 @@ -10110,7 +10110,7 @@ snapshots: tm-grammars@1.17.27: {} - tm-themes@1.8.5: {} + tm-themes@1.8.6: {} to-fast-properties@2.0.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d40f40296..080884220 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -35,7 +35,7 @@ catalog: chalk: ^5.3.0 eslint: ^9.11.1 eslint-plugin-format: ^0.1.2 - esno: ^4.7.0 + esno: ^4.8.0 fast-glob: ^3.3.2 floating-vue: ^5.2.2 fs-extra: ^11.2.0 @@ -72,7 +72,7 @@ catalog: simple-git-hooks: ^2.11.1 taze: ^0.17.2 tm-grammars: ^1.17.27 - tm-themes: ^1.8.5 + tm-themes: ^1.8.6 twoslash: ^0.2.12 twoslash-vue: ^0.2.12 typescript: ^5.6.2