Skip to content

Commit

Permalink
fix(create branch): include woorkspaceRoot as part of the workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Realtin committed Jul 4, 2019
1 parent f9c70bd commit 1ee49fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/create-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ const getWorkspaceRootPathForCommit = ({
commit
}) => {
return packageJsonPathsWithWorkspaceDefinitions.find(packageJsonPath => {
// the workspaceRoot itself is also always part of the workspace
if (commit.path === packageJsonPath) return true

const rootPath = packageJsonPath.replace('package.json', '')
// Get the packageJson with the workspace definitions
const packageJson = repoDoc.packages[packageJsonPath]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
},
"package.json": Object {
"dependencies": Object {
"react": "1.0.0",
"react": "2.0.0",
},
"workspaces": Array [
"jobs/*",
Expand Down

0 comments on commit 1ee49fc

Please sign in to comment.