@volter/tabnode 0.5.31 → 0.5.32

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.
@@ -21136,10 +21136,17 @@ var implementation$1 = function bind2(that) {
21136
21136
  var implementation = implementation$1;
21137
21137
  var functionBind = Function.prototype.bind || implementation;
21138
21138
  var functionCall = Function.prototype.call;
21139
- var functionApply = Function.prototype.apply;
21139
+ var functionApply;
21140
+ var hasRequiredFunctionApply;
21141
+ function requireFunctionApply() {
21142
+ if (hasRequiredFunctionApply) return functionApply;
21143
+ hasRequiredFunctionApply = 1;
21144
+ functionApply = Function.prototype.apply;
21145
+ return functionApply;
21146
+ }
21140
21147
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
21141
21148
  var bind$2 = functionBind;
21142
- var $apply$1 = functionApply;
21149
+ var $apply$1 = requireFunctionApply();
21143
21150
  var $call$2 = functionCall;
21144
21151
  var $reflectApply = reflectApply;
21145
21152
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -21259,7 +21266,7 @@ var hasSymbols = requireHasSymbols()();
21259
21266
  var getProto = requireGetProto();
21260
21267
  var $ObjectGPO = requireObject_getPrototypeOf();
21261
21268
  var $ReflectGPO = requireReflect_getPrototypeOf();
21262
- var $apply = functionApply;
21269
+ var $apply = requireFunctionApply();
21263
21270
  var $call = functionCall;
21264
21271
  var needsEval = {};
21265
21272
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -21900,7 +21907,7 @@ function requireApplyBind() {
21900
21907
  if (hasRequiredApplyBind) return applyBind;
21901
21908
  hasRequiredApplyBind = 1;
21902
21909
  var bind3 = functionBind;
21903
- var $apply2 = functionApply;
21910
+ var $apply2 = requireFunctionApply();
21904
21911
  var actualApply$1 = actualApply;
21905
21912
  applyBind = function applyBind2() {
21906
21913
  return actualApply$1(bind3, $apply2, arguments);
@@ -79665,6 +79672,17 @@ function createRequire(vfs2, fsShim, process2, currentDir, moduleCache, options,
79665
79672
  runModuleBody(module, vfs2.readFileSync(prepared, "utf8"), resolvedPath, dirname$1, true);
79666
79673
  return module;
79667
79674
  }
79675
+ if (prepared) {
79676
+ const body = __substrateScopeGlobalCalls(prepareModuleCode(rawCode, resolvedPath));
79677
+ try {
79678
+ const partial = `${prepared}.${process2.pid}.partial`;
79679
+ vfs2.writeFileSync(partial, body);
79680
+ vfs2.renameSync(partial, prepared);
79681
+ } catch {
79682
+ }
79683
+ runModuleBody(module, body, resolvedPath, dirname$1, true);
79684
+ return module;
79685
+ }
79668
79686
  }
79669
79687
  runModuleBody(module, prepareModuleCode(rawCode, resolvedPath, format2), resolvedPath, dirname$1);
79670
79688
  return module;
package/dist/index.mjs CHANGED
@@ -21284,10 +21284,17 @@ var implementation$1 = function bind2(that) {
21284
21284
  var implementation = implementation$1;
21285
21285
  var functionBind = Function.prototype.bind || implementation;
21286
21286
  var functionCall = Function.prototype.call;
21287
- var functionApply = Function.prototype.apply;
21287
+ var functionApply;
21288
+ var hasRequiredFunctionApply;
21289
+ function requireFunctionApply() {
21290
+ if (hasRequiredFunctionApply) return functionApply;
21291
+ hasRequiredFunctionApply = 1;
21292
+ functionApply = Function.prototype.apply;
21293
+ return functionApply;
21294
+ }
21288
21295
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
21289
21296
  var bind$2 = functionBind;
21290
- var $apply$1 = functionApply;
21297
+ var $apply$1 = requireFunctionApply();
21291
21298
  var $call$2 = functionCall;
21292
21299
  var $reflectApply = reflectApply;
21293
21300
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -21407,7 +21414,7 @@ var hasSymbols = requireHasSymbols()();
21407
21414
  var getProto = requireGetProto();
21408
21415
  var $ObjectGPO = requireObject_getPrototypeOf();
21409
21416
  var $ReflectGPO = requireReflect_getPrototypeOf();
21410
- var $apply = functionApply;
21417
+ var $apply = requireFunctionApply();
21411
21418
  var $call = functionCall;
21412
21419
  var needsEval = {};
21413
21420
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -22048,7 +22055,7 @@ function requireApplyBind() {
22048
22055
  if (hasRequiredApplyBind) return applyBind;
22049
22056
  hasRequiredApplyBind = 1;
22050
22057
  var bind3 = functionBind;
22051
- var $apply2 = functionApply;
22058
+ var $apply2 = requireFunctionApply();
22052
22059
  var actualApply$1 = actualApply;
22053
22060
  applyBind = function applyBind2() {
22054
22061
  return actualApply$1(bind3, $apply2, arguments);
@@ -39326,6 +39333,17 @@ function createRequire(vfs2, fsShim, process2, currentDir, moduleCache, options,
39326
39333
  runModuleBody(module, vfs2.readFileSync(prepared, "utf8"), resolvedPath, dirname$1, true);
39327
39334
  return module;
39328
39335
  }
39336
+ if (prepared) {
39337
+ const body = __substrateScopeGlobalCalls(prepareModuleCode(rawCode, resolvedPath));
39338
+ try {
39339
+ const partial = `${prepared}.${process2.pid}.partial`;
39340
+ vfs2.writeFileSync(partial, body);
39341
+ vfs2.renameSync(partial, prepared);
39342
+ } catch {
39343
+ }
39344
+ runModuleBody(module, body, resolvedPath, dirname$1, true);
39345
+ return module;
39346
+ }
39329
39347
  }
39330
39348
  runModuleBody(module, prepareModuleCode(rawCode, resolvedPath, format2), resolvedPath, dirname$1);
39331
39349
  return module;
@@ -40218,7 +40236,7 @@ class WorkerRuntime {
40218
40236
  this.worker = new Worker(
40219
40237
  new URL(
40220
40238
  /* @vite-ignore */
40221
- "/assets/runtime-worker-CvLlu5oq.js",
40239
+ "/assets/runtime-worker-g2I0tMiC.js",
40222
40240
  import.meta.url
40223
40241
  ),
40224
40242
  { type: "module" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/tabnode",
3
- "version": "0.5.31",
3
+ "version": "0.5.32",
4
4
  "description": "Node's own library, in a browser tab.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/runtime.ts CHANGED
@@ -1997,6 +1997,20 @@ function createRequire(
1997
1997
  runModuleBody(module, vfs.readFileSync(prepared, 'utf8'), resolvedPath, dirname, true);
1998
1998
  return module;
1999
1999
  }
2000
+ // A file the image carries no body for (a package installed in the
2001
+ // tab) is prepared here once and kept under the same name, so the next
2002
+ // process takes it: every Playwright test worker required
2003
+ // playwright-core afresh, 28 s each, measured in a tab.
2004
+ if (prepared) {
2005
+ const body = __substrateScopeGlobalCalls(prepareModuleCode(rawCode, resolvedPath));
2006
+ try {
2007
+ const partial = `${prepared}.${process.pid}.partial`;
2008
+ vfs.writeFileSync(partial, body);
2009
+ vfs.renameSync(partial, prepared);
2010
+ } catch { /* a process that may not write there prepares its own */ }
2011
+ runModuleBody(module, body, resolvedPath, dirname, true);
2012
+ return module;
2013
+ }
2000
2014
  }
2001
2015
  runModuleBody(module, prepareModuleCode(rawCode, resolvedPath, format), resolvedPath, dirname);
2002
2016
  return module;