Skip to content

Commit

Permalink
feat: update grammars and oniguruma-to-es
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 2, 2025
1 parent ebe1ecf commit 3cdcbac
Show file tree
Hide file tree
Showing 7 changed files with 747 additions and 636 deletions.
21 changes: 11 additions & 10 deletions docs/references/engine-js-compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

Compatibility reference of all built-in grammars with the [JavaScript RegExp engine](/guide/regex-engines#javascript-regexp-engine).

> Generated on Friday, December 27, 2024
> Generated on Thursday, January 2, 2025
>
> Version `1.24.4`
>
> Runtime: Node.js v22.11.0
> Runtime: Node.js v20.18.0
## Report Summary

| | Count |
| :-------------- | --------------------------: |
| Total Languages | 218 |
| Supported | [210](#supported-languages) |
| Mismatched | [2](#mismatched-languages) |
| Unsupported | [6](#unsupported-languages) |
| Total Languages | 219 |
| Supported | [213](#supported-languages) |
| Mismatched | [1](#mismatched-languages) |
| Unsupported | [5](#unsupported-languages) |

## Supported Languages

Expand All @@ -24,8 +24,9 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s

| Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff |
| ------------------ | :-------------- | ----------------: | --------------: | ---: |
| abap | ✅ OK | 51 | - | |
| abap | ✅ OK | 52 | - | |
| actionscript-3 | ✅ OK | 57 | - | |
| ada | ✅ OK | 201 | - | |
| angular-html | ✅ OK | 670 | - | |
| angular-ts | ✅ OK | 779 | - | |
| apache | ✅ OK | 60 | - | |
Expand Down Expand Up @@ -125,11 +126,12 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s
| jsx | ✅ OK | 376 | - | |
| julia | ✅ OK | 1168 | - | |
| kotlin | ✅ OK | 58 | - | |
| kusto | ✅ OK | 60 | - | |
| latex | ✅ OK | 283 | - | |
| lean | ✅ OK | 32 | - | |
| less | ✅ OK | 280 | - | |
| liquid | ✅ OK | 689 | - | |
| log | ✅ OK | 30 | - | |
| log | ✅ OK | 31 | - | |
| logo | ✅ OK | 9 | - | |
| lua | ✅ OK | 278 | - | |
| luau | ✅ OK | 88 | - | |
Expand All @@ -156,6 +158,7 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s
| php | ✅ OK | 1131 | - | |
| plsql | ✅ OK | 45 | - | |
| po | ✅ OK | 23 | - | |
| polar | ✅ OK | 30 | - | |
| postcss | ✅ OK | 49 | - | |
| powerquery | ✅ OK | 30 | - | |
| powershell | ✅ OK | 88 | - | |
Expand Down Expand Up @@ -248,7 +251,6 @@ Languages that do not throw with the JavaScript RegExp engine, but will produce

| Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff |
| -------- | :------------------------------------------------------------------------- | ----------------: | --------------: | ---: |
| kusto | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=kusto) | 60 | - | 40 |
| nginx | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=nginx) | 378 | - | 122 |

## Unsupported Languages
Expand All @@ -257,7 +259,6 @@ Languages that throw with the JavaScript RegExp engine, either because they cont

| Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff |
| ---------- | :-------------- | ----------------: | --------------: | ---: |
| ada | ✅ OK | 201 | 1 | |
| hack | ❌ Error | 947 | 1 | 114 |
| purescript | ❌ Error | 72 | 1 | |
| csharp | ❌ Error | 306 | 3 | 137 |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "module",
"version": "1.24.4",
"private": true,
"packageManager": "pnpm@9.15.1",
"packageManager": "pnpm@9.15.2",
"scripts": {
"lint": "eslint . --cache",
"release": "bumpp",
Expand Down
3 changes: 2 additions & 1 deletion packages/langs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"./pot": "./dist/pot.mjs",
"./potx": "./dist/potx.mjs",
"./po": "./dist/po.mjs",
"./polar": "./dist/polar.mjs",
"./postcss": "./dist/postcss.mjs",
"./powerquery": "./dist/powerquery.mjs",
"./ps": "./dist/ps.mjs",
Expand Down Expand Up @@ -350,6 +351,6 @@
"@shikijs/types": "workspace:*"
},
"devDependencies": {
"tm-grammars": "^1.21.10"
"tm-grammars": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"@types/hast": "catalog:"
},
"devDependencies": {
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-copy": "catalog:",
"tm-grammars": "catalog:",
"tm-themes": "catalog:",
"vscode-oniguruma": "catalog:"
Expand Down
6 changes: 6 additions & 0 deletions packages/shiki/src/langs-bundle-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,11 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
],
'import': (() => import('@shikijs/langs/po')) as DynamicImportLanguageRegistration
},
{
'id': 'polar',
'name': 'Polar',
'import': (() => import('@shikijs/langs/polar')) as DynamicImportLanguageRegistration
},
{
'id': 'postcss',
'name': 'PostCSS',
Expand Down Expand Up @@ -1507,6 +1512,7 @@ export type BundledLanguage =
| 'php'
| 'plsql'
| 'po'
| 'polar'
| 'postcss'
| 'pot'
| 'potx'
Expand Down
Loading

0 comments on commit 3cdcbac

Please sign in to comment.