Skip to content

Commit

Permalink
Merge branch 'release' into fatme/merge-rel-master
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/common
#	npm-shrinkwrap.json
#	package.json
  • Loading branch information
Fatme committed Aug 13, 2018
2 parents 1084a26 + 5fa0308 commit a4f5b45
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 8 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
NativeScript CLI Changelog
================

4.2.1 (2018, August 10)
==

### Fixed
* [Fixed #3763](https://github.com/NativeScript/nativescript-cli/issues/3763): Duplicated entries in `tns run` log while livesyncing
* [Fixed #3802](https://github.com/NativeScript/nativescript-cli/issues/3802): Unable to use templates without `App_Resources`
* [Fixed #3803](https://github.com/NativeScript/nativescript-cli/issues/3803): `tns run ios` command fails if tns-ios version is a tag
* [Fixed #3805](https://github.com/NativeScript/nativescript-cli/issues/3805): `tns run android` fails in case you do not have Android emulator images


4.2.0 (2018, August 7)
==

### New
* [Implemented #3023](https://github.com/NativeScript/nativescript-cli/issues/3023): `tns device --available-devices` to list all emulator images
* [Implemented #3717](https://github.com/NativeScript/nativescript-cli/pull/3717): Speed up device detection
* [Implemented #3718](https://github.com/NativeScript/nativescript-cli/issues/3718): Install the Android project dependencies only when needed
* [Implemented #3719](https://github.com/NativeScript/nativescript-cli/issues/3719): Build plugins with the same gradle versions as the runtime
* [Implemented #3735](https://github.com/NativeScript/nativescript-cli/pull/3735): Speed up adding native platform
* [Implemented #3750](https://github.com/NativeScript/nativescript-cli/pull/3750): Add hook for `checkForChanges`
* [Implemented #3733](https://github.com/NativeScript/nativescript-cli/issues/3733): [API] Expose API for listing and starting emulators and simulators when using CLI as library.
* [Implemented #3797](https://github.com/NativeScript/nativescript-cli/issues/3797): Use sockets to LiveSync changes on Android
* [Implemented #3798](https://github.com/NativeScript/nativescript-cli/issues/3798): Allow templates to be full application - full support

### Fixed
* [Fixed #2485](https://github.com/NativeScript/nativescript-cli/issues/2485): EACCES (Permission denied) when livesync Angular projects on Samsung devices
* [Fixed #2547](https://github.com/NativeScript/nativescript-cli/issues/2547): `tns-android` remains inside dependencies when `tns build/run android` fails
* [Fixed #3132](https://github.com/NativeScript/nativescript-cli/issues/3132): Xcode 9: Requires Provisioning Profile Error
* [Fixed #3602](https://github.com/NativeScript/nativescript-cli/issues/3602): Livesync does not work on Android P
* [Fixed #3610](https://github.com/NativeScript/nativescript-cli/issues/3610): Livesync ignores aar file changes inside a plugin
* [Fixed #3672](https://github.com/NativeScript/nativescript-cli/issues/3672): `tns run/debug ios --syncAllFiles` with cocoapods has issues
* [Fixed #3707](https://github.com/NativeScript/nativescript-cli/issues/3707): CLI generates aar files on changes in `app/` (livesync with webpack)
* [Fixed #3710](https://github.com/NativeScript/nativescript-cli/issues/3710): CLI regenerates ALL aar files on changes in `node_modules`
* [Fixed #3723](https://github.com/NativeScript/nativescript-cli/issues/3723): iOS build for device fails with Xcode 10 beta versions
* [Fixed #3729](https://github.com/NativeScript/nativescript-cli/pull/3729): File references inside .pbxproject are incorrect when there's space in project path
* [Fixed #3741](https://github.com/NativeScript/nativescript-cli/issues/3741): Platforms folder need to be removed after a bitcode error
* [Fixed #3744](https://github.com/NativeScript/nativescript-cli/pull/3744): During all gradle operations "Gradle build" message is printed
* [Fixed #3751](https://github.com/NativeScript/nativescript-cli/issues/3751): Problem building nativescript-google-maps-sdk on Android
* [Fixed #3752](https://github.com/NativeScript/nativescript-cli/issues/3752): Increase the default timeout for debug command from 5 to 10 seconds
* [Fixed #3768](https://github.com/NativeScript/nativescript-cli/pull/3768): Skip preparation of plugins native files in case they are not changed
* [Fixed #3794](https://github.com/NativeScript/nativescript-cli/pull/3794): Update lodash to fix a security vulnerability.


4.1.2 (2018, June 26)
==

Expand Down
2 changes: 1 addition & 1 deletion lib/services/ios-debugger-port-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class IOSDebuggerPortService implements IIOSDebuggerPortService {
private canStartLookingForDebuggerPort(data: IProjectDir): boolean {
const projectData = this.$projectDataService.getProjectData(data && data.projectDir);
const frameworkVersion = this.$iOSProjectService.getFrameworkVersion(projectData);
return !frameworkVersion || semver.gt(frameworkVersion, IOSDebuggerPortService.MIN_REQUIRED_FRAMEWORK_VERSION);
return !frameworkVersion || !semver.valid(frameworkVersion) || semver.gt(frameworkVersion, IOSDebuggerPortService.MIN_REQUIRED_FRAMEWORK_VERSION);
}

@cache()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
const pathToLiveSyncFile = temp.path({ prefix: "livesync" });
this.$fs.writeFile(pathToLiveSyncFile, "");
await this.device.fileSystem.putFile(pathToLiveSyncFile, this.getPathToLiveSyncFileOnDevice(deviceAppData.appIdentifier), deviceAppData.appIdentifier);
await this.device.applicationManager.startApplication({ appId: deviceAppData.appIdentifier, projectName: this.data.projectName });
await this.device.applicationManager.startApplication({ appId: deviceAppData.appIdentifier, projectName: this.data.projectName, justLaunch: true });
await this.connectLivesyncTool(projectFilesPath, this.data.projectId);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/services/livesync/livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,6 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
const platformLiveSyncService = this.getLiveSyncService(platform);
const deviceBuildInfoDescriptor = _.find(deviceDescriptors, dd => dd.identifier === device.deviceInfo.identifier);

await platformLiveSyncService.prepareForLiveSync(device, projectData, liveSyncData, deviceBuildInfoDescriptor.debugOptions);

await this.ensureLatestAppPackageIsInstalledOnDevice({
device,
preparedPlatforms,
Expand All @@ -474,6 +472,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
env: liveSyncData.env
}, { skipNativePrepare: deviceBuildInfoDescriptor.skipNativePrepare });

await platformLiveSyncService.prepareForLiveSync(device, projectData, liveSyncData, deviceBuildInfoDescriptor.debugOptions);

const liveSyncResultInfo = await platformLiveSyncService.fullSync({
projectData, device,
syncAllFiles: liveSyncData.watchAllFiles,
Expand Down
9 changes: 6 additions & 3 deletions lib/services/project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as shelljs from "shelljs";
import { format } from "util";
import { exported } from "../common/decorators";
import { Hooks, TemplatesV2PackageJsonKeysToRemove } from "../constants";
import * as temp from "temp";

export class ProjectService implements IProjectService {

Expand Down Expand Up @@ -131,14 +132,16 @@ export class ProjectService implements IProjectService {

private async ensureAppResourcesExist(projectDir: string): Promise<void> {
const projectData = this.$projectDataService.getProjectData(projectDir);
const appPath = projectData.getAppDirectoryPath(projectDir);
const appResourcesDestinationPath = projectData.getAppResourcesDirectoryPath(projectDir);

if (!this.$fs.exists(appResourcesDestinationPath)) {
this.$fs.createDirectory(appResourcesDestinationPath);

const tempDir = temp.mkdirSync("ns-default-template");
// the template installed doesn't have App_Resources -> get from a default template
await this.$pacoteService.extractPackage(constants.RESERVED_TEMPLATE_NAMES["default"], appPath, { filter: (name: string, entry: any) => entry.path.indexOf(constants.APP_RESOURCES_FOLDER_NAME) !== -1 });
await this.$pacoteService.extractPackage(constants.RESERVED_TEMPLATE_NAMES["default"], tempDir);
const templateProjectData = this.$projectDataService.getProjectData(tempDir);
const templateAppResourcesDir = templateProjectData.getAppResourcesDirectoryPath(tempDir);
this.$fs.copyFile(path.join(templateAppResourcesDir, "*"), appResourcesDestinationPath);
}
}

Expand Down

0 comments on commit a4f5b45

Please sign in to comment.