Skip to content

Commit daeb30f

Browse files
👷 Add check to skip private packages in update-peer-dependency-versions script (#3929)
1 parent da9fc67 commit daeb30f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎scripts/release/update-peer-dependency-versions.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { readFileSync } from 'node:fs'
12
import { runMain } from '../lib/executionUtils.ts'
23
import { modifyFile } from '../lib/filesUtils.ts'
34
import { command } from '../lib/command.ts'
@@ -17,6 +18,11 @@ const JSON_FILES = packagesDirectoryNames.map((packageName) => `./packages/${pac
1718
// [2]: https://github.com/lerna/lerna/issues/1575
1819
runMain(async () => {
1920
for (const jsonFile of JSON_FILES) {
21+
const packageJson = JSON.parse(readFileSync(jsonFile, 'utf8'))
22+
if (packageJson?.private) {
23+
continue
24+
}
25+
2026
await modifyFile(jsonFile, updateJsonPeerDependencies)
2127
}
2228
// update yarn.lock to match the updated JSON files

0 commit comments

Comments
 (0)