@agoric/xsnap 0.14.3-dev-eb7e9eb.0 → 0.14.3-dev-3ce0599.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/xsnap",
3
- "version": "0.14.3-dev-eb7e9eb.0+eb7e9eb",
3
+ "version": "0.14.3-dev-3ce0599.0+3ce0599",
4
4
  "description": "Description forthcoming.",
5
5
  "author": "Agoric",
6
6
  "license": "Apache-2.0",
@@ -27,9 +27,9 @@
27
27
  "test:xs": "exit 0"
28
28
  },
29
29
  "dependencies": {
30
- "@agoric/assert": "0.6.1-dev-eb7e9eb.0+eb7e9eb",
31
- "@agoric/internal": "0.3.3-dev-eb7e9eb.0+eb7e9eb",
32
- "@agoric/xsnap-lockdown": "0.14.1-dev-eb7e9eb.0+eb7e9eb",
30
+ "@agoric/assert": "0.6.1-dev-3ce0599.0+3ce0599",
31
+ "@agoric/internal": "0.3.3-dev-3ce0599.0+3ce0599",
32
+ "@agoric/xsnap-lockdown": "0.14.1-dev-3ce0599.0+3ce0599",
33
33
  "@endo/bundle-source": "^2.5.2",
34
34
  "@endo/eventual-send": "^0.17.3",
35
35
  "@endo/init": "^0.5.57",
@@ -59,8 +59,11 @@
59
59
  "files": [
60
60
  "test/**/test-*.js"
61
61
  ],
62
+ "require": [
63
+ "@endo/init/debug.js"
64
+ ],
62
65
  "timeout": "2m",
63
66
  "workerThreads": false
64
67
  },
65
- "gitHead": "eb7e9ebe52e78052e5ded601b6658896d257cab4"
68
+ "gitHead": "3ce0599d5173b802598b5bedf57d3c30f016f789"
66
69
  }
package/src/xsnap.js CHANGED
@@ -152,7 +152,7 @@ export async function xsnap(options) {
152
152
  sourceStream.pipe(destStream, { end: false });
153
153
 
154
154
  done = finished(sourceStream);
155
- done.catch(noop).then(() => sourceStream.unpipe(destStream));
155
+ void done.catch(noop).then(() => sourceStream.unpipe(destStream));
156
156
  };
157
157
 
158
158
  return harden({
@@ -258,7 +258,7 @@ export async function xsnap(options) {
258
258
  await loadSnapshotHandler?.afterSpawn(snapshotLoadStream);
259
259
 
260
260
  if (loadSnapshotHandler) {
261
- vatExit.promise.catch(noop).then(() => {
261
+ void vatExit.promise.catch(noop).then(() => {
262
262
  if (loadSnapshotHandler) {
263
263
  const { cleanup } = loadSnapshotHandler;
264
264
  loadSnapshotHandler = undefined;
@@ -458,10 +458,13 @@ export async function xsnap(options) {
458
458
  const handle = await fs.open(snapPath, 'w+');
459
459
  // @ts-expect-error 'close' event added in Node 15.4
460
460
  handle.on('close', () => {
461
- fs.unlink(snapPath);
461
+ // Safe to ignore the result because we are skipping to to clean up the temp directory.
462
+ void fs.unlink(snapPath);
462
463
  });
463
464
  sourceStream = handle.createReadStream();
464
- finished(output).finally(() => sourceStream.destroy());
465
+ finished(output)
466
+ .finally(() => sourceStream.destroy())
467
+ .catch(noop);
465
468
  } else {
466
469
  sourceStream = snapshotSaveStream;
467
470
  snapPath = `@${SNAPSHOT_SAVE_FD}`;
@@ -470,7 +473,7 @@ export async function xsnap(options) {
470
473
  // ensuring that any previous save stream usage has ended. However we
471
474
  // must start the flow before receiving the command's response or the
472
475
  // xsnap process would block on a full pipe, causing an IPC deadlock.
473
- batonKit.promise.then(maybePipe);
476
+ batonKit.promise.then(maybePipe, noop);
474
477
  }
475
478
 
476
479
  const cleanup = () => {
package/src/xsrepl.js CHANGED
@@ -97,4 +97,4 @@ async function main() {
97
97
  return vat.close();
98
98
  }
99
99
 
100
- main();
100
+ await main().catch(err => console.log(err));