Skip to content

Commit

Permalink
Fix version script (facebook#5906)
Browse files Browse the repository at this point in the history
  • Loading branch information
acywatson authored Apr 17, 2024
1 parent e2f1dff commit 2b9b54f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/updateVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,23 @@ function sortDependencies(packageJSON, key, deps) {
* @param {string} version
*/
function updateDependencies(packageJSON, version) {
const {dependencies = {}, peerDependencies = {}} = packageJSON;
const {
dependencies = {},
peerDependencies = {},
devDependencies = {},
} = packageJSON;
Object.keys(dependencies).forEach((dep) => {
if (packages[dep] !== undefined) {
dependencies[dep] = version;
}
});
// We need to update the dev dependencies of the devtools package since it includes lexical
// dev-tools-core.
Object.keys(devDependencies).forEach((devDep) => {
if (packages[devDep] !== undefined) {
devDependencies[devDep] = version;
}
});
// Move peerDependencies on lexical monorepo packages to dependencies
// per #5783
Object.keys(peerDependencies).forEach((peerDep) => {
Expand Down

0 comments on commit 2b9b54f

Please sign in to comment.