@agoric/xsnap 0.14.3-dev-4989f26.0 → 0.14.3-dev-779b73d.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-4989f26.0+4989f26",
3
+ "version": "0.14.3-dev-779b73d.0+779b73d",
4
4
  "description": "Description forthcoming.",
5
5
  "author": "Agoric",
6
6
  "license": "Apache-2.0",
@@ -26,9 +26,9 @@
26
26
  "test:xs": "exit 0"
27
27
  },
28
28
  "dependencies": {
29
- "@agoric/assert": "0.6.1-dev-4989f26.0+4989f26",
30
- "@agoric/internal": "0.3.3-dev-4989f26.0+4989f26",
31
- "@agoric/xsnap-lockdown": "0.14.1-dev-4989f26.0+4989f26",
29
+ "@agoric/assert": "0.6.1-dev-779b73d.0+779b73d",
30
+ "@agoric/internal": "0.3.3-dev-779b73d.0+779b73d",
31
+ "@agoric/xsnap-lockdown": "0.14.1-dev-779b73d.0+779b73d",
32
32
  "@endo/bundle-source": "^2.5.1",
33
33
  "@endo/eventual-send": "^0.17.2",
34
34
  "@endo/init": "^0.5.56",
@@ -59,5 +59,5 @@
59
59
  "timeout": "2m",
60
60
  "workerThreads": false
61
61
  },
62
- "gitHead": "4989f26753580251326c40fd6a7a7e3b853aff01"
62
+ "gitHead": "779b73d11992c1e00cfe99bfe3444081107a34a1"
63
63
  }
@@ -1,5 +1,4 @@
1
1
  /* global globalThis */
2
- /* eslint-disable no-await-in-loop, @jessie.js/no-nested-await -- test code */
3
2
  /** global print */
4
3
 
5
4
  const { assign, freeze, keys } = Object;
@@ -300,6 +299,7 @@ function makeTester(htest, out) {
300
299
  expectation,
301
300
  message = `should reject like ${expectation}`,
302
301
  ) {
302
+ await null;
303
303
  try {
304
304
  await (typeof thrower === 'function' ? thrower() : thrower);
305
305
  assert(false, message);
@@ -310,6 +310,7 @@ function makeTester(htest, out) {
310
310
  },
311
311
  /** @type {(thrower: () => Promise<unknown>, message?: string) => Promise<void> } */
312
312
  async notThrowsAsync(nonThrower, message) {
313
+ await null;
313
314
  try {
314
315
  await (typeof nonThrower === 'function' ? nonThrower() : nonThrower);
315
316
  } catch (ex) {
@@ -335,6 +336,7 @@ const test = (label, run, htestOpt) => {
335
336
  htest.queue(label, async () => {
336
337
  const out = tapFormat(htest.send);
337
338
  const t = makeTester(htest, out);
339
+ await null;
338
340
  try {
339
341
  // out.diagnostic('start', label);
340
342
  await run(t);
package/src/avaXS.js CHANGED
@@ -6,7 +6,6 @@ Usage:
6
6
 
7
7
  */
8
8
 
9
- /* eslint-disable no-await-in-loop, @jessie.js/no-nested-await -- test code */
10
9
  import '@endo/init';
11
10
 
12
11
  import fs from 'fs';
@@ -129,6 +128,7 @@ async function runTestScript(
129
128
  testNames = msg.testNames;
130
129
  }
131
130
 
131
+ await null;
132
132
  if ('bundleSource' in msg) {
133
133
  const [startFilename, ...rest] = msg.bundleSource;
134
134
  // see also makeBundleResolve() below
@@ -244,6 +244,7 @@ async function avaConfig(args, options, { glob, readFile }) {
244
244
  let debug = false;
245
245
  let verbose = false;
246
246
  let titleMatch;
247
+ await null;
247
248
  while (args.length > 0) {
248
249
  const arg = args.shift();
249
250
  assert.typeof(arg, 'string');
package/src/build.js CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  /* global process */
3
- /* eslint-disable @jessie.js/no-nested-await -- test/build code */
4
3
  import * as childProcessTop from 'child_process';
5
4
  import fsTop from 'fs';
6
5
  import osTop from 'os';
@@ -176,13 +175,13 @@ async function main(args, { env, stdout, spawn, fs, os }) {
176
175
  },
177
176
  ];
178
177
 
178
+ await null;
179
179
  if (args.includes('--show-env')) {
180
180
  for (const submodule of submodules) {
181
181
  const { path, envPrefix, commitHash } = submodule;
182
182
  if (!commitHash) {
183
183
  // We need to glean the commitHash and url from Git.
184
184
  const sm = makeSubmodule(path, '?', { git });
185
- // eslint-disable-next-line no-await-in-loop
186
185
  const [[{ hash }], url] = await Promise.all([
187
186
  sm.status(),
188
187
  sm.config('url'),
@@ -208,13 +207,10 @@ async function main(args, { env, stdout, spawn, fs, os }) {
208
207
  // ignore
209
208
  }
210
209
  if (!fs.existsSync(submodule.path)) {
211
- // eslint-disable-next-line no-await-in-loop
212
210
  await submodule.clone();
213
211
  }
214
- // eslint-disable-next-line no-await-in-loop
215
212
  await submodule.checkout(commitHash);
216
213
  } else {
217
- // eslint-disable-next-line no-await-in-loop
218
214
  await submodule.init();
219
215
  }
220
216
  }
@@ -229,7 +225,6 @@ async function main(args, { env, stdout, spawn, fs, os }) {
229
225
 
230
226
  const make = makeCLI(platform.make || 'make', { spawn });
231
227
  for (const goal of ModdableSDK.buildGoals) {
232
- // eslint-disable-next-line no-await-in-loop
233
228
  await make.run(
234
229
  [
235
230
  `MODDABLE=${ModdableSDK.MODDABLE}`,
package/src/replay.js CHANGED
@@ -227,14 +227,12 @@ export async function replayXSnap(
227
227
  const seq = parseInt(digits, 10);
228
228
  console.log(folder, seq, kind);
229
229
  if (running && !['command', 'reply'].includes(kind)) {
230
- // eslint-disable-next-line @jessie.js/no-nested-await
231
230
  await running;
232
231
  running = undefined;
233
232
  }
234
233
  const file = rd.file(step);
235
234
  switch (kind) {
236
235
  case 'isReady':
237
- // eslint-disable-next-line @jessie.js/no-nested-await
238
236
  await it.isReady();
239
237
  break;
240
238
  case 'evaluate':
@@ -254,7 +252,6 @@ export async function replayXSnap(
254
252
  console.log(folder, step, 'ignoring remaining steps from', folder);
255
253
  return;
256
254
  } else {
257
- // eslint-disable-next-line @jessie.js/no-nested-await
258
255
  await (async () => {
259
256
  const snapshotPath = file.getText();
260
257
  const snapFile = await opts.fs.open(snapshotPath, 'w');
package/src/xsnap.js CHANGED
@@ -119,17 +119,13 @@ export async function xsnap(options) {
119
119
  const cleanup = async () => fs.unlink(snapPath);
120
120
 
121
121
  try {
122
- // eslint-disable-next-line @jessie.js/no-nested-await
123
122
  const tmpSnap = await fs.open(snapPath, 'w');
124
- // eslint-disable-next-line @jessie.js/no-nested-await
125
123
  await tmpSnap.writeFile(
126
124
  // @ts-expect-error incorrect typings, does support AsyncIterable
127
125
  snapshotStream,
128
126
  );
129
- // eslint-disable-next-line @jessie.js/no-nested-await
130
127
  await tmpSnap.close();
131
128
  } catch (e) {
132
- // eslint-disable-next-line @jessie.js/no-nested-await
133
129
  await cleanup();
134
130
  throw e;
135
131
  }
@@ -289,7 +285,6 @@ export async function xsnap(options) {
289
285
  if (loadSnapshotHandler) {
290
286
  const { cleanup } = loadSnapshotHandler;
291
287
  loadSnapshotHandler = undefined;
292
- // eslint-disable-next-line @jessie.js/no-nested-await
293
288
  await cleanup();
294
289
  }
295
290
  if (iteration.done) {
@@ -328,9 +323,7 @@ export async function xsnap(options) {
328
323
  )}`,
329
324
  );
330
325
  } else if (message[0] === QUERY) {
331
- // eslint-disable-next-line @jessie.js/no-nested-await
332
326
  const commandResult = await handleCommand(message.subarray(1));
333
- // eslint-disable-next-line @jessie.js/no-nested-await
334
327
  await messagesToXsnap.next([QUERY_RESPONSE_BUF, commandResult]);
335
328
  } else {
336
329
  // unrecognized responses also kill the process
@@ -429,6 +422,7 @@ export async function xsnap(options) {
429
422
  let snapshotReadSize = 0;
430
423
  /** @type {number | undefined} */
431
424
  let snapshotSize;
425
+ await null;
432
426
  try {
433
427
  /** @type {string} */
434
428
  let snapPath;
@@ -444,7 +438,6 @@ export async function xsnap(options) {
444
438
 
445
439
  if (snapshotUseFs) {
446
440
  // TODO: Refactor to use tmpFile rather than tmpName.
447
- // eslint-disable-next-line @jessie.js/no-nested-await
448
441
  snapPath = await ptmpName({
449
442
  template: `make-snapshot-${safeHintFromDescription(
450
443
  description,
@@ -461,7 +454,6 @@ export async function xsnap(options) {
461
454
  // then wait for the command response to pipe the file stream into the
462
455
  // output, causing the file read to begin.
463
456
 
464
- // eslint-disable-next-line @jessie.js/no-nested-await
465
457
  const handle = await fs.open(snapPath, 'w+');
466
458
  // @ts-expect-error 'close' event added in Node 15.4
467
459
  handle.on('close', () => {
@@ -522,7 +514,6 @@ export async function xsnap(options) {
522
514
 
523
515
  yield* output;
524
516
  } finally {
525
- // eslint-disable-next-line @jessie.js/no-nested-await
526
517
  await done;
527
518
  (piped && snapshotReadSize === snapshotSize) ||
528
519
  Fail`Snapshot size does not match. saved=${q(snapshotSize)}, read=${q(
package/src/xsrepl.js CHANGED
@@ -1,6 +1,5 @@
1
1
  /* global process */
2
2
  /* We make exceptions for test code. This is a test utility. */
3
- /* eslint-disable @jessie.js/no-nested-await */
4
3
  /* eslint no-await-in-loop: ["off"] */
5
4
 
6
5
  import '@endo/init';