Skip to content

Commit

Permalink
fix: monorepo detection
Browse files Browse the repository at this point in the history
  • Loading branch information
janl authored and hulkoba committed Jul 15, 2019
1 parent 3d2dfac commit fdb9167
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/utils/initial-branch-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('initial branch utils', () => {
'bazquux/package.json'
]
const contents = {
'package.json': { devDependencies: { '@finnpauls/blup': '1.0.0' }, workspaceRoot: 'bazquux/' },
'package.json': { devDependencies: { '@finnpauls/blup': '1.0.0' }, workspaces: 'bazquux/' },
'bazquux/package.json': { devDependencies: { '@finnpauls/dep': '*' }, dependencies: { 'florp': '1.2.3' } }
}
const result = getDependenciesFromPackageFiles(paths, contents)
Expand Down
2 changes: 1 addition & 1 deletion utils/initial-branch-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getDependenciesFromPackageFiles (packagePaths, packageJsonContents) {
For those dependencies, we should not try to fetch infos
from npm, because the dependencies are not there.
*/
const isMonorepo = !!_.get(packageJsonContents['package.json'], 'workspaceRoot')
const isMonorepo = !!_.get(packageJsonContents['package.json'], 'workspaces')
const isMonorepoStar = ({ name, version, type }) => {
return !(isMonorepo && version === '*')
}
Expand Down

0 comments on commit fdb9167

Please sign in to comment.