@shikijs/engine-oniguruma 3.23.0 → 4.0.1
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/chunk-index.d.d.mts +11 -11
- package/dist/index.mjs +7 -6
- package/package.json +5 -2
package/dist/chunk-index.d.d.mts
CHANGED
|
@@ -40,29 +40,29 @@ interface OnigString {
|
|
|
40
40
|
*/
|
|
41
41
|
type OrMask<T extends number> = number;
|
|
42
42
|
|
|
43
|
+
//#region src/utils.d.ts
|
|
43
44
|
type Awaitable<T> = T | Promise<T>;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
interface RegexEngineString extends OnigString {
|
|
48
|
-
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/engines.d.ts
|
|
47
|
+
interface PatternScanner extends OnigScanner {}
|
|
48
|
+
interface RegexEngineString extends OnigString {}
|
|
49
49
|
/**
|
|
50
50
|
* Engine for RegExp matching and scanning.
|
|
51
51
|
*/
|
|
52
52
|
interface RegexEngine {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
createScanner: (patterns: (string | RegExp)[]) => PatternScanner;
|
|
54
|
+
createString: (s: string) => RegexEngineString;
|
|
55
55
|
}
|
|
56
56
|
interface WebAssemblyInstantiator {
|
|
57
|
-
|
|
57
|
+
(importObject: Record<string, Record<string, WebAssembly.ImportValue>> | undefined): Promise<WebAssemblyInstance>;
|
|
58
58
|
}
|
|
59
59
|
type WebAssemblyInstance = WebAssembly.WebAssemblyInstantiatedSource | WebAssembly.Instance | WebAssembly.Instance['exports'];
|
|
60
60
|
type OnigurumaLoadOptions = {
|
|
61
|
-
|
|
61
|
+
instantiator: WebAssemblyInstantiator;
|
|
62
62
|
} | {
|
|
63
|
-
|
|
63
|
+
default: WebAssemblyInstantiator;
|
|
64
64
|
} | {
|
|
65
|
-
|
|
65
|
+
data: ArrayBufferView | ArrayBuffer | Response;
|
|
66
66
|
};
|
|
67
67
|
type LoadWasmOptionsPlain = OnigurumaLoadOptions | WebAssemblyInstantiator | ArrayBufferView | ArrayBuffer | Response;
|
|
68
68
|
type LoadWasmOptions = Awaitable<LoadWasmOptionsPlain> | (() => Awaitable<LoadWasmOptionsPlain>);
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
//#region src/error.ts
|
|
2
|
+
var ShikiError = class extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "ShikiError";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
7
8
|
|
|
8
9
|
function getHeapMax() {
|
|
9
10
|
return 2147483648;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/engine-oniguruma",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.1",
|
|
5
5
|
"description": "Engine for Shiki using Oniguruma RegExp engine in WebAssembly",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
31
34
|
"dependencies": {
|
|
32
35
|
"@shikijs/vscode-textmate": "^10.0.2",
|
|
33
|
-
"@shikijs/types": "
|
|
36
|
+
"@shikijs/types": "4.0.1"
|
|
34
37
|
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"vscode-oniguruma": "1.7.0"
|