Skip to content

Commit fdb9167

Browse files
janlhulkoba
authored andcommitted
fix: monorepo detection
1 parent 3d2dfac commit fdb9167

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/utils/initial-branch-utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('initial branch utils', () => {
122122
'bazquux/package.json'
123123
]
124124
const contents = {
125-
'package.json': { devDependencies: { '@finnpauls/blup': '1.0.0' }, workspaceRoot: 'bazquux/' },
125+
'package.json': { devDependencies: { '@finnpauls/blup': '1.0.0' }, workspaces: 'bazquux/' },
126126
'bazquux/package.json': { devDependencies: { '@finnpauls/dep': '*' }, dependencies: { 'florp': '1.2.3' } }
127127
}
128128
const result = getDependenciesFromPackageFiles(paths, contents)

utils/initial-branch-utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function getDependenciesFromPackageFiles (packagePaths, packageJsonContents) {
2323
For those dependencies, we should not try to fetch infos
2424
from npm, because the dependencies are not there.
2525
*/
26-
const isMonorepo = !!_.get(packageJsonContents['package.json'], 'workspaceRoot')
26+
const isMonorepo = !!_.get(packageJsonContents['package.json'], 'workspaces')
2727
const isMonorepoStar = ({ name, version, type }) => {
2828
return !(isMonorepo && version === '*')
2929
}

0 commit comments

Comments
 (0)