Skip to content

Commit 635b408

Browse files
committed
Fix Package API usage to get react-native package.json
1 parent 6b8454d commit 635b408

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/projectVersionHelper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export class ProjectVersionHelper {
6363
nodeModulesRoot = AppLauncher.getNodeModulesRootByProjectPath(projectRoot);
6464
}
6565
const rnPackage = new Package(nodeModulesRoot);
66-
const rnPkgJson = await rnPackage.getPackageJsonFromNodeModules(
67-
REACT_NATIVE_PACKAGES.REACT_NATIVE.packageName,
68-
);
66+
const rnPkgJson = await rnPackage
67+
.dependencyPackage(REACT_NATIVE_PACKAGES.REACT_NATIVE.packageName)
68+
.parsePackageInformation();
6969
const engines = rnPkgJson && rnPkgJson.engines;
7070
const nodeRange = engines && engines.node;
7171
if (typeof nodeRange === "string" && nodeRange.trim().length > 0) {

0 commit comments

Comments
 (0)