From 678f098606d24b1c98844f71606056c6746b86d9 Mon Sep 17 00:00:00 2001 From: fatme Date: Fri, 25 May 2018 14:12:13 +0300 Subject: [PATCH 01/10] Don't show components info when `tns doctor` command is executed outside of project directory --- lib/services/versions-service.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/services/versions-service.ts b/lib/services/versions-service.ts index c46fff5793..441f17dc6f 100644 --- a/lib/services/versions-service.ts +++ b/lib/services/versions-service.ts @@ -100,14 +100,15 @@ class VersionsService implements IVersionsService { allComponents.push(nativescriptCliInformation); } - const nativescriptCoreModulesInformation: IVersionInformation = await this.getTnsCoreModulesVersion(); - if (nativescriptCoreModulesInformation) { - allComponents.push(nativescriptCoreModulesInformation); - } - - const runtimesVersions: IVersionInformation[] = await this.getRuntimesVersions(); + if (this.projectData) { + const nativescriptCoreModulesInformation: IVersionInformation = await this.getTnsCoreModulesVersion(); + if (nativescriptCoreModulesInformation) { + allComponents.push(nativescriptCoreModulesInformation); + } - allComponents = allComponents.concat(runtimesVersions); + const runtimesVersions: IVersionInformation[] = await this.getRuntimesVersions(); + allComponents = allComponents.concat(runtimesVersions); + } return allComponents .map(componentInformation => { From 0f6fcc32f7783ddd78a47ad93bcb3b8dac4b85dd Mon Sep 17 00:00:00 2001 From: fatme Date: Fri, 25 May 2018 15:17:32 +0300 Subject: [PATCH 02/10] Don't print warnings messages twice when `tns doctor` command is executed and env is not correctly configured. --- lib/services/doctor-service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/services/doctor-service.ts b/lib/services/doctor-service.ts index 514614833c..556f859d04 100644 --- a/lib/services/doctor-service.ts +++ b/lib/services/doctor-service.ts @@ -34,12 +34,11 @@ class DoctorService implements IDoctorService { await this.$analyticsService.track("DoctorEnvironmentSetup", hasWarnings ? "incorrect" : "correct"); } - this.printInfosCore(infos); - if (hasWarnings) { this.$logger.info("There seem to be issues with your configuration."); } else { this.$logger.out("No issues were detected.".bold); + this.printInfosCore(infos); } try { From 3d94aa68ae3c95c5d8a0bf24cd68fa8426269163 Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Fri, 25 May 2018 18:40:02 +0300 Subject: [PATCH 03/10] fix(node-xcode): Update to 1.5.1 tag Fix issue with C++ source code files being added to Resources instead of Sources group. Add unit tests. --- npm-shrinkwrap.json | 4 ++-- package.json | 2 +- test/ios-project-service.ts | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c0e986f2a3..33e61d49ea 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -5658,8 +5658,8 @@ } }, "xcode": { - "version": "https://github.com/NativeScript/node-xcode/archive/NativeScript-1.5.0.tar.gz", - "integrity": "sha512-2q3ALXJ/kyJht3TyQxfYpMLbWkoB0ndcp3gl9Jj03CQxrFeFRc6xiFPnye29QSnlAkzx83JRfOUgyZNcXjsr7g==", + "version": "https://github.com/NativeScript/node-xcode/archive/NativeScript-1.5.1.tar.gz", + "integrity": "sha512-YIj7RSd4onuBYp2CAxFaO5zm+q59AyqRbng+fKb0Schwj+23xKM2AmtuVzg/XrC5eFUEBnIznVDT+pRMzUy5RQ==", "requires": { "node-uuid": "1.3.3", "pegjs": "0.6.2" diff --git a/package.json b/package.json index 8376304cbc..2c768d4b98 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "uuid": "3.0.1", "winreg": "0.0.17", "ws": "5.1.0", - "xcode": "https://github.com/NativeScript/node-xcode/archive/NativeScript-1.5.0.tar.gz", + "xcode": "https://github.com/NativeScript/node-xcode/archive/NativeScript-1.5.1.tar.gz", "xml2js": "0.4.19", "xmldom": "0.1.21", "xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master", diff --git a/test/ios-project-service.ts b/test/ios-project-service.ts index 12eef30b8a..16aca624d1 100644 --- a/test/ios-project-service.ts +++ b/test/ios-project-service.ts @@ -548,7 +548,9 @@ describe("Source code in plugin support", () => { assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`); if (shouldBeAdded && !path.extname(basename).startsWith(".h")) { - assert.isDefined(buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)), `${basename} not added to PBXSourcesBuildPhase`); + const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)); + assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`); + assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`); } } else { assert.equal(pbxFileReferenceValues.indexOf(basename), -1, `${basename} was added to PBXFileRefereces, but it shouldn't have been`); @@ -566,11 +568,19 @@ describe("Source code in plugin support", () => { const pbxFileReference = pbxProj.hash.project.objects.PBXFileReference; const pbxFileReferenceValues = Object.keys(pbxFileReference).map(key => pbxFileReference[key]); + const buildPhaseFiles = pbxProj.hash.project.objects.PBXResourcesBuildPhase["858B842C18CA22B800AB12DE"].files; resFileNames.forEach(filename => { const dirName = path.dirname(filename); const fileToCheck = dirName.endsWith(".bundle") ? dirName : filename; - assert.isTrue(pbxFileReferenceValues.indexOf(path.basename(fileToCheck)) !== -1, `Resource ${filename} not added to PBXFileRefereces`); + const basename = path.basename(fileToCheck); + + assert.isTrue(pbxFileReferenceValues.indexOf(basename) !== -1, `Resource ${filename} not added to PBXFileRefereces`); + + const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename)); + assert.isDefined(buildPhaseFile, `${fileToCheck} not added to PBXResourcesBuildPhase`); + assert.include(buildPhaseFile.comment, "in Resources", `${fileToCheck} must be added to Resources group`); + }); }); } From dd40c9db797c95c223aa3dde7f1f0fbeaf4fb023 Mon Sep 17 00:00:00 2001 From: Rosen Vladimirov Date: Sun, 27 May 2018 14:10:43 +0300 Subject: [PATCH 04/10] fix: platform remove command fails with old Android runtime After upgrading `nativescript-doctor`, the version of the Java is validated against the current Android runtime version. In case the runtime version cannot work with Java 10, `nativescript-doctor` does not allow the operation to continue. This breaks the `platform remove` command, as it checks the system requirements first, before executing the actual removal. However, this is no longer required as the code for removing the platform is `try-catched` and in case the current environment is not setup correctly, it will try to remove the platforms/ dir and the respective key in package.json. So remove the environment validation from this command. Also remove the `validatePlatformInstalled` call from the `canExecute` method of the command, as it is actually called in the `removePlatforms` method. --- lib/commands/remove-platform.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/commands/remove-platform.ts b/lib/commands/remove-platform.ts index e6132e14bf..3ee9b90dc7 100644 --- a/lib/commands/remove-platform.ts +++ b/lib/commands/remove-platform.ts @@ -3,8 +3,7 @@ export class RemovePlatformCommand implements ICommand { constructor(private $platformService: IPlatformService, private $projectData: IProjectData, - private $errors: IErrors, - private $platformsData: IPlatformsData) { + private $errors: IErrors) { this.$projectData.initializeProjectData(); } @@ -17,12 +16,9 @@ export class RemovePlatformCommand implements ICommand { this.$errors.fail("No platform specified. Please specify a platform to remove"); } - for (const platform of args) { - this.$platformService.validatePlatformInstalled(platform, this.$projectData); - const platformData = this.$platformsData.getPlatformData(platform, this.$projectData); - const platformProjectService = platformData.platformProjectService; - await platformProjectService.validate(this.$projectData); - } + _.each(args, platform => { + this.$platformService.validatePlatform(platform, this.$projectData); + }); return true; } From d694a25daeaa43175dcf9c6f549a30020ca95a47 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 15:21:51 +0300 Subject: [PATCH 05/10] fix: Validate environment based on specified runtime version Add logic to validate environment based on the specified runtime version. This is required for the cases where the runtime version is not specified in the project's package.json but we need to verify if a runtime version can be used For `tns platform update ` command validate the runtime version that will be installed based on the passed argument. This has two cases: 1. In case version is specified: `tns platform update android@4.0.1` - we'll get the 4.0.1 version and validate if it can be used with currently installed Java compiler version. 2. In case version is not specified: `tns platform update android` - we'll not validate the java version here as we know we'll install at least 4.1.0 runtime, which is compatible with all Java versions For `tns platform clean ` command we need to validate the current platform immediately as the command removes it and adds the same version after that. --- lib/commands/platform-clean.ts | 11 +++++---- lib/commands/update-platform.ts | 24 ++++++++++++++----- lib/common | 2 +- lib/definitions/platform.d.ts | 12 ++++++++-- lib/services/doctor-service.ts | 8 +++---- .../platform-environment-requirements.ts | 8 +++---- lib/services/platform-service.ts | 2 +- test/stubs.ts | 4 ++++ 8 files changed, 49 insertions(+), 22 deletions(-) diff --git a/lib/commands/platform-clean.ts b/lib/commands/platform-clean.ts index 5542372de9..7193a75ca1 100644 --- a/lib/commands/platform-clean.ts +++ b/lib/commands/platform-clean.ts @@ -5,7 +5,7 @@ export class CleanCommand implements ICommand { private $projectData: IProjectData, private $platformService: IPlatformService, private $errors: IErrors, - private $platformsData: IPlatformsData) { + private $platformEnvironmentRequirements: IPlatformEnvironmentRequirements) { this.$projectData.initializeProjectData(); } @@ -18,12 +18,15 @@ export class CleanCommand implements ICommand { this.$errors.fail("No platform specified. Please specify a platform to clean"); } + _.each(args, platform => { + this.$platformService.validatePlatform(platform, this.$projectData); + }); + for (const platform of args) { this.$platformService.validatePlatformInstalled(platform, this.$projectData); - const platformData = this.$platformsData.getPlatformData(platform, this.$projectData); - const platformProjectService = platformData.platformProjectService; - await platformProjectService.validate(this.$projectData); + const currentRuntimeVersion = this.$platformService.getCurrentPlatformVersion(platform, this.$projectData); + await this.$platformEnvironmentRequirements.checkEnvironmentRequirements(platform, this.$projectData.projectDir, currentRuntimeVersion); } return true; diff --git a/lib/commands/update-platform.ts b/lib/commands/update-platform.ts index 7dc8c1dae3..bfa3fa2c1f 100644 --- a/lib/commands/update-platform.ts +++ b/lib/commands/update-platform.ts @@ -4,8 +4,8 @@ export class UpdatePlatformCommand implements ICommand { constructor(private $options: IOptions, private $projectData: IProjectData, private $platformService: IPlatformService, - private $errors: IErrors, - private $platformsData: IPlatformsData) { + private $platformEnvironmentRequirements: IPlatformEnvironmentRequirements, + private $errors: IErrors) { this.$projectData.initializeProjectData(); } @@ -18,12 +18,24 @@ export class UpdatePlatformCommand implements ICommand { this.$errors.fail("No platform specified. Please specify platforms to update."); } - for (const arg of args) { + _.each(args, arg => { const platform = arg.split("@")[0]; this.$platformService.validatePlatform(platform, this.$projectData); - const platformData = this.$platformsData.getPlatformData(platform, this.$projectData); - const platformProjectService = platformData.platformProjectService; - await platformProjectService.validate(this.$projectData); + }); + + for (const arg of args) { + const [ platform, versionToBeInstalled ] = arg.split("@"); + this.$platformService.validatePlatformInstalled(platform, this.$projectData); + const argsToCheckEnvironmentRequirements: string[] = [ platform ]; + // If version is not specified, we know the command will install the latest compatible Android runtime. + // The latest compatible Android runtime supports Java version, so we do not need to pass it here. + // Passing projectDir to the nativescript-doctor validation will cause it to check the runtime from the current package.json + // So in this case, where we do not want to validate the runtime, just do not pass both projectDir and runtimeVersion. + if (versionToBeInstalled) { + argsToCheckEnvironmentRequirements.push(this.$projectData.projectDir, versionToBeInstalled); + } + + await this.$platformEnvironmentRequirements.checkEnvironmentRequirements(...argsToCheckEnvironmentRequirements); } return true; diff --git a/lib/common b/lib/common index a20a105da0..4ed6670d28 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit a20a105da0789a4c57bc6420ce6bb2b594789d77 +Subproject commit 4ed6670d2815ed4103079237b11a0a4468c6191d diff --git a/lib/definitions/platform.d.ts b/lib/definitions/platform.d.ts index 15aba5c20f..b76e7fa5c2 100644 --- a/lib/definitions/platform.d.ts +++ b/lib/definitions/platform.d.ts @@ -214,6 +214,14 @@ interface IPlatformService extends IBuildPlatformAction, NodeJS.EventEmitter { * @returns {void} */ saveBuildInfoFile(platform: string, projectDir: string, buildInfoFileDirname: string): void; + + /** + * Gives information for the current version of the runtime. + * @param {string} platform The platform to be checked. + * @param {IProjectData} projectData The data describing the project + * @returns {string} Runtime version + */ + getCurrentPlatformVersion(platform: string, projectData: IProjectData): string; } interface IPlatformOptions extends IPlatformSpecificData, ICreateProjectOptions { } @@ -381,5 +389,5 @@ interface IUpdateAppOptions extends IOptionalFilesToSync, IOptionalFilesToRemove } interface IPlatformEnvironmentRequirements { - checkEnvironmentRequirements(platform?: string, projectDir?: string): Promise; -} \ No newline at end of file + checkEnvironmentRequirements(platform?: string, projectDir?: string, runtimeVersion?: string): Promise; +} diff --git a/lib/services/doctor-service.ts b/lib/services/doctor-service.ts index ef1bc98bf9..8b153e11f8 100644 --- a/lib/services/doctor-service.ts +++ b/lib/services/doctor-service.ts @@ -17,10 +17,10 @@ class DoctorService implements IDoctorService { private $terminalSpinnerService: ITerminalSpinnerService, private $versionsService: IVersionsService) { } - public async printWarnings(configOptions?: { trackResult: boolean , projectDir?: string }): Promise { + public async printWarnings(configOptions?: { trackResult: boolean , projectDir?: string, runtimeVersion?: string }): Promise { const infos = await this.$terminalSpinnerService.execute({ text: `Getting environment information ${EOL}` - }, () => doctor.getInfos({ projectDir: configOptions && configOptions.projectDir })); + }, () => doctor.getInfos({ projectDir: configOptions && configOptions.projectDir, androidRuntimeVersion: configOptions && configOptions.runtimeVersion })); const warnings = infos.filter(info => info.type === constants.WARNING_TYPE_NAME); const hasWarnings = warnings.length > 0; @@ -80,12 +80,12 @@ class DoctorService implements IDoctorService { }); } - public async canExecuteLocalBuild(platform?: string, projectDir?: string): Promise { + public async canExecuteLocalBuild(platform?: string, projectDir?: string, runtimeVersion?: string): Promise { await this.$analyticsService.trackEventActionInGoogleAnalytics({ action: TrackActionNames.CheckLocalBuildSetup, additionalData: "Starting", }); - const infos = await doctor.getInfos({ platform, projectDir }); + const infos = await doctor.getInfos({ platform, projectDir, androidRuntimeVersion: runtimeVersion }); const warnings = this.filterInfosByType(infos, constants.WARNING_TYPE_NAME); const hasWarnings = warnings.length > 0; diff --git a/lib/services/platform-environment-requirements.ts b/lib/services/platform-environment-requirements.ts index e5b17199b2..b07e52a020 100644 --- a/lib/services/platform-environment-requirements.ts +++ b/lib/services/platform-environment-requirements.ts @@ -30,7 +30,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ "deploy": "tns cloud deploy" }; - public async checkEnvironmentRequirements(platform?: string, projectDir?: string): Promise { + public async checkEnvironmentRequirements(platform?: string, projectDir?: string, runtimeVersion?: string): Promise { if (process.env.NS_SKIP_ENV_CHECK) { await this.$analyticsService.trackEventActionInGoogleAnalytics({ action: TrackActionNames.CheckEnvironmentRequirements, @@ -39,7 +39,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ return true; } - const canExecute = await this.$doctorService.canExecuteLocalBuild(platform, projectDir); + const canExecute = await this.$doctorService.canExecuteLocalBuild(platform, projectDir, runtimeVersion); if (!canExecute) { if (!isInteractive()) { await this.$analyticsService.trackEventActionInGoogleAnalytics({ @@ -71,7 +71,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ if (selectedOption === PlatformEnvironmentRequirements.LOCAL_SETUP_OPTION_NAME) { await this.$doctorService.runSetupScript(); - if (await this.$doctorService.canExecuteLocalBuild(platform, projectDir)) { + if (await this.$doctorService.canExecuteLocalBuild(platform, projectDir, runtimeVersion)) { return true; } @@ -102,7 +102,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ if (selectedOption === PlatformEnvironmentRequirements.BOTH_CLOUD_SETUP_AND_LOCAL_SETUP_OPTION_NAME) { await this.processBothCloudBuildsAndSetupScript(); - if (await this.$doctorService.canExecuteLocalBuild(platform, projectDir)) { + if (await this.$doctorService.canExecuteLocalBuild(platform, projectDir, runtimeVersion)) { return true; } diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 6d517014aa..272590e8a9 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -74,7 +74,7 @@ export class PlatformService extends EventEmitter implements IPlatformService { } } - private getCurrentPlatformVersion(platform: string, projectData: IProjectData): string { + public getCurrentPlatformVersion(platform: string, projectData: IProjectData): string { const platformData = this.$platformsData.getPlatformData(platform, projectData); const currentPlatformData: any = this.$projectDataService.getNSValue(projectData.projectDir, platformData.frameworkPackageName); let version: string; diff --git a/test/stubs.ts b/test/stubs.ts index b6894ce45a..2bc186ac87 100644 --- a/test/stubs.ts +++ b/test/stubs.ts @@ -812,6 +812,10 @@ export class PlatformServiceStub extends EventEmitter implements IPlatformServic public async trackActionForPlatform(actionData: ITrackPlatformAction): Promise { return null; } + + public getCurrentPlatformVersion(platform: string, projectData: IProjectData): string { + return null; + } } export class EmulatorPlatformService implements IEmulatorPlatformService { From e6979ef4b951deac47b083661c0340b16b24ab94 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 15:24:41 +0300 Subject: [PATCH 06/10] chore: Update version of natiescript-doctor to current rc --- npm-shrinkwrap.json | 36 ++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 33e61d49ea..acb08f8605 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -6,7 +6,7 @@ "dependencies": { "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -16,13 +16,13 @@ "@types/chai": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.0.1.tgz", - "integrity": "sha512-DWrdkraJO+KvBB7+Jc6AuDd2+fwV6Z9iK8cqEEoYpcurYrH7GiUZmwjFuQIIWj5HhFz6NsSxdN72YMIHT7Fy2Q==", + "integrity": "sha1-N/6neWF8/sP9KxmgJH6LvdUTO/Y=", "dev": true }, "@types/chai-as-promised": { "version": "0.0.31", "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-0.0.31.tgz", - "integrity": "sha512-DWT96QeM5AeASIkChnFtEOy6O45WvKmaw27MPhAKLkx06TaFNqrzJuWVurKjCEo3PqVV89YLR2iVON8PhTRaLg==", + "integrity": "sha1-4ekF6m2XHa/K02VgyPH3p9aQxeU=", "dev": true, "requires": { "@types/chai": "4.0.1" @@ -79,7 +79,7 @@ "@types/lockfile": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/lockfile/-/lockfile-1.0.0.tgz", - "integrity": "sha512-pD6JuijPmrfi84qF3/TzGQ7zi0QIX+d7ZdetD6jUA6cp+IsCzAquXZfi5viesew+pfpOTIdAVKuh1SHA7KeKzg==", + "integrity": "sha1-dqfBnFD+juKxZm1lP/XVV8MP4P8=", "dev": true }, "@types/node": { @@ -109,7 +109,7 @@ "@types/request": { "version": "0.0.45", "resolved": "https://registry.npmjs.org/@types/request/-/request-0.0.45.tgz", - "integrity": "sha512-OIIREjT58pnpfJjEY5PeBEuRtRR2ED4DF1Ez3Dj9474kCqEKfE+iNAYyM/P3RxxDjNxBhipo+peNBW0S/7Wrzg==", + "integrity": "sha1-xuUr6LEI6wNcNaqa9Wo4omDD5+Y=", "dev": true, "requires": { "@types/form-data": "2.2.1", @@ -137,7 +137,7 @@ "@types/universal-analytics": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/universal-analytics/-/universal-analytics-0.4.1.tgz", - "integrity": "sha512-AZSPpDUEZ4mAgO9geHc62dp/xCLmBJ1yIpbgTq5W/cWcVQsxmU/FyKwYKHXk2hnT9TAmYVFFdAijMrCdYjuHsA==", + "integrity": "sha1-7mESGwqJiwvqXuskcgCJjg+o8Jw=", "dev": true }, "@types/ws": { @@ -638,7 +638,7 @@ "chai-as-promised": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.0.0.tgz", - "integrity": "sha512-7YYdnXPq2pV9nvRBb36Wi/MXfT8j2iL/H76GtenlOMatXbMoQLb+PonuVHGFsw5wE2M6R/VFciq8AnSSAix0GA==", + "integrity": "sha1-yH7mE+qhlnZjk9pvu0BS8RKs9nU=", "dev": true, "requires": { "check-error": "1.0.2", @@ -2217,7 +2217,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -2230,7 +2230,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "1.1.11" } @@ -2266,7 +2266,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "globby": { @@ -3812,9 +3812,9 @@ "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==" }, "nativescript-doctor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-1.1.0.tgz", - "integrity": "sha512-XmZO+6tLbiOGr/gLYuhmVhec0UPOSsShK/dG7LlEkiLOE7ew7LB/j/gPFAzS5I54jjudJ/qDK/cMvcZWS0TvBg==", + "version": "1.2.0-rc.0", + "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-1.2.0-rc.0.tgz", + "integrity": "sha512-tqWLXzYmFjlWOh+XoNkmbS1knYU5U13AhBQjZtZdhecwC3Snyp43nmHQEIrjq1gmgOgTEFDSa0gsK826FiyYwg==", "requires": { "osenv": "0.1.3", "semver": "5.3.0", @@ -3886,7 +3886,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "requires": { "hosted-git-info": "2.6.0", "is-builtin-module": "1.0.0", @@ -4731,7 +4731,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" }, "semver": { "version": "5.3.0", @@ -4776,7 +4776,7 @@ }, "should-equal": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz", "integrity": "sha1-x5fxNfMGf+tp6+zbMGscP+IbPm8=", "dev": true, "requires": { @@ -5327,7 +5327,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "1.1.11" @@ -5476,7 +5476,7 @@ "universal-analytics": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.15.tgz", - "integrity": "sha512-9Dt6WBWsHsmv74G+N/rmEgi6KFZxVvQXkVhr0disegeUryybQAUQwMD1l5EtqaOu+hSOGbhL/hPPQYisZIqPRw==", + "integrity": "sha1-SrxhsVn/52W+FE4Ht7c54O57iKs=", "requires": { "async": "1.2.1", "request": "2.85.0", diff --git a/package.json b/package.json index 2c768d4b98..f760e4485d 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "minimatch": "3.0.2", "mkdirp": "0.5.1", "mute-stream": "0.0.5", - "nativescript-doctor": "1.1.0", + "nativescript-doctor": "1.2.0-rc.0", "open": "0.0.5", "ora": "2.0.0", "osenv": "0.1.3", From 5bc7a58512a81cea29603e0c1dca515af9b8b667 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 17:29:41 +0300 Subject: [PATCH 07/10] chore: Fix unit-tests --- test/platform-commands.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/platform-commands.ts b/test/platform-commands.ts index c8d988f3d4..9f2730fa32 100644 --- a/test/platform-commands.ts +++ b/test/platform-commands.ts @@ -165,6 +165,9 @@ function createTestInjector() { getPlaygroundInfo: () => Promise.resolve(null) }); testInjector.register("filesHashService", {}); + testInjector.register("platformEnvironmentRequirements", { + checkEnvironmentRequirements: async (platform?: string, projectDir?: string, runtimeVersion?: string): Promise => true + }); return testInjector; } From 2a7a25236a6ac51cd7c8f52467b71156549fb8cf Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 18:12:41 +0300 Subject: [PATCH 08/10] chore: Update to latest common lib --- lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common b/lib/common index 4ed6670d28..fff883ea95 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 4ed6670d2815ed4103079237b11a0a4468c6191d +Subproject commit fff883ea9559b31029760bcc7ba6375cfbb6adee From 4f98f8b8e832998aa2a6bfa46fc459b12528fd56 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 18:15:22 +0300 Subject: [PATCH 09/10] chore: Update nativescript-doctor to 1.2.0 --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index acb08f8605..86b7ccdc27 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -3812,9 +3812,9 @@ "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==" }, "nativescript-doctor": { - "version": "1.2.0-rc.0", - "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-1.2.0-rc.0.tgz", - "integrity": "sha512-tqWLXzYmFjlWOh+XoNkmbS1knYU5U13AhBQjZtZdhecwC3Snyp43nmHQEIrjq1gmgOgTEFDSa0gsK826FiyYwg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/nativescript-doctor/-/nativescript-doctor-1.2.0.tgz", + "integrity": "sha512-huJB71CxCcbBQDCt9F1CkfsGDN2YHVJHGQyQYhnCCX6OJFOOjSr/HMqNpUUIGlhqVQfUR1SYeCFfaKa+1/eDvg==", "requires": { "osenv": "0.1.3", "semver": "5.3.0", diff --git a/package.json b/package.json index f760e4485d..e4cc6a8cce 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "minimatch": "3.0.2", "mkdirp": "0.5.1", "mute-stream": "0.0.5", - "nativescript-doctor": "1.2.0-rc.0", + "nativescript-doctor": "1.2.0", "open": "0.0.5", "ora": "2.0.0", "osenv": "0.1.3", From b2c643dcb0a73d148d8dbc70e65d2841a111b8fd Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 28 May 2018 20:31:03 +0300 Subject: [PATCH 10/10] chore: Update to latest common lib --- lib/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common b/lib/common index fff883ea95..b707b42918 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit fff883ea9559b31029760bcc7ba6375cfbb6adee +Subproject commit b707b42918a6c30b9b26d8ff3013c00020b4b3ef