MCPcopy Create free account
hub / github.com/angular/dev-infra / getYarnVersion

Function getYarnVersion

ng-dev/utils/resolve-yarn-bin.ts:142–151  ·  view source on GitHub ↗
(info: YarnCommandInfo)

Source from the content-addressed store, hash-verified

140}
141
142async function getYarnVersion(info: YarnCommandInfo): Promise<string | null> {
143 try {
144 return (
145 await ChildProcess.spawn(info.binary, [...info.args, '--version'], {mode: 'silent'})
146 ).stdout.trim();
147 } catch (e) {
148 Log.debug('Could not determine Yarn version. Error:', e);
149 return null;
150 }
151}
152
153/** Finds and parses the Yarn configuration file for the given project. */
154async function findAndParseYarnConfiguration(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected