@agoric/xsnap 0.14.3-dev-a1aec5d.0.a1aec5d → 0.14.3-dev-2da8e5c.0.2da8e5c
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/package.json +4 -4
- package/src/ava-xs.js +13 -1
- package/src/avaAssertXS.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/xsnap",
|
|
3
|
-
"version": "0.14.3-dev-
|
|
3
|
+
"version": "0.14.3-dev-2da8e5c.0.2da8e5c",
|
|
4
4
|
"description": "Snapshotting VM worker based on Moddable's XS Javascript engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test:xs": "exit 0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@agoric/xsnap-lockdown": "0.14.1-dev-
|
|
33
|
+
"@agoric/xsnap-lockdown": "0.14.1-dev-2da8e5c.0.2da8e5c",
|
|
34
34
|
"@endo/bundle-source": "^4.1.2",
|
|
35
35
|
"@endo/errors": "^1.2.13",
|
|
36
36
|
"@endo/eventual-send": "^1.3.4",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tmp": "^0.2.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@agoric/internal": "0.3.3-dev-
|
|
46
|
+
"@agoric/internal": "0.3.3-dev-2da8e5c.0.2da8e5c",
|
|
47
47
|
"@endo/base64": "^1.0.12",
|
|
48
48
|
"@endo/nat": "^5.1.3",
|
|
49
49
|
"ava": "^7.0.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": "^20.9 || ^22.11"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "2da8e5ce15f4ccc3b25a87ea32954aec37eae2cb"
|
|
79
79
|
}
|
package/src/ava-xs.js
CHANGED
|
@@ -5,11 +5,23 @@ import { spawn } from 'node:child_process';
|
|
|
5
5
|
import { type as osType } from 'node:os';
|
|
6
6
|
import { promises as fsp } from 'node:fs';
|
|
7
7
|
import path from 'node:path';
|
|
8
|
-
import
|
|
8
|
+
import globCallback from 'glob';
|
|
9
9
|
import bundleSource from '@endo/bundle-source';
|
|
10
10
|
|
|
11
11
|
import { main, makeBundleResolve } from './avaXS.js';
|
|
12
12
|
|
|
13
|
+
/** @type {(pattern: string) => Promise<string[]>} */
|
|
14
|
+
const glob = pattern =>
|
|
15
|
+
new Promise((resolve, reject) => {
|
|
16
|
+
globCallback(pattern, (err, matches) => {
|
|
17
|
+
if (err) {
|
|
18
|
+
reject(err);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
resolve(matches);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
13
25
|
Promise.resolve()
|
|
14
26
|
.then(_ =>
|
|
15
27
|
main(process.argv.slice(2), {
|
package/src/avaAssertXS.js
CHANGED
|
@@ -5,7 +5,6 @@ const { assign, freeze, keys } = Object;
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* deep equal value comparison
|
|
8
|
-
* XXX broken https://github.com/Agoric/agoric-sdk/pull/5398
|
|
9
8
|
*
|
|
10
9
|
* originally based on code from Paul Roub Aug 2014
|
|
11
10
|
* https://stackoverflow.com/a/25456134/7963
|
|
@@ -42,8 +41,9 @@ function deepDifference(x, y) {
|
|
|
42
41
|
Reflect.apply(hasOwnProperty, obj, [prop]);
|
|
43
42
|
for (const prop of Reflect.ownKeys(x)) {
|
|
44
43
|
if (hasOwnPropertyOf(y, prop)) {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const delta = deepDifference(x[prop], y[prop]);
|
|
45
|
+
if (delta) {
|
|
46
|
+
return delta;
|
|
47
47
|
}
|
|
48
48
|
} else {
|
|
49
49
|
return { actual: { extraProperty: prop } };
|