Skip to content

Commit 57112fd

Browse files
authored
Merge pull request #745 from microsoft/fix-744
fix: Remove check for yarn.lock
2 parents b2288cd + d68e2f7 commit 57112fd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/npm.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,12 @@ async function getYarnProductionDependencies(cwd: string, packagedDependencies?:
185185
async function getYarnDependencies(cwd: string, packagedDependencies?: string[]): Promise<string[]> {
186186
const result = new Set([cwd]);
187187

188-
if (await exists(path.join(cwd, 'yarn.lock'))) {
189-
const deps = await getYarnProductionDependencies(cwd, packagedDependencies);
190-
const flatten = (dep: YarnDependency) => {
191-
result.add(dep.path);
192-
dep.children.forEach(flatten);
193-
};
194-
deps.forEach(flatten);
195-
}
188+
const deps = await getYarnProductionDependencies(cwd, packagedDependencies);
189+
const flatten = (dep: YarnDependency) => {
190+
result.add(dep.path);
191+
dep.children.forEach(flatten);
192+
};
193+
deps.forEach(flatten);
196194

197195
return [...result];
198196
}

0 commit comments

Comments
 (0)