@shikijs/engine-javascript 1.17.6 → 1.18.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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PatternScanner, RegexEngineString, RegexEngine } from '@shikijs/types';
2
+ import { IOnigMatch } from '@shikijs/vscode-textmate';
2
3
 
3
4
  interface JavaScriptRegexEngineOptions {
4
5
  /**
@@ -34,14 +35,7 @@ declare class JavaScriptScanner implements PatternScanner {
34
35
  regexps: (RegExp | null)[];
35
36
  contiguousAnchorSimulation: boolean[];
36
37
  constructor(patterns: string[], options?: JavaScriptRegexEngineOptions);
37
- findNextMatchSync(string: string | RegexEngineString, startPosition: number): {
38
- index: number;
39
- captureIndices: {
40
- end: number;
41
- start: number;
42
- length: number;
43
- }[];
44
- } | null;
38
+ findNextMatchSync(string: string | RegexEngineString, startPosition: number): IOnigMatch | null;
45
39
  }
46
40
  /**
47
41
  * Use the modern JavaScript RegExp engine to implement the OnigScanner.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PatternScanner, RegexEngineString, RegexEngine } from '@shikijs/types';
2
+ import { IOnigMatch } from '@shikijs/vscode-textmate';
2
3
 
3
4
  interface JavaScriptRegexEngineOptions {
4
5
  /**
@@ -34,14 +35,7 @@ declare class JavaScriptScanner implements PatternScanner {
34
35
  regexps: (RegExp | null)[];
35
36
  contiguousAnchorSimulation: boolean[];
36
37
  constructor(patterns: string[], options?: JavaScriptRegexEngineOptions);
37
- findNextMatchSync(string: string | RegexEngineString, startPosition: number): {
38
- index: number;
39
- captureIndices: {
40
- end: number;
41
- start: number;
42
- length: number;
43
- }[];
44
- } | null;
38
+ findNextMatchSync(string: string | RegexEngineString, startPosition: number): IOnigMatch | null;
45
39
  }
46
40
  /**
47
41
  * Use the modern JavaScript RegExp engine to implement the OnigScanner.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/engine-javascript",
3
3
  "type": "module",
4
- "version": "1.17.6",
4
+ "version": "1.18.0",
5
5
  "description": "Engine for Shiki using JavaScript's native RegExp",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "bugs": "https://github.com/shikijs/shiki/issues",
15
15
  "keywords": [
16
16
  "shiki",
17
- "@shikijs/transformers"
17
+ "shiki-engine"
18
18
  ],
19
19
  "sideEffects": false,
20
20
  "exports": {
@@ -30,8 +30,9 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
+ "@shikijs/vscode-textmate": "^9.2.2",
33
34
  "oniguruma-to-js": "0.4.3",
34
- "@shikijs/types": "1.17.6"
35
+ "@shikijs/types": "1.18.0"
35
36
  },
36
37
  "scripts": {
37
38
  "build": "unbuild",