MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / readPackageIfExists

Function readPackageIfExists

scripts/validate-changesets.ts:67–75  ·  view source on GitHub ↗
(
  fs: FileSystem.FileSystem,
  path: Path.Path,
  packagesDir: string,
  dir: string
)

Source from the content-addressed store, hash-verified

65 );
66
67const readPackageIfExists = (
68 fs: FileSystem.FileSystem,
69 path: Path.Path,
70 packagesDir: string,
71 dir: string
72) => {
73 const packagePath = path.join(packagesDir, dir, 'package.json');
74 return pipe(packagePath, fs.exists, Effect.flatMap(checkAndReadPackage(fs, packagePath)));
75};
76
77const readPackage =
78 (fs: FileSystem.FileSystem, path: Path.Path, packagesDir: string) => (dir: string) =>

Callers 1

readPackageFunction · 0.70

Calls 1

checkAndReadPackageFunction · 0.70

Tested by

no test coverage detected