Skip to content

Commit

Permalink
Ensure sync-react updates pnpm overrides (#68329)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Jul 30, 2024
1 parent 509c790 commit c28b2d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/sync-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Or, run this command with no arguments to use the most recently published versio
await fsp.readFile(path.join(cwd, 'package.json'), 'utf-8')
)
const devDependencies = pkgJson.devDependencies
const resolutions = pkgJson.resolutions
const pnpmOverrides = pkgJson.pnpm.overrides
const baseVersionStr = devDependencies[
useExperimental ? 'react-experimental-builtin' : 'react-builtin'
].replace(/^npm:react@/, '')
Expand Down Expand Up @@ -94,9 +94,9 @@ Or, run this command with no arguments to use the most recently published versio
)
}
}
for (const [dep, version] of Object.entries(resolutions)) {
for (const [dep, version] of Object.entries(pnpmOverrides)) {
if (version.endsWith(`${baseReleaseLabel}-${baseSha}-${baseDateString}`)) {
resolutions[dep] = version.replace(
pnpmOverrides[dep] = version.replace(
`${baseReleaseLabel}-${baseSha}-${baseDateString}`,
`${newReleaseLabel}-${newSha}-${newDateString}`
)
Expand Down

0 comments on commit c28b2d2

Please sign in to comment.