MCPcopy Create free account
hub / github.com/babel/babel / resolveChain

Function resolveChain

Gulpfile.ts:314–322  ·  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

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

Callers 1

buildRollupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected