supercov 0.0.12 → 0.0.13
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/README.md
CHANGED
|
@@ -195,7 +195,7 @@ producing a plausible but invalid aggregate.
|
|
|
195
195
|
For a JavaScript or TypeScript project, the CLI:
|
|
196
196
|
|
|
197
197
|
1. refreshes a stable isolated source namespace under
|
|
198
|
-
|
|
198
|
+
`.supercov/cache/workspace/<project>/`, links the existing
|
|
199
199
|
dependency tree, and creates generated runner configuration and build output
|
|
200
200
|
only there; file data uses copy-on-write reflinks where the filesystem
|
|
201
201
|
supports them, and falls back to copying where it does not; the stable path
|
|
@@ -228,7 +228,7 @@ For a JavaScript or TypeScript project, the CLI:
|
|
|
228
228
|
rebuilt afterward.
|
|
229
229
|
|
|
230
230
|
Only the Supercov-owned `.supercov/` run store and marker-protected
|
|
231
|
-
|
|
231
|
+
`.supercov/cache/workspace/` cache are modified in the user's checkout. A user-created
|
|
232
232
|
`supercov/` directory without Supercov's ownership marker is never treated as
|
|
233
233
|
storage. A per-project lock rejects overlapping runs before either can build. Run state is durably written
|
|
234
234
|
through preparing/building/testing/publishing phases; SIGINT, SIGTERM,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supercov",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Zero-edit, runner-aware coverage completeness for JavaScript test suites",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"prepublishOnly": "npm run release:check"
|
|
64
64
|
},
|
|
65
65
|
"optionalDependencies": {
|
|
66
|
-
"@supercov/cli-darwin-arm64": "0.0.
|
|
67
|
-
"@supercov/cli-darwin-x64": "0.0.
|
|
68
|
-
"@supercov/cli-linux-arm64-gnu": "0.0.
|
|
69
|
-
"@supercov/cli-linux-arm64-musl": "0.0.
|
|
70
|
-
"@supercov/cli-linux-x64-gnu": "0.0.
|
|
71
|
-
"@supercov/cli-linux-x64-musl": "0.0.
|
|
66
|
+
"@supercov/cli-darwin-arm64": "0.0.13",
|
|
67
|
+
"@supercov/cli-darwin-x64": "0.0.13",
|
|
68
|
+
"@supercov/cli-linux-arm64-gnu": "0.0.13",
|
|
69
|
+
"@supercov/cli-linux-arm64-musl": "0.0.13",
|
|
70
|
+
"@supercov/cli-linux-x64-gnu": "0.0.13",
|
|
71
|
+
"@supercov/cli-linux-x64-musl": "0.0.13"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@playwright/test": ">=1.55.0",
|
|
@@ -16,6 +16,7 @@ const patchedBuilders = new WeakSet();
|
|
|
16
16
|
const exportedValues = new WeakSet();
|
|
17
17
|
const capabilityProxies = new WeakMap();
|
|
18
18
|
const importedCapabilityProxies = new WeakMap();
|
|
19
|
+
const importedMemberProxies = new WeakMap();
|
|
19
20
|
let installed = false;
|
|
20
21
|
let remoteLaunchSequence = 0;
|
|
21
22
|
function executionLogPath(path) {
|
|
@@ -227,6 +228,43 @@ function wrapResult(value, mapping) {
|
|
|
227
228
|
return value.then((result) => wrapCapabilityObject(result, mapping));
|
|
228
229
|
return wrapCapabilityObject(value, mapping);
|
|
229
230
|
}
|
|
231
|
+
|
|
232
|
+
// A Proxy `get` trap must return the exact value of a non-configurable,
|
|
233
|
+
// non-writable own data property (and `undefined` for a non-configurable
|
|
234
|
+
// accessor without a getter). Constructors commonly expose `prototype` this
|
|
235
|
+
// way. Returning another capability proxy is a TypeError before user code can
|
|
236
|
+
// run, as seen with PrismaSessionStorage during an Essential Apps VM bake.
|
|
237
|
+
function fixedProxyValue(target, property) {
|
|
238
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
|
|
239
|
+
if (!descriptor || descriptor.configurable)
|
|
240
|
+
return { fixed: false };
|
|
241
|
+
if ("value" in descriptor && !descriptor.writable)
|
|
242
|
+
return { fixed: true, value: descriptor.value };
|
|
243
|
+
if (!("value" in descriptor) && descriptor.get === undefined)
|
|
244
|
+
return { fixed: true, value: undefined };
|
|
245
|
+
return { fixed: false };
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function wrapImportedMember(member, receiver, invoke) {
|
|
249
|
+
let members = importedMemberProxies.get(receiver);
|
|
250
|
+
if (!members) {
|
|
251
|
+
members = new WeakMap();
|
|
252
|
+
importedMemberProxies.set(receiver, members);
|
|
253
|
+
}
|
|
254
|
+
const cached = members.get(member);
|
|
255
|
+
if (cached)
|
|
256
|
+
return cached;
|
|
257
|
+
const proxy = new Proxy(member, {
|
|
258
|
+
apply(target, _thisArgument, args) {
|
|
259
|
+
return invoke(target, receiver, args);
|
|
260
|
+
},
|
|
261
|
+
construct(target, args, newTarget) {
|
|
262
|
+
return wrapImportedCapability(Reflect.construct(target, args, newTarget));
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
members.set(member, proxy);
|
|
266
|
+
return proxy;
|
|
267
|
+
}
|
|
230
268
|
/**
|
|
231
269
|
* A remote SDK can hide its first executable launch inside a configuration
|
|
232
270
|
* callback (for example an image warmup hook). Decorate callbacks in ordinary
|
|
@@ -287,6 +325,9 @@ export function wrapCapabilityObject(value, mapping) {
|
|
|
287
325
|
return cached;
|
|
288
326
|
const proxy = new Proxy(object, {
|
|
289
327
|
get(target, property) {
|
|
328
|
+
const fixed = fixedProxyValue(target, property);
|
|
329
|
+
if (fixed.fixed)
|
|
330
|
+
return fixed.value;
|
|
290
331
|
// Use the real target as the receiver so SDK getters backed by private
|
|
291
332
|
// fields keep their brand check. Method calls are likewise bound below.
|
|
292
333
|
const member = Reflect.get(target, property, target);
|
|
@@ -362,10 +403,13 @@ export function wrapImportedCapability(value) {
|
|
|
362
403
|
};
|
|
363
404
|
const proxy = new Proxy(object, {
|
|
364
405
|
get(target, property) {
|
|
406
|
+
const fixed = fixedProxyValue(target, property);
|
|
407
|
+
if (fixed.fixed)
|
|
408
|
+
return fixed.value;
|
|
365
409
|
const member = Reflect.get(target, property, target);
|
|
366
410
|
if (typeof member !== "function")
|
|
367
411
|
return wrapImportedCapability(member);
|
|
368
|
-
return (
|
|
412
|
+
return wrapImportedMember(member, target, invoke);
|
|
369
413
|
},
|
|
370
414
|
...(typeof value === "function"
|
|
371
415
|
? {
|
|
@@ -16,7 +16,9 @@ installLaunchSupervisor();
|
|
|
16
16
|
// run and periodically reports public active-resource types. This deliberately
|
|
17
17
|
// uses no Unix signal: a launch tree may contain uninstrumented Node children,
|
|
18
18
|
// and signalling one would terminate a healthy command by default.
|
|
19
|
-
|
|
19
|
+
const verboseDiagnostics = [process.env.SUPERCOV_VERBOSE, process.env.SUPERCOV_DEBUG]
|
|
20
|
+
.some(value => value === "1" || value === "true" || value === "yes");
|
|
21
|
+
if (verboseDiagnostics && !process.__SUPERCOV_DIAGNOSTIC_REPORTER__) {
|
|
20
22
|
process.__SUPERCOV_DIAGNOSTIC_REPORTER__ = true;
|
|
21
23
|
const ownerFile = process.env.SUPERCOV_DIAGNOSTIC_OWNER_FILE;
|
|
22
24
|
let ownerDescriptor;
|