diff --git a/packages/agoric-cli/package.json b/packages/agoric-cli/package.json index 70a4297ab28..fce1cc4c067 100644 --- a/packages/agoric-cli/package.json +++ b/packages/agoric-cli/package.json @@ -64,7 +64,6 @@ "commander": "^10.0.0", "dd-trace": "^3.3.0", "deterministic-json": "^1.0.5", - "esm": "agoric-labs/esm#Agoric-built", "inquirer": "^8.2.2", "opener": "^1.5.2", "tmp": "^0.2.1", diff --git a/packages/agoric-cli/src/entrypoint.js b/packages/agoric-cli/src/entrypoint.js index 942a040d1bf..dacf5e47f96 100755 --- a/packages/agoric-cli/src/entrypoint.js +++ b/packages/agoric-cli/src/entrypoint.js @@ -4,7 +4,6 @@ /* global process */ import '@endo/init/pre.js'; -import 'esm'; import '@agoric/casting/node-fetch-shim.js'; import '@endo/init'; diff --git a/packages/agoric-cli/src/scripts.js b/packages/agoric-cli/src/scripts.js index 54857b5d7e3..7f0ca5ce655 100644 --- a/packages/agoric-cli/src/scripts.js +++ b/packages/agoric-cli/src/scripts.js @@ -4,13 +4,11 @@ import bundleSource from '@endo/bundle-source'; import { E } from '@endo/captp'; import { search as readContainingPackageDescriptor } from '@endo/compartment-mapper'; -import createEsmRequire from 'esm'; import { createRequire } from 'module'; import path from 'path'; import url from 'url'; const require = createRequire(import.meta.url); -const esmRequire = createEsmRequire(/** @type {NodeModule} */ ({})); const PATH_SEP_RE = new RegExp(`${path.sep.replace(/\\/g, '\\\\')}`, 'g'); @@ -154,9 +152,9 @@ export { bootPlugin } from ${JSON.stringify(absPath)}; ); const modulePath = pathResolve(moduleFile); - let mainNS = await (nativeEsm && import(modulePath)); + const mainNS = await (nativeEsm && import(modulePath)); if (!mainNS) { - mainNS = esmRequire(modulePath); + throw Error('standardthings/esm emulation disabled'); } const allEndowments = harden({ diff --git a/packages/agoric-cli/test/test-main.js b/packages/agoric-cli/test/test-main.js index 88219733fae..e61dc104ce6 100644 --- a/packages/agoric-cli/test/test-main.js +++ b/packages/agoric-cli/test/test-main.js @@ -1,7 +1,6 @@ /* global globalThis */ import '@agoric/casting/node-fetch-shim.js'; import '@endo/init/pre.js'; -import 'esm'; import '@endo/init/debug.js'; import test from 'ava'; import fs from 'fs';