profile
viewpoint
Yuri Skorokhodov SounD120 @Microsoft Russia, Yaroslavl

microsoft/vscode-react-native 2124

VSCode extension for React Native - supports debugging and editor integration

microsoft/vscode-cordova 254

A Visual Studio Code extension providing intellisense, debug, and build support for Cordova and Ionic projects.

microsoft/cordova-simulate 195

Simulates your Apache Cordova application in the browser.

SounD120/cordova-serve 0

Mirror of Apache cordova serve

SounD120/expo-cli 0

Tools for making Expo apps

SounD120/full-react-snippets 0

Code snippets for React/React Native and extra libs

SounD120/hello 0

Migration from angular to cordova app for soyjuanmedina

SounD120/ow 0

Function argument validation for humans

SounD120/rocketseat-vscode-react-native-snippets 0

Rocketseat React Native snippets for Visual Studio Code Editor

push eventmicrosoft/vscode-react-native

RedMickey

commit sha 67ffa5b40d95e65f48c89d928a014356b94014f2

Fix logger and appWorker stop (#1325)

view details

RedMickey

commit sha 4e4705fcd5a515ac8e2ef7e064fbd4be38e03b19

[Preview] Fix expo smoke tests (#1334) * Fix Expo smoke tests (#1332) * Update expo apps template * Add App.tsx entry point * Fix file names * Change Expo version for pure expo scenarios * Fix versions * Improve Expo Pure tests Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com> * update command for install java8 on mac

view details

Yuri Skorokhodov

commit sha 8152571adb22d7628c545490a38bc85153249841

Fix errors in case of spaces in adb path from local.properties (#1328) * Add tests

view details

Yuri Skorokhodov

commit sha 392e8fb61f43719ae2ca9c0b8a3aab32a0f29748

Merge remote-tracking branch 'remotes/origin/preview' into expo-helper-fix

view details

Yuri Skorokhodov

commit sha b0941bb1f4c3900fe221600b7b16d8419dd0dd60

Merge branch 'expo-helper-fix' of https://github.com/Microsoft/vscode-react-native into expo-helper-fix

view details

push time in a day

issue closedmicrosoft/vscode-react-native

The debugger / React Native was hang if too many console.log messages output to Debug Console

Actual Behavior

  1. The debugger / React Native was hang if too many console.log messages output to Debug Console (when enabled debug JS remotely) on Android emulator
  2. It's no problem if JS remote debug was disabled ( the console.log messages were outputted to Output tab.
  3. Same test code on Mac + iPhone emulator was OK
  4. I tried timer callback function to do console.log output for 1 time per second, the debugger was still hang

Expected Behavior

  1. Debugger / React Native won't hang

Software versions

  • React-Native VS Code extension version: 0.16.1
  • VSCode version: 1.46.1
  • OS platform and version: Windows 10 Pro 1909
  • NodeJS version:
  • React Native version: 0.62.2
  • Expo SDK version (include if relevant):

App.js

closed time in a day

ccl0504

issue commentmicrosoft/vscode-react-native

The debugger / React Native was hang if too many console.log messages output to Debug Console

Hi @ccl0504 and thanks for your question. React Native Tools debugger is based on debugging via local Node.js process. As we found out Node.js has some problems with large amounts of IO due to architectural features: https://github.com/nodejs/node/issues/6379. So I recommend to not overload the debugger thread by non-blocking IO like console.log.

ccl0504

comment created time in a day

delete branch microsoft/vscode-react-native

delete branch : fix-spaces-in-adb-path-preview

delete time in 2 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 8152571adb22d7628c545490a38bc85153249841

Fix errors in case of spaces in adb path from local.properties (#1328) * Add tests

view details

push time in 2 days

issue commentmicrosoft/vscode-react-native

[Bug][Expo] XDLError: packagerPort must be an integer

Hi @superandrew . Maybe it was connected to React Native Tools extension update? After updates XDL is reinstalled, so I recommend you to try this instruction once again on the latest installed version (0.16.1)

mjstelly

comment created time in 2 days

Pull request review commentmicrosoft/vscode-react-native

Prepare for 0.16.1

+## 0.16.1
+* Improved extension security [#1310](https://github.com/microsoft/vscode-react-native/pull/1310), [#1329](https://github.com/microsoft/vscode-react-native/pull/1329)
+* Fixed the incorrect handling of spaces in `adb` path from `local.properties`
+
RedMickey

comment created time in 3 days

Pull request review commentmicrosoft/vscode-react-native

Prepare for 0.16.1

+## 0.16.1
+* Improved extension security [#1310](https://github.com/microsoft/vscode-react-native/pull/1310), [#1329](https://github.com/microsoft/vscode-react-native/pull/1329)
+* Fixed the bug of incorrect handling of spaces in `adb` path from `local.properties`
* Fixed the incorrect handling of spaces in `adb` path from `local.properties`

RedMickey

comment created time in 4 days

Pull request review commentmicrosoft/vscode-react-native

Prepare for 0.16.1

+## 0.16.1
+* Improved extension security [#1310](https://github.com/microsoft/vscode-react-native/pull/1310), [#1329](https://github.com/microsoft/vscode-react-native/pull/1329)
+* Fixed the bug of incorrect handling of spaces in `adb` path from `local.properties`
+* Internal changes:
+    * Migrated from TSLint to ESLint [#1315](https://github.com/microsoft/vscode-react-native/pull/1315)
+    * Implemented service for running different checks of the extension work [#1309](https://github.com/microsoft/vscode-react-native/pull/1309), [#1322](https://github.com/microsoft/vscode-react-native/pull/1322)
+    * Smoke tests were updated to work with VC Code 1.45.1 and Expo SDK 38
    * Smoke tests were updated to work with VS Code 1.45.1 and Expo SDK 38

RedMickey

comment created time in 4 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha a3ceb385b25d21c1f214509a0e385f07697b3613

Fix file name for iOS Expo LAN test

view details

push time in 4 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 4879b4228ff0db7561bbbdcbe8e08257ad7b250b

Fix entry point file name in tests

view details

push time in 5 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 542130d21eed95defa39502c175c1ac9015128b7

Fix versions

view details

push time in 5 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 30df31dcb3127f088ebad8c5f5487ba29f2a4d22

Change Expo version for pure expo scenarios

view details

push time in 5 days

Pull request review commentmicrosoft/vscode-react-native

Fix ExponentHelper multi initializing

 export class Packager {     constructor(private workspacePath: string, private projectPath: string, private packagerPort?: number, packagerStatusIndicator?: PackagerStatusIndicator) {         this.packagerStatus = PackagerStatus.PACKAGER_STOPPED;         this.packagerStatusIndicator = packagerStatusIndicator || new PackagerStatusIndicator();-        this.expoHelper = new ExponentHelper(this.workspacePath, this.projectPath);+    }++    public setExponentHelper(expoHelper: ExponentHelper) {+        this.expoHelper = expoHelper;+    }++    public getExponentHelper(): ExponentHelper{

Should we generate new ExponentHelper on get? I suppose it might be better if we generate it somewhere outside and will just return the value.

JiglioNero

comment created time in 5 days

Pull request review commentmicrosoft/vscode-react-native

Fix ExponentHelper multi initializing

 export class Packager {     constructor(private workspacePath: string, private projectPath: string, private packagerPort?: number, packagerStatusIndicator?: PackagerStatusIndicator) {         this.packagerStatus = PackagerStatus.PACKAGER_STOPPED;         this.packagerStatusIndicator = packagerStatusIndicator || new PackagerStatusIndicator();-        this.expoHelper = new ExponentHelper(this.workspacePath, this.projectPath);+    }++    public setExponentHelper(expoHelper: ExponentHelper) {+        this.expoHelper = expoHelper;+    }++    public getExponentHelper(): ExponentHelper{+        if (!this.expoHelper){
        if (!this.expoHelper) {
JiglioNero

comment created time in 8 days

Pull request review commentmicrosoft/vscode-react-native

Fix ExponentHelper multi initializing

 export class Packager {     constructor(private workspacePath: string, private projectPath: string, private packagerPort?: number, packagerStatusIndicator?: PackagerStatusIndicator) {         this.packagerStatus = PackagerStatus.PACKAGER_STOPPED;         this.packagerStatusIndicator = packagerStatusIndicator || new PackagerStatusIndicator();-        this.expoHelper = new ExponentHelper(this.workspacePath, this.projectPath);+    }++    public setExponentHelper(expoHelper: ExponentHelper) {+        this.expoHelper = expoHelper;+    }++    public getExponentHelper(): ExponentHelper{
    public getExponentHelper(): ExponentHelper {
JiglioNero

comment created time in 8 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha a709005aee84ff635d9162f9e47576cb650d1102

Fix Q Promise entries

view details

push time in 5 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha e88c465bcd5cf9d4303620db7fe17ed58f714d73

Fix file names

view details

push time in 5 days

PullRequestEvent

issue commentmicrosoft/vscode-react-native

[Bug][Expo] XDLError: packagerPort must be an integer

Hi @mjstelly and thanks for reaching us. We already investigated this problem and created the corresponding issue for expo-cli repository. Here it is: https://github.com/expo/expo-cli/issues/2270. I'll left this issue opened until this error is resolved.

mjstelly

comment created time in 6 days

push eventfriederbluemle/vscode-react-native

Yuri Skorokhodov

commit sha 10e2def9ea1eb4a50af0e98a0e1eef02a489af42

Fix errors in case of spaces in adb path from local.properties (#1326) * Add tests

view details

Yuri Skorokhodov

commit sha fa8d546130d4721d1f32055151c9be993e051c35

Merge branch 'master' into fix-caps

view details

push time in 9 days

issue commentmicrosoft/vscode-react-native

[Bug] If there is a space in the ADB path, it will not work properly

@yuki2006 We fixed that situation and now path acquired from sdk.dir will be wrapped in quotes when when any command is executed. It should help to avoid such situations in future. This fix will be available in the next extension release.

yuki2006

comment created time in 9 days

create barnchmicrosoft/vscode-react-native

branch : fix-spaces-in-adb-path-preview

created branch time in 9 days

delete branch microsoft/vscode-react-native

delete branch : fix-spaces-in-adb-path

delete time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 10e2def9ea1eb4a50af0e98a0e1eef02a489af42

Fix errors in case of spaces in adb path from local.properties (#1326) * Add tests

view details

push time in 9 days

issue closedmicrosoft/vscode-react-native

[Bug] If there is a space in the ADB path, it will not work properly

set .zshrc PATH="${PATH}":"/Volumes/Macintosh HD/Users/foo/Library/Android/sdk/platform-tools"

Run Debug Android

Debug output

<details> <summary>Debug Console</summary>

デバッグできませんでした。コマンド '/Volumes/Macintosh HD/Users/foo/Library/Android/sdk/platform-tools/adb devices' の実行中にエラーが発生しました : Command failed: /Volumes/Macintosh HD/Users/foo/Library/Android/sdk/platform-tools/adb devices
/bin/sh: /Volumes/Macintosh: No such file or directory```

Environment

  • React Native Tools extension version: 0.16.0

closed time in 9 days

yuki2006

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 922daba4cf4e0714fbc34f04f9d56e57a990b85f

Fix tests

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 07d25ce73e412144b14403be09ca59c00a7b4699

Fix tests

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 8334b6203b034c970af2d6ce62eaa3cfb1b5da4f

Fix paths

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha fbe6311159a11ead9c36ef14937cd848a7b9074a

Fix paths

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 1ffb6a67fccdb917c15940c9dcfa11ab1c093ff9

Fix path

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 5a789562744121f14a2b0489b6fe5254bc90d5f7

Minor fix

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 68254cecd932f18bceda3bef7a3c33334f9833a7

Fix paths determination

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 7b8f95520e2d6ce09ccc5bbc12ad0fcd537eeedb

Fix paths

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 0406cdd772a5771936845b4d65aa099a8cbb9ccb

Fix path in tests

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha ba3d02b0fdb3d182715203419710865802454aa6

Fix tests

view details

push time in 9 days

Pull request review commentmicrosoft/vscode-react-native

Fix resources disposal after disconnect request

 export class RNDebugSession extends DebugSessionBase {                                     }                                 }                             });+                            if (this.cancellationTokenSource.token.isCancellationRequested) {

Why we trying to do that here?

RedMickey

comment created time in 9 days

Pull request review commentmicrosoft/vscode-react-native

Fix resources disposal after disconnect request

 export class RNDebugSession extends DebugSessionBase {                             this.appLauncher.setAppWorker(this.appWorker);                              this.appWorker.on("connected", (port: number) => {+                                if (this.cancellationTokenSource.token.isCancellationRequested) {+                                    return this.appWorker?.stop();

Why we are trying to stop appworker here? What if the scenario will emergency stop? Will this mean that we don't receive any connected signals and we receive hanged appworker?

RedMickey

comment created time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha b3989fe9530a62e73d340bf3437140a369a3f89a

Fix tests

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 49c90c8ca63cd6a62104b26c2d84f32ff0c74a01

Fix test name

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha d9df69e0b2d81159548c8f9269c73e247ba0f641

Fix test path

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha e350197228764310314fe7fb1c6d47600337011a

Add tests

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 49a61c9591e5216316ac65dc8f5e27f2eaa99e67

Add test for scenarios with spaces

view details

push time in 9 days

issue openedmicrosoft/vscode-react-native

[Bug] Random failures when launching Expo scenarios

🐛 What is the bug? How can we reproduce it?

Sometimes Expo fails to launch with strange errors. But if we run Expo several times after that - it launches without any problems.

  1. Launch Debug in Exponent scenario
  2. See random XDL failures like Socket hang up, Module.vscode/exponentIndex.jsdoes not exist in Haste module map
  3. QR Code is not rendered

Expected behavior

Expo works without problems

  • React Native Tools extension version: 0.16.0
  • Expo SDK version (if applicable): 37

created time in 9 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 631a7d4853032b3f22a55ed87d92b9c4986ba88f

Add more tests

view details

Yuri Skorokhodov

commit sha ade062f19fd3af4131a0d03ea97aad25f66ba9c7

Merge branch 'fix-spaces-in-adb-path' of https://github.com/Microsoft/vscode-react-native into fix-spaces-in-adb-path

view details

push time in 9 days

push eventmicrosoft/vscode-react-native

RedMickey

commit sha f4f2d271a4edf6e8f241d06226c8833f979dada6

Implement launch of experiment service (#1322)

view details

Yuri Skorokhodov

commit sha 6be4adc598738c69edc3133732216b244e2dc1fd

Merge branch 'master' into fix-spaces-in-adb-path

view details

push time in 10 days

PR opened microsoft/vscode-react-native

Reviewers
Fix spaces in adb path

Fixes #1321

+8 -8

0 comment

1 changed file

pr created time in 10 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 624d210d760a163545618030677f961546440d43

Minor fix

view details

push time in 10 days

create barnchmicrosoft/vscode-react-native

branch : fix-spaces-in-adb-path

created branch time in 10 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha f3c6246356859af333081e81ffb5658f7dd8ad0d

Add some more fixes for Q

view details

push time in 10 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 285b55118444f3b2777a86db8e4a80a515e28e35

Refactor some Q based functions

view details

push time in 11 days

issue commentmicrosoft/vscode-react-native

[Bug] If there is a space in the ADB path, it will not work properly

Hi @yuki2006 and thanks for your question. It is no need to go down to level of mounted drives to set the path to the Android SDK. You can try to do it using the following recommendations: Could you please try to replace your current content of .zshrc by these lines?

export ANDROID_HOME=/Users/$USER/Library/Android/sdk/
export ANDROID_SDK_ROOT=$ANDROID_HOME
PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"

Please let us know if this helped.

yuki2006

comment created time in 11 days

create barnchmicrosoft/vscode-react-native

branch : remove-q-from-common-folder

created branch time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export class AppLauncher {                                 resolve();                             })                             .catch(error => {+                                if (!mobilePlatformOptions.enableDebug && launchArgs.platform === "ios") {+                                    // If we disable debugging mode for iOS scenarios, we'll we ignore the error and run the run ios command anyways,
                                    // If we disable debugging mode for iOS scenarios, we'll we ignore the error and run the 'run-ios' command anyways,
RedMickey

comment created time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export const ERROR_STRINGS = {     [InternalErrorCode.IOSDeployNotFound]: localize("IOSDeployNotFound", "Unable to find ios-deploy. Please make sure to install it globally('npm install -g ios-deploy')"),     [InternalErrorCode.DeviceNotPluggedIn]: localize("DeviceNotPluggedIn", "Unable to mount developer disk image."),     [InternalErrorCode.DeveloperDiskImgNotMountable]: localize("DeveloperDiskImgNotMountable", "Unable to mount developer disk image."),-    [InternalErrorCode.UnableToLaunchApplication]: localize("UnableToLaunchApplication", "Unable to launch application."),+    [InternalErrorCode.ApplicationLaunchFailed]: localize("ApplicationLaunchFailed", "An error occurred while launching the application. {0}"),+    [InternalErrorCode.CouldNotAttachToDebugger]: localize("CouldNotAttachToDebugger", "An error occurred while attaching to the debugger. {0}"),
    [InternalErrorCode.CouldNotAttachToDebugger]: localize("CouldNotAttachToDebugger", "An error occurred while attaching debugger to the application. {0}"),
RedMickey

comment created time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 The following is a list of all the configuration properties the debugger accepts |`cwd`|The path to the project root folder|`string`|`${workspaceFolder}`| |`sourceMaps`|Whether to use JavaScript source maps to map the generated bundled code back to its original sources|`boolean`|`true`| |`sourceMapPathOverrides`|A set of mappings for rewriting the locations of source files from what the source map says, to their locations on disk. See [Debugging with TypeScript and Haul](#typescript-and-haul) for details|`object`|n/a|+|`debuggingEnabled`|Whether to enable debug mode. If set to "false", an application will be launch without debugging|`boolean`|`true`|

I suppose that it is better to change the name of this property to enableDebug since it represents some question to user, like Do you want to enable debug?.

RedMickey

comment created time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export class AppLauncher {                                 resolve();                             })                             .catch(error => {+                                if (!mobilePlatformOptions.debuggingEnabled && launchArgs.platform === "ios") {

Why this is acceptable for iOS and not for Android?

RedMickey

comment created time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export class AppLauncher {                                 return mobilePlatform.runApp();                             })                             .then(() => {-                                if (mobilePlatformOptions.isDirect) {-                                    generator.step("mobilePlatform.enableDirectDebuggingMode");-                                    if (launchArgs.platform === "android") {-                                        this.logger.info(localize("PrepareHermesDebugging", "Prepare Hermes debugging (experimental)"));+                                if (mobilePlatformOptions.isDirect || !mobilePlatformOptions.debuggingEnabled) {

Do we need that !mobilePlatformOptions.debuggingEnabled check? We also have this after that check and that confused me a bit.

RedMickey

comment created time in 12 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export class DirectDebugSession extends DebugSessionBase {                         return TelemetryHelper.generate("launch", extProps, (generator) => {                             return this.appLauncher.launch(launchArgs)                                 .then(() => {-                                    return this.appLauncher.getPackagerPort(launchArgs.cwd);-                                })-                                .then((packagerPort: number) => {-                                    launchArgs.port = launchArgs.port || packagerPort;-                                    this.attachRequest(response, launchArgs).then(() => {+                                    if (launchArgs.debuggingEnabled) {+                                        launchArgs.port = launchArgs.port || this.appLauncher.getPackagerPort(launchArgs.cwd);+                                        this.attachRequest(response, launchArgs).then(() => {+                                            resolve();+                                        }).catch((e) => reject(e));

Should we show the similar error like here? https://github.com/microsoft/vscode-react-native/pull/1319/files#diff-28e7cf10d05219e87adfabc5cb1c1c93R66-R69 Also I think that should be localized.

RedMickey

comment created time in 13 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

     "reactNative.launch.debuggerWorkerUrlPath.description": "Path to the app debugger worker to override. For example, if debugger tries to attach to http://localhost:8081/debugger-ui/debuggerWorker.js and you get 404 error from packager output then you may want to change debuggerWorkerUrlPath to another value suitable for your packager (\"debugger-ui\" will be replaced with the value you provide).",     "reactNative.launch.launchActivity.description": "The activity to be launched for debugging. Default is 'MainActivity'.",     "reactNative.launch.expoHostType.description": "The connection type to be used on Expo debugging to communicate with a device or an emulator. Default is 'tunnel'.",+    "reactNative.launch.debuggingEnabled.description": "Whether to enable debug mode. If set to \"false\", an application will be launch without debugging.",
    "reactNative.launch.debuggingEnabled.description": "Whether to enable debug mode. If set to \"false\", an application will be launched without debugging.",
RedMickey

comment created time in 13 days

issue closedmicrosoft/vscode-cordova

Extension causes high cpu load

  • Issue Type: Performance
  • Extension Name: cordova-tools
  • Extension Version: 1.9.4
  • OS Version: Windows_NT x64 10.0.18362
  • VSCode version: 1.46.0

:warning: Make sure to attach this file from your home-directory: :warning:C:\Users\papso\msjsdiag.cordova-tools-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

closed time in 13 days

ehmd96

issue commentmicrosoft/vscode-cordova

Extension causes high cpu load

@ehmd96 Duplicate #517

ehmd96

comment created time in 13 days

Pull request review commentmicrosoft/vscode-react-native

Add scenarios to run apps without debugging

 export class AppLauncher {             mobilePlatformOptions.debugLaunchActivity = launchArgs.launchActivity;         } -        if (launchArgs.type === "reactnativedirect") {+        if (launchArgs.type === "reactnativedirect-preview") {

It is better to use REACT_NATIVE_TYPES.DIRECT here

RedMickey

comment created time in 13 days

Pull request review commentmicrosoft/vscode-react-native

Eslint migration

+module.exports = {+    ignorePatterns: [+      "**/*.d.ts",+      "**/*.js",+      "node_modules/**",+      "test/resources/sampleReactNative022Project/**/*.js",+      "test/smoke/package/node_modules/**",+      "test/smoke/automation/node_modules/**",+      "test/smoke/resources/**",+      "test/smoke/vscode/**",

Do we need these filters here? We point only src folder to be linted.

JiglioNero

comment created time in 23 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as Configstore from "configstore";+import * as https from "https";+import { PreviewVersionPromotion } from "./experiments/previewVersionPromotion";+import { IExperiment } from "./experiments/IExperiment";+import { TelemetryHelper } from "../../common/telemetryHelper";++export enum ExperimentStatuses {+    FAILURE = "failure",+    SUCCESS = "success",+    SKIPPED = "skipped",+}++export interface ExperimentConfig {+    experimentName: string;+    popCoveragePercent: number;+    enabled: boolean;+}++export interface ExperimentParameters extends ExperimentConfig {+    [key: string]: any;+    extensionId?: string;+}++export interface ExperimentResult {+    resultStatus: ExperimentStatuses;+    updatedExperimentParameters: ExperimentParameters;+}++export class ExperimentService {+    private readonly endpointURL: string;+    private readonly configName: string;+    private readonly availableExperiments: any;+    private config: Configstore;+    private downloadedExperimentsConfig: Array<ExperimentConfig> | null;+    private downloadConfigRequest: Promise<ExperimentConfig[]> | null;++    constructor() {+        this.endpointURL = "https://microsoft.github.io/vscode-react-native/experiments/experimentsConfig.json";+        this.configName = "reactNativeToolsConfig";+        this.availableExperiments = {+            RNT_PREVIEW_PROMPT: "RNTPreviewPrompt",+        };++        this.config = new Configstore(this.configName);+        this.downloadedExperimentsConfig = null;+        this.downloadConfigRequest = null;+    }++    public async initialize(): Promise<void> {+        this.downloadConfigRequest = this.downloadExperimentsConfig();

I thought that initialize method will be more explicit since we are calling it in the activate method where we can call all the initializations. We also thought about singleton, but decided to work without it since we don't have any other singletons in that project.

RedMickey

comment created time in 24 days

issue commentmicrosoft/vscode-react-native

Run the application without debugging

@molant Not sure that it could be cherry-picked cleanly since the entry points for commands has changed, and they are in different files now because of architectural changes.

molant

comment created time in 24 days

issue openedmicrosoft/vscode-react-native

[Feature] Investigate if it is possible to implement 'Reload app' and 'Show DevMenu' commands via Metro bundler instead of NativeModules

🚀 Feature request

We need to investigate if we can trigger Reload app and Show DevMenu commands on iOS and RNW without triggering NativeModules inside of React Native core. More info: https://github.com/microsoft/react-native-windows/issues/3822#issuecomment-629566126

What scenarios will this solve?

This will allow to not depend on React Native code base inside our debuggerWorker.js and may be helpful when the only direct debugging will be allowed

created time in 24 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as Configstore from "configstore";+import * as https from "https";+import { PreviewVersionPromotion} from "./experiments/previewVersionPromotion";+import { TelemetryHelper } from "../../common/telemetryHelper";++export enum ExperimentStatuses {+    FAILURE = "failure",+    SUCCESS = "success",+    SKIPPED = "skipped",+}++export interface ExperimentConfig {+    experimentName: string;+    popCoveragePercent: number;+    enabled: boolean;+}++export interface ExperimentParameters extends ExperimentConfig {+    [key: string]: any;+    extensionId?: string;+}++export interface ExperimentResult {+    resultStatus: ExperimentStatuses;+    updatedExperimentParameters: ExperimentParameters;+}++export class ExperimentService {+    private readonly endpointURL: string;+    private readonly configName: string;+    private readonly availableExperiments: any;+    private config: Configstore;+    private downloadedExperimentsConfig: Array<ExperimentConfig> | null;+    private downloadConfigProm: Promise<ExperimentConfig[]> | null;++    constructor() {+        this.endpointURL = "https://microsoft.github.io/vscode-react-native/experiments/experimentsConfig.json";+        this.configName = "reactNativeToolsConfig";+        this.availableExperiments = {+            RNT_PREVIEW_PROMPT: "RNTPreviewPrompt",+        };++        this.config = new Configstore(this.configName);+        this.downloadedExperimentsConfig = null;+        this.downloadConfigProm = null;+    }++    public async initialize(): Promise<void> {+        this.downloadConfigProm = this.downloadExperimentsConfig();+    }++    public async runExperiments(): Promise<void> {+        if (!this.downloadedExperimentsConfig) {+            if (!this.downloadConfigProm) {+                throw new Error("Experiment Service is not initialized");+            }+            try {+                this.downloadedExperimentsConfig = await this.downloadConfigProm;+            } catch (err) {+                this.downloadConfigProm = this.downloadExperimentsConfig();+                throw new Error("Failed to download experiments config");

Should these strings be localized?

RedMickey

comment created time in 25 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as vscode from "vscode";+import { IExperiment } from "./IExperiment";+import { ExperimentConfig, ExperimentParameters, ExperimentResult, ExperimentStatuses } from "../experimentService";+import { PROMPT_TITLES } from "../experimentsStrings";++export class PreviewVersionPromotion implements IExperiment {++    public async run(newExpConfig: ExperimentConfig, curExpParameters?: ExperimentParameters): Promise<ExperimentResult> {+        if (curExpParameters) {+            if (curExpParameters.promptShown) {+                return {+                    resultStatus: ExperimentStatuses.SKIPPED,+                    updatedExperimentParameters: curExpParameters,+                };+            } else if (newExpConfig.popCoveragePercent !== curExpParameters.popCoveragePercent) {+                this.showPrompIfThresholdIsNotExceeded(newExpConfig, curExpParameters);+            }+        }++        const updatedExperimentParameters = this.showPrompIfThresholdIsNotExceeded(newExpConfig, curExpParameters);++        return {+            resultStatus: ExperimentStatuses.SUCCESS,+            updatedExperimentParameters,+        };+    }++    private showPrompIfThresholdIsNotExceeded(newExpConfig: ExperimentConfig, promptParameters?: ExperimentParameters) {+        if (promptParameters) {+            promptParameters.threshold = newExpConfig.popCoveragePercent;+        } else {+            promptParameters = Object.assign(+                {},+                newExpConfig,+                {+                    extensionId: "msjsdiag.vscode-react-native-preview",+                    promptShown: false,+                }+            );+        }++        if (newExpConfig.popCoveragePercent > Math.random()) {

I thought that all probabilities should be calculated on configurations initialization, and then based on this we may not even launch the experiment code.

RedMickey

comment created time in 25 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as Configstore from "configstore";+import * as https from "https";+import { PreviewVersionPromotion} from "./experiments/previewVersionPromotion";+import { TelemetryHelper } from "../../common/telemetryHelper";++export enum ExperimentStatuses {+    FAILURE = "failure",+    SUCCESS = "success",+    SKIPPED = "skipped",+}++export interface ExperimentConfig {+    experimentName: string;+    popCoveragePercent: number;+    enabled: boolean;+}++export interface ExperimentParameters extends ExperimentConfig {+    [key: string]: any;+    extensionId?: string;+}++export interface ExperimentResult {+    resultStatus: ExperimentStatuses;+    updatedExperimentParameters: ExperimentParameters;+}++export class ExperimentService {+    private readonly endpointURL: string;+    private readonly configName: string;+    private readonly availableExperiments: any;+    private config: Configstore;+    private downloadedExperimentsConfig: Array<ExperimentConfig> | null;+    private downloadConfigProm: Promise<ExperimentConfig[]> | null;

Maybe rename this to downloadConfigReq or downloadConfigRequest. Prom ending looks not very obvious

RedMickey

comment created time in 25 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as nls from "vscode-nls";+const localize = nls.loadMessageBundle();

Please take into account that on preview version we also need to apply nls.config

RedMickey

comment created time in 25 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as Configstore from "configstore";+import * as https from "https";+import { PreviewVersionPromotion} from "./experiments/previewVersionPromotion";+import { TelemetryHelper } from "../../common/telemetryHelper";++export enum ExperimentStatuses {+    FAILURE = "failure",+    SUCCESS = "success",+    SKIPPED = "skipped",+}++export interface ExperimentConfig {+    experimentName: string;+    popCoveragePercent: number;+    enabled: boolean;+}++export interface ExperimentParameters extends ExperimentConfig {+    [key: string]: any;+    extensionId?: string;+}++export interface ExperimentResult {+    resultStatus: ExperimentStatuses;+    updatedExperimentParameters: ExperimentParameters;+}++export class ExperimentService {+    private readonly endpointURL: string;+    private readonly configName: string;+    private readonly availableExperiments: any;+    private config: Configstore;+    private downloadedExperimentsConfig: Array<ExperimentConfig> | null;+    private downloadConfigProm: Promise<ExperimentConfig[]> | null;++    constructor() {+        this.endpointURL = "https://microsoft.github.io/vscode-react-native/experiments/experimentsConfig.json";+        this.configName = "reactNativeToolsConfig";+        this.availableExperiments = {+            RNT_PREVIEW_PROMPT: "RNTPreviewPrompt",+        };++        this.config = new Configstore(this.configName);+        this.downloadedExperimentsConfig = null;+        this.downloadConfigProm = null;+    }++    public async initialize(): Promise<void> {+        this.downloadConfigProm = this.downloadExperimentsConfig();+    }++    public async runExperiments(): Promise<void> {+        if (!this.downloadedExperimentsConfig) {+            if (!this.downloadConfigProm) {+                throw new Error("Experiment Service is not initialized");+            }+            try {+                this.downloadedExperimentsConfig = await this.downloadConfigProm;+            } catch (err) {+                this.downloadConfigProm = this.downloadExperimentsConfig();+                throw new Error("Failed to download experiments config");+            }+        }++        let experimentResults: Array<ExperimentResult> = await Promise.all(this.downloadedExperimentsConfig+            .filter(expConfig => expConfig.enabled)+            .map(async (expConfig) => await this.executeExperiment(expConfig))+        );++        this.sendExperimentTelemetry(experimentResults);+    }++    private async executeExperiment(expConfig: ExperimentConfig): Promise<ExperimentResult> {+        let curExperimentParameters = this.config.get(expConfig.experimentName);+        let expResult: ExperimentResult;++        try {+            switch (expConfig.experimentName) {+                case this.availableExperiments.RNT_PREVIEW_PROMPT:+                    let previewPromptExp = new PreviewVersionPromotion();+                    expResult = await previewPromptExp.run(expConfig, curExperimentParameters);+                    break;+                default:+                    throw new Error("Cannot run the experiment. There is no such experiment.");+            }+        } catch (err) {+            return {+                resultStatus: ExperimentStatuses.FAILURE,+                updatedExperimentParameters: expConfig,+            };+        }++        this.config.set(expConfig.experimentName, expResult.updatedExperimentParameters);+        return expResult;+    }++    private downloadExperimentsConfig(): Promise<ExperimentConfig[]> {+        return new Promise<ExperimentConfig[]>((resolve, reject) => {+            https.get(this.endpointURL, (response) => {+                let data = "";+                response.setEncoding("utf8");+                response.on("data", (chunk: string) => (data += chunk));+                response.on("end", () => {+                    try {+                        resolve(JSON.parse(data));+                    } catch (err) {+                        reject(err);+                    }+                });+                response.on("error", reject);+            }).on("error", reject);+        });+    }++    private sendExperimentTelemetry(experimentsResults: ExperimentResult[]): void {+        const telemetryProps = experimentsResults.reduce((tProps, expResult) => {+            return Object.assign(

Could you please add description for the new telemetry event in the PR description?

RedMickey

comment created time in 25 days

Pull request review commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

+// Copyright (c) Microsoft Corporation. All rights reserved.+// Licensed under the MIT license. See LICENSE file in the project root for details.++import * as vscode from "vscode";+import { IExperiment } from "./IExperiment";+import { ExperimentConfig, ExperimentParameters, ExperimentResult, ExperimentStatuses } from "../experimentService";+import { PROMPT_TITLES } from "../experimentsStrings";++export class PreviewVersionPromotion implements IExperiment {++    public async run(newExpConfig: ExperimentConfig, curExpParameters?: ExperimentParameters): Promise<ExperimentResult> {+        if (curExpParameters) {+            if (curExpParameters.promptShown) {+                return {+                    resultStatus: ExperimentStatuses.SKIPPED,+                    updatedExperimentParameters: curExpParameters,+                };+            } else if (newExpConfig.popCoveragePercent !== curExpParameters.popCoveragePercent) {+                this.showPrompIfThresholdIsNotExceeded(newExpConfig, curExpParameters);+            }+        }++        const updatedExperimentParameters = this.showPrompIfThresholdIsNotExceeded(newExpConfig, curExpParameters);++        return {+            resultStatus: ExperimentStatuses.SUCCESS,+            updatedExperimentParameters,+        };+    }++    private showPrompIfThresholdIsNotExceeded(newExpConfig: ExperimentConfig, promptParameters?: ExperimentParameters) {
    private showPromptIfThresholdIsNotExceeded(newExpConfig: ExperimentConfig, promptParameters?: ExperimentParameters) {
RedMickey

comment created time in 25 days

issue closedmicrosoft/vscode-react-native

[Feature] Bundle extension

🚀 Feature request

What do you want to be added?

From VS Code - Bundling Extensions:

Loading 100 small files is much slower than loading one large file. That's why we recommend bundling. Bundling is the process of combining multiple small source files into a single file.

There is more information in the link above.

What scenarios will this solve?

This should make the extension to load faster.

closed time in 25 days

molant

delete branch microsoft/vscode-react-native

delete branch : webpack-bundle

delete time in 25 days

PR merged microsoft/vscode-react-native

Add webpack bundling for the extension preview
  • Added extension bundling
    • Resolved several critical dependencies issues
    • Resolved dynamic require webpack issues
  • Enhanced preview VSIX generation scripts
  • Bumped vscode-nls package
  • Added localization smoke test

Resolves #1294

+3323 -159

0 comment

42 changed files

SounD120

pr closed time in 25 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 2d8af448639ae41e82a4787568ca03d97e261d3d

Add webpack bundling for the extension (#1308) * Add webpack bundling for the extension * Fix dependencies problem * Change build script * Add webpack-bundle-analyzer * Add localization pipeline to bundling scenario * Update localization configs to suit vscode-nls@4 * Added localization smoke test * Resolve webpack dynamic require problem, add additional attribution

view details

push time in 25 days

pull request commentmicrosoft/vscode-react-native

Add prompt functionality to promote RNT-preview extension

@molant We are reworking this PR right now to make cherry-pick it to preview branch cleanly. @RedMickey Will let you know when it's ready.

RedMickey

comment created time in 25 days

issue openedmicrosoft/vscode-react-native

[Feature] Migrate extension linting from tslint to eslint

🚀 Feature request

tslint becomes deprecated on December 1: https://github.com/palantir/tslint/issues/4534

What scenarios will this solve?

This will allow to keep the toolkit updated and use new linting functions with recent TS versions.

created time in 25 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 8511948dc91f2537c7b92aff6b4fbcdb4e1e6506

Update src/common/extensionHelper.ts Co-authored-by: RedMickey <33267199+RedMickey@users.noreply.github.com>

view details

push time in 25 days

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 996e2c77e018255af37af96566284cea691a0fce

Enhance package.json file backing up in gulp release script

view details

push time in 25 days

push eventmicrosoft/vscode-react-native

dependabot[bot]

commit sha fc7330974e30c8a352f2c1aadf1a5cffc73860a8

Bump websocket-extensions from 0.1.3 to 0.1.4 in /test/smoke/package (#1310) Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

Yuri Skorokhodov

commit sha debc80d1d428abc5b946d82ca033c07e7e386b6a

Merge branch 'master' into add-prompt-functionality

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 60b3212198cb4ae673815fc0ddfebd8770619ae5

Squashed commit of the following: commit 9442a7e6d775bd164f0d04d0bc3ff5d8b7775769 Author: JiglioNero <43934531+JiglioNero@users.noreply.github.com> Date: Tue Jun 9 11:32:53 2020 +0300 Remove skip from Hermes RN app Debug test (#1307) * remove skip from Hermes RN app Debug test * check output and fix assert * change log file for check result

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 0edda03caf5a3e1d355d10d78dc903b7fa7bb96a

Fix dynamic require

view details

push time in a month

Pull request review commentmicrosoft/vscode-react-native

Add debug config migration guide for RNT preview

  > This is a preview version of the updated React Native Tools extension. It's not recommended to use the preview version and the stable one at the same time. +## React Native Tools Preview migration guide++In the Preview version of the extension we changed debug types in debug configurations. The table below shows the difference between debug configuration of the stable and the preview version.++|RNT stable|RNT preview|+|---|---|+|```"type": "reactnative"```|```"type": "reactnative-preview"```|+|```"type": "reactnativedirect"```|```"type": "reactnativedirect-preview"```|++It's just required to add `-preview` suffix in `type` field of a debug configuration of the RNT stable extension to be able to use the preview version of the extension.++We also added `(Preview)` suffix to Command Palette command names.++![React Native commands preview](images/command-palette-preview.png)++To avoid conflicts, it's not recommended to use Command Palette commands of the preview version and the stable one at the same time.
To avoid conflicts, it's not recommended to use Command Palette commands and debug configurations of the preview version and the stable one at the same time.
RedMickey

comment created time in a month

Pull request review commentmicrosoft/vscode-react-native

Add debug config migration guide for RNT preview

  > This is a preview version of the updated React Native Tools extension. It's not recommended to use the preview version and the stable one at the same time. +## React Native Tools Preview migration guide++In the Preview version of the extension we changed debug types in debug configurations. The table below shows the difference between debug configuration of the stable and the preview version.++|RNT stable|RNT preview|

I am also thinking that we could add some image to demonstrate how the old configuration becomes the preview one in addition to this table.

RedMickey

comment created time in a month

Pull request review commentmicrosoft/vscode-react-native

Add debug config migration guide for RNT preview

  > This is a preview version of the updated React Native Tools extension. It's not recommended to use the preview version and the stable one at the same time. +## React Native Tools Preview migration guide++In the Preview version of the extension we changed debug types in debug configurations. The table below shows the difference between debug configuration of the stable and the preview version.++|RNT stable|RNT preview|+|---|---|+|```"type": "reactnative"```|```"type": "reactnative-preview"```|+|```"type": "reactnativedirect"```|```"type": "reactnativedirect-preview"```|++It's just required to add `-preview` suffix in `type` field of a debug configuration of the RNT stable extension to be able to use the preview version of the extension.
In order to use the preview version of the extension it's required to add `-preview` suffix in `type` field of a debug configuration of the RNT stable extension.
RedMickey

comment created time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 90f27c233954a945e19545f3507abcc4d45584a1

Update version numbers in preview version test

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 0141ef67922da4efbd70a95d487f26eb1cdc7c9a

Fix indent

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 2b6d4e6f0368e02dd1be53e0fced50a2d64489c4

Minor fix

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha c033f6ddaae6558e99dae55edef6a0f1cbcd2230

Fix tslint

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 47b254b2516fe42f20f6ecd5c7578b0fc579b2e6

Resolve webpack dynamic require problem, add additional attribution

view details

push time in a month

fork SounD120/ow

Function argument validation for humans

https://sindresorhus.com/ow

fork in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 4a3506b173cafabfa8736e7ba6a77a211a009eea

Add rolling back the package json after producing a VSIX package

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha aa9e1c36977e2f0f28c2fd4d40890d3e4b7b617d

Update test string

view details

push time in a month

push eventmicrosoft/vscode-react-native

Yuri Skorokhodov

commit sha 3eff0060e3e3b5328e93b1bc798acbe955b6c0e6

Fix argument passing

view details

push time in a month

more