MCPcopy Index your code
hub / github.com/angular/angularfire / findPackageVersion

Function findPackageVersion

src/schematics/deploy/actions.ts:118–121  ·  view source on GitHub ↗
(packageManager: string, name: string)

Source from the content-addressed store, hash-verified

116};
117
118const findPackageVersion = (packageManager: string, name: string) => {
119 const match = execSync(`${packageManager} list ${name}`).toString().match(`[^|s]${escapeRegExp(name)}[@| ][^s]+(s.+)?$`);
120 return match ? match[0].split(new RegExp(`${escapeRegExp(name)}[@| ]`))[1].split(/\s/)[0] : null;
121};
122
123const getPackageJson = (context: BuilderContext, workspaceRoot: string, options: DeployBuilderOptions, main?: string) => {
124 const dependencies: Record<string, string> = {};

Callers 1

getPackageJsonFunction · 0.85

Calls 1

escapeRegExpFunction · 0.85

Tested by

no test coverage detected