Skip to content

Commit

Permalink
refactor: import assert from endo/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Sep 13, 2023
1 parent 4923803 commit 12f678e
Show file tree
Hide file tree
Showing 64 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion packages/ERTP/src/issuerKit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @jessie-check

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { assertPattern } from '@agoric/store';
import { makeScalarBigMapStore } from '@agoric/vat-data';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { buildVatController } from '@agoric/swingset-vat';

const bfile = name => new URL(name, import.meta.url).pathname;
Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/test/unitTests/test-mintObj.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { initEmpty, M } from '@agoric/store';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

import { defineDurableKind, makeKindHandle } from '@agoric/vat-data';
import { makeIssuerKit, AssetKind, AmountMath } from '../../src/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/devices/bundle/device-bundle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { buildSerializationTools } from '../lib/deviceTools.js';

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Nat } from '@endo/nat';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { buildSerializationTools } from '../lib/deviceTools.js';
import { insistVatID } from '../../lib/id.js';
import { kunser } from '../../lib/kmarshal.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/dummyMeterControl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

export function makeDummyMeterControl() {
let meteringDisabled = 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/vat-admin-hooks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { insistVatID } from '../lib/id.js';
import { kser, kunser } from '../lib/kmarshal.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/vat-loader/manager-helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import '../../types-ambient.js';
import {
insistVatDeliveryResult,
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/lib/kmarshal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Far, passStyleOf } from '@endo/far';
import { makeMarshal } from '@endo/marshal';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

// Simple wrapper for serializing and unserializing marshalled values inside the
// kernel, where we don't actually want to use clists nor actually allocate real
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/lib/runPolicies.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

export function foreverPolicy() {
/** @type { RunPolicy } */
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/vats/timer/vat-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Far, E, passStyleOf } from '@endo/far';
import { makePromiseKit } from '@endo/promise-kit';
import { Nat } from '@endo/nat';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import {
provideKindHandle,
provideDurableMapStore,
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/bundling/bootstrap-bundles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { Far, E } from '@endo/far';
import { importBundle } from '@endo/import-bundle';

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/bundling/test-bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { test } from '../../tools/prepare-test-env-ava.js';
// eslint-disable-next-line import/order
import fs from 'fs';
import bundleSource from '@endo/bundle-source';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { initializeSwingset, makeSwingsetController } from '../../src/index.js';
import { kunser, krefOf } from '../../src/lib/kmarshal.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { initializeSwingset, makeSwingsetController } from '../../src/index.js';
import { kunser } from '../../src/lib/kmarshal.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/devices/device-raw-0.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { buildSerializationTools } from '../../src/devices/lib/deviceTools.js';

export function buildDevice(tools, endowments) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { handleUnhandledRejections } from './unhandledRejectionDetector.js';
import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
// eslint-disable-next-line import/order
import { initSwingStore } from '@agoric/swing-store';
import { initializeSwingset, makeSwingsetController } from '../../src/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/test-gc-kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import anylogger from 'anylogger';
import { test } from '../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { waitUntilQuiescent } from '@agoric/internal/src/lib-nodejs/waitUntilQuiescent.js';
import { parseVatSlot } from '../src/lib/parseVatSlots.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Far, E } from '@endo/far';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { makePromiseKit } from '@endo/promise-kit';

const NUM_SENSORS = 39;
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/upgrade/test-upgrade-replay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// eslint-disable-next-line import/order
import { test } from '../../tools/prepare-test-env-ava.js';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import {
buildKernelBundles,
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/upgrade/test-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import bundleSource from '@endo/bundle-source';
import { objectMap } from '@agoric/internal';
import { initSwingStore } from '@agoric/swing-store';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/upgrade/vat-ulrik-2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Far, E } from '@endo/far';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initEmpty } from '@agoric/store';
import { defineDurableKind, defineDurableKindMulti } from '@agoric/vat-data';

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/vat-util.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// this file is imported by some test vats, so don't import any non-pure
// modules

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { kser, kunser } from '../src/lib/kmarshal.js';

export function extractMessage(vatDeliverObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { test } from '../../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { parseReachableAndVatSlot } from '../../../src/kernel/state/reachable.js';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { test } from '../../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { parseReachableAndVatSlot } from '../../../src/kernel/state/reachable.js';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/zcf-ish-upgrade/pseudo-zcf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Far } from '@endo/far';
import { importBundle } from '@endo/import-bundle';
import { defineDurableKind } from '@agoric/vat-data';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import {
provideHandle,
provideBaggageSubset as provideBaggageSubTree,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { test } from '../../tools/prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initSwingStore } from '@agoric/swing-store';
import { initializeSwingset, makeSwingsetController } from '../../src/index.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/tools/bootstrap-relay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { objectMap } from '@agoric/internal';
import { Far, E } from '@endo/far';
import { buildManualTimer } from './manual-timer.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/tools/dvo-test-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { test } from './prepare-test-env-ava.js';

// eslint-disable-next-line import/order
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { makeMarshal } from '@endo/marshal';
import { initSwingStore } from '@agoric/swing-store';
import { initializeSwingset, makeSwingsetController } from '../src/index.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/tools/passableEncoding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { E } from '@endo/far';
import { isObject, makeMarshal } from '@endo/marshal';

Expand Down
2 changes: 1 addition & 1 deletion packages/deploy-script-support/src/offer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
import { E } from '@endo/far';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
// Avoid pulling in too many dependencies like notifiers
import { AmountMath } from '@agoric/ertp/src/amountMath.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/deploy-script-support/src/startInstance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { E, passStyleOf } from '@endo/far';

/** @typedef {import('@agoric/deploy-script-support/src/externalTypes').Petname} Petname */
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
},
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
"dependencies": {
"@agoric/assert": "^0.6.0",
"@agoric/ertp": "^0.16.2",
"@agoric/governance": "^0.10.3",
"@agoric/internal": "^0.3.2",
Expand All @@ -42,6 +41,7 @@
"@agoric/vats": "^0.15.1",
"@agoric/zoe": "^0.26.2",
"@endo/captp": "^3.1.4",
"@endo/errors": "^0.1.1",
"@endo/eventual-send": "^0.17.5",
"@endo/far": "^0.2.21",
"@endo/marshal": "^0.8.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { resolve as importMetaResolve } from 'import-meta-resolve';

import { buildVatController } from '@agoric/swingset-vat';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { resolve as importMetaResolve } from 'import-meta-resolve';

import { buildVatController } from '@agoric/swingset-vat';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { resolve as importMetaResolve } from 'import-meta-resolve';

import { buildVatController } from '@agoric/swingset-vat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { resolve as importMetaResolve } from 'import-meta-resolve';

import { AmountMath } from '@agoric/ertp';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { makeTracer } from '@agoric/internal';

const vaultRoot = './vault-contract-wrapper.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/test/vaultFactory/test-vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { resolve as importMetaResolve } from 'import-meta-resolve';

import { AmountMath, makeIssuerKit } from '@agoric/ertp';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { makeTracer } from '@agoric/internal';

const vaultRoot = './vault-contract-wrapper.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/notifier/src/notifier.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="ses"/>

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { E, Far } from '@endo/far';

import './types-ambient.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/pegasus/src/once-promise-kit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { makePromiseKit } from '@endo/promise-kit';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { resolve as importMetaResolve } from 'import-meta-resolve';

import { buildVatController } from '@agoric/swingset-vat';
Expand Down
2 changes: 1 addition & 1 deletion packages/solo/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import parseArgs from 'minimist';
import process from 'process';
import { spawnSync } from 'child_process';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

import anylogger from 'anylogger';

Expand Down
2 changes: 1 addition & 1 deletion packages/spawner/src/contractHost.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (C) 2019 Agoric, under Apache License 2.0

import { E } from '@endo/eventual-send';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { Far } from '@endo/marshal';

// spawnBundle is built with 'yarn build'
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/src/watchedPromises.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// no-lonely-if is a stupid rule that really should be disabled globally
/* eslint-disable no-lonely-if */

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { initEmpty, M } from '@agoric/store';
import { E } from '@endo/eventual-send';
import { parseVatSlot } from './parseVatSlots.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/test/dummyMeterControl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

export function makeDummyMeterControl() {
let meteringDisabled = 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/test/kmarshal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Far, makeMarshal, passStyleOf } from '@endo/marshal';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

// Simple wrapper for serializing and unserializing marshalled values inside the
// kernel, where we don't actually want to use clists nor actually allocate real
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/tools/fakeVirtualSupport.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global globalThis */
/* eslint-disable max-classes-per-file */
import { makeMarshal } from '@endo/marshal';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { parseVatSlot } from '../src/parseVatSlots.js';

import { makeVirtualReferenceManager } from '../src/virtualReferences.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-runner/demo/vatFailure/vat-bad.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { kser } from '@agoric/swingset-vat/src/lib/kmarshal.js';

export default function setup(syscall, _state, _helpers, _vatPowers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import { E } from '@endo/eventual-send';
import { Far } from '@endo/marshal';
import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';

import { Offers } from '@agoric/inter-protocol/src/clientSupport.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/api/src/issuerTable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check

import { assert } from '@agoric/assert';
import { assert } from '@endo/errors';
import { E } from '@endo/eventual-send';

import { makeScalarWeakMapStore } from '@agoric/store';
Expand Down
Loading

0 comments on commit 12f678e

Please sign in to comment.