Skip to content

Commit 5425ca9

Browse files
author
Dimitar Kerezov
committed
Respect runtime version written in package json
Instead of always installing the latest runtime version, respect the one written in `package.json` `nativescript` key.
1 parent 00b80f7 commit 5425ca9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ export const ItunesConnectApplicationTypes = new ItunesConnectApplicationTypesCl
6868
export const ANGULAR_NAME = "angular";
6969
export const TYPESCRIPT_NAME = "typescript";
7070
export const BUILD_OUTPUT_EVENT_NAME = "buildOutput";
71+
export const VERSION_STRING = "version";

lib/services/platform-service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export class PlatformService extends EventEmitter implements IPlatformService {
6767
}
6868

6969
let platformData = this.$platformsData.getPlatformData(platform, projectData);
70+
let currentPlatformData: any = this.$projectDataService.getNSValue(projectData.projectDir, platformData.frameworkPackageName);
71+
if (currentPlatformData && currentPlatformData[constants.VERSION_STRING]) {
72+
version = currentPlatformData[constants.VERSION_STRING];
73+
}
7074

7175
// Copy platform specific files in platforms dir
7276
let platformProjectService = platformData.platformProjectService;

0 commit comments

Comments
 (0)