ts-repo-utils 3.1.0 → 3.1.2

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.
Files changed (45) hide show
  1. package/dist/functions/assert-ext.mjs.map +1 -1
  2. package/dist/functions/assert-path-exists.mjs.map +1 -1
  3. package/dist/functions/assert-repo-is-clean.mjs.map +1 -1
  4. package/dist/functions/diff.mjs.map +1 -1
  5. package/dist/functions/exec-async.mjs.map +1 -1
  6. package/dist/functions/format.mjs.map +1 -1
  7. package/dist/functions/gen-index.d.mts +4 -4
  8. package/dist/functions/gen-index.d.mts.map +1 -1
  9. package/dist/functions/gen-index.mjs +5 -4
  10. package/dist/functions/gen-index.mjs.map +1 -1
  11. package/dist/functions/index.mjs +2 -1
  12. package/dist/functions/index.mjs.map +1 -1
  13. package/dist/functions/should-run.mjs.map +1 -1
  14. package/dist/functions/workspace-utils/execute-parallel.d.mts +25 -0
  15. package/dist/functions/workspace-utils/execute-parallel.d.mts.map +1 -0
  16. package/dist/functions/workspace-utils/execute-parallel.mjs +162 -0
  17. package/dist/functions/workspace-utils/execute-parallel.mjs.map +1 -0
  18. package/dist/functions/workspace-utils/get-workspace-packages.d.mts +1 -29
  19. package/dist/functions/workspace-utils/get-workspace-packages.d.mts.map +1 -1
  20. package/dist/functions/workspace-utils/get-workspace-packages.mjs +11 -163
  21. package/dist/functions/workspace-utils/get-workspace-packages.mjs.map +1 -1
  22. package/dist/functions/workspace-utils/index.d.mts +2 -0
  23. package/dist/functions/workspace-utils/index.d.mts.map +1 -1
  24. package/dist/functions/workspace-utils/index.mjs +2 -1
  25. package/dist/functions/workspace-utils/index.mjs.map +1 -1
  26. package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts.map +1 -1
  27. package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs +2 -1
  28. package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs.map +1 -1
  29. package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts.map +1 -1
  30. package/dist/functions/workspace-utils/run-cmd-in-stages.mjs +2 -1
  31. package/dist/functions/workspace-utils/run-cmd-in-stages.mjs.map +1 -1
  32. package/dist/functions/workspace-utils/types.d.mts +7 -0
  33. package/dist/functions/workspace-utils/types.d.mts.map +1 -0
  34. package/dist/functions/workspace-utils/types.mjs +2 -0
  35. package/dist/functions/workspace-utils/types.mjs.map +1 -0
  36. package/dist/index.mjs +2 -1
  37. package/dist/index.mjs.map +1 -1
  38. package/package.json +13 -14
  39. package/src/functions/gen-index.mts +10 -7
  40. package/src/functions/workspace-utils/execute-parallel.mts +247 -0
  41. package/src/functions/workspace-utils/get-workspace-packages.mts +12 -251
  42. package/src/functions/workspace-utils/index.mts +2 -0
  43. package/src/functions/workspace-utils/run-cmd-in-parallel.mts +2 -4
  44. package/src/functions/workspace-utils/run-cmd-in-stages.mts +2 -4
  45. package/src/functions/workspace-utils/types.mts +7 -0
@@ -0,0 +1,247 @@
1
+ import { spawn } from 'child_process';
2
+ import {
3
+ createPromise,
4
+ hasKey,
5
+ isNotUndefined,
6
+ isRecord,
7
+ pipe,
8
+ Result,
9
+ } from 'ts-data-forge';
10
+ import '../../node-global.mjs';
11
+ import { type Package } from './types.mjs';
12
+
13
+ const DEBUG = false as boolean;
14
+
15
+ /**
16
+ * Executes a npm script across multiple packages in parallel with a concurrency limit.
17
+ * @param packages - Array of Package objects to execute the script in
18
+ * @param scriptName - The name of the npm script to execute
19
+ * @param concurrency - Maximum number of packages to process simultaneously (default: 3)
20
+ * @returns A promise that resolves to an array of execution results
21
+ */
22
+ export const executeParallel = async (
23
+ packages: readonly Package[],
24
+ scriptName: string,
25
+ concurrency: number = 3,
26
+ ): Promise<
27
+ readonly Result<Readonly<{ code?: number; skipped?: boolean }>, Error>[]
28
+ > => {
29
+ const mut_resultPromises: Promise<
30
+ Result<Readonly<{ code?: number; skipped?: boolean }>, Error>
31
+ >[] = [];
32
+
33
+ const executing = new Set<Promise<unknown>>();
34
+
35
+ for (const pkg of packages) {
36
+ const promise = executeScript(pkg, scriptName);
37
+
38
+ mut_resultPromises.push(promise);
39
+
40
+ const wrappedPromise = promise.finally(() => {
41
+ executing.delete(wrappedPromise);
42
+ if (DEBUG) {
43
+ console.debug('executing size', executing.size);
44
+ }
45
+ });
46
+
47
+ executing.add(wrappedPromise);
48
+
49
+ if (DEBUG) {
50
+ console.debug('executing size', executing.size);
51
+ }
52
+
53
+ // If we reach concurrency limit, wait for one to finish
54
+ if (executing.size >= concurrency) {
55
+ // eslint-disable-next-line no-await-in-loop
56
+ await Promise.race(executing);
57
+ }
58
+ }
59
+
60
+ return Promise.all(mut_resultPromises);
61
+ };
62
+
63
+ /**
64
+ * Executes a npm script across packages in dependency order stages.
65
+ * Packages are grouped into stages where each stage contains packages whose
66
+ * dependencies have been completed in previous stages.
67
+ * @param packages - Array of Package objects to execute the script in
68
+ * @param scriptName - The name of the npm script to execute
69
+ * @param concurrency - Maximum number of packages to process simultaneously within each stage (default: 3)
70
+ * @returns A promise that resolves when all stages are complete
71
+ */
72
+ export const executeStages = async (
73
+ packages: readonly Package[],
74
+ scriptName: string,
75
+ concurrency: number = 3,
76
+ ): Promise<void> => {
77
+ const dependencyGraph = buildDependencyGraph(packages);
78
+
79
+ const sorted = topologicalSortPackages(packages, dependencyGraph);
80
+
81
+ const stages: (readonly Package[])[] = [];
82
+ const completed = new Set<string>();
83
+
84
+ while (completed.size < sorted.length) {
85
+ const stage: Package[] = [];
86
+
87
+ for (const pkg of sorted) {
88
+ if (completed.has(pkg.name)) continue;
89
+
90
+ const deps = dependencyGraph.get(pkg.name) ?? [];
91
+ const depsCompleted = deps.every((dep) => completed.has(dep));
92
+
93
+ if (depsCompleted) {
94
+ stage.push(pkg);
95
+ }
96
+ }
97
+
98
+ if (stage.length === 0) {
99
+ throw new Error('Circular dependency detected');
100
+ }
101
+
102
+ stages.push(stage);
103
+ for (const pkg of stage) completed.add(pkg.name);
104
+ }
105
+
106
+ console.log(`\nExecuting ${scriptName} in ${stages.length} stages...\n`);
107
+
108
+ for (const [i, stage] of stages.entries()) {
109
+ if (stage.length > 0) {
110
+ console.log(`Stage ${i + 1}: ${stage.map((p) => p.name).join(', ')}`);
111
+ // eslint-disable-next-line no-await-in-loop
112
+ await executeParallel(stage, scriptName, concurrency);
113
+ }
114
+ }
115
+ };
116
+
117
+ /**
118
+ * Executes a npm script in a specific package directory.
119
+ * @param pkg - The package object containing path and metadata
120
+ * @param scriptName - The name of the npm script to execute
121
+ * @param options - Configuration options
122
+ * @param options.prefix - Whether to prefix output with package name (default: true)
123
+ * @returns A promise that resolves to execution result with exit code or skipped flag
124
+ */
125
+ const executeScript = (
126
+ pkg: Package,
127
+ scriptName: string,
128
+ { prefix = true }: Readonly<{ prefix?: boolean }> = {},
129
+ ): Promise<Result<Readonly<{ code?: number; skipped?: boolean }>, Error>> =>
130
+ pipe(
131
+ createPromise(
132
+ (
133
+ resolve: (
134
+ value: Readonly<{ code?: number; skipped?: boolean }>,
135
+ ) => void,
136
+ reject: (reason: unknown) => void,
137
+ ) => {
138
+ const packageJsonScripts =
139
+ isRecord(pkg.packageJson) && isRecord(pkg.packageJson['scripts'])
140
+ ? pkg.packageJson['scripts']
141
+ : {};
142
+
143
+ const hasScript = hasKey(packageJsonScripts, scriptName);
144
+ if (!hasScript) {
145
+ resolve({ skipped: true });
146
+ return;
147
+ }
148
+
149
+ const prefixStr = prefix ? `[${pkg.name}] ` : '';
150
+ const proc = spawn('npm', ['run', scriptName], {
151
+ cwd: pkg.path,
152
+ shell: true,
153
+ stdio: 'pipe',
154
+ });
155
+
156
+ proc.stdout.on('data', (data: Readonly<Buffer>) => {
157
+ process.stdout.write(prefixStr + data.toString());
158
+ });
159
+
160
+ proc.stderr.on('data', (data: Readonly<Buffer>) => {
161
+ process.stderr.write(prefixStr + data.toString());
162
+ });
163
+
164
+ proc.on('close', (code: number | null) => {
165
+ if (code === 0) {
166
+ resolve({ code });
167
+ } else {
168
+ reject(new Error(`${pkg.name} exited with code ${code}`));
169
+ }
170
+ });
171
+
172
+ proc.on('error', reject);
173
+ },
174
+ ),
175
+ ).map((result) =>
176
+ result.then(
177
+ Result.mapErr((err) => {
178
+ const errorMessage: string =
179
+ err instanceof Error
180
+ ? err.message
181
+ : isRecord(err) && hasKey(err, 'message')
182
+ ? (err.message?.toString() ?? 'Unknown error message')
183
+ : 'Unknown error';
184
+
185
+ console.error(`\nError in ${pkg.name}:`, errorMessage);
186
+ return err instanceof Error ? err : new Error(errorMessage);
187
+ }),
188
+ ),
189
+ ).value;
190
+
191
+ /**
192
+ * Performs a topological sort on packages based on their dependencies,
193
+ * ensuring dependencies are ordered before their dependents.
194
+ * @param packages - Array of Package objects to sort
195
+ * @returns An array of packages in dependency order (dependencies first)
196
+ */
197
+ const topologicalSortPackages = (
198
+ packages: readonly Package[],
199
+ dependencyGraph: ReadonlyMap<string, readonly string[]>,
200
+ ): readonly Package[] => {
201
+ const visited = new Set<string>();
202
+ const result: string[] = [];
203
+
204
+ const packageMap = new Map(packages.map((p) => [p.name, p]));
205
+
206
+ const visit = (pkgName: string): void => {
207
+ if (visited.has(pkgName)) return;
208
+ visited.add(pkgName);
209
+
210
+ const deps = dependencyGraph.get(pkgName) ?? [];
211
+ for (const dep of deps) {
212
+ visit(dep);
213
+ }
214
+
215
+ result.push(pkgName);
216
+ };
217
+
218
+ for (const pkg of packages) {
219
+ visit(pkg.name);
220
+ }
221
+
222
+ return result
223
+ .map((pkgName) => packageMap.get(pkgName))
224
+ .filter(isNotUndefined);
225
+ };
226
+
227
+ /**
228
+ * Builds a dependency graph from the given packages, mapping each package name
229
+ * to its internal workspace dependencies.
230
+ * @param packages - Array of Package objects to analyze
231
+ * @returns A readonly map where keys are package names and values are arrays of their dependency package names
232
+ */
233
+ const buildDependencyGraph = (
234
+ packages: readonly Package[],
235
+ ): ReadonlyMap<string, readonly string[]> => {
236
+ const packageMap = new Map(packages.map((p) => [p.name, p]));
237
+ const graph = new Map<string, readonly string[]>();
238
+
239
+ for (const pkg of packages) {
240
+ const deps = Object.keys(pkg.dependencies).filter((depName) =>
241
+ packageMap.has(depName),
242
+ );
243
+ graph.set(pkg.name, deps);
244
+ }
245
+
246
+ return graph;
247
+ };
@@ -1,26 +1,15 @@
1
1
  #!/usr/bin/env tsx
2
2
 
3
- import { spawn } from 'child_process';
4
3
  import {
5
- createPromise,
6
4
  hasKey,
7
5
  isNotUndefined,
8
6
  isRecord,
9
7
  isString,
10
- pipe,
8
+ Json,
11
9
  Result,
12
10
  } from 'ts-data-forge';
13
11
  import '../../node-global.mjs';
14
-
15
- const DEBUG = false as boolean;
16
-
17
- // Get all workspace packages
18
- type Package = Readonly<{
19
- name: string;
20
- path: string;
21
- packageJson: JsonValue;
22
- dependencies: ReadonlyRecord<string, string>;
23
- }>;
12
+ import { type Package } from './types.mjs';
24
13
 
25
14
  /**
26
15
  * Retrieves all workspace packages from a monorepo based on the workspace patterns
@@ -46,6 +35,8 @@ export const getWorkspacePackages = async (
46
35
  const matches = await glob(pattern, {
47
36
  cwd: rootPackageJsonDir,
48
37
  ignore: ['**/node_modules/**'],
38
+ onlyDirectories: true,
39
+ absolute: true,
49
40
  });
50
41
 
51
42
  const packageJsonList: readonly (
@@ -53,15 +44,19 @@ export const getWorkspacePackages = async (
53
44
  | undefined
54
45
  )[] = await Promise.all(
55
46
  matches.map(async (match) => {
56
- const packagePath = path.join(rootPackageJsonDir, match);
47
+ const maybePackagePath = path.join(match, 'package.json');
57
48
 
58
49
  const result = await Result.fromPromise(
59
- fs.readFile(path.join(packagePath, 'package.json'), 'utf8'),
50
+ fs.readFile(maybePackagePath, 'utf8'),
60
51
  );
61
52
 
62
53
  if (Result.isErr(result)) return undefined;
63
54
 
64
- return [packagePath, result.value] as const;
55
+ const parsed = Json.parse(result.value);
56
+
57
+ if (Result.isErr(parsed)) return undefined;
58
+
59
+ return [maybePackagePath, parsed.value] as const;
65
60
  }),
66
61
  );
67
62
 
@@ -70,7 +65,7 @@ export const getWorkspacePackages = async (
70
65
  .filter(isNotUndefined)
71
66
  .map(([packagePath, packageJson]) => ({
72
67
  name: getStrFromJsonValue(packageJson, 'name'),
73
- path: packagePath,
68
+ path: path.dirname(packagePath),
74
69
  packageJson,
75
70
  dependencies: {
76
71
  ...getKeyValueRecordFromJsonValue(packageJson, 'dependencies'),
@@ -121,237 +116,3 @@ const getKeyValueRecordFromJsonValue = (
121
116
  );
122
117
  return Object.fromEntries(entries);
123
118
  };
124
-
125
- /**
126
- * Builds a dependency graph from the given packages, mapping each package name
127
- * to its internal workspace dependencies.
128
- * @param packages - Array of Package objects to analyze
129
- * @returns A readonly map where keys are package names and values are arrays of their dependency package names
130
- */
131
- const buildDependencyGraph = (
132
- packages: readonly Package[],
133
- ): ReadonlyMap<string, readonly string[]> => {
134
- const packageMap = new Map(packages.map((p) => [p.name, p]));
135
- const graph = new Map<string, string[]>();
136
-
137
- for (const pkg of packages) {
138
- const deps = Object.keys(pkg.dependencies).filter((depName) =>
139
- packageMap.has(depName),
140
- );
141
- graph.set(pkg.name, deps);
142
- }
143
-
144
- return graph;
145
- };
146
-
147
- /**
148
- * Performs a topological sort on packages based on their dependencies,
149
- * ensuring dependencies are ordered before their dependents.
150
- * @param packages - Array of Package objects to sort
151
- * @returns An array of packages in dependency order (dependencies first)
152
- */
153
- const topologicalSortPackages = (
154
- packages: readonly Package[],
155
- ): readonly Package[] => {
156
- const graph = buildDependencyGraph(packages);
157
- const visited = new Set<string>();
158
- const result: string[] = [];
159
-
160
- const packageMap = new Map(packages.map((p) => [p.name, p]));
161
-
162
- const visit = (pkgName: string): void => {
163
- if (visited.has(pkgName)) return;
164
- visited.add(pkgName);
165
-
166
- const deps = graph.get(pkgName) ?? [];
167
- for (const dep of deps) {
168
- visit(dep);
169
- }
170
-
171
- result.push(pkgName);
172
- };
173
-
174
- for (const pkg of packages) {
175
- visit(pkg.name);
176
- }
177
-
178
- return result
179
- .map((pkgName) => packageMap.get(pkgName))
180
- .filter(isNotUndefined);
181
- };
182
-
183
- /**
184
- * Executes a npm script in a specific package directory.
185
- * @param pkg - The package object containing path and metadata
186
- * @param scriptName - The name of the npm script to execute
187
- * @param options - Configuration options
188
- * @param options.prefix - Whether to prefix output with package name (default: true)
189
- * @returns A promise that resolves to execution result with exit code or skipped flag
190
- */
191
- const executeScript = (
192
- pkg: Package,
193
- scriptName: string,
194
- { prefix = true }: Readonly<{ prefix?: boolean }> = {},
195
- ): Promise<Result<Readonly<{ code?: number; skipped?: boolean }>, Error>> =>
196
- pipe(
197
- createPromise(
198
- (
199
- resolve: (
200
- value: Readonly<{ code?: number; skipped?: boolean }>,
201
- ) => void,
202
- reject: (reason: unknown) => void,
203
- ) => {
204
- const packageJsonScripts =
205
- isRecord(pkg.packageJson) && isRecord(pkg.packageJson['scripts'])
206
- ? pkg.packageJson['scripts']
207
- : {};
208
-
209
- const hasScript = hasKey(packageJsonScripts, scriptName);
210
- if (!hasScript) {
211
- resolve({ skipped: true });
212
- return;
213
- }
214
-
215
- const prefixStr = prefix ? `[${pkg.name}] ` : '';
216
- const proc = spawn('npm', ['run', scriptName], {
217
- cwd: pkg.path,
218
- shell: true,
219
- stdio: 'pipe',
220
- });
221
-
222
- proc.stdout.on('data', (data: Readonly<Buffer>) => {
223
- process.stdout.write(prefixStr + data.toString());
224
- });
225
-
226
- proc.stderr.on('data', (data: Readonly<Buffer>) => {
227
- process.stderr.write(prefixStr + data.toString());
228
- });
229
-
230
- proc.on('close', (code: number | null) => {
231
- if (code === 0) {
232
- resolve({ code });
233
- } else {
234
- reject(new Error(`${pkg.name} exited with code ${code}`));
235
- }
236
- });
237
-
238
- proc.on('error', reject);
239
- },
240
- ),
241
- ).map((result) =>
242
- result.then(
243
- Result.mapErr((err) => {
244
- const errorMessage: string =
245
- err instanceof Error
246
- ? err.message
247
- : isRecord(err) && hasKey(err, 'message')
248
- ? (err.message?.toString() ?? 'Unknown error message')
249
- : 'Unknown error';
250
-
251
- console.error(`\nError in ${pkg.name}:`, errorMessage);
252
- return err instanceof Error ? err : new Error(errorMessage);
253
- }),
254
- ),
255
- ).value;
256
-
257
- /**
258
- * Executes a npm script across multiple packages in parallel with a concurrency limit.
259
- * @param packages - Array of Package objects to execute the script in
260
- * @param scriptName - The name of the npm script to execute
261
- * @param concurrency - Maximum number of packages to process simultaneously (default: 3)
262
- * @returns A promise that resolves to an array of execution results
263
- */
264
- export const executeParallel = async (
265
- packages: readonly Package[],
266
- scriptName: string,
267
- concurrency: number = 3,
268
- ): Promise<
269
- readonly Result<Readonly<{ code?: number; skipped?: boolean }>, Error>[]
270
- > => {
271
- const mut_resultPromises: Promise<
272
- Result<Readonly<{ code?: number; skipped?: boolean }>, Error>
273
- >[] = [];
274
-
275
- const executing = new Set<Promise<unknown>>();
276
-
277
- for (const pkg of packages) {
278
- const promise = executeScript(pkg, scriptName);
279
-
280
- mut_resultPromises.push(promise);
281
-
282
- const wrappedPromise = promise.finally(() => {
283
- executing.delete(wrappedPromise);
284
- if (DEBUG) {
285
- console.debug('executing size', executing.size);
286
- }
287
- });
288
-
289
- executing.add(wrappedPromise);
290
-
291
- if (DEBUG) {
292
- console.debug('executing size', executing.size);
293
- }
294
-
295
- // If we reach concurrency limit, wait for one to finish
296
- if (executing.size >= concurrency) {
297
- // eslint-disable-next-line no-await-in-loop
298
- await Promise.race(executing);
299
- }
300
- }
301
-
302
- return Promise.all(mut_resultPromises);
303
- };
304
-
305
- /**
306
- * Executes a npm script across packages in dependency order stages.
307
- * Packages are grouped into stages where each stage contains packages whose
308
- * dependencies have been completed in previous stages.
309
- * @param packages - Array of Package objects to execute the script in
310
- * @param scriptName - The name of the npm script to execute
311
- * @param concurrency - Maximum number of packages to process simultaneously within each stage (default: 3)
312
- * @returns A promise that resolves when all stages are complete
313
- */
314
- export const executeStages = async (
315
- packages: readonly Package[],
316
- scriptName: string,
317
- concurrency: number = 3,
318
- ): Promise<void> => {
319
- const sorted = topologicalSortPackages(packages);
320
-
321
- const stages: (readonly Package[])[] = [];
322
- const completed = new Set<string>();
323
-
324
- const dependencyGraph = buildDependencyGraph(packages);
325
-
326
- while (completed.size < sorted.length) {
327
- const stage: Package[] = [];
328
-
329
- for (const pkg of sorted) {
330
- if (completed.has(pkg.name)) continue;
331
-
332
- const deps = dependencyGraph.get(pkg.name) ?? [];
333
- const depsCompleted = deps.every((dep) => completed.has(dep));
334
-
335
- if (depsCompleted) {
336
- stage.push(pkg);
337
- }
338
- }
339
-
340
- if (stage.length === 0) {
341
- throw new Error('Circular dependency detected');
342
- }
343
-
344
- stages.push(stage);
345
- for (const pkg of stage) completed.add(pkg.name);
346
- }
347
-
348
- console.log(`\nExecuting ${scriptName} in ${stages.length} stages...\n`);
349
-
350
- for (const [i, stage] of stages.entries()) {
351
- if (stage.length > 0) {
352
- console.log(`Stage ${i + 1}: ${stage.map((p) => p.name).join(', ')}`);
353
- // eslint-disable-next-line no-await-in-loop
354
- await executeParallel(stage, scriptName, concurrency);
355
- }
356
- }
357
- };
@@ -1,3 +1,5 @@
1
+ export * from './execute-parallel.mjs';
1
2
  export * from './get-workspace-packages.mjs';
2
3
  export * from './run-cmd-in-parallel.mjs';
3
4
  export * from './run-cmd-in-stages.mjs';
5
+ export * from './types.mjs';
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env tsx
2
2
 
3
- import {
4
- executeParallel,
5
- getWorkspacePackages,
6
- } from './get-workspace-packages.mjs';
3
+ import { executeParallel } from './execute-parallel.mjs';
4
+ import { getWorkspacePackages } from './get-workspace-packages.mjs';
7
5
 
8
6
  /**
9
7
  * Executes a npm script command across all workspace packages in parallel.
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env tsx
2
2
 
3
- import {
4
- executeStages,
5
- getWorkspacePackages,
6
- } from './get-workspace-packages.mjs';
3
+ import { executeStages } from './execute-parallel.mjs';
4
+ import { getWorkspacePackages } from './get-workspace-packages.mjs';
7
5
 
8
6
  /**
9
7
  * Executes a npm script command across all workspace packages in dependency order stages.
@@ -0,0 +1,7 @@
1
+ // Get all workspace packages
2
+ export type Package = Readonly<{
3
+ name: string;
4
+ path: string;
5
+ packageJson: JsonValue;
6
+ dependencies: ReadonlyRecord<string, string>;
7
+ }>;