Skip to content

Commit

Permalink
Merge pull request #745 from microsoft/fix-744
Browse files Browse the repository at this point in the history
fix: Remove check for yarn.lock
  • Loading branch information
hediet committed Jun 23, 2022
2 parents b2288cd + d68e2f7 commit 57112fd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/npm.ts
Expand Up @@ -185,14 +185,12 @@ async function getYarnProductionDependencies(cwd: string, packagedDependencies?:
async function getYarnDependencies(cwd: string, packagedDependencies?: string[]): Promise<string[]> {
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];
}
Expand Down

0 comments on commit 57112fd

Please sign in to comment.