From d68e2f7947069dd26c6aa425523cee8372dbd73a Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Wed, 22 Jun 2022 17:19:58 +0200 Subject: [PATCH] Remove check for yarn.lock --- src/npm.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/npm.ts b/src/npm.ts index a57eaad2..c355cbef 100644 --- a/src/npm.ts +++ b/src/npm.ts @@ -185,14 +185,12 @@ async function getYarnProductionDependencies(cwd: string, packagedDependencies?: async function getYarnDependencies(cwd: string, packagedDependencies?: string[]): Promise { const result = new Set([cwd]); - if (await exists(path.join(cwd, 'yarn.lock'))) { - const deps = await getYarnProductionDependencies(cwd, packagedDependencies); - const flatten = (dep: YarnDependency) => { - result.add(dep.path); - dep.children.forEach(flatten); - }; - deps.forEach(flatten); - } + const deps = await getYarnProductionDependencies(cwd, packagedDependencies); + const flatten = (dep: YarnDependency) => { + result.add(dep.path); + dep.children.forEach(flatten); + }; + deps.forEach(flatten); return [...result]; }