build: fix merge issue in packages generation

This commit is contained in:
ElevateBart
2021-12-07 12:09:01 -06:00
parent 58c60f7367
commit 20d03608cc

View File

@@ -148,11 +148,13 @@ export const replaceLocalNpmVersions = async function (basePath: string) {
const pkgName = depName.startsWith('@cypress/') ? depName.split('/')[1] : depName
json.dependencies[depName] = `file:${path.join(basePath, 'npm', pkgName)}`
const localPkgPath = path.join(basePath, 'npm', pkgName)
json.dependencies[depName] = `file:${localPkgPath}`
shouldWriteFile = true
if (!visited.has(depName)) {
await updatePackageJson(`./npm/${pkgName}/package.json`)
if (!visited.has(localPkgPath)) {
await updatePackageJson(`./npm/${pkgName}`)
}
shouldWriteFile = true