MCPcopy
hub / github.com/arktypeio/arktype / assertPackageRoot

Function assertPackageRoot

ark/fs/fs.ts:142–148  ·  view source on GitHub ↗
(fromDir?: string)

Source from the content-addressed store, hash-verified

140}
141
142export const assertPackageRoot = (fromDir?: string): string => {
143 const startDir = fromDir ?? dirOfCaller()
144 const result = findPackageRoot(fromDir)
145 if (result) return result
146
147 throw new Error(`${startDir} is not part of a node package.`)
148}
149
150export const findPackageAncestors = (fromDir?: string): string[] => {
151 const dirs: string[] = []

Callers 3

forTypeScriptVersionsFunction · 0.90
fromPackageRootFunction · 0.85
readPackageJsonFunction · 0.85

Calls 2

dirOfCallerFunction · 0.85
findPackageRootFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…