MCPcopy
hub / github.com/prisma/prisma / resolvePkg

Function resolvePkg

packages/internals/src/resolvePkg.ts:26–30  ·  view source on GitHub ↗
(id: string, options: resolve.AsyncOpts)

Source from the content-addressed store, hash-verified

24 * `require.resolve`. This variant will find the _root_ of a package.
25 */
26export async function resolvePkg(id: string, options: resolve.AsyncOpts) {
27 const resolvedPath = await resolveOrUndefined(`${id}/package.json`, options)
28
29 return resolvedPath && path.dirname(resolvedPath)
30}

Callers 4

getPackedPackageFunction · 0.90
findPrismaClientDirFunction · 0.90
resolveFunction · 0.85
getCurrentClientVersionFunction · 0.85

Calls 1

resolveOrUndefinedFunction · 0.85

Tested by

no test coverage detected