@shikijs/engine-javascript 1.24.3 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @shikijs/engine-javascript
2
2
 
3
- Engine for Shiki using JavaScript's native RegExp (experimental). Uses [Oniguruma-To-ES](https://github.com/slevithan/oniguruma-to-es) to transpile regex syntax and behavior.
3
+ Engine for Shiki using JavaScript's native RegExp. Uses [Oniguruma-To-ES](https://github.com/slevithan/oniguruma-to-es) to transpile regex syntax and behavior.
4
4
 
5
5
  [Documentation](https://shiki.style/guide/regex-engines)
6
6
 
package/dist/index.d.mts CHANGED
@@ -54,8 +54,6 @@ declare class JavaScriptScanner implements PatternScanner {
54
54
  * patterns are not supported. Errors will be thrown when parsing TextMate grammars with
55
55
  * unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax.
56
56
  * Set `forgiving` to `true` to ignore these errors and skip any unsupported or invalid patterns.
57
- *
58
- * @experimental
59
57
  */
60
58
  declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
61
59
 
package/dist/index.d.ts CHANGED
@@ -54,8 +54,6 @@ declare class JavaScriptScanner implements PatternScanner {
54
54
  * patterns are not supported. Errors will be thrown when parsing TextMate grammars with
55
55
  * unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax.
56
56
  * Set `forgiving` to `true` to ignore these errors and skip any unsupported or invalid patterns.
57
- *
58
- * @experimental
59
57
  */
60
58
  declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
61
59
 
package/dist/index.mjs CHANGED
@@ -10,13 +10,13 @@ function defaultJavaScriptRegexConstructor(pattern, options) {
10
10
  rules: {
11
11
  // Needed since TextMate grammars merge backrefs across patterns
12
12
  allowOrphanBackrefs: true,
13
- // Removing `\G` anchors in cases when they're not supported for emulation allows
14
- // supporting more grammars, but also allows some mismatches
15
- allowUnhandledGAnchors: true,
16
13
  // Improves search performance for generated regexes
17
14
  asciiWordBoundaries: true,
18
15
  // Follow `vscode-oniguruma` which enables this Oniguruma option by default
19
- captureGroup: true
16
+ captureGroup: true,
17
+ // Removing `\G` anchors in cases when they're not supported for emulation allows
18
+ // supporting more grammars, but also allows some mismatches
19
+ ignoreUnsupportedGAnchors: true
20
20
  },
21
21
  ...options
22
22
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/engine-javascript",
3
3
  "type": "module",
4
- "version": "1.24.3",
4
+ "version": "1.25.0",
5
5
  "description": "Engine for Shiki using JavaScript's native RegExp",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@shikijs/vscode-textmate": "^9.3.1",
34
- "oniguruma-to-es": "0.8.0",
35
- "@shikijs/types": "1.24.3"
34
+ "oniguruma-to-es": "0.10.0",
35
+ "@shikijs/types": "1.25.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "unbuild",