@travetto/repo 7.0.0-rc.2 → 7.0.0-rc.3

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": "@travetto/repo",
3
- "version": "7.0.0-rc.2",
3
+ "version": "7.0.0-rc.3",
4
4
  "description": "Monorepo utilities",
5
5
  "keywords": [
6
6
  "travetto",
@@ -22,8 +22,8 @@
22
22
  "directory": "module/repo"
23
23
  },
24
24
  "dependencies": {
25
- "@travetto/cli": "^7.0.0-rc.2",
26
- "@travetto/worker": "^7.0.0-rc.2"
25
+ "@travetto/cli": "^7.0.0-rc.3",
26
+ "@travetto/worker": "^7.0.0-rc.3"
27
27
  },
28
28
  "peerDependenciesMeta": {
29
29
  "@travetto/cli": {
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import { spawn, ChildProcess } from 'node:child_process';
3
3
  import fs from 'node:fs/promises';
4
4
 
5
- import { ExecUtil, ExecutionResult } from '@travetto/runtime';
5
+ import { ExecUtil, ExecutionResult, JSONUtil } from '@travetto/runtime';
6
6
  import { type IndexedModule, type ManifestContext, type Package, PackageUtil } from '@travetto/manifest';
7
7
  import { CliModuleUtil } from '@travetto/cli';
8
8
 
@@ -40,12 +40,12 @@ export class PackageManager {
40
40
  if (!result.valid && !result.stderr.includes('E404')) {
41
41
  throw new Error(result.stderr);
42
42
  }
43
- const item: (string[] | string) = result.stdout ? JSON.parse(result.stdout) : [];
43
+ const item: (string[] | string) = result.stdout ? JSONUtil.parseSafe(result.stdout) : [];
44
44
  const found = Array.isArray(item) ? item.pop() : item;
45
45
  return !!found && found === mod.version;
46
46
  }
47
47
  case 'yarn': {
48
- const parsed = JSON.parse(result.stdout);
48
+ const parsed = JSONUtil.parseSafe<{ data?: unknown }>(result.stdout);
49
49
  return parsed.data !== undefined;
50
50
  }
51
51
  }