Skip to content

Commit

Permalink
fix: remove singleton behavior for localShadowRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jan 3, 2022
1 parent 815830f commit 887bb68
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/shared/localShadowRepo.ts
Expand Up @@ -45,8 +45,6 @@ interface CommitRequest {
}

export class ShadowRepo {
// private static instance: ShadowRepo;

public gitDir: string;
public projectPath: string;

Expand All @@ -61,12 +59,8 @@ export class ShadowRepo {
this.packageDirs = options.packageDirs;
}

// this is NOT a singleton but it was at one point, so its public method still sounds like it would be
public static async getInstance(options: ShadowRepoOptions): Promise<ShadowRepo> {
// if (!ShadowRepo.instance) {
// ShadowRepo.instance = new ShadowRepo(options);
// await ShadowRepo.instance.init();
// }
// return ShadowRepo.instance;
const instance = new ShadowRepo(options);
await instance.init();
return instance;
Expand Down

0 comments on commit 887bb68

Please sign in to comment.