minor fixes
nclazz/depresolve/pipeline/head This commit looks good
Details
nclazz/depresolve/pipeline/head This commit looks good
Details
parent
e45a3118f5
commit
299c40e359
|
@ -19,11 +19,13 @@ export class NpmResolver implements Resolver<NpmResolverOptions> {
|
|||
}
|
||||
|
||||
private async resolveWithYarn(): Promise<ResolveResult[]> {
|
||||
console.log('Run npm resolver using yarn')
|
||||
try {
|
||||
child_process.execSync('yarn outdated', { })
|
||||
}catch (e: any) {
|
||||
// Unfortunately the command throws an error, that we have to catch
|
||||
const stdout = String(e.stdout)
|
||||
console.debug(stdout)
|
||||
return parseOutdatedLibraries(stdout, 'package.json')
|
||||
}
|
||||
return []
|
||||
|
|
|
@ -30,6 +30,8 @@ export const parseOutdatedLibraries = (stdout: string, location: string): Resolv
|
|||
|
||||
const results = lines
|
||||
.map(([name, current, , latest, packageType, url]) => {
|
||||
console.debug('Parse yarn outdated output', name, current, latest, packageType, url)
|
||||
|
||||
const currentVersion = parseSemver(current)
|
||||
const recommendedVersion = parseSemver(latest)
|
||||
const changeType = compareVersions(currentVersion, recommendedVersion)
|
||||
|
|
Loading…
Reference in New Issue