Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(engine-js): update deps, support new languages #875

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/references/engine-js-compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

> Generated on Saturday, December 21, 2024
> Generated on Friday, December 27, 2024
>
> Version `1.24.3`
> Version `1.24.4`
>
> Runtime: Node.js v22.11.0

Expand All @@ -13,8 +13,8 @@ Compatibility reference of all built-in grammars with the [JavaScript RegExp eng
| | Count |
| :-------------- | --------------------------: |
| Total Languages | 218 |
| Supported | [208](#supported-languages) |
| Mismatched | [4](#mismatched-languages) |
| Supported | [210](#supported-languages) |
| Mismatched | [2](#mismatched-languages) |
| Unsupported | [6](#unsupported-languages) |

## Supported Languages
Expand All @@ -29,6 +29,7 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s
| angular-html | ✅ OK | 670 | - | |
| angular-ts | ✅ OK | 779 | - | |
| apache | ✅ OK | 60 | - | |
| apex | ✅ OK | 187 | - | |
| apl | ✅ OK | 917 | - | |
| applescript | ✅ OK | 152 | - | |
| ara | ✅ OK | 54 | - | |
Expand Down Expand Up @@ -58,6 +59,7 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s
| coffee | ✅ OK | 469 | - | |
| common-lisp | ✅ OK | 60 | - | |
| coq | ✅ OK | 26 | - | |
| cpp | ✅ OK | 512 | - | |
| crystal | ✅ OK | 1067 | - | |
| css | ✅ OK | 141 | - | |
| csv | ✅ OK | 1 | - | |
Expand Down Expand Up @@ -218,8 +220,8 @@ In some edge cases, it's not guaranteed that the highlighting will be 100% the s
| verilog | ✅ OK | 33 | - | |
| vhdl | ✅ OK | 82 | - | |
| viml | ✅ OK | 72 | - | |
| vue | ✅ OK | 692 | - | |
| vue-html | ✅ OK | 716 | - | |
| vue | ✅ OK | 694 | - | |
| vue-html | ✅ OK | 718 | - | |
| vyper | ✅ OK | 238 | - | |
| wasm | ✅ OK | 78 | - | |
| wenyan | ✅ OK | 18 | - | |
Expand All @@ -246,8 +248,6 @@ Languages that do not throw with the JavaScript RegExp engine, but will produce

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

Expand All @@ -260,6 +260,6 @@ Languages that throw with the JavaScript RegExp engine, either because they cont
| ada | ✅ OK | 201 | 1 | |
| hack | ❌ Error | 947 | 1 | 114 |
| purescript | ❌ Error | 72 | 1 | |
| csharp | ❌ Error | 306 | 3 | 148 |
| csharp | ❌ Error | 306 | 3 | 137 |
| swift | ❌ Error | 326 | 3 | 8 |
| razor | ❌ Error | 952 | 5 | 14 |
| razor | ❌ Error | 952 | 5 | |
6 changes: 3 additions & 3 deletions packages/engine-javascript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ export function defaultJavaScriptRegexConstructor(pattern: string, options?: Oni
rules: {
// Needed since TextMate grammars merge backrefs across patterns
allowOrphanBackrefs: true,
// Removing `\G` anchors in cases when they're not supported for emulation allows
// supporting more grammars, but also allows some mismatches
allowUnhandledGAnchors: true,
// Improves search performance for generated regexes
asciiWordBoundaries: true,
// Follow `vscode-oniguruma` which enables this Oniguruma option by default
captureGroup: true,
// Removing `\G` anchors in cases when they're not supported for emulation allows
// supporting more grammars, but also allows some mismatches
ignoreUnsupportedGAnchors: true,
},
...options,
},
Expand Down
29 changes: 15 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ catalog:
monaco-editor-core: ^0.52.2
ofetch: ^1.4.1
ohash: ^1.1.4
oniguruma-to-es: 0.8.1
oniguruma-to-es: 0.9.0
picocolors: ^1.1.1
pinia: ^2.3.0
pnpm: ^9.15.1
Expand Down
Loading