Skip to content

Commit 7a815e2

Browse files
committedFeb 23, 2024
Return undefined if no manifest (shouldn't happen anyway)
1 parent d5bb530 commit 7a815e2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎packages/knip/src/ConfigurationChief.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export class ConfigurationChief {
365365
}
366366

367367
public getManifestForWorkspace(dir: string) {
368-
return this.availableWorkspaceManifests?.find(item => item.dir === dir)?.manifest ?? {};
368+
return this.availableWorkspaceManifests?.find(item => item.dir === dir)?.manifest;
369369
}
370370

371371
public getIncludedWorkspaces() {

‎packages/knip/src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
145145
const manifest = chief.getManifestForWorkspace(dir);
146146
const { ignoreBinaries, ignoreDependencies } = chief.getIgnores(name);
147147

148+
if (!manifest) continue;
149+
148150
deputy.addWorkspace({ name, cwd, dir, manifestPath, manifest, ignoreBinaries, ignoreDependencies });
149151
const dependencies = deputy.getDependencies(name);
150152

0 commit comments

Comments
 (0)
Please sign in to comment.