@shikijs/engine-oniguruma 1.19.0 → 1.20.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 +5 -1
- package/dist/index.mjs +8 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -11,6 +11,10 @@ declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
|
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
13
|
declare function getDefaultWasmLoader(): LoadWasmOptions | undefined;
|
|
14
|
+
declare function createOnigurumaEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
15
|
+
/**
|
|
16
|
+
* Deprecated. Use `createOnigurumaEngine` instead.
|
|
17
|
+
*/
|
|
14
18
|
declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
15
19
|
|
|
16
|
-
export { createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
|
20
|
+
export { createOnigurumaEngine, createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
package/dist/index.mjs
CHANGED
|
@@ -483,7 +483,7 @@ function setDefaultWasmLoader(_loader) {
|
|
|
483
483
|
function getDefaultWasmLoader() {
|
|
484
484
|
return _defaultWasmLoader;
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function createOnigurumaEngine(options) {
|
|
487
487
|
if (options)
|
|
488
488
|
await loadWasm(options);
|
|
489
489
|
return {
|
|
@@ -495,5 +495,11 @@ async function createWasmOnigEngine(options) {
|
|
|
495
495
|
},
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Deprecated. Use `createOnigurumaEngine` instead.
|
|
500
|
+
*/
|
|
501
|
+
async function createWasmOnigEngine(options) {
|
|
502
|
+
return createOnigurumaEngine(options);
|
|
503
|
+
}
|
|
498
504
|
|
|
499
|
-
export { createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
|
505
|
+
export { createOnigurumaEngine, createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/engine-oniguruma",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.20.0",
|
|
5
5
|
"description": "Engine for Shiki using Oniguruma RegExp engine in WebAssembly",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@shikijs/vscode-textmate": "^9.2.2",
|
|
50
|
-
"@shikijs/types": "1.
|
|
50
|
+
"@shikijs/types": "1.20.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"vscode-oniguruma": "^1.7.0"
|