Skip to content

chore: merge release in master #3343

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 32 commits into from
Jan 31, 2018
Merged

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Jan 30, 2018

NOTE: Merge after telerik/mobile-cli-lib#1044

This PR will duplicate some commits that we've already cherry-picked from master to release branch. However, this will allow us to start using Merge commits from now on and automatically merge release in master.

Mitko-Kerezov and others added 29 commits December 11, 2017 14:35
In case the project does not have dependencies or dev-dependencies CLI should fail with correct message when `--bundle` is passed.
Add Node.js 9 as verified so CLI will not print warning that these versions are not verified.
The `proxy-lib` package provides required methods for setting and getting proxy. Its implementation is more secure when stroing credentials, so switch to it instead of current implementation.
Remove the credentials-manager from CLI as it is no longer needed.
Remove the CredentialsManager.exe as well and its source code.

Fix the error `Cannot read property ExceptionMessage of null` when wokring behind proxy - add correct null checks.

Fix tracking to google analytics behind proxy - pass the proxy URL to Universal Analytics module.
Remove moment.js as dependency as it is not used in the code.

Update shrinkwrap as several dependencies have been added, but shrinkwrap has not been regenerated since then.
Drop the logic that special cases `release` or `bundle` builds and rely on the service instead.
When switching the value of `--bundle` (i.e. passing it or not passing it) between two builds the latter build should clear the app directory inside platforms prior to building.
* Always clean platforms/app when `--bundle` is passed

* Do not use $options in $nodeModulesBuilder

Whenever CLI is required as a library `$options` flags are not set. Hence `$options` should only be used where one knows CLI is truly run as a command-line interface - i.e. in commands.
During running on Android, CLI tries to take smart decision which files to upload. This is done by checking the shasum of all project files and comparing it with the latest one uploaded to device. However, in huge projects, this leads to error with code EMFILE as the OS have limits for opened file handles.
This happens as CLI executes the operation simultaneously for all files. In order to fix this behavior, execute the actions by chunks (currently set to 100).
Introduce new method in helpers to execute this action and add tests for it.
* fix generating port for debug socket when debugging ios with chrome devtools

When generating a port to start a websocket on, use the same logic as is present in the android debug service - get the first available available port in a range, and reuse it for the next debug session of the same application if it is still available

* fix(device-socket): iOS Socket proxy should listen on IPv4 localhost adapter

Check for available port is done on this adapter and by default server is launched on "::" which is IPv6's any adapter
When we close the websocket we have to destroy the device socket as well.
We need to wait the close event on the device socket instead of end.
…st compatible version (#3302)

* Currently it is never updated and is left at the first version ever installed in `~/.local`.
As a result newly published inspector packages are not used unless the user installs
them explicitly in the project or deletes the cache manually.
* The iOS inspector package version must be determined according to project's iOS runtime
version instead of the version of CLI as it has been till now
Update proxy-lib to latest version - 0.4.0 - the major change in this version is that it allows using it without having Visual C++ redistributable installed on the users Windows machine.
* minor grammatical update (#3267)

* Add check for JAVA 9 (#3294)

* Add check for JAVA 9

Currently Gradle cannot work with JAVA 9, so detect if it has been used and break the build for Android. Also the check will print warning when `tns doctor` is called.
Also update submodule, where the following change is applied:

Fix detection of Javac version

The command `javac -version` prints result to stderr when JAVA 8 is used and to stdout when JAVA 9 is used. Current check in CLI uses the stderr output, so when JAVA 9 is installed it fails to detect the correct version.
In order to support both JAVA 8 and JAVA 9, capture both stdout and stderr and get the version from there.
Also remove unneeded check for Java version - we care about JAVA Compiler, which is included in JDK.

* Handle case when Javac version is a single number (9 for example)

In some cases javac version is a single number, for example 9. In this case our validation fails to detect the correct version and to check if we support this version.
In order to resolve this issue, use the `appendZeroesToVersion` method in order to make the versin semver valid.
Change the return type of `validateJavacVersion` method - it does not require to return a Promise.
Add unit tests for `validateJavacVersion` method.

* release notes 3.4.0 (#3297)

* release notes 3.4.0

* add implemented item

* remove a fixed issue from changelog

* Update submodule to release branch
* Allow using Android SDK 27

Add version 27 of Android SDK as verified, so users will use it by default when it is installed.

* Use latest available appCompat version

The current CLI logic finds appCompat version that matches the selected SDK version. However, the latest appCompat version is 26.0.0-alpha, so in case we have Android SDK 27, we are unable to find matchin appCompat.
In order to resolve the issue and allow using Android SDK 27, get latest available appCompat version when there's no matching one.
* change log for 3.4.1

* add implemented changelog

* changelog
In case terminal is not interactive, the spinner we are using during `tns doctor` or `tns platform add ...` is printing a lot of messages and polutes the output.
So in case we are in non-interactive environment, print the spinner message a single time. In order to achieve this, use the newly introduce method in $progressIndicatior from submodule;

Add getSpinner method to $progressIndicator

Add `getSpinner` method to $progressIndicator - it will return a new instance of clui.Spinner in case terminal is interactive. In case it is not - a mocked instance will be returned.
This way in CI builds the spinner will not print tons of repeated messages.
Set version to 3.4.2
When `tns debug ios` is used, each change of application's code will trigger restart of app and Chrome DevTools will be disconnected. CLI prints the "new" URL and in case you copy it and paste it immediately in the browser, you'll receive empty DevTools. The problem is that the URL is printed before application is launched successfully on simulator.
In order to resolve this issue, try connection on port 18181 - the connection will be successfull only when the application is running. Wait 10 seconds to connect and throw error in case we are unable to connect for this time.

Also fix incorrect behavior of connectionError event - the thrown error should contain the deviceIdentifier, but it was missing.
* Fix multiple typescript/sass watchers

Whenever using CLI as a library, calling livesync multiple times leads to multiple typescript/sass watchers.
This happens due to the fact that `currentWatcherInfo.pattern` is an array and checking two arrays for equality with `!==` is bound to return `true` at all times. `toString()` both arrays and check the string literals instead.

* Fix comments
Introduce a `cleanApp` hook which occurs whenever CLI needs to clean the app directory in `platforms`.
The `debug-brk` option was broken in a previous commit as we were trying to connect to the backend port (18181). The problem is that connecting to it makes the runtime thinks debugger is attached and it continues to next statements.
Instead of connecting to the port, check if it is in LISTEN state.
@rosen-vladimirov rosen-vladimirov self-assigned this Jan 30, 2018
@rosen-vladimirov rosen-vladimirov changed the title Merge release in master chore: merge release in master Jan 30, 2018
…-hook

feat(build): introduce cleanApp hook
@rosen-vladimirov rosen-vladimirov merged commit d67764a into master Jan 31, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/merge-rel-master branch January 31, 2018 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants