Skip to content

Commit

Permalink
sdk(react-native-sdk): update script to check if dep versions are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinteodor committed Sep 23, 2023
1 parent 8a7f456 commit 31a59d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions react-native-sdk/update_dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ function updateDependencies() {
updated = true;
}

if (!semver.valid(packageJSON.dependencies[key])) {
packageJSON.dependencies[key] = RNSDKpackageJSON.peerDependencies[key];
updated = true;

console.log(`
⚠️We changed ${key} version number from ${packageJSON.dependencies[key]} to ${RNSDKpackageJSON.peerDependencies[key]}`
);

continue;
}

if (semver.satisfies(RNSDKpackageJSON.peerDependencies[key], `=${packageJSON.dependencies[key]}`)) {
continue;
}
Expand Down

0 comments on commit 31a59d8

Please sign in to comment.