Unverified Commit c28b2d25 authored by Sebastian Silbermann's avatar Sebastian Silbermann Committed by GitHub

Ensure sync-react updates pnpm overrides (#68329)

parent 509c7909
......@@ -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@/, '')
......@@ -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}`
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment