Skip to content

Merge release into master #4891

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 63 commits into from
Jul 22, 2019
Merged

Merge release into master #4891

merged 63 commits into from
Jul 22, 2019

Conversation

DimitarTachev
Copy link
Contributor

No description provided.

Fatme and others added 30 commits July 15, 2019 14:05
…loud build is selected

Currently native watch is not started on cloud run command and from sidekick when cloud build is selected.
fix: start native watch on cloud run command and from sidekick when cloud build is selected
…igrate

fix: update Angular deps during app migration
…bpack

fix: support node <= 8.9.4 (lookbehind is supported only with the `harmony` flag)
…ation-hmr-only

docs: --no-hmr added, --syncAllFiles and --bundle removed, added note…
NativeScript CLI doesn't respect correctly `hmr: false` when the option is provided through dashed options from command. This led to the exception when the application is built using CLI and deployed on device using Xcode as the `hmr` is included in app's bundle.

Fixes:
#4846
#4814
docs: update `tns migrate` docs based on the latest changes
fix: don't override `--env.production` and `--env.verbose` when provided from user
…-flag

docs: remove --sdk flag from documentation
…nloaded-app

fix: preview for app downloaded from playground fails
Update nativescirpt-dev-webpack and ios-runtime to their latest versions. We'll require at least these versions when running the application.
…rate

chore: update required deps for 6.0
fix: bump the version of `nativescript-unit-test-runner` from migrate
rosen-vladimirov and others added 26 commits July 17, 2019 22:58
fix: add forgotten migrate dependencies for Vue and Angular apps
fix: respect correctly `hmr: false` from command's dashed options
…mplate-help

docs: remove --platform-template from CLI's help
Currently `tns run android --release` throws an error that `--hmr` and `--release` cannot be used simultaneously. After parsing `this.yargsArgv = yargs(process.argv.slice(2))` command line options, only `--release` option is true as it is expected to be. For some reason after calling `this.argv = this.yargsArgv.options(<any>opts).argv`, `this.yargsArgv` is modified and `this.yargsArgv.hmr` is true which is not the expected behavior. It seems like a strange behavior of yargs. In order to fix it, we parse the command line only once and persist the `argv` object of initial parsed command line.
…help

docs: update migrate help and changelog for 6.0.1
fix: migrate and update exit with code 0 when everything is up-to-date
…oper disk image when app is built in cloud on windows

The livesync process is stopped when a native change is made in app built in cloud on windows OS. This happens as CLI builds the app and after that tries to restart it. As the `platformLiveSyncService.restartApplication` is without try/catch, the CLI is not able to start the application due to missing developer disk image mounted on device. After that an error is thrown and the livesync process is stopped. This PR replaces `platformLiveSyncService.restartApplication` with `this.refreshApplication`. The `this.refreshApplication` method has try/catch and shows a warning `Unable to start application...`  when an error is thrown during restart process. On the other side, this method has a check if a naive change occurs, so no additional checks will be executed from the method in order to determine if the application should be refreshed or restarted. (https://github.com/NativeScript/nativescript-cli/blob/24b21c4c3ec46ecf05f3b3aa1d2ed5b7d2301424/lib/controllers/run-controller.ts#L187)
`tns run` (and using SK) should remove its handler for prepareControllers' `prepareReadyEvent` handler. However, this does not happend due to two reasons:
- we try to remove the handler from runControllers' event, but this handler is attached to `preparController`, so it actually remains and causes multiple issues in long living processes, when CLI is used as a library
- the event handler is not cached correctly as we attach its bound version, but cache it without the binding. So you cannot remove it.

This causes issues when running on device in Sidekick, closing the current app, open it again and try to livesync a change - we have many handlers for prepareReadyEvent and this causes multiple livesync operations.
`tns preview` (and using SK) should remove its handler for prepareControllers' `prepareReadyEvent` handler. However, this does not happend due to two reasons:
- we try to remove the handler from prepareControllers' event, but this handler is attached to `preparController`, so it actually remains and causes multiple issues in long living processes, when CLI is used as a library
- the event handler is not cached correctly as we attach its bound version, but cache it without the binding. So you cannot remove it.

This causes issues when using preview in Sidekick, closing the current app, open it again and try to livesync a change - we have many handlers for prepareReadyEvent and this causes multiple livesync operations.
Commands using prepare of project (and using SK) should remove their handlers for webpackCompilerService's `webpackCompilationComplete` event. This is not happening and whenever we start new prepartion of the project, we attach new handler.

This causes issues when running on device in Sidekick, closing the current app, open it again and try to livesync a change - we have many handlers for prepareReadyEvent and this causes multiple livesync operations.
Currently the webpackCompilerService caches the started webpack processes, but it removes them from the cache only when someone calls `stopWebpackCompiler` method.
This is a major problem as we cache the first instance of the child process and we do not remove it, even when the process dies. For example, when you run just build, we start the webpack process without watch mode, the webpackCompilerService caches the child process, it exits, but the instance remains cached.
Trying to run the application on device does not start new webpack process and different failures occur.
`stopPreview` method does not stop running webpack compilers, so it is no longer possible to run the same application on device (no matter preview, build or run). This happens in long living processes, like Sidekick.
To fix this, add new parameter to the method - an object containing the projectDir and use it to stop the processes.
fix: multiple errors in Sidekick
…-dep

fix(migrate): include forgotten Angular dependency from the code-sharing apps
@cla-bot cla-bot bot added the cla: yes label Jul 22, 2019
@DimitarTachev DimitarTachev merged commit 77de5b5 into master Jul 22, 2019
@DimitarTachev DimitarTachev deleted the tachev/release-into-master branch July 22, 2019 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants