Skip to content

Merge release into master #3816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
3b7de75
docs: update Changelog for 4.2.0
rosen-vladimirov Aug 7, 2018
6c230ab
Merge pull request #3799 from NativeScript/vladimirov/changelog-420
rosen-vladimirov Aug 7, 2018
7ea0239
chore: bump version to 4.2.1
KristianDD Aug 7, 2018
60ee551
fix: incorrect project is created when template does not have App_Res…
rosen-vladimirov Aug 7, 2018
d22ad0d
Merge pull request #3801 from NativeScript/kddimitrov/bump-vresion-4.2.1
rosen-vladimirov Aug 7, 2018
d2d1ddb
fix: cloud run fails if tns-ios version contains tags
KristianDD Aug 7, 2018
12bfeb5
fix: avoid getting logs from a wrong process or an old instance of th…
Jul 23, 2018
d3bd0e9
Merge pull request #3804 from NativeScript/kddimitrov/fix-cloud-run-i…
rosen-vladimirov Aug 7, 2018
beb88df
Merge pull request #3766 from NativeScript/tachev/fix-adb-logs
rosen-vladimirov Aug 7, 2018
270edda
fix: use `pid` logcat option only on supported Android devices
Aug 8, 2018
2f442b6
Merge pull request #3808 from NativeScript/tachev/fix-android-logs
Aug 8, 2018
c0a0076
fix: status of iOS Sim images and Android Emulator images are different
rosen-vladimirov Aug 9, 2018
f7e2d60
docs: update changelog for 4.2.1
rosen-vladimirov Aug 9, 2018
eea1a18
Merge pull request #3809 from NativeScript/vladimirov/changelog-421
rosen-vladimirov Aug 9, 2018
87d7844
fix: stop starting logcat helper when starting the app only for lives…
Aug 9, 2018
5fa0308
Merge pull request #3810 from NativeScript/tachev/fix-livesync-logs
Aug 9, 2018
a4f5b45
Merge branch 'release' into fatme/merge-rel-master
Fatme Aug 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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