@shikijs/engine-oniguruma 3.1.0 → 3.2.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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -11
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -52,8 +52,7 @@ async function main(init) {
52
52
  function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead = 1024) {
53
53
  const endIdx = idx + maxBytesToRead;
54
54
  let endPtr = idx;
55
- while (heapOrArray[endPtr] && !(endPtr >= endIdx))
56
- ++endPtr;
55
+ while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
57
56
  if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
58
57
  return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
59
58
  }
@@ -110,10 +109,7 @@ async function main(init) {
110
109
 
111
110
  var __defProp = Object.defineProperty;
112
111
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
113
- var __publicField = (obj, key, value) => {
114
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
115
- return value;
116
- };
112
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
117
113
  let onigBinding = null;
118
114
  function throwLastOnigError(onigBinding2) {
119
115
  throw new ShikiError(onigBinding2.UTF8ToString(onigBinding2.getLastOnigError()));
@@ -229,7 +225,7 @@ class UtfString {
229
225
  return result;
230
226
  }
231
227
  }
232
- const _OnigString = class {
228
+ const _OnigString = class _OnigString {
233
229
  constructor(str) {
234
230
  __publicField(this, "id", ++_OnigString.LAST_ID);
235
231
  __publicField(this, "_onigBinding");
@@ -285,11 +281,11 @@ const _OnigString = class {
285
281
  this._onigBinding.ofree(this.ptr);
286
282
  }
287
283
  };
288
- let OnigString = _OnigString;
289
- __publicField(OnigString, "LAST_ID", 0);
290
- __publicField(OnigString, "_sharedPtr", 0);
284
+ __publicField(_OnigString, "LAST_ID", 0);
285
+ __publicField(_OnigString, "_sharedPtr", 0);
291
286
  // a pointer to a string of 10000 bytes
292
- __publicField(OnigString, "_sharedPtrInUse", false);
287
+ __publicField(_OnigString, "_sharedPtrInUse", false);
288
+ let OnigString = _OnigString;
293
289
  class OnigScanner {
294
290
  constructor(patterns) {
295
291
  __publicField(this, "_onigBinding");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/engine-oniguruma",
3
3
  "type": "module",
4
- "version": "3.1.0",
4
+ "version": "3.2.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",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@shikijs/vscode-textmate": "^10.0.2",
33
- "@shikijs/types": "3.1.0"
33
+ "@shikijs/types": "3.2.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "vscode-oniguruma": "1.7.0"