FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: preview shouldn't start native watch by KristianDD · Pull Request #5016 · NativeScript/nativescript-cli · GitHub

fix: preview shouldn't start native watch - #5016

Merged
KristianDD merged 2 commits into
releasefrom
kddimitrov/fix-preview-watches-native-changes
Sep 12, 2019
Merged

fix: preview shouldn't start native watch#5016
KristianDD merged 2 commits into
releasefrom
kddimitrov/fix-preview-watches-native-changes

Conversation

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

When the user scans the preview barcode with both device platforms, the second one modifies the package.json to set the runtime version, which triggers a native change event. This causes an error as preview controller doesn't understand and shouldn't understand of native changes.

What is the new behavior?

Disable the native changes watch when running tns preview.

Fixes/Implements/Closes #4893

cla-bot Bot added the cla: yes label Sep 11, 2019

Copy link
Copy Markdown
Contributor Author

test cli-smoke cli-preview cli-device

KristianDD force-pushed the kddimitrov/fix-preview-watches-native-changes branch from 02e7ca1 to f763264 Compare September 11, 2019 14:58

Copy link
Copy Markdown
Contributor Author

test cli-smoke cli-preview cli-device

Comment thread lib/data/prepare-data.ts Outdated
if (_.isBoolean(data.watchNative)) {
this.watchNative = data.watchNative;
}
this.watch = data.watch;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Duplicated line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good catch. :)

Comment thread lib/controllers/prepare-controller.ts Outdated
}

private async startNativeWatcherWithPrepare(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise<boolean> {
let newWatchStarted = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

newWatchStarted -> newNativeWatchStarted

Copy link
Copy Markdown
Contributor Author

test cli-smoke cli-preview cli-device

KristianDD merged commit 1daa7aa into release Sep 12, 2019
KristianDD deleted the kddimitrov/fix-preview-watches-native-changes branch September 12, 2019 16:09
KristianDD added this to the 6.1.1 milestone Sep 17, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL