-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathcheck-rn-versions.js
More file actions
24 lines (21 loc) · 794 Bytes
/
check-rn-versions.js
File metadata and controls
24 lines (21 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { exit } = require('process');
const path = require('path');
const basicExamplePackageJsonPath = path.join(
__dirname,
'../apps/basic-example/package.json'
);
const basicExamplePackageJson = require(basicExamplePackageJsonPath);
const rnghPackageJsonPath = path.join(
__dirname,
'../packages/react-native-gesture-handler/package.json'
);
const rnghPackageJson = require(rnghPackageJsonPath);
if (
rnghPackageJson.devDependencies['react-native'] !==
basicExamplePackageJson.dependencies['react-native']
) {
console.error(
'There is a mismatch between the react-native version in the BasicExample and react-native-gesture-handler packages.\nIf you are bumping react-native version, make sure to also update react-native-gesture-handler package.json.'
);
exit(1);
}