From 8fcb127a0baa6f56f37a1b235fe66be490eaca5f Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 22 Aug 2024 12:39:42 -0700 Subject: [PATCH] test: run without yarn --- packages/boot/package.json | 1 + packages/boot/tools/supports.ts | 15 ++++++--------- yarn.lock | 3 ++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/boot/package.json b/packages/boot/package.json index 76ea2e4cb3d0..27c287ebb710 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -55,6 +55,7 @@ "@agoric/swingset-liveslots": "^0.10.2", "@endo/base64": "^1.0.6", "@endo/patterns": "^1.4.2", + "agoric": "workspace:^", "ava": "^5.3.0", "c8": "^9.1.0", "tsx": "3.12.8" diff --git a/packages/boot/tools/supports.ts b/packages/boot/tools/supports.ts index 36af57d01ccc..dc614f606a27 100644 --- a/packages/boot/tools/supports.ts +++ b/packages/boot/tools/supports.ts @@ -50,6 +50,11 @@ import { icaMocks, protoMsgMockMap, protoMsgMocks } from './ibc/mocks.js'; const trace = makeTracer('BSTSupport', false); +const cliEntrypoint = await importMetaResolve( + 'agoric/src/entrypoint.js', + import.meta.url, +).then(u => new URL(u).pathname); + type ConsumeBootrapItem = ( name: N, ) => N extends keyof EconomyBootstrapPowers['consume'] @@ -156,18 +161,10 @@ export const makeProposalExtractor = ({ childProcess, fs }: Powers) => { env: NodeJS.ProcessEnv, ) => { console.info('running package script:', scriptPath); - const out = childProcess.execFileSync('yarn', ['bin', 'agoric'], { + return childProcess.execFileSync(cliEntrypoint, ['run', scriptPath], { cwd: outputDir, env, }); - return childProcess.execFileSync( - out.toString().trim(), - ['run', scriptPath], - { - cwd: outputDir, - env, - }, - ); }; const loadJSON = async filePath => diff --git a/yarn.lock b/yarn.lock index 3f4d93b6a552..c7aabab7cbb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -131,6 +131,7 @@ __metadata: "@endo/patterns": "npm:^1.4.2" "@endo/promise-kit": "npm:^1.1.4" "@endo/stream": "npm:^1.2.4" + agoric: "workspace:^" ava: "npm:^5.3.0" c8: "npm:^9.1.0" import-meta-resolve: "npm:^2.2.1" @@ -6286,7 +6287,7 @@ __metadata: languageName: node linkType: hard -"agoric@npm:^0.21.1, agoric@workspace:packages/agoric-cli": +"agoric@npm:^0.21.1, agoric@workspace:^, agoric@workspace:packages/agoric-cli": version: 0.0.0-use.local resolution: "agoric@workspace:packages/agoric-cli" dependencies: