Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
🐛 Fix package.json not commited in Yarn workspaces
Browse files Browse the repository at this point in the history
Fixed #105
  • Loading branch information
Leko committed Aug 1, 2018
1 parent 5070cce commit f2f5105
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/@hothouse/monorepo-yarn-workspaces/src/index.js
Expand Up @@ -48,14 +48,17 @@ class YarnWorkspaces implements Structure {
npmClient: PackageManager
): Promise<Set<string>> {
await npmClient.install(rootDirectory);
return this.getChanges(rootDirectory);
return this.getChanges(packageDirectory, rootDirectory);
}

async getChanges(rootDirectory: string): Promise<Set<string>> {
async getChanges(
packageDirectory: string,
rootDirectory: string
): Promise<Set<string>> {
// #88 package-lock.json should not be added nor committed if not exist
return new Set(
[
path.join(rootDirectory, "package.json"),
path.join(packageDirectory, "package.json"),
path.join(rootDirectory, "yarn.lock")
]
.filter(fs.existsSync)
Expand Down

0 comments on commit f2f5105

Please sign in to comment.