@volter/tabnode 0.5.30 → 0.5.31

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.
@@ -17671,11 +17671,9 @@ class Zlib {
17671
17671
  __privateMethod(this, _Zlib_instances, run_fn).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17672
17672
  (_a4 = __privateGet(this, _callback)) == null ? void 0 : _a4.call(this);
17673
17673
  });
17674
- return this;
17675
17674
  }
17676
17675
  writeSync(flush2, inBuf, inOff, inLen, outBuf, outOff, outLen) {
17677
17676
  __privateMethod(this, _Zlib_instances, run_fn).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17678
- return this;
17679
17677
  }
17680
17678
  /**
17681
17679
  * `deflateParams` mid-stream. pako's deflate does not carry it, so the
@@ -17844,11 +17842,9 @@ class BrotliDecoderHandle {
17844
17842
  __privateMethod(this, _BrotliDecoderHandle_instances, run_fn2).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17845
17843
  (_a4 = __privateGet(this, _callback2)) == null ? void 0 : _a4.call(this);
17846
17844
  });
17847
- return this;
17848
17845
  }
17849
17846
  writeSync(flush2, inBuf, inOff, inLen, outBuf, outOff, outLen) {
17850
17847
  __privateMethod(this, _BrotliDecoderHandle_instances, run_fn2).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17851
- return this;
17852
17848
  }
17853
17849
  params() {
17854
17850
  }
@@ -21140,17 +21136,10 @@ var implementation$1 = function bind2(that) {
21140
21136
  var implementation = implementation$1;
21141
21137
  var functionBind = Function.prototype.bind || implementation;
21142
21138
  var functionCall = Function.prototype.call;
21143
- var functionApply;
21144
- var hasRequiredFunctionApply;
21145
- function requireFunctionApply() {
21146
- if (hasRequiredFunctionApply) return functionApply;
21147
- hasRequiredFunctionApply = 1;
21148
- functionApply = Function.prototype.apply;
21149
- return functionApply;
21150
- }
21139
+ var functionApply = Function.prototype.apply;
21151
21140
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
21152
21141
  var bind$2 = functionBind;
21153
- var $apply$1 = requireFunctionApply();
21142
+ var $apply$1 = functionApply;
21154
21143
  var $call$2 = functionCall;
21155
21144
  var $reflectApply = reflectApply;
21156
21145
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -21270,7 +21259,7 @@ var hasSymbols = requireHasSymbols()();
21270
21259
  var getProto = requireGetProto();
21271
21260
  var $ObjectGPO = requireObject_getPrototypeOf();
21272
21261
  var $ReflectGPO = requireReflect_getPrototypeOf();
21273
- var $apply = requireFunctionApply();
21262
+ var $apply = functionApply;
21274
21263
  var $call = functionCall;
21275
21264
  var needsEval = {};
21276
21265
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -21911,7 +21900,7 @@ function requireApplyBind() {
21911
21900
  if (hasRequiredApplyBind) return applyBind;
21912
21901
  hasRequiredApplyBind = 1;
21913
21902
  var bind3 = functionBind;
21914
- var $apply2 = requireFunctionApply();
21903
+ var $apply2 = functionApply;
21915
21904
  var actualApply$1 = actualApply;
21916
21905
  applyBind = function applyBind2() {
21917
21906
  return actualApply$1(bind3, $apply2, arguments);
package/dist/index.mjs CHANGED
@@ -17799,11 +17799,9 @@ class Zlib {
17799
17799
  __privateMethod(this, _Zlib_instances, run_fn).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17800
17800
  (_a3 = __privateGet(this, _callback)) == null ? void 0 : _a3.call(this);
17801
17801
  });
17802
- return this;
17803
17802
  }
17804
17803
  writeSync(flush2, inBuf, inOff, inLen, outBuf, outOff, outLen) {
17805
17804
  __privateMethod(this, _Zlib_instances, run_fn).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17806
- return this;
17807
17805
  }
17808
17806
  /**
17809
17807
  * `deflateParams` mid-stream. pako's deflate does not carry it, so the
@@ -17972,11 +17970,9 @@ class BrotliDecoderHandle {
17972
17970
  __privateMethod(this, _BrotliDecoderHandle_instances, run_fn2).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17973
17971
  (_a3 = __privateGet(this, _callback2)) == null ? void 0 : _a3.call(this);
17974
17972
  });
17975
- return this;
17976
17973
  }
17977
17974
  writeSync(flush2, inBuf, inOff, inLen, outBuf, outOff, outLen) {
17978
17975
  __privateMethod(this, _BrotliDecoderHandle_instances, run_fn2).call(this, flush2, inBuf, inOff, inLen, outBuf, outOff, outLen);
17979
- return this;
17980
17976
  }
17981
17977
  params() {
17982
17978
  }
@@ -40222,7 +40218,7 @@ class WorkerRuntime {
40222
40218
  this.worker = new Worker(
40223
40219
  new URL(
40224
40220
  /* @vite-ignore */
40225
- "/assets/runtime-worker-Dv_vTkXr.js",
40221
+ "/assets/runtime-worker-CvLlu5oq.js",
40226
40222
  import.meta.url
40227
40223
  ),
40228
40224
  { type: "module" }
@@ -11,8 +11,8 @@ export declare class Zlib {
11
11
  onerror: ((message: string, errno: number, code?: string) => void) | null;
12
12
  constructor(mode: number);
13
13
  init(windowBits: number, level: number, memLevel: number, strategy: number, writeState: Uint32Array, processCallback: ProcessCallback, dictionary?: Uint8Array): void;
14
- write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this;
15
- writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this;
14
+ write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void;
15
+ writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void;
16
16
  /**
17
17
  * `deflateParams` mid-stream. pako's deflate does not carry it, so the
18
18
  * level and strategy are taken by starting the stream again -- which is
@@ -31,8 +31,8 @@ declare class BrotliDecoderHandle {
31
31
  onerror: ((message: string, errno: number, code?: string) => void) | null;
32
32
  constructor(mode: number);
33
33
  init(_params: Uint32Array, writeState: Uint32Array, processCallback: ProcessCallback): boolean;
34
- write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this;
35
- writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this;
34
+ write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void;
35
+ writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void;
36
36
  params(): void;
37
37
  reset(): void;
38
38
  close(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/tabnode",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "description": "Node's own library, in a browser tab.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -163,7 +163,7 @@ export class Zlib {
163
163
  write(
164
164
  flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number,
165
165
  outBuf: Uint8Array, outOff: number, outLen: number,
166
- ): this {
166
+ ): void {
167
167
  // Node's own binding does this work on the thread pool and calls back;
168
168
  // a tab has one thread, so the work is done here and the callback is the
169
169
  // next tick, which is the difference a program can observe.
@@ -173,15 +173,15 @@ export class Zlib {
173
173
  this.#run(flush, inBuf, inOff, inLen, outBuf, outOff, outLen);
174
174
  this.#callback?.();
175
175
  });
176
- return this;
177
176
  }
178
177
 
179
178
  writeSync(
180
179
  flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number,
181
180
  outBuf: Uint8Array, outOff: number, outLen: number,
182
- ): this {
181
+ ): void {
182
+ // Node's binding returns nothing: the answer is the shared pair, and
183
+ // pngjs's `res || this._writeState` reads a returned value in its place.
183
184
  this.#run(flush, inBuf, inOff, inLen, outBuf, outOff, outLen);
184
- return this;
185
185
  }
186
186
 
187
187
  /**
@@ -292,19 +292,17 @@ class BrotliDecoderHandle {
292
292
  }
293
293
  }
294
294
 
295
- write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this {
295
+ write(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void {
296
296
  const tick = (globalThis as { process?: { nextTick?: (fn: () => void) => void } }).process?.nextTick
297
297
  ?? ((fn: () => void) => { queueMicrotask(fn); });
298
298
  tick(() => {
299
299
  this.#run(flush, inBuf, inOff, inLen, outBuf, outOff, outLen);
300
300
  this.#callback?.();
301
301
  });
302
- return this;
303
302
  }
304
303
 
305
- writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): this {
304
+ writeSync(flush: number, inBuf: Uint8Array | null, inOff: number, inLen: number, outBuf: Uint8Array, outOff: number, outLen: number): void {
306
305
  this.#run(flush, inBuf, inOff, inLen, outBuf, outOff, outLen);
307
- return this;
308
306
  }
309
307
 
310
308
  params(): void {}