MCPcopy
hub / github.com/babel/babel / resolveChain

Function resolveChain

Gulpfile.ts:313–321  ·  view source on GitHub ↗

* Resolve a nested dependency starting from the given file

(baseUrl: string, ...packages: string[])

Source from the content-addressed store, hash-verified

311 * Resolve a nested dependency starting from the given file
312 */
313function resolveChain(baseUrl: string, ...packages: string[]) {
314 const require = createRequire(baseUrl);
315
316 return packages.reduce(
317 (base, pkg) =>
318 path.dirname(require.resolve(pkg + "/package.json", { paths: [base] })),
319 path.dirname(fileURLToPath(baseUrl))
320 );
321}
322
323// If this build is part of a pull request, include the pull request number in
324// the version number.

Callers 1

buildRollupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…