agoric 0.21.2-dev-7b582c1.0 → 0.21.2-dev-987bcf1.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",
3
- "version": "0.21.2-dev-7b582c1.0+7b582c1",
3
+ "version": "0.21.2-dev-987bcf1.0+987bcf1",
4
4
  "description": "Manage the Agoric Javascript smart contract platform",
5
5
  "type": "module",
6
6
  "main": "src/main.js",
@@ -30,28 +30,28 @@
30
30
  "lint:eslint": "eslint ."
31
31
  },
32
32
  "devDependencies": {
33
- "@agoric/cosmic-swingset": "0.41.4-dev-7b582c1.0+7b582c1",
34
- "@agoric/deploy-script-support": "0.10.4-dev-7b582c1.0+7b582c1",
33
+ "@agoric/cosmic-swingset": "0.41.4-dev-987bcf1.0+987bcf1",
34
+ "@agoric/deploy-script-support": "0.10.4-dev-987bcf1.0+987bcf1",
35
35
  "ava": "^5.3.0",
36
36
  "c8": "^10.1.2"
37
37
  },
38
38
  "dependencies": {
39
- "@agoric/access-token": "0.4.22-dev-7b582c1.0+7b582c1",
40
- "@agoric/cache": "0.3.3-dev-7b582c1.0+7b582c1",
41
- "@agoric/casting": "0.4.3-dev-7b582c1.0+7b582c1",
42
- "@agoric/client-utils": "0.1.1-dev-7b582c1.0+7b582c1",
43
- "@agoric/cosmic-proto": "0.4.1-dev-7b582c1.0+7b582c1",
44
- "@agoric/ertp": "0.16.3-dev-7b582c1.0+7b582c1",
45
- "@agoric/governance": "0.10.4-dev-7b582c1.0+7b582c1",
46
- "@agoric/inter-protocol": "0.16.2-dev-7b582c1.0+7b582c1",
47
- "@agoric/internal": "0.3.3-dev-7b582c1.0+7b582c1",
48
- "@agoric/network": "0.1.1-dev-7b582c1.0+7b582c1",
49
- "@agoric/smart-wallet": "0.5.4-dev-7b582c1.0+7b582c1",
50
- "@agoric/store": "0.9.3-dev-7b582c1.0+7b582c1",
51
- "@agoric/swingset-vat": "0.32.3-dev-7b582c1.0+7b582c1",
52
- "@agoric/vats": "0.15.2-dev-7b582c1.0+7b582c1",
53
- "@agoric/zoe": "0.26.3-dev-7b582c1.0+7b582c1",
54
- "@agoric/zone": "0.2.3-dev-7b582c1.0+7b582c1",
39
+ "@agoric/access-token": "0.4.22-dev-987bcf1.0+987bcf1",
40
+ "@agoric/cache": "0.3.3-dev-987bcf1.0+987bcf1",
41
+ "@agoric/casting": "0.4.3-dev-987bcf1.0+987bcf1",
42
+ "@agoric/client-utils": "0.1.1-dev-987bcf1.0+987bcf1",
43
+ "@agoric/cosmic-proto": "0.4.1-dev-987bcf1.0+987bcf1",
44
+ "@agoric/ertp": "0.16.3-dev-987bcf1.0+987bcf1",
45
+ "@agoric/governance": "0.10.4-dev-987bcf1.0+987bcf1",
46
+ "@agoric/inter-protocol": "0.16.2-dev-987bcf1.0+987bcf1",
47
+ "@agoric/internal": "0.3.3-dev-987bcf1.0+987bcf1",
48
+ "@agoric/network": "0.1.1-dev-987bcf1.0+987bcf1",
49
+ "@agoric/smart-wallet": "0.5.4-dev-987bcf1.0+987bcf1",
50
+ "@agoric/store": "0.9.3-dev-987bcf1.0+987bcf1",
51
+ "@agoric/swingset-vat": "0.32.3-dev-987bcf1.0+987bcf1",
52
+ "@agoric/vats": "0.15.2-dev-987bcf1.0+987bcf1",
53
+ "@agoric/zoe": "0.26.3-dev-987bcf1.0+987bcf1",
54
+ "@agoric/zone": "0.2.3-dev-987bcf1.0+987bcf1",
55
55
  "@confio/relayer": "^0.11.3",
56
56
  "@cosmjs/crypto": "^0.32.3",
57
57
  "@cosmjs/encoding": "^0.32.3",
@@ -102,5 +102,5 @@
102
102
  "typeCoverage": {
103
103
  "atLeast": 78.73
104
104
  },
105
- "gitHead": "7b582c1ffac84b818165bb8e2f7f2fb97270b751"
105
+ "gitHead": "987bcf1df00a307034d4c6da3145b6f1318885be"
106
106
  }
package/src/install.js CHANGED
@@ -1,8 +1,10 @@
1
1
  /* eslint-env node */
2
2
  import path from 'path';
3
3
  import chalk from 'chalk';
4
+ import { execFileSync } from 'child_process';
4
5
  import { makePspawn } from './helpers.js';
5
6
  import DEFAULT_SDK_PACKAGE_NAMES from './sdk-package-names.js';
7
+ import { listWorkspaces } from './lib/packageManager.js';
6
8
 
7
9
  const REQUIRED_AGORIC_START_PACKAGES = [
8
10
  '@agoric/solo',
@@ -30,17 +32,7 @@ export default async function installMain(progname, rawArgs, powers, opts) {
30
32
  const rimraf = file => pspawn('rm', ['-rf', file]);
31
33
 
32
34
  async function getWorktreePackagePaths(cwd = '.', map = new Map()) {
33
- // run `yarn workspaces info` to get the list of directories to
34
- // use, instead of a hard-coded list
35
- const p = pspawn('yarn', ['workspaces', '--silent', 'info'], {
36
- cwd,
37
- stdio: ['inherit', 'pipe', 'inherit'],
38
- });
39
- const stdout = [];
40
- p.childProcess.stdout?.on('data', out => stdout.push(out));
41
- await p;
42
- const d = JSON.parse(Buffer.concat(stdout).toString('utf-8'));
43
- for (const [name, { location }] of Object.entries(d)) {
35
+ for (const { name, location } of listWorkspaces({ execFileSync })) {
44
36
  map.set(name, path.resolve(cwd, location));
45
37
  }
46
38
  return map;
@@ -0,0 +1,22 @@
1
+ // @ts-check
2
+
3
+ /**
4
+ * @import { execFileSync } from 'child_process';
5
+ */
6
+
7
+ /**
8
+ * Omits the root
9
+ *
10
+ * @param {{ execFileSync: execFileSync }} io
11
+ * @returns {Array<{ location: string, name: string }>}
12
+ */
13
+ export const listWorkspaces = ({ execFileSync }) => {
14
+ const out = execFileSync('npm', ['query', '.workspace'], {
15
+ stdio: ['ignore', 'pipe', 'inherit'],
16
+ shell: true,
17
+ encoding: 'utf-8',
18
+ });
19
+ /** @type {Array<{ location: string, name: string, description: string }>} */
20
+ const result = JSON.parse(out);
21
+ return result.filter(({ location }) => location !== '.');
22
+ };