author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
410,217 |
11.04.2018 13:36:30
| 25,200 |
ca5a46dad4e6700b33d779c697ec0d8b29448a1d
|
Remove support for old Webkit debugger which nobody used
And cleaned up some code
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -32,8 +32,6 @@ namespace Microsoft.NodejsTools.Project\nprivate readonly NodejsProjectNode _project;\nprivate int? _testServerPort;\n- private static readonly Guid WebkitDebuggerGuid = Guid.Parse(\"4cc6df14-0ab5-4a91-8bb4-eb0bf233d0fe\");\n- private static readonly Guid WebkitPortSupplierGuid = Guid.Parse(\"4103f338-2255-40c0-acf5-7380e2bea13d\");\ninternal static readonly Guid WebKitDebuggerV2Guid = Guid.Parse(\"30d423cc-6d0b-4713-b92d-6b2a374c3d89\");\npublic NodejsProjectLauncher(NodejsProjectNode project)\n@@ -64,26 +62,20 @@ namespace Microsoft.NodejsTools.Project\n}\nvar nodeVersion = Nodejs.GetNodeVersion(nodePath);\n- var chromeProtocolRequired = nodeVersion >= new Version(8, 0) || CheckDebugProtocolOption();\nvar startBrowser = ShouldStartBrowser();\n// The call to Version.ToString() is safe, since changes to the ToString method are very unlikely, as the current output is widely documented.\n- if (debug && !chromeProtocolRequired)\n+ if (debug)\n{\n- StartWithDebugger(file);\n- TelemetryHelper.LogDebuggingStarted(\"Node6\", nodeVersion.ToString());\n- }\n- else if (debug && chromeProtocolRequired)\n- {\n- if (CheckUseNewChromeDebugProtocolOption())\n+ if (nodeVersion >= new Version(8, 0))\n{\nStartWithChromeV2Debugger(file, nodePath, startBrowser);\nTelemetryHelper.LogDebuggingStarted(\"ChromeV2\", nodeVersion.ToString());\n}\nelse\n{\n- StartAndAttachDebugger(file, nodePath, startBrowser);\n- TelemetryHelper.LogDebuggingStarted(\"Chrome\", nodeVersion.ToString());\n+ StartWithDebugger(file);\n+ TelemetryHelper.LogDebuggingStarted(\"Node6\", nodeVersion.ToString());\n}\n}\nelse\n@@ -97,20 +89,6 @@ namespace Microsoft.NodejsTools.Project\n// todo: move usersettings to separate class, so we can use this from other places.\n- internal static bool CheckUseNewChromeDebugProtocolOption()\n- {\n- var optionString = NodejsDialogPage.LoadString(name: \"WebKitVersion\", cat: \"Debugging\");\n-\n- return !StringComparer.OrdinalIgnoreCase.Equals(optionString, \"V1\");\n- }\n-\n- internal static bool CheckDebugProtocolOption()\n- {\n- var optionString = NodejsDialogPage.LoadString(name: \"DebugProtocol\", cat: \"Debugging\");\n-\n- return StringComparer.OrdinalIgnoreCase.Equals(optionString, \"chrome\");\n- }\n-\ninternal static bool CheckEnableDiagnosticLoggingOption()\n{\nvar optionString = NodejsDialogPage.LoadString(name: \"DiagnosticLogging\", cat: \"Debugging\");\n@@ -118,123 +96,6 @@ namespace Microsoft.NodejsTools.Project\nreturn StringComparer.OrdinalIgnoreCase.Equals(optionString, \"true\");\n}\n- internal static string CheckForRegistrySpecifiedNodeParams()\n- {\n- var paramString = NodejsDialogPage.LoadString(name: \"NodeCmdParams\", cat: \"Debugging\");\n-\n- return paramString;\n- }\n-\n- private void StartAndAttachDebugger(string file, string nodePath, bool startBrowser)\n- {\n- // start the node process\n- var workingDir = _project.GetWorkingDirectory();\n- var url = GetFullUrl();\n- var env = GetEnvironmentVariablesString(url);\n- var interpreterOptions = _project.GetProjectProperty(NodeProjectProperty.NodeExeArguments);\n- var debugOptions = this.GetDebugOptions();\n- var script = GetFullArguments(file, includeNodeArgs: false);\n-\n- var process = NodeDebugger.StartNodeProcessWithInspect(exe: nodePath, script: script, dir: workingDir, env: env, interpreterOptions: interpreterOptions, debugOptions: debugOptions);\n- process.Start();\n-\n- // setup debug info and attach\n- var debugUri = $\"http://127.0.0.1:{process.DebuggerPort}\";\n-\n- var dbgInfo = new VsDebugTargetInfo4();\n- dbgInfo.dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning;\n- dbgInfo.LaunchFlags = (uint)__VSDBGLAUNCHFLAGS.DBGLAUNCH_StopDebuggingOnEnd;\n-\n- dbgInfo.guidLaunchDebugEngine = WebkitDebuggerGuid;\n- dbgInfo.dwDebugEngineCount = 1;\n-\n- var enginesPtr = MarshalDebugEngines(new[] { WebkitDebuggerGuid });\n- dbgInfo.pDebugEngines = enginesPtr;\n- dbgInfo.guidPortSupplier = WebkitPortSupplierGuid;\n- dbgInfo.bstrPortName = debugUri;\n- dbgInfo.fSendToOutputWindow = 0;\n-\n- // we connect through a URI, so no need to set the process,\n- // we need to set the process id to '1' so the debugger is able to attach\n- dbgInfo.bstrExe = $\"\\01\";\n-\n- AttachDebugger(dbgInfo);\n-\n- if (startBrowser)\n- {\n- Uri uri = null;\n- if (!String.IsNullOrWhiteSpace(url))\n- {\n- uri = new Uri(url);\n- }\n-\n- if (uri != null)\n- {\n- OnPortOpenedHandler.CreateHandler(\n- uri.Port,\n- shortCircuitPredicate: () => process.HasExited,\n- action: () =>\n- {\n- VsShellUtilities.OpenBrowser(url, (uint)__VSOSPFLAGS.OSP_LaunchNewBrowser);\n- }\n- );\n- }\n- }\n- }\n-\n- private NodeDebugOptions GetDebugOptions()\n- {\n- var debugOptions = NodeDebugOptions.None;\n-\n- if (NodejsPackage.Instance.GeneralOptionsPage.WaitOnAbnormalExit)\n- {\n- debugOptions |= NodeDebugOptions.WaitOnAbnormalExit;\n- }\n-\n- if (NodejsPackage.Instance.GeneralOptionsPage.WaitOnNormalExit)\n- {\n- debugOptions |= NodeDebugOptions.WaitOnNormalExit;\n- }\n-\n- return debugOptions;\n- }\n-\n- private void AttachDebugger(VsDebugTargetInfo4 dbgInfo)\n- {\n- var serviceProvider = _project.Site;\n-\n- var debugger = serviceProvider.GetService(typeof(SVsShellDebugger)) as IVsDebugger4;\n-\n- if (debugger == null)\n- {\n- throw new InvalidOperationException(\"Failed to get the debugger service.\");\n- }\n-\n- var launchResults = new VsDebugTargetProcessInfo[1];\n- debugger.LaunchDebugTargets4(1, new[] { dbgInfo }, launchResults);\n- }\n-\n- private static IntPtr MarshalDebugEngines(Guid[] debugEngines)\n- {\n- if (debugEngines.Length == 0)\n- {\n- return IntPtr.Zero;\n- }\n-\n- var guidSize = Marshal.SizeOf(typeof(Guid));\n- var size = debugEngines.Length * guidSize;\n- var bytes = new byte[size];\n- for (var i = 0; i < debugEngines.Length; ++i)\n- {\n- debugEngines[i].ToByteArray().CopyTo(bytes, i * guidSize);\n- }\n-\n- var pDebugEngines = Marshal.AllocCoTaskMem(size);\n- Marshal.Copy(bytes, 0, pDebugEngines, size);\n-\n- return pDebugEngines;\n- }\n-\nprivate void StartNodeProcess(string file, string nodePath, bool startBrowser)\n{\n//TODO: looks like this duplicates a bunch of code in NodeDebugger\n@@ -385,6 +246,8 @@ namespace Microsoft.NodejsTools.Project\n}\nvar runtimeArguments = ConvertArguments(this._project.GetProjectProperty(NodeProjectProperty.NodeExeArguments));\n+ // If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\n+ runtimeArguments = runtimeArguments.Append($\"--inspect-brk=${debuggerPort}\");\nvar scriptArguments = ConvertArguments(this._project.GetProjectProperty(NodeProjectProperty.ScriptArguments));\nvar cwd = _project.GetWorkingDirectory(); // Current working directory\n@@ -395,7 +258,7 @@ namespace Microsoft.NodejsTools.Project\nnew JProperty(\"program\", file),\nnew JProperty(\"args\", scriptArguments),\nnew JProperty(\"runtimeExecutable\", nodePath),\n- new JProperty(\"runtimeArgs\", runtimeArguments.Concat(new[] { $\"--inspect-brk=${debuggerPort}\" }).ToArray()), // If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\n+ new JProperty(\"runtimeArgs\", runtimeArguments),\nnew JProperty(\"port\", debuggerPort),\nnew JProperty(\"cwd\", cwd),\nnew JProperty(\"console\", \"externalTerminal\"),\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/JsFileDebugLaunchTargetProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/JsFileDebugLaunchTargetProvider.cs",
"diff": "@@ -31,7 +31,7 @@ namespace Microsoft.NodejsTools.Workspace\nvar nodeExe = CheckNodeInstalledAndWarn(debugLaunchContext);\nvar nodeVersion = Nodejs.GetNodeVersion(nodeExe);\n- if (nodeVersion >= new Version(8, 0) || NodejsProjectLauncher.CheckDebugProtocolOption())\n+ if (nodeVersion >= new Version(8, 0))\n{\nthis.SetupDebugTargetInfoForInspectProtocol(ref vsDebugTargetInfo, debugLaunchContext, nodeExe);\nTelemetryHelper.LogDebuggingStarted(\"ChromeV2\", nodeVersion.ToString(), isProject: false);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/LaunchDebugTargetProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/LaunchDebugTargetProvider.cs",
"diff": "@@ -61,9 +61,11 @@ namespace Microsoft.NodejsTools.Workspace\nprotected static string GetJsonConfigurationForInspectProtocol(string target, string workingDir, string nodeExe, DebugLaunchActionContext debugLaunchContext)\n{\n+ var debuggerPort = debugLaunchContext.LaunchConfiguration.GetValue(DebuggerPortKey, defaultValue: NodejsConstants.DefaultDebuggerPort);\nvar runtimeArguments = ConvertArguments(debugLaunchContext.LaunchConfiguration.GetValue<string>(NodeArgsKey, defaultValue: null));\n+ // If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\n+ runtimeArguments = runtimeArguments.Append($\"--inspect-brk=${debuggerPort}\");\nvar scriptArguments = ConvertArguments(debugLaunchContext.LaunchConfiguration.GetValue<string>(ScriptArgsKey, defaultValue: null));\n- var port = debugLaunchContext.LaunchConfiguration.GetValue(DebuggerPortKey, defaultValue: NodejsConstants.DefaultDebuggerPort);\nvar configuration = new JObject(\nnew JProperty(\"name\", \"Debug Node.js program from Visual Studio\"),\n@@ -73,7 +75,7 @@ namespace Microsoft.NodejsTools.Workspace\nnew JProperty(\"args\", scriptArguments),\nnew JProperty(\"runtimeExecutable\", nodeExe),\nnew JProperty(\"runtimeArgs\", runtimeArguments),\n- new JProperty(\"port\", port),\n+ new JProperty(\"port\", debuggerPort),\nnew JProperty(\"cwd\", workingDir),\nnew JProperty(\"console\", \"externalTerminal\"),\nnew JProperty(\"trace\", NodejsProjectLauncher.CheckEnableDiagnosticLoggingOption()),\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/NodeJsDebugLaunchTargetProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/NodeJsDebugLaunchTargetProvider.cs",
"diff": "@@ -36,7 +36,7 @@ namespace Microsoft.NodejsTools.Workspace\nvar nodeExe = CheckNodeInstalledAndWarn(debugLaunchContext);\nvar nodeVersion = Nodejs.GetNodeVersion(nodeExe);\n- if (nodeVersion >= new Version(8, 0) || NodejsProjectLauncher.CheckDebugProtocolOption())\n+ if (nodeVersion >= new Version(8, 0))\n{\nSetupDebugTargetInfoForInspectProtocol(ref vsDebugTargetInfo, debugLaunchContext, nodeExe);\nTelemetryHelper.LogDebuggingStarted(\"ChromeV2\", nodeVersion.ToString(), isProject: false);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Remove support for old Webkit debugger which nobody used
And cleaned up some code
|
410,217 |
11.04.2018 13:40:12
| 25,200 |
01c741b156f19005f3b0737ad203249bd0163a43
|
Add nuget package so we can use the new filewatcher API in VS
|
[
{
"change_type": "MODIFY",
"old_path": "Build/xTVS.ruleset",
"new_path": "Build/xTVS.ruleset",
"diff": "<RuleSet Name=\"xTVS Coding Rules\" Description=\"xTVS ruleset with low-value tests disabled.\" ToolsVersion=\"10.0\">\n<Rules AnalyzerId=\"Microsoft.Analyzers.ManagedCodeAnalysis\" RuleNamespace=\"Microsoft.Rules.Managed\">\n<Rule Id=\"CA2204\" Action=\"None\" />\n- <Rule Id=\"CA2210\" Action=\"None\" /> <!-- mt.exe problem with signing -->\n-\n+ <Rule Id=\"CA2210\" Action=\"None\" />\n+ <!-- mt.exe problem with signing -->\n<Rule Id=\"CA1001\" Action=\"Warning\" />\n<Rule Id=\"CA1009\" Action=\"Warning\" />\n<Rule Id=\"CA1016\" Action=\"Warning\" />\n<Rule Id=\"CA1049\" Action=\"Warning\" />\n- <Rule Id=\"CA1033\" Action=\"None\" /> <!-- Explicit interface implementation on base classes -->\n+ <Rule Id=\"CA1033\" Action=\"None\" />\n+ <!-- Explicit interface implementation on base classes -->\n<Rule Id=\"CA1060\" Action=\"Warning\" />\n<Rule Id=\"CA1061\" Action=\"Warning\" />\n<Rule Id=\"CA1063\" Action=\"Warning\" />\n- <Rule Id=\"CA1065\" Action=\"None\" /> <!-- Throw from property accessors -->\n+ <Rule Id=\"CA1065\" Action=\"None\" />\n+ <!-- Throw from property accessors -->\n<Rule Id=\"CA1301\" Action=\"Warning\" />\n<Rule Id=\"CA1400\" Action=\"Warning\" />\n<Rule Id=\"CA1401\" Action=\"Warning\" />\n<Rule Id=\"CA2147\" Action=\"Warning\" />\n<Rule Id=\"CA2149\" Action=\"Warning\" />\n<Rule Id=\"CA2200\" Action=\"Warning\" />\n- <Rule Id=\"CA2202\" Action=\"None\" /> <!-- Do not dispose objects multiple times -->\n+ <Rule Id=\"CA2202\" Action=\"None\" />\n+ <!-- Do not dispose objects multiple times -->\n<Rule Id=\"CA2207\" Action=\"Warning\" />\n<Rule Id=\"CA2212\" Action=\"Warning\" />\n<Rule Id=\"CA2213\" Action=\"Warning\" />\n<Rule Id=\"CA2240\" Action=\"Warning\" />\n<Rule Id=\"CA2241\" Action=\"Warning\" />\n<Rule Id=\"CA2242\" Action=\"Warning\" />\n-\n- <Rule Id=\"CA1008\" Action=\"None\" /> <!-- Enum should have zero value -->\n+ <Rule Id=\"CA1008\" Action=\"None\" />\n+ <!-- Enum should have zero value -->\n<Rule Id=\"CA1013\" Action=\"Warning\" />\n- <Rule Id=\"CA1303\" Action=\"None\" /> <!-- Do not pass literals as localized parameters -->\n- <Rule Id=\"CA1308\" Action=\"None\" /> <!-- Normalize strings to uppercase -->\n- <Rule Id=\"CA1806\" Action=\"None\" /> <!-- Do not ignore method results -->\n+ <Rule Id=\"CA1303\" Action=\"None\" />\n+ <!-- Do not pass literals as localized parameters -->\n+ <Rule Id=\"CA1308\" Action=\"None\" />\n+ <!-- Normalize strings to uppercase -->\n+ <Rule Id=\"CA1806\" Action=\"None\" />\n+ <!-- Do not ignore method results -->\n<Rule Id=\"CA1816\" Action=\"Warning\" />\n<Rule Id=\"CA1819\" Action=\"Warning\" />\n<Rule Id=\"CA1820\" Action=\"Warning\" />\n<Rule Id=\"CA1903\" Action=\"Warning\" />\n- <Rule Id=\"CA2004\" Action=\"None\" /> <!-- Remove calls to GC.KeepAlive -->\n+ <Rule Id=\"CA2004\" Action=\"None\" />\n+ <!-- Remove calls to GC.KeepAlive -->\n<Rule Id=\"CA2006\" Action=\"Warning\" />\n<Rule Id=\"CA2102\" Action=\"Warning\" />\n- <Rule Id=\"CA2104\" Action=\"None\" /> <!-- Do not declare readonly mutable types -->\n- <Rule Id=\"CA2105\" Action=\"None\" /> <!-- Array fields should not be read only -->\n+ <Rule Id=\"CA2104\" Action=\"None\" />\n+ <!-- Do not declare readonly mutable types -->\n+ <Rule Id=\"CA2105\" Action=\"None\" />\n+ <!-- Array fields should not be read only -->\n<Rule Id=\"CA2106\" Action=\"Warning\" />\n<Rule Id=\"CA2115\" Action=\"Warning\" />\n<Rule Id=\"CA2119\" Action=\"Warning\" />\n<Rule Id=\"CA2205\" Action=\"Warning\" />\n<Rule Id=\"CA2215\" Action=\"Warning\" />\n<Rule Id=\"CA2221\" Action=\"Warning\" />\n- <Rule Id=\"CA2222\" Action=\"None\" /> <!-- Do not decrease inherited member visibility -->\n+ <Rule Id=\"CA2222\" Action=\"None\" />\n+ <!-- Do not decrease inherited member visibility -->\n<Rule Id=\"CA2223\" Action=\"Warning\" />\n<Rule Id=\"CA2224\" Action=\"Warning\" />\n<Rule Id=\"CA2226\" Action=\"Warning\" />\n<Rule Id=\"CA2227\" Action=\"Warning\" />\n<Rule Id=\"CA2239\" Action=\"Warning\" />\n</Rules>\n+ <Rules AnalyzerId=\"Microsoft.VisualStudio.Threading.Analyzers\" RuleNamespace=\"Microsoft.VisualStudio.Threading.Analyzers\">\n+ <Rule Id=\"VSTHRD001\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD002\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD003\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD010\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD011\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD012\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD100\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD101\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD102\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD103\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD104\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD105\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD106\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD107\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD108\" Action=\"Info\" />\n+ <Rule Id=\"VSTHRD200\" Action=\"Info\" />\n+ </Rules>\n</RuleSet>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<PackageReference Include=\"Microsoft.VisualStudio.AppDesigner\">\n<Version>15.3.0-rc-6162104</Version>\n</PackageReference>\n+ <PackageReference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime\">\n+ <Version>15.7.1</Version>\n+ </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n<Version>15.7.942-master669188BE</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "nuget.config",
"new_path": "nuget.config",
"diff": "<add key=\"dotnet myget\" value=\"https://dotnet.myget.org/f/dotnet-core/api/v3/index.json\" />\n<add key=\"roslyn myget\" value=\"https://dotnet.myget.org/f/roslyn/api/v3/index.json\" />\n<add key=\"Interactive Window\" value=\"https://dotnet.myget.org/f/interactive-window/api/v3/index.json\" />\n+ <add key=\"VSSDK Preview\" value=\"https://vside.myget.org/F/vssdk/api/v3/index.json\" />\n</packageSources>\n</configuration>\n\\ No newline at end of file\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Add nuget package so we can use the new filewatcher API in VS
|
410,217 |
11.04.2018 15:09:23
| 25,200 |
d65bd019dfabc092ff6eee6888272405df2e3166
|
Add commit id to help/about
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.settings",
"new_path": "Build/Common.Build.settings",
"diff": "</PropertyGroup>\n<PropertyGroup>\n- <BuildVersionExtended>$(BuildVersion)</BuildVersionExtended>\n+ <BuildVersionExtended>$(BuildVersion) unknown commit</BuildVersionExtended>\n<BuildVersionExtended Condition=\"'$(BUILD_SOURCEVERSION)'!=''\">$(BuildVersionExtended) commit:$(BUILD_SOURCEVERSION)</BuildVersionExtended>\n<VSIXBuildVersion>$(BuildVersion)</VSIXBuildVersion>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "</ItemGroup>\n<ItemGroup>\n<T4ParameterValues Include=\"BuildVersion\">\n- <Value>$(VSIXBuildVersion)</Value>\n+ <Value>$(BuildVersionExtended)</Value>\n<Visible>false</Visible>\n</T4ParameterValues>\n</ItemGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Add commit id to help/about
|
410,217 |
12.04.2018 11:24:36
| 25,200 |
7c65cbbf61449eb39b72a0d37a93698d0ac4b646
|
Update commit description in help/about
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.settings",
"new_path": "Build/Common.Build.settings",
"diff": "<PropertyGroup>\n<BuildVersionExtended>$(BuildVersion) unknown commit</BuildVersionExtended>\n- <BuildVersionExtended Condition=\"'$(BUILD_SOURCEVERSION)'!=''\">$(BuildVersionExtended) commit:$(BUILD_SOURCEVERSION)</BuildVersionExtended>\n+ <BuildVersionExtended Condition=\"'$(BUILD_SOURCEVERSION)'!=''\">$(BuildVersion) Commit Hash:$(BUILD_SOURCEVERSION)</BuildVersionExtended>\n<VSIXBuildVersion>$(BuildVersion)</VSIXBuildVersion>\n<AssemblyVersion>$(MajorVersion).0.0.0</AssemblyVersion>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Update commit description in help/about
|
410,217 |
12.04.2018 13:55:43
| 25,200 |
f5c5c0c05dcf05cbc8a6bb858989c3d3370e4b19
|
Ensure the assemblies are linked not referenced
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<PackageReference Include=\"Microsoft.VisualStudio.AppDesigner\">\n<Version>15.3.0-rc-6162104</Version>\n</PackageReference>\n+ <PackageReference Include=\"Microsoft.VisualStudio.SDK.EmbedInteropTypes\">\n+ <Version>15.0.17</Version>\n+ </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime\">\n<Version>15.7.1</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"diff": "<PackageReference Include=\"MicroBuild.Core\">\n<Version>0.3.0</Version>\n</PackageReference>\n+ <PackageReference Include=\"Microsoft.VisualStudio.SDK.EmbedInteropTypes\">\n+ <Version>15.0.17</Version>\n+ </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime\">\n<Version>15.7.1</Version>\n</PackageReference>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Ensure the assemblies are linked not referenced
|
410,217 |
12.04.2018 16:28:29
| 25,200 |
d6e36c8c83855a0d826ad7141a25f90f72f3f615
|
Clean up to prepare for unit test changes
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/ProcessOutput.cs",
"new_path": "Common/Product/SharedProject/ProcessOutput.cs",
"diff": "@@ -65,7 +65,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\ninternal sealed class ProcessOutput : IDisposable\n{\n- private readonly Process process;\nprivate readonly string arguments;\nprivate readonly List<string> output, error;\nprivate ManualResetEvent waitHandleEvent;\n@@ -409,30 +408,30 @@ namespace Microsoft.VisualStudioTools.Project\nthis.error = new List<string>();\n}\n- this.process = process;\n- if (this.process.StartInfo.RedirectStandardOutput)\n+ this.Process = process;\n+ if (this.Process.StartInfo.RedirectStandardOutput)\n{\n- this.process.OutputDataReceived += this.OnOutputDataReceived;\n+ this.Process.OutputDataReceived += this.OnOutputDataReceived;\n}\n- if (this.process.StartInfo.RedirectStandardError)\n+ if (this.Process.StartInfo.RedirectStandardError)\n{\n- this.process.ErrorDataReceived += this.OnErrorDataReceived;\n+ this.Process.ErrorDataReceived += this.OnErrorDataReceived;\n}\n- if (!this.process.StartInfo.RedirectStandardOutput && !this.process.StartInfo.RedirectStandardError)\n+ if (!this.Process.StartInfo.RedirectStandardOutput && !this.Process.StartInfo.RedirectStandardError)\n{\n// If we are receiving output events, we signal that the process\n// has exited when one of them receives null. Otherwise, we have\n// to listen for the Exited event.\n// If we just listen for the Exited event, we may receive it\n// before all the output has arrived.\n- this.process.Exited += this.OnExited;\n+ this.Process.Exited += this.OnExited;\n}\n- this.process.EnableRaisingEvents = true;\n+ this.Process.EnableRaisingEvents = true;\ntry\n{\n- this.process.Start();\n+ this.Process.Start();\n}\ncatch (Exception ex)\n{\n@@ -451,28 +450,28 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthis.error.AddRange(SplitLines(ex.ToString()));\n}\n- this.process = null;\n+ this.Process = null;\n}\n- if (this.process != null)\n+ if (this.Process != null)\n{\n- if (this.process.StartInfo.RedirectStandardOutput)\n+ if (this.Process.StartInfo.RedirectStandardOutput)\n{\n- this.process.BeginOutputReadLine();\n+ this.Process.BeginOutputReadLine();\n}\n- if (this.process.StartInfo.RedirectStandardError)\n+ if (this.Process.StartInfo.RedirectStandardError)\n{\n- this.process.BeginErrorReadLine();\n+ this.Process.BeginErrorReadLine();\n}\n- if (this.process.StartInfo.RedirectStandardInput)\n+ if (this.Process.StartInfo.RedirectStandardInput)\n{\n// Close standard input so that we don't get stuck trying to read input from the user.\nif (this.redirector == null || (this.redirector != null && this.redirector.CloseStandardInput()))\n{\ntry\n{\n- this.process.StandardInput.Close();\n+ this.Process.StandardInput.Close();\n}\ncatch (InvalidOperationException)\n{\n@@ -496,11 +495,11 @@ namespace Microsoft.VisualStudioTools.Project\nlock (this.seenNullLock)\n{\nthis.seenNullInOutput = true;\n- shouldExit = this.seenNullInError || !this.process.StartInfo.RedirectStandardError;\n+ shouldExit = this.seenNullInError || !this.Process.StartInfo.RedirectStandardError;\n}\nif (shouldExit)\n{\n- OnExited(this.process, EventArgs.Empty);\n+ OnExited(this.Process, EventArgs.Empty);\n}\n}\nelse if (!string.IsNullOrEmpty(e.Data))\n@@ -532,11 +531,11 @@ namespace Microsoft.VisualStudioTools.Project\nlock (this.seenNullLock)\n{\nthis.seenNullInError = true;\n- shouldExit = this.seenNullInOutput || !this.process.StartInfo.RedirectStandardOutput;\n+ shouldExit = this.seenNullInOutput || !this.Process.StartInfo.RedirectStandardOutput;\n}\nif (shouldExit)\n{\n- OnExited(this.process, EventArgs.Empty);\n+ OnExited(this.Process, EventArgs.Empty);\n}\n}\nelse if (!string.IsNullOrEmpty(e.Data))\n@@ -555,7 +554,9 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- public int? ProcessId => this.IsStarted ? this.process.Id : (int?)null;\n+ public int? ProcessId => this.IsStarted ? this.Process.Id : (int?)null;\n+\n+ public Process Process { get; }\n/// <summary>\n/// The arguments that were originally passed, including the filename.\n@@ -565,7 +566,7 @@ namespace Microsoft.VisualStudioTools.Project\n/// <summary>\n/// True if the process started. False if an error occurred.\n/// </summary>\n- public bool IsStarted => this.process != null;\n+ public bool IsStarted => this.Process != null;\n/// <summary>\n/// The exit code or null if the process never started or has not\n@@ -575,11 +576,11 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this.process == null || !this.process.HasExited)\n+ if (this.Process == null || !this.Process.HasExited)\n{\nreturn null;\n}\n- return this.process.ExitCode;\n+ return this.Process.ExitCode;\n}\n}\n@@ -590,11 +591,11 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this.process != null && !this.process.HasExited)\n+ if (this.Process != null && !this.Process.HasExited)\n{\ntry\n{\n- return this.process.PriorityClass;\n+ return this.Process.PriorityClass;\n}\ncatch (Win32Exception)\n{\n@@ -609,11 +610,11 @@ namespace Microsoft.VisualStudioTools.Project\n}\nset\n{\n- if (this.process != null && !this.process.HasExited)\n+ if (this.Process != null && !this.Process.HasExited)\n{\ntry\n{\n- this.process.PriorityClass = value;\n+ this.Process.PriorityClass = value;\n}\ncatch (Win32Exception)\n{\n@@ -640,34 +641,34 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (IsStarted && redirector != null && !redirector.CloseStandardInput())\n{\n- process.StandardInput.WriteLine(line);\n- process.StandardInput.Flush();\n+ Process.StandardInput.WriteLine(line);\n+ Process.StandardInput.Flush();\n}\n}\nprivate void FlushAndCloseOutput()\n{\n- if (this.process == null)\n+ if (this.Process == null)\n{\nreturn;\n}\n- if (this.process.StartInfo.RedirectStandardOutput)\n+ if (this.Process.StartInfo.RedirectStandardOutput)\n{\ntry\n{\n- this.process.CancelOutputRead();\n+ this.Process.CancelOutputRead();\n}\ncatch (InvalidOperationException)\n{\n// Reader has already been cancelled\n}\n}\n- if (this.process.StartInfo.RedirectStandardError)\n+ if (this.Process.StartInfo.RedirectStandardError)\n{\ntry\n{\n- this.process.CancelErrorRead();\n+ this.Process.CancelErrorRead();\n}\ncatch (InvalidOperationException)\n{\n@@ -706,7 +707,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nget\n{\n- if (this.process == null)\n+ if (this.Process == null)\n{\nreturn null;\n}\n@@ -725,9 +726,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic void Wait()\n{\n- if (this.process != null)\n+ if (this.Process != null)\n{\n- this.process.WaitForExit();\n+ this.Process.WaitForExit();\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\n}\n@@ -742,9 +743,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </returns>\npublic bool Wait(TimeSpan timeout)\n{\n- if (this.process != null)\n+ if (this.Process != null)\n{\n- var exited = this.process.WaitForExit((int)timeout.TotalMilliseconds);\n+ var exited = this.Process.WaitForExit((int)timeout.TotalMilliseconds);\nif (exited)\n{\n// Should have already been called, in which case this is a no-op\n@@ -762,18 +763,18 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (this.awaiter == null)\n{\n- if (this.process == null)\n+ if (this.Process == null)\n{\nvar tcs = new TaskCompletionSource<int>();\ntcs.SetCanceled();\nthis.awaiter = tcs.Task;\n}\n- else if (this.process.HasExited)\n+ else if (this.Process.HasExited)\n{\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\nvar tcs = new TaskCompletionSource<int>();\n- tcs.SetResult(this.process.ExitCode);\n+ tcs.SetResult(this.Process.ExitCode);\nthis.awaiter = tcs.Task;\n}\nelse\n@@ -788,7 +789,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthrow new OperationCanceledException();\n}\n- return this.process.ExitCode;\n+ return this.Process.ExitCode;\n});\n}\n}\n@@ -801,9 +802,9 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\npublic void Kill()\n{\n- if (this.process != null && !this.process.HasExited)\n+ if (this.Process != null && !this.Process.HasExited)\n{\n- this.process.Kill();\n+ this.Process.Kill();\n// Should have already been called, in which case this is a no-op\nOnExited(this, EventArgs.Empty);\n}\n@@ -837,17 +838,17 @@ namespace Microsoft.VisualStudioTools.Project\nif (!this.isDisposed)\n{\nthis.isDisposed = true;\n- if (this.process != null)\n+ if (this.Process != null)\n{\n- if (this.process.StartInfo.RedirectStandardOutput)\n+ if (this.Process.StartInfo.RedirectStandardOutput)\n{\n- this.process.OutputDataReceived -= this.OnOutputDataReceived;\n+ this.Process.OutputDataReceived -= this.OnOutputDataReceived;\n}\n- if (this.process.StartInfo.RedirectStandardError)\n+ if (this.Process.StartInfo.RedirectStandardError)\n{\n- this.process.ErrorDataReceived -= this.OnErrorDataReceived;\n+ this.Process.ErrorDataReceived -= this.OnErrorDataReceived;\n}\n- this.process.Dispose();\n+ this.Process.Dispose();\n}\nif (this.redirector is IDisposable disp)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Outlining/IndentBasedRegionBuilder.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Outlining/IndentBasedRegionBuilder.cs",
"diff": "@@ -160,7 +160,7 @@ namespace Microsoft.NodejsTools.Jade\nfor (int i = line.Start; i < line.End; i++)\n{\nvar ch = line.Snapshot.GetText(i, 1)[0];\n- if (!Char.IsWhiteSpace(ch))\n+ if (!char.IsWhiteSpace(ch))\n{\nreturn i - line.Start;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/TextProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/TextProvider.cs",
"diff": "@@ -91,8 +91,8 @@ namespace Microsoft.NodejsTools.Jade\nif (ignoreCase)\n{\n- ch1 = Char.ToLowerInvariant(ch1);\n- ch2 = Char.ToLowerInvariant(ch2);\n+ ch1 = char.ToLowerInvariant(ch1);\n+ ch2 = char.ToLowerInvariant(ch2);\n}\nif (ch1 != ch2)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/JadeTokenizer.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/JadeTokenizer.cs",
"diff": "@@ -146,7 +146,7 @@ namespace Microsoft.NodejsTools.Jade\nbreak;\n}\n- if (this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || Char.IsLetter(this._cs.NextChar)))\n+ if (this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || char.IsLetter(this._cs.NextChar)))\n{\nif (this._cs.Position > start)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/HtmlState.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/HtmlState.cs",
"diff": "@@ -10,7 +10,7 @@ namespace Microsoft.NodejsTools.Jade\n// plain text with possible #{foo} variable references\nprivate void OnHtml()\n{\n- Debug.Assert(this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || Char.IsLetter(this._cs.NextChar)));\n+ Debug.Assert(this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || char.IsLetter(this._cs.NextChar)));\nvar length = this._cs.NextChar == '/' ? 2 : 1;\nAddToken(JadeTokenType.AngleBracket, this._cs.Position, length);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/TagState.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/TagState.cs",
"diff": "@@ -71,7 +71,7 @@ namespace Microsoft.NodejsTools.Jade\nwhile (!this._cs.IsWhiteSpace() && !this._cs.IsEndOfStream())\n{\n- if (this._cs.CurrentChar == '.' && Char.IsWhiteSpace(this._cs.NextChar))\n+ if (this._cs.CurrentChar == '.' && char.IsWhiteSpace(this._cs.NextChar))\n{\n// If this is last ., then what follows is a text literal\nif (StringComparer.OrdinalIgnoreCase.Equals(ident, \"script\"))\n@@ -115,7 +115,7 @@ namespace Microsoft.NodejsTools.Jade\nselectorRange.Length\n);\n- if (Char.IsWhiteSpace(this._cs.CurrentChar) && this._cs.LookAhead(-1) == '.')\n+ if (char.IsWhiteSpace(this._cs.CurrentChar) && this._cs.LookAhead(-1) == '.')\n{\nthis._cs.Position--;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/TextState.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Tokenizer/States/TextState.cs",
"diff": "@@ -28,7 +28,7 @@ namespace Microsoft.NodejsTools.Jade\n{\nHandleString();\n}\n- else if (this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || Char.IsLetter(this._cs.NextChar)) && html)\n+ else if (this._cs.CurrentChar == '<' && (this._cs.NextChar == '/' || char.IsLetter(this._cs.NextChar)) && html)\n{\nOnHtml();\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Jade/Tokens/Tokenizer.cs",
"new_path": "Nodejs/Product/Nodejs/Jade/Tokens/Tokenizer.cs",
"diff": "@@ -185,7 +185,7 @@ namespace Microsoft.NodejsTools.Jade\nbreak;\n}\n- if (!Char.IsWhiteSpace(ch))\n+ if (!char.IsWhiteSpace(ch))\n{\nmultiline = false;\nbreak;\n@@ -416,7 +416,7 @@ namespace Microsoft.NodejsTools.Jade\npos++;\nfor (var j = pos; j < this._cs.Position + 1; j++)\n{\n- if (j == this._cs.Position || !Char.IsWhiteSpace(this._cs[j]))\n+ if (j == this._cs.Position || !char.IsWhiteSpace(this._cs[j]))\n{\nbaseIndent = j - pos;\nbreak;\n@@ -558,7 +558,7 @@ namespace Microsoft.NodejsTools.Jade\nbreak;\n}\n- if (!Char.IsWhiteSpace(ch))\n+ if (!char.IsWhiteSpace(ch))\n{\nallWS = false;\nbreak;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Reference Include=\"System.Design\" />\n<Reference Include=\"System.Drawing\" />\n<Reference Include=\"System.Web\" />\n- <Reference Include=\"System.Web.Extensions\" />\n<Reference Include=\"System.Windows.Forms\" />\n<Reference Include=\"System.Xaml\" />\n<Reference Include=\"System.Xml\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs",
"diff": "@@ -13,13 +13,13 @@ using System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\n-using System.Web.Script.Serialization;\nusing System.Windows.Forms;\nusing Microsoft.NodejsTools.Telemetry;\nusing Microsoft.VisualStudio.InteractiveWindow;\nusing Microsoft.VisualStudio.InteractiveWindow.Commands;\nusing Microsoft.VisualStudio.Text;\nusing Microsoft.VisualStudio.Utilities;\n+using Newtonsoft.Json;\nnamespace Microsoft.NodejsTools.Repl\n{\n@@ -494,7 +494,6 @@ namespace Microsoft.NodejsTools.Repl\npublic bool connected;\nprivate TaskCompletionSource<ExecutionResult> completion;\nprivate string executionText;\n- private readonly JavaScriptSerializer serializer = new JavaScriptSerializer();\nprivate bool disposed;\n#if DEBUG\nprivate Thread socketLockedThread;\n@@ -633,7 +632,7 @@ namespace Microsoft.NodejsTools.Repl\npublic void SendRequest(Dictionary<string, object> request)\n{\n- var json = this.serializer.Serialize(request);\n+ var json = JsonConvert.SerializeObject(request);\nvar bytes = Encoding.UTF8.GetBytes(json);\nvar length = \"Content-length: \" + bytes.Length + \"\\r\\n\\r\\n\";\n@@ -648,7 +647,7 @@ namespace Microsoft.NodejsTools.Repl\nprotected override void ProcessPacket(JsonResponse response)\n{\n- var cmd = this.serializer.Deserialize<Dictionary<string, object>>(response.Body);\n+ var cmd = JsonConvert.DeserializeObject<Dictionary<string, object>>(response.Body);\nif (cmd.TryGetValue(\"type\", out var type) && type is string)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"diff": "</Compile>\n<Compile Include=\"Properties\\AssemblyInfo.cs\" />\n<Compile Include=\"RunFromContextFileExtensions.cs\" />\n+ <Compile Include=\"SerializationHelpers.cs\" />\n<Compile Include=\"ServiceProviderExtension.cs\" />\n<Compile Include=\"TestContainer.cs\" />\n<Compile Include=\"TestContainerDiscoverer.cs\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestExecutor.cs",
"diff": "@@ -445,10 +445,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nframeworkHandle.RecordEnd(test, result.Outcome);\nthis.currentTests.Remove(test);\n}\n- }\n-}\n-internal class TestReceiver : ITestCaseDiscoverySink\n+ private sealed class TestReceiver : ITestCaseDiscoverySink\n{\npublic List<TestCase> Tests { get; } = new List<TestCase>();\n@@ -457,68 +455,5 @@ internal class TestReceiver : ITestCaseDiscoverySink\nthis.Tests.Add(discoveredTest);\n}\n}\n-\n-internal class NodejsProjectSettings\n-{\n- public NodejsProjectSettings()\n- {\n- this.NodeExePath = string.Empty;\n- this.SearchPath = string.Empty;\n- this.WorkingDir = string.Empty;\n- }\n-\n- public string NodeExePath { get; set; }\n- public string SearchPath { get; set; }\n- public string WorkingDir { get; set; }\n- public string ProjectRootDir { get; set; }\n-}\n-\n-internal class ResultObject\n-{\n- public ResultObject()\n- {\n- this.title = string.Empty;\n- this.passed = false;\n- this.pending = false;\n- this.stdout = string.Empty;\n- this.stderr = string.Empty;\n- }\n- public string title { get; set; }\n- public bool passed { get; set; }\n- public bool? pending { get; set; }\n- public string stdout { get; set; }\n- public string stderr { get; set; }\n-}\n-\n-internal class TestEvent\n-{\n- public string type { get; set; }\n- public string title { get; set; }\n- public ResultObject result { get; set; }\n-}\n-\n-internal class TestCaseObject\n-{\n- public TestCaseObject()\n- {\n- this.framework = string.Empty;\n- this.testName = string.Empty;\n- this.testFile = string.Empty;\n- this.workingFolder = string.Empty;\n- this.projectFolder = string.Empty;\n- }\n-\n- public TestCaseObject(string framework, string testName, string testFile, string workingFolder, string projectFolder)\n- {\n- this.framework = framework;\n- this.testName = testName;\n- this.testFile = testFile;\n- this.workingFolder = workingFolder;\n- this.projectFolder = projectFolder;\n}\n- public string framework { get; set; }\n- public string testName { get; set; }\n- public string testFile { get; set; }\n- public string workingFolder { get; set; }\n- public string projectFolder { get; set; }\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Clean up to prepare for unit test changes
|
410,204 |
16.04.2018 09:15:35
| 25,200 |
cc0a7c379e8e2b864d258b2c56989bb3eee1716c
|
Remove incorrect $ from the port
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -247,7 +247,7 @@ namespace Microsoft.NodejsTools.Project\nvar runtimeArguments = ConvertArguments(this._project.GetProjectProperty(NodeProjectProperty.NodeExeArguments));\n// If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\n- runtimeArguments = runtimeArguments.Append($\"--inspect-brk=${debuggerPort}\");\n+ runtimeArguments = runtimeArguments.Append($\"--inspect-brk={debuggerPort}\");\nvar scriptArguments = ConvertArguments(this._project.GetProjectProperty(NodeProjectProperty.ScriptArguments));\nvar cwd = _project.GetWorkingDirectory(); // Current working directory\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/LaunchDebugTargetProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/LaunchDebugTargetProvider.cs",
"diff": "@@ -64,7 +64,7 @@ namespace Microsoft.NodejsTools.Workspace\nvar debuggerPort = debugLaunchContext.LaunchConfiguration.GetValue(DebuggerPortKey, defaultValue: NodejsConstants.DefaultDebuggerPort);\nvar runtimeArguments = ConvertArguments(debugLaunchContext.LaunchConfiguration.GetValue<string>(NodeArgsKey, defaultValue: null));\n// If we supply the port argument we also need to manually add --inspect-brk=port to the runtime arguments\n- runtimeArguments = runtimeArguments.Append($\"--inspect-brk=${debuggerPort}\");\n+ runtimeArguments = runtimeArguments.Append($\"--inspect-brk={debuggerPort}\");\nvar scriptArguments = ConvertArguments(debugLaunchContext.LaunchConfiguration.GetValue<string>(ScriptArgsKey, defaultValue: null));\nvar configuration = new JObject(\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Remove incorrect $ from the port
|
410,217 |
17.04.2018 15:57:39
| 25,200 |
f50529f5b6d16ee7f45261e935ad5fc19bdfbfa9
|
Ensure when we add a folder we use a trailing slash
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/CommonUtils.cs",
"new_path": "Common/Product/SharedProject/CommonUtils.cs",
"diff": "@@ -550,7 +550,8 @@ namespace Microsoft.VisualStudioTools\n{\nif (string.IsNullOrEmpty(path))\n{\n- return string.Empty;\n+ Debug.Fail(\"what??\");\n+ return path;\n}\nelse if (!HasEndSeparator(path))\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.DiskMerger.cs",
"diff": "@@ -59,7 +59,7 @@ namespace Microsoft.VisualStudioTools.Project\nprivate async Task<bool> ContinueMergeAsyncWorker((string Name, HierarchyNode Parent) dir, bool hierarchyCreated)\n{\nvar wasExpanded = hierarchyCreated ? dir.Parent.GetIsExpanded() : false;\n- var missingChildren = new HashSet<HierarchyNode>(dir.Parent.AllChildren);\n+ var missingOnDisk = new HashSet<HierarchyNode>(dir.Parent.AllChildren);\nvar thread = this.project.Site.GetUIThread();\n@@ -92,15 +92,9 @@ namespace Microsoft.VisualStudioTools.Project\nthis.project.CreateSymLinkWatcher(curDir);\n}\n- var existing = this.project.FindNodeByFullPath(curDir);\n- if (existing == null)\n- {\n- existing = this.project.AddAllFilesFolder(dir.Parent, curDir + Path.DirectorySeparatorChar, hierarchyCreated);\n- }\n- else\n- {\n- missingChildren.Remove(existing);\n- }\n+ var existing = this.project.AddAllFilesFolder(dir.Parent, curDir, hierarchyCreated);\n+ missingOnDisk.Remove(existing);\n+\nthis.remainingDirs.Push((curDir, existing));\n}\n}\n@@ -136,7 +130,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\nelse\n{\n- missingChildren.Remove(existing);\n+ missingOnDisk.Remove(existing);\n}\n}\n@@ -156,7 +150,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\n// remove the excluded children which are no longer there\n- this.RemoveMissingChildren(missingChildren);\n+ this.RemoveMissingChildren(missingOnDisk);\nif (hierarchyCreated)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.FileSystemChange.cs",
"diff": "@@ -184,7 +184,7 @@ namespace Microsoft.VisualStudioTools.Project\nthis.project.CreateSymLinkWatcher(this.path);\n}\n- var folderNode = this.project.AddAllFilesFolder(parent, this.path + Path.DirectorySeparatorChar);\n+ var folderNode = this.project.AddAllFilesFolder(parent, this.path);\nvar folderNodeWasExpanded = folderNode.GetIsExpanded();\n// then add the folder nodes\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"diff": "@@ -693,10 +693,12 @@ namespace Microsoft.VisualStudioTools.Project\n/// </summary>\nprivate HierarchyNode AddAllFilesFolder(HierarchyNode curParent, string curDir, bool hierarchyCreated = true)\n{\n- var folderNode = FindNodeByFullPath(curDir);\n+ var safePath = CommonUtils.EnsureEndSeparator(curDir);\n+\n+ var folderNode = FindNodeByFullPath(safePath);\nif (folderNode == null)\n{\n- folderNode = CreateFolderNode(new AllFilesProjectElement(curDir, \"Folder\", this));\n+ folderNode = CreateFolderNode(new AllFilesProjectElement(safePath, \"Folder\", this));\nAddAllFilesNode(curParent, folderNode);\nif (hierarchyCreated)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Ensure when we add a folder we use a trailing slash
|
410,217 |
19.04.2018 11:52:20
| 25,200 |
7dde86eb0d3fc414536523b3a468dd1c4781a0ab
|
some final PR feedback
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"diff": "@@ -5,7 +5,6 @@ using System.Collections.Generic;\nusing System.Drawing;\nusing System.IO;\nusing System.Linq;\n-using System.Text.RegularExpressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.NodejsTools.Npm;\n@@ -559,15 +558,7 @@ namespace Microsoft.NodejsTools.Project\nreturn this.ModulesNode.InstallMissingModules();\n}\n- internal struct LongPathInfo\n- {\n- public string FullPath;\n- public string RelativePath;\n- public bool IsDirectory;\n- }\n-\ninternal event EventHandler OnDispose;\n-\nprotected override void Dispose(bool disposing)\n{\nif (disposing)\n@@ -583,8 +574,12 @@ namespace Microsoft.NodejsTools.Project\nOnDispose?.Invoke(this, EventArgs.Empty);\n- RemoveChild(this.ModulesNode);\n- this.ModulesNode?.Dispose();\n+ var node = this.ModulesNode;\n+ if (node != null)\n+ {\n+ RemoveChild(node);\n+ node.Dispose();\n+ }\nthis.ModulesNode = null;\n}\nbase.Dispose(disposing);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyIdMap.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyIdMap.cs",
"diff": "@@ -23,20 +23,17 @@ namespace Microsoft.VisualStudioTools.Project\nVisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();\nDebug.Assert(node != null, \"The node added here should never be null.\");\n#if DEBUG\n- foreach (var reference in this.nodes.Values)\n+ foreach (var kv in this.nodes)\n{\n- if (reference != null)\n- {\n- if (reference.TryGetTarget(out var item))\n- {\n- Debug.Assert(node != item);\n- }\n- }\n+ Debug.Assert(kv.Value.TryGetTarget(out var item), \"should not be GC-ed before we remove\");\n+ Debug.Assert(kv.Key == item.ID, \"the key should match the id of the node\");\n+ Debug.Assert(node != item, \"don't double insert\");\n}\n#endif\nif (!this.freedIds.TryPop(out var idx))\n{\n- idx = this.NextIndex();\n+ // +1 since 0 is not a valid HierarchyId\n+ idx = (uint)this.nodes.Count + 1;\n}\nvar addSuccess = this.nodes.TryAdd(idx, new WeakReference<HierarchyNode>(node));\n@@ -45,12 +42,6 @@ namespace Microsoft.VisualStudioTools.Project\nreturn idx;\n}\n- private uint NextIndex()\n- {\n- // +1 since 0 is not a valid HierarchyId\n- return (uint)this.nodes.Count + 1;\n- }\n-\n/// <summary>\n/// Must be called from the UI thread\n/// </summary>\n@@ -80,8 +71,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nVisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();\n- var idx = itemId;\n- if (this.nodes.TryGetValue(idx, out var reference) && reference != null && reference.TryGetTarget(out var node))\n+ if (this.nodes.TryGetValue(itemId, out var reference) && reference.TryGetTarget(out var node))\n{\nDebug.Assert(node != null);\nreturn node;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
some final PR feedback
|
410,217 |
20.04.2018 14:17:08
| 25,200 |
462f8ac62f6cccfe41c68a557bf6b9597b86ec89
|
We no longer need to set this Env Variable
VS sets VSINSTALLDIR, which is also available in the Dev CMD Prompt, so
we no longer need this workaround
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"diff": "@@ -128,20 +128,6 @@ namespace Microsoft.NodejsTools\n// The variable is inherited by child processes backing Test Explorer, and is used in\n// the NTVS test discoverer and test executor to connect back to VS.\nEnvironment.SetEnvironmentVariable(NodejsConstants.NodeToolsProcessIdEnvironmentVariable, Process.GetCurrentProcess().Id.ToString());\n-\n- var devenvPath = Environment.GetEnvironmentVariable(\"VSAPPIDDIR\");\n- if (!string.IsNullOrEmpty(devenvPath))\n- {\n- try\n- {\n- var root = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(devenvPath), @\"..\\..\"));\n- Environment.SetEnvironmentVariable(NodejsConstants.NodeToolsVsInstallRootEnvironmentVariable, root);\n- }\n- catch (Exception)\n- {\n- // noop\n- }\n- }\n}\nprivate void SubscribeToVsCommandEvents(\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
We no longer need to set this Env Variable
VS sets VSINSTALLDIR, which is also available in the Dev CMD Prompt, so
we no longer need this workaround
|
410,217 |
20.04.2018 14:17:55
| 25,200 |
ff3e5a3d8d3fa28f16f53a490c952af2a4aaa6cd
|
Split CommonConstants
Split common constansts in a common file, and a vs specific file.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "Common/Product/SharedProject/CommonConstants.VS.cs",
"diff": "+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+using Microsoft.VisualStudio;\n+using Microsoft.VisualStudio.OLE.Interop;\n+using OleConstants = Microsoft.VisualStudio.OLE.Interop.Constants;\n+using VsCommands2K = Microsoft.VisualStudio.VSConstants.VSStd2KCmdID;\n+\n+namespace Microsoft.VisualStudioTools\n+{\n+ internal static partial class CommonConstants\n+ {\n+ //\"Open Folder in Windows Explorer\" command ID.\n+ //Don't change this! This is Visual Studio constant.\n+ public const VsCommands2K OpenFolderInExplorerCmdId = (VsCommands2K)1635;\n+\n+ //These are VS internal constants - don't change them\n+ public static Guid Std97CmdGroupGuid = typeof(VSConstants.VSStd97CmdID).GUID;\n+ public static Guid Std2KCmdGroupGuid = typeof(VSConstants.VSStd2KCmdID).GUID;\n+\n+ //Command statuses\n+ public const int NotSupportedInvisibleCmdStatus = (int)OleConstants.OLECMDERR_E_NOTSUPPORTED |\n+ (int)OleConstants.OLECMDSTATE_INVISIBLE;\n+ public const int SupportedEnabledCmdStatus = (int)(OLECMDF.OLECMDF_SUPPORTED |\n+ OLECMDF.OLECMDF_ENABLED);\n+ public const int SupportedCmdStatus = (int)OLECMDF.OLECMDF_SUPPORTED;\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/CommonConstants.cs",
"new_path": "Common/Product/SharedProject/CommonConstants.cs",
"diff": "// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\nusing System;\n-#if !NOVS\n-using Microsoft.VisualStudio;\n-using Microsoft.VisualStudio.OLE.Interop;\n-using OleConstants = Microsoft.VisualStudio.OLE.Interop.Constants;\n-using VsCommands2K = Microsoft.VisualStudio.VSConstants.VSStd2KCmdID;\n-#endif\n+\nnamespace Microsoft.VisualStudioTools\n{\n- internal static class CommonConstants\n+ internal static partial class CommonConstants\n{\n/// <summary>\n/// <see cref=\"VsConstants.UICONTEXT_NoSolution\"/>.\n@@ -75,22 +70,7 @@ namespace Microsoft.VisualStudioTools\npublic const string IsWindowsApplication = \"IsWindowsApplication\";\npublic const string PublishUrl = \"PublishUrl\";\n-#if !NOVS\n- //\"Open Folder in Windows Explorer\" command ID.\n- //Don't change this! This is Visual Studio constant.\n- public const VsCommands2K OpenFolderInExplorerCmdId = (VsCommands2K)1635;\n-\n- //These are VS internal constants - don't change them\n- public static Guid Std97CmdGroupGuid = typeof(VSConstants.VSStd97CmdID).GUID;\n- public static Guid Std2KCmdGroupGuid = typeof(VSConstants.VSStd2KCmdID).GUID;\n-\n- //Command statuses\n- public const int NotSupportedInvisibleCmdStatus = (int)OleConstants.OLECMDERR_E_NOTSUPPORTED |\n- (int)OleConstants.OLECMDSTATE_INVISIBLE;\n- public const int SupportedEnabledCmdStatus = (int)(OLECMDF.OLECMDF_SUPPORTED |\n- OLECMDF.OLECMDF_ENABLED);\n- public const int SupportedCmdStatus = (int)OLECMDF.OLECMDF_SUPPORTED;\n-#endif\n+\n/// <summary>\n/// Show all files is enabled, we show the merged view of project + files\n/// </summary>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonConstants.cs\">\n<Link>SharedProject\\CommonConstants.cs</Link>\n</Compile>\n+ <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonConstants.VS.cs\">\n+ <Link>SharedProject\\CommonConstants.VS.cs</Link>\n+ </Compile>\n<Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonUtils.cs\">\n<Link>SharedProject\\CommonUtils.cs</Link>\n</Compile>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Split CommonConstants
Split common constansts in a common file, and a vs specific file.
|
410,217 |
20.04.2018 15:14:55
| 25,200 |
fcbee524c92d891685c27f24f24bdca02cb4b208
|
Conver TestFrameworkDirectories to a static class
TestFrameworkDirectories was consistently used as a static class,
so I converted it to be one.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs",
"diff": "@@ -20,7 +20,7 @@ namespace Microsoft.NodejsTools.Project\n{\nInitializeComponent();\n- var testFrameworks = new TestFrameworkDirectories().GetFrameworkNames();\n+ var testFrameworks = TestFrameworkDirectories.GetFrameworkNames();\nthis._frameworkSelector.Items.AddRange(testFrameworks);\nLocalizeLabels();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/FrameworkDiscover.cs",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/FrameworkDiscover.cs",
"diff": "@@ -14,8 +14,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nprivate FrameworkDiscover()\n{\n- var directoryLoader = new TestFrameworkDirectories();\n- var testFrameworkDirectories = directoryLoader.GetFrameworkDirectories();\n+ var testFrameworkDirectories = TestFrameworkDirectories.GetFrameworkDirectories();\nforeach (var directory in testFrameworkDirectories)\n{\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Conver TestFrameworkDirectories to a static class
TestFrameworkDirectories was consistently used as a static class,
so I converted it to be one.
|
410,217 |
24.04.2018 12:34:01
| 25,200 |
5150e68926a6625f203549af7e635595446187e9
|
Move Telemetry to VS assembly
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<PackageReference Include=\"Microsoft.Build\">\n<Version>15.6.82</Version>\n</PackageReference>\n- <PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n- <Version>15.7.942-master669188BE</Version>\n- </PackageReference>\n<PackageReference Include=\"Newtonsoft.Json\">\n<Version>9.0.1</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutor.cs",
"diff": "@@ -8,7 +8,6 @@ using System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Threading;\nusing Microsoft.NodejsTools.TestAdapter.TestFrameworks;\n-using Microsoft.VisualStudio.Telemetry;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\n@@ -31,7 +30,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate readonly ManualResetEvent testsCompleted = new ManualResetEvent(false);\nprivate ProcessOutput nodeProcess;\n- private object syncObject = new object();\n+ private readonly object syncObject = new object();\nprivate List<TestCase> currentTests;\nprivate IFrameworkHandle frameworkHandle;\nprivate TestResult currentResult = null;\n@@ -161,18 +160,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n- private void LogTelemetry(int testCount, Version nodeVersion, bool isDebugging, string testFramework)\n- {\n- var userTask = new UserTaskEvent(\"VS/NodejsTools/UnitTestsExecuted\", TelemetryResult.Success);\n- userTask.Properties[\"VS.NodejsTools.TestCount\"] = testCount;\n- // This is safe, since changes to the ToString method are very unlikely, as the current output is widely documented.\n- userTask.Properties[\"VS.NodejsTools.NodeVersion\"] = nodeVersion.ToString();\n- userTask.Properties[\"VS.NodejsTools.IsDebugging\"] = isDebugging;\n- userTask.Properties[\"VS.NodejsTools.TestFramework\"] = testFramework;\n-\n- TelemetryService.DefaultSession?.PostEvent(userTask);\n- }\n-\nprivate bool HasVisualStudioProcessId(out int processId)\n{\nprocessId = 0;\n@@ -221,7 +208,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n// this way the .NET framework only tries to load the assemblies when we actually need them.\nif (startedFromVs)\n{\n- LogTelemetry(tests.Count(), nodeVersion, runContext.IsBeingDebugged, testFramework);\n+ this.LogTelemetry(tests.Count(), nodeVersion, runContext.IsBeingDebugged, testFramework);\n}\nforeach (var test in tests)\n@@ -310,6 +297,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nVisualStudioApp.DetachDebugger(vsProcessId);\n}\n+ private void LogTelemetry(int testCount, Version nodeVersion, bool isDebugging, string testFramework)\n+ {\n+ VisualStudioApp.LogTelemetry(testCount, nodeVersion, isDebugging, testFramework);\n+ }\n+\nprivate void AttachDebugger(int vsProcessId, int port, Version nodeVersion)\n{\ntry\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"diff": "@@ -9,6 +9,7 @@ using EnvDTE;\nusing Microsoft.VisualStudio.OLE.Interop;\nusing Microsoft.VisualStudio.Shell;\nusing Microsoft.VisualStudio.Shell.Interop;\n+using Microsoft.VisualStudio.Telemetry;\nusing Process = System.Diagnostics.Process;\nnamespace Microsoft.VisualStudioTools\n@@ -30,6 +31,18 @@ namespace Microsoft.VisualStudioTools\nreturn inst;\n}\n+ public static void LogTelemetry(int testCount, Version nodeVersion, bool isDebugging, string testFramework)\n+ {\n+ var userTask = new UserTaskEvent(\"VS/NodejsTools/UnitTestsExecuted\", TelemetryResult.Success);\n+ userTask.Properties[\"VS.NodejsTools.TestCount\"] = testCount;\n+ // This is safe, since changes to the ToString method are very unlikely, as the current output is widely documented.\n+ userTask.Properties[\"VS.NodejsTools.NodeVersion\"] = nodeVersion.ToString();\n+ userTask.Properties[\"VS.NodejsTools.IsDebugging\"] = isDebugging;\n+ userTask.Properties[\"VS.NodejsTools.TestFramework\"] = testFramework;\n+\n+ TelemetryService.DefaultSession?.PostEvent(userTask);\n+ }\n+\npublic static bool AttachToProcessNode2DebugAdapter(int vsProcessId, int port)\n{\nvar app = FromProcessId(vsProcessId);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Move Telemetry to VS assembly
|
410,217 |
25.04.2018 13:45:52
| 25,200 |
01b5ecd865dc11fb732a903a4f2df788bcf76104
|
Prevent crash when there is no pending breakpoint
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs",
"new_path": "Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs",
"diff": "@@ -1292,6 +1292,8 @@ namespace Microsoft.NodejsTools.Debugger.DebugEngine\nprivate void OnBreakpointBound(object sender, BreakpointBindingEventArgs e)\n{\nvar pendingBreakpoint = this._breakpointManager.GetPendingBreakpoint(e.Breakpoint);\n+ if (pendingBreakpoint != null)\n+ {\nvar breakpointBinding = e.BreakpointBinding;\nvar codeContext = new AD7MemoryAddress(this, pendingBreakpoint.DocumentName, breakpointBinding.Target.Line, breakpointBinding.Target.Column);\nvar documentContext = new AD7DocumentContext(codeContext);\n@@ -1304,6 +1306,7 @@ namespace Microsoft.NodejsTools.Debugger.DebugEngine\nnull\n);\n}\n+ }\nprivate void OnBreakpointUnbound(object sender, BreakpointBindingEventArgs e)\n{\n@@ -1323,10 +1326,13 @@ namespace Microsoft.NodejsTools.Debugger.DebugEngine\nprivate void OnBreakpointBindFailure(object sender, BreakpointBindingEventArgs e)\n{\nvar pendingBreakpoint = this._breakpointManager.GetPendingBreakpoint(e.Breakpoint);\n+ if (pendingBreakpoint != null)\n+ {\nvar breakpointErrorEvent = new AD7BreakpointErrorEvent(pendingBreakpoint, this);\npendingBreakpoint.AddBreakpointError(breakpointErrorEvent);\nSend(breakpointErrorEvent, AD7BreakpointErrorEvent.IID, null);\n}\n+ }\nprivate void OnAsyncBreakComplete(object sender, ThreadEventArgs e)\n{\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Prevent crash when there is no pending breakpoint
|
410,217 |
25.04.2018 13:54:02
| 25,200 |
77dd4f62e6edac9f8623238cd9203b37236bb9ea
|
Make sure we get a fresh hierarchy id map per project instance
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyIdMap.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyIdMap.cs",
"diff": "@@ -11,9 +11,9 @@ namespace Microsoft.VisualStudioTools.Project\nprivate readonly ConcurrentDictionary<uint, WeakReference<HierarchyNode>> nodes = new ConcurrentDictionary<uint, WeakReference<HierarchyNode>>();\nprivate readonly ConcurrentStack<uint> freedIds = new ConcurrentStack<uint>();\n- public readonly static HierarchyIdMap Instance = new HierarchyIdMap();\n-\n- private HierarchyIdMap() { }\n+ public HierarchyIdMap()\n+ {\n+ }\n/// <summary>\n/// Must be called from the UI thread\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -585,9 +585,10 @@ namespace Microsoft.VisualStudioTools.Project\n}\n/// <summary>\n- /// Gets a collection of integer ids that maps to project item instances\n+ /// Gets a collection of integer ids that maps to project item instances.\n+ /// This should be a new instance for each hierarchy.\n/// </summary>\n- internal HierarchyIdMap ItemIdMap => HierarchyIdMap.Instance;\n+ internal HierarchyIdMap ItemIdMap { get; } = new HierarchyIdMap();\n/// <summary>\n/// Get the helper object that track document changes.\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make sure we get a fresh hierarchy id map per project instance
|
410,217 |
27.04.2018 15:57:56
| 25,200 |
627e8dd459f5419da9777b6e34a2e90b58c4a80a
|
Fix content type for interactive window.
This ensures the script code entered is colorized as expected.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"Debugger\\ExceptionHandler.cs\" />\n<Compile Include=\"ProvideLanguageTemplates.cs\" />\n<Compile Include=\"Repl\\InfoReplCommand.cs\" />\n- <Compile Include=\"Repl\\InteractiveContentType.cs\" />\n<Compile Include=\"Repl\\InteractiveWindowColor.cs\" />\n<Compile Include=\"Repl\\InteractiveWindowCommand.cs\" />\n<Compile Include=\"Repl\\InteractiveWindowProvider.cs\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs",
"diff": "@@ -12,7 +12,7 @@ using Microsoft.VisualStudio.Utilities;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(ReplConstants.ContentType)]\n+ [ContentType(NodejsConstants.TypeScript)]\ninternal sealed class InfoReplCommand : InteractiveWindowCommand\n{\npublic override Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"diff": "@@ -32,7 +32,7 @@ namespace Microsoft.NodejsTools.Repl\nthis.serviceProvider = serviceProvider;\nthis.windowFactory = factory;\n- this.contentType = contentTypeService.GetContentType(ReplConstants.ContentType);\n+ this.contentType = contentTypeService.GetContentType(NodejsConstants.TypeScript);\n}\npublic IVsInteractiveWindow OpenOrCreateWindow()\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs",
"diff": "@@ -23,7 +23,7 @@ using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(ReplConstants.ContentType)]\n+ [ContentType(NodejsConstants.TypeScript)]\ninternal class NpmReplCommand : InteractiveWindowCommand\n{\npublic override async Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/SaveReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/SaveReplCommand.cs",
"diff": "@@ -15,7 +15,7 @@ using Microsoft.VisualStudio.InteractiveWindow;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(ReplConstants.ContentType)]\n+ [ContentType(NodejsConstants.TypeScript)]\ninternal class SaveReplCommand : InteractiveWindowCommand\n{\npublic override Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix content type for interactive window.
This ensures the script code entered is colorized as expected.
|
410,217 |
01.05.2018 09:20:12
| 25,200 |
d4aa6d70ef60300d7983719d0f2dc9268e992933
|
Use ProcessOutput class to run/discover tests.
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/ProcessOutput.cs",
"new_path": "Common/Product/SharedProject/ProcessOutput.cs",
"diff": "@@ -432,7 +432,7 @@ namespace Microsoft.VisualStudioTools.Project\ntry\n{\n- this.Process.Start();\n+ var started = this.Process.Start();\n}\ncatch (Exception ex)\n{\n@@ -549,7 +549,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\nif (this.redirector != null)\n{\n- this.redirector.WriteLine(line);\n+ this.redirector.WriteErrorLine(line);\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"diff": "using System;\nusing System.Collections.Generic;\n-using System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\n+using Microsoft.VisualStudioTools.Project;\nusing Newtonsoft.Json;\nnamespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n@@ -70,6 +70,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n}\nfinally\n{\n+#if !DEBUG\ntry\n{\nFile.Delete(discoverResultFile);\n@@ -79,6 +80,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n//Unable to delete for some reason\n//We leave the file behind in this case, its in TEMP so eventually OS will clean up\n}\n+#endif\n}\nvar testCases = new List<NodejsTestInfo>();\n@@ -132,53 +134,21 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nprivate string EvaluateJavaScript(string nodeExePath, string testFile, string discoverResultFile, IMessageLogger logger, string workingDirectory)\n{\nworkingDirectory = workingDirectory.TrimEnd(new char['\\\\']);\n- var arguments = WrapWithQuotes(this.findTestsScriptFile)\n- + \" \" + this.Name +\n- \" \" + WrapWithQuotes(testFile) +\n- \" \" + WrapWithQuotes(discoverResultFile) +\n- \" \" + WrapWithQuotes(workingDirectory);\n-\n#if DEBUG\n+ var arguments = $\"{WrapWithQuotes(this.findTestsScriptFile)} {this.Name} {WrapWithQuotes(testFile)} {WrapWithQuotes(discoverResultFile)} {WrapWithQuotes(workingDirectory)}\";\nlogger.SendMessage(TestMessageLevel.Informational, \"Arguments: \" + arguments);\n#endif\n- var processStartInfo = new ProcessStartInfo(nodeExePath, arguments)\n- {\n- CreateNoWindow = true,\n- UseShellExecute = false,\n- RedirectStandardError = true,\n- RedirectStandardOutput = true\n- };\n-\nvar stdout = string.Empty;\ntry\n{\n- using (var process = Process.Start(processStartInfo))\n- {\n- process.EnableRaisingEvents = true;\n- process.OutputDataReceived += (sender, args) =>\n- {\n- stdout += args.Data + Environment.NewLine;\n- };\n- process.ErrorDataReceived += (sender, args) =>\n- {\n- stdout += args.Data + Environment.NewLine;\n- };\n- process.BeginErrorReadLine();\n- process.BeginOutputReadLine();\n+ var process = ProcessOutput.Run(nodeExePath, new[] { this.findTestsScriptFile, this.Name, testFile, discoverResultFile, workingDirectory }, workingDirectory, env: null, visible: false, redirector: new DiscoveryRedirector(logger));\n- process.WaitForExit();\n-#if DEBUG\n- logger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.InvariantCulture, \" Process exited: {0}\", process.ExitCode));\n-#endif\n- }\n-#if DEBUG\n- logger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.InvariantCulture, \" StdOut:{0}\", stdout));\n-#endif\n+ process.Wait();\n}\ncatch (FileNotFoundException e)\n{\n- logger.SendMessage(TestMessageLevel.Error, string.Format(CultureInfo.InvariantCulture, \"Error starting node.exe.\\r\\n {0}\", e));\n+ logger.SendMessage(TestMessageLevel.Error, $\"Error starting node.exe.{Environment.NewLine}{e}\");\n}\nreturn stdout;\n@@ -191,11 +161,43 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nprivate sealed class DiscoveredTest\n{\n- public string Test { get; set; }\n- public string Suite { get; set; }\n- public string File { get; set; }\n- public int Line { get; set; }\n- public int Column { get; set; }\n+ // fields are set using serializer\n+#pragma warning disable CS0649\n+ public string Test;\n+ public string Suite;\n+ public string File;\n+ public int Line;\n+ public int Column;\n+#pragma warning restore CS0649\n+ }\n+\n+ private sealed class DiscoveryRedirector : Redirector\n+ {\n+ private const string NTVS_Error = \"NTVS_ERROR:\";\n+\n+ private readonly IMessageLogger logger;\n+\n+ public DiscoveryRedirector(IMessageLogger logger)\n+ {\n+ this.logger = logger;\n+ }\n+\n+ public override void WriteErrorLine(string line)\n+ {\n+ if (line.StartsWith(NTVS_Error))\n+ {\n+ this.logger.SendMessage(TestMessageLevel.Error, line.Substring(NTVS_Error.Length).TrimStart());\n+ }\n+ else\n+ {\n+ this.logger.SendMessage(TestMessageLevel.Error, line);\n+ }\n+ }\n+\n+ public override void WriteLine(string line)\n+ {\n+ this.logger.SendMessage(TestMessageLevel.Informational, line);\n+ }\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"diff": "@@ -36,7 +36,7 @@ namespace Microsoft.VisualStudioTools\nvar userTask = new UserTaskEvent(\"VS/NodejsTools/UnitTestsExecuted\", TelemetryResult.Success);\nuserTask.Properties[\"VS.NodejsTools.TestCount\"] = testCount;\n// This is safe, since changes to the ToString method are very unlikely, as the current output is widely documented.\n- userTask.Properties[\"VS.NodejsTools.NodeVersion\"] = nodeVersion.ToString();\n+ userTask.Properties[\"VS.NodejsTools.NodeVersion\"] = nodeVersion.ToString() ?? \"0.0\";\nuserTask.Properties[\"VS.NodejsTools.IsDebugging\"] = isDebugging;\nuserTask.Properties[\"VS.NodejsTools.TestFramework\"] = testFramework;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Use ProcessOutput class to run/discover tests.
|
410,217 |
01.05.2018 09:55:58
| 25,200 |
649ba79ee1caa3094967a2a5e3c5fe3f8f44a3ec
|
Only hook outputs for running tests.
We need to hook outputs when running tests, so we can associate output with
each test, for discovering tests we don't need and should just output to
stdout and stdErr, so we can report to user.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/ExportRunner/exportrunner.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/ExportRunner/exportrunner.js",
"diff": "@@ -19,8 +19,6 @@ function hook_outputs() {\nprocess.stderr.write = append_stderr;\n}\n-hook_outputs();\n-\nvar find_tests = function (testFileList, discoverResultFile) {\nvar debug;\ntry {\n@@ -75,6 +73,8 @@ var run_tests = function (testCases, callback) {\nhook_outputs();\n}\n+ hook_outputs();\n+\nfor (var test of testCases) {\npost({\ntype: 'test start',\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jasmine/jasmine.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jasmine/jasmine.js",
"diff": "@@ -63,7 +63,7 @@ function getJasmineOptions(projectFolder) {\noptions && console.log(\"Found jasmine.json file.\");\n}\ncatch (ex) {\n- console.log(\"Using default Jasmine settings.\");\n+ console.error(\"Failed to load Jasmine setting, using default settings.\", ex);\n}\nconsole.log(\"Using Jasmine settings: \", jasmineOptions);\nreturn jasmineOptions;\n@@ -102,7 +102,6 @@ function enumerateSpecs(suite, testList, testFile) {\n});\n}\n-\n/**\n* @param {string} testFileList\n* @param {string} discoverResultFile\n@@ -129,7 +128,7 @@ function find_tests(testFileList, discoverResultFile, projectFolder) {\n}\ncatch (ex) {\n//we would like continue discover other files, so swallow, log and continue;\n- logError(\"Test discovery error:\", ex, \"in\", testFile);\n+ console.error(\"Test discovery error:\", ex, \"in\", testFile);\n}\n});\n@@ -163,8 +162,6 @@ function hookStandardOutputs() {\n};\n}\n-hookStandardOutputs();\n-\nfunction sendTestProgress(callback, evtType, result, title) {\nvar event = {\ntype: evtType,\n@@ -207,6 +204,8 @@ function createCustomReporter(callback) {\n}\nfunction run_tests(testCases, callback) {\n+ hookStandardOutputs();\n+\nvar projectFolder = testCases[0].projectFolder;\nvar Jasmine = detectJasmine(projectFolder);\nif (!Jasmine) {\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/mocha/mocha.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/mocha/mocha.js",
"diff": "+// @ts-check\n\"use strict\";\nvar EOL = require('os').EOL;\nvar fs = require('fs');\n@@ -6,16 +7,7 @@ var path = require('path');\n// 'min' produces undisplayable text to stdout and stderr under piped/redirect,\n// and 'xunit' does not print the stack trace from the test.\nvar defaultMochaOptions = { ui: 'tdd', reporter: 'tap', timeout: 2000 };\n-function append_stdout(string, encoding, fd) {\n- result.stdOut += string;\n-}\n-function append_stderr(string, encoding, fd) {\n- result.stdErr += string;\n-}\n-function hook_outputs() {\n- process.stdout.write = append_stdout;\n- process.stderr.write = append_stderr;\n-}\n+\nfunction reset_result() {\nreturn {\n'title': '',\n@@ -28,8 +20,6 @@ function reset_result() {\nvar result = reset_result();\n-hook_outputs();\n-\nvar find_tests = function (testFileList, discoverResultFile, projectFolder) {\nvar Mocha = detectMocha(projectFolder);\nif (!Mocha) {\n@@ -68,7 +58,7 @@ var find_tests = function (testFileList, discoverResultFile, projectFolder) {\ngetTestList(mocha.suite, testFile);\n} catch (e) {\n//we would like continue discover other files, so swallow, log and continue;\n- logError(\"Test discovery error:\", e, \"in\", testFile);\n+ console.error(\"Test discovery error:\", e, \"in\", testFile);\n}\n});\n@@ -88,6 +78,21 @@ var run_tests = function (testCases, callback) {\nreturn string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n+ function append_stdout(string, encoding, fd) {\n+ result.stdOut += string;\n+ return true;\n+ }\n+ function append_stderr(string, encoding, fd) {\n+ result.stdErr += string;\n+ return true;\n+ }\n+ function hook_outputs() {\n+ process.stdout.write = append_stdout;\n+ process.stderr.write = append_stderr;\n+ }\n+\n+ hook_outputs();\n+\nvar testResults = [];\nvar Mocha = detectMocha(testCases[0].projectFolder);\nif (!Mocha) {\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Only hook outputs for running tests.
We need to hook outputs when running tests, so we can associate output with
each test, for discovering tests we don't need and should just output to
stdout and stdErr, so we can report to user.
|
410,217 |
01.05.2018 17:05:03
| 25,200 |
73beed70b6251c1af9c277d71d283b2d87fe0719
|
Fixes for csproj
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/ShimTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/ShimTestDiscoverer.cs",
"diff": "@@ -7,7 +7,7 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n- [FileExtension(\".njsproj\"), FileExtension(\"*.csproj\"), FileExtension(\"*.vbproj\")]\n+ [FileExtension(\".njsproj\"), FileExtension(\".csproj\"), FileExtension(\".vbproj\")]\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\npublic class ShimTestDiscoverer : ITestDiscoverer\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<DefineConstants>$(DefineConstants);NOVS;NO_WINDOWS</DefineConstants>\n</PropertyGroup>\n<ItemGroup>\n+ <Reference Include=\"Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"System\" />\n<Reference Include=\"System.Core\" />\n<Reference Include=\"System.Xml.Linq\" />\n<PackageReference Include=\"MicroBuild.Core\">\n<Version>0.3.0</Version>\n</PackageReference>\n- <PackageReference Include=\"Microsoft.Build\">\n- <Version>15.6.82</Version>\n- </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n<Version>15.7.942-master669188BE</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"diff": "<Reference Include=\"envdte90, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<EmbedInteropTypes>False</EmbedInteropTypes>\n</Reference>\n+ <Reference Include=\"Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"Microsoft.VisualStudio.Shell.Interop.15.0.DesignTime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n<EmbedInteropTypes>True</EmbedInteropTypes>\n</Reference>\n<PackageReference Include=\"MicroBuild.Core\">\n<Version>0.3.0</Version>\n</PackageReference>\n- <PackageReference Include=\"Microsoft.Build\">\n- <Version>15.6.82</Version>\n- </PackageReference>\n<PackageReference Include=\"Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime\">\n<Version>15.7.1</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"diff": "@@ -59,16 +59,16 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate static IEnumerable<IVsProject> EnumerateLoadedProjects(IVsSolution solution)\n{\n- var guid = Guids.NodejsBaseProjectFactory;\n+ var ignored = Guid.Empty;\nErrorHandler.ThrowOnFailure((solution.GetProjectEnum(\n- (uint)(__VSENUMPROJFLAGS.EPF_MATCHTYPE | __VSENUMPROJFLAGS.EPF_LOADEDINSOLUTION),\n- ref guid,\n+ (uint)__VSENUMPROJFLAGS.EPF_LOADEDINSOLUTION,\n+ ref ignored,\nout var hierarchies)));\n- var hierarchy = new IVsHierarchy[1];\n- while (ErrorHandler.Succeeded(hierarchies.Next(1, hierarchy, out var fetched)) && fetched == 1)\n+ var current = new IVsHierarchy[1];\n+ while (ErrorHandler.Succeeded(hierarchies.Next(1, current, out var fetchCount)) && fetchCount == 1)\n{\n- if (hierarchy[0] is IVsProject project)\n+ if (current[0] is IVsProject project)\n{\nyield return project;\n}\n@@ -307,7 +307,10 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic IEnumerable<ITestContainer> GetTestContainers(IVsProject project)\n{\n- project.GetMkDocument(VSConstants.VSITEMID_ROOT, out var path);\n+ if (ErrorHandler.Failed(project.GetMkDocument(VSConstants.VSITEMID_ROOT, out var path)) || string.IsNullOrEmpty(path))\n+ {\n+ yield break;\n+ }\nif (this.detectingChanges)\n{\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixes for csproj
|
410,214 |
03.05.2018 14:30:49
| 25,200 |
b613160c42f8b972333b693a7cbe977588aeb855
|
Removing broken links
The leads to a 404 page. We should delete the instances of this link.
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "# Node.js tools for Visual Studio\n-Node.js tools for [Visual Studio 2017](http://aka.ms/explorentvs) is developed and managed here.\n+Node.js tools for Visual Studio 2017 is developed and managed here.\n\n[](https://gitter.im/Microsoft/nodejstools?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n-Visit our page on [VisualStudio.com](https://aka.ms/explorentvs) for an overview and download links,\n-and check out our documentation on [the NTVS wiki](https://github.com/Microsoft/nodejstools/wiki)\n+Check out our documentation on [the NTVS wiki](https://github.com/Microsoft/nodejstools/wiki)\nand our (old) [feature overview](https://channel9.msdn.com/events/Visual-Studio/Connect-event-2015/801) video on Channel 9.\nFeel free to file issues or ask questions on our [issue tracker](http://github.com/Microsoft/nodejstools/issues),\n@@ -16,7 +15,7 @@ and we welcome code contributions - see\n## Visual Studio 2017 installation\n-The Node.js development workload is available as part of [Visual Studio 2017](https://aka.ms/explorentvs) Community, Professional\n+The Node.js development workload is available as part of Visual Studio 2017 Community, Professional\nand Enterprise.\nTo install, run the [normal VS installer](https://visualstudio.com/vs/downloads?wt.mc_id=github_microsoft_com)\nand select the **Node.js development workload**.\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removing broken links
The http://aka.ms/explorentvs leads to a 404 page. We should delete the instances of this link.
|
410,217 |
08.05.2018 16:51:37
| 25,200 |
09edf41d820e925551872f015df9bf8180035289
|
Fix command content type
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"Commands\\ImportWizardCommand.cs\" />\n<Compile Include=\"Commands\\OpenReplWindowCommand.cs\" />\n<Compile Include=\"Debugger\\DebugEngine\\AD7EvalErrorProperty.cs\" />\n+ <Compile Include=\"Repl\\InteractiveWindowContentType.cs\" />\n<Compile Include=\"TypeScriptHelpers\\TsConfigJson.cs\" />\n<Compile Include=\"TypeScriptHelpers\\TsConfigJsonFactory.cs\" />\n<Compile Include=\"TypeScriptHelpers\\TypeScriptCompile.cs\" />\n<Content Include=\"visualstudio_nodejs_repl.js\">\n<IncludeInVSIX>true</IncludeInVSIX>\n<VSIXSubpath>.</VSIXSubpath>\n- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n<ZipProject Include=\"ProjectTemplates\\NodejsWebApp\\NodejsWebApp.vstemplate\">\n<SubType>Designer</SubType>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/InfoReplCommand.cs",
"diff": "@@ -12,7 +12,7 @@ using Microsoft.VisualStudio.Utilities;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(NodejsConstants.TypeScript)]\n+ [ContentType(InteractiveWindowContentType.ContentType)]\ninternal sealed class InfoReplCommand : InteractiveWindowCommand\n{\npublic override Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"diff": "@@ -21,7 +21,8 @@ namespace Microsoft.NodejsTools.Repl\nprivate readonly IServiceProvider serviceProvider;\nprivate readonly IVsInteractiveWindowFactory windowFactory;\n- private readonly IContentType contentType;\n+ private readonly IContentType typeScriptContentType;\n+ private readonly IContentType nodeInteractiveContentType;\n[ImportingConstructor]\npublic InteractiveWindowProvider(\n@@ -32,7 +33,8 @@ namespace Microsoft.NodejsTools.Repl\nthis.serviceProvider = serviceProvider;\nthis.windowFactory = factory;\n- this.contentType = contentTypeService.GetContentType(NodejsConstants.TypeScript);\n+ this.typeScriptContentType = contentTypeService.GetContentType(NodejsConstants.TypeScript);\n+ this.nodeInteractiveContentType = contentTypeService.GetContentType(InteractiveWindowContentType.ContentType);\n}\npublic IVsInteractiveWindow OpenOrCreateWindow()\n@@ -68,7 +70,7 @@ namespace Microsoft.NodejsTools.Repl\nprivate IInteractiveEvaluator GetReplEvaluator()\n{\n- return new NodejsReplEvaluator(this.serviceProvider, this.contentType);\n+ return new NodejsReplEvaluator(this.serviceProvider, this.nodeInteractiveContentType);\n}\nprivate IVsInteractiveWindow CreateReplWindowInternal(IInteractiveEvaluator evaluator, int id, string title, Guid languageServiceGuid)\n@@ -89,7 +91,7 @@ namespace Microsoft.NodejsTools.Repl\n{\ntoolwindow.BitmapImageMoniker = KnownMonikers.JSInteractiveWindow;\n}\n- replWindow.SetLanguage(languageServiceGuid, this.contentType);\n+ replWindow.SetLanguage(languageServiceGuid, this.typeScriptContentType);\nreplWindow.InteractiveWindow.InitializeAsync();\nreturn replWindow;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs",
"diff": "@@ -23,7 +23,7 @@ using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(NodejsConstants.TypeScript)]\n+ [ContentType(InteractiveWindowContentType.ContentType)]\ninternal class NpmReplCommand : InteractiveWindowCommand\n{\npublic override async Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/SaveReplCommand.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/SaveReplCommand.cs",
"diff": "@@ -15,7 +15,7 @@ using Microsoft.VisualStudio.InteractiveWindow;\nnamespace Microsoft.NodejsTools.Repl\n{\n[Export(typeof(IInteractiveWindowCommand))]\n- [ContentType(NodejsConstants.TypeScript)]\n+ [ContentType(InteractiveWindowContentType.ContentType)]\ninternal class SaveReplCommand : InteractiveWindowCommand\n{\npublic override Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix command content type
|
410,217 |
08.05.2018 16:51:53
| 25,200 |
20bac58400567da1cf59630e647cec7293cba951
|
Remove deprecated uses of Buffer constructor
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/visualstudio_nodejs_repl.js",
"new_path": "Nodejs/Product/Nodejs/visualstudio_nodejs_repl.js",
"diff": "@@ -26,7 +26,7 @@ for (; ;) {\nfunction send_response(socket, data) {\nvar str = JSON.stringify(data);\n- var buf = Buffer(str);\n+ var buf = Buffer.from(str);\nsocket.write('Content-length: ' + buf.length + '\\r\\n\\r\\n');\nsocket.write(buf);\n}\n@@ -126,7 +126,7 @@ function processRequest(command) {\n}\n}\n-var reader_state = { 'prevData': Buffer(0), 'state': 'header' }\n+var reader_state = { 'prevData': Buffer.allocUnsafe(0), 'state': 'header' }\nclient.on('data', function (data) {\ntry {\n@@ -153,7 +153,7 @@ client.on('data', function (data) {\nthrow 'expected Content-Length header, got ' + header;\n}\n- data = Buffer(0);\n+ data = Buffer.allocUnsafe(0);\nreader_state['prevData'] = incoming.slice(endOfHeaders + 4, incoming.length);\nreader_state['state'] = 'body';\nreader_state['contentLength'] = contentLength;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Remove deprecated uses of Buffer constructor
|
410,217 |
08.05.2018 17:06:51
| 25,200 |
2d9a3db19bd106c348d2049fd2307ad205f87daf
|
Fix assert where we try to open the interactive window twice
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"diff": "@@ -185,7 +185,7 @@ namespace Microsoft.NodejsTools\n{\nvar replProvider = this.GetInteractiveWindowProvider();\n- replProvider.CreateReplWindow(id);\n+ replProvider.OpenOrCreateWindow(id);\nreturn VSConstants.S_OK;\n}\n@@ -196,7 +196,7 @@ namespace Microsoft.NodejsTools\n{\nvar replProvider = this.GetInteractiveWindowProvider();\n- replProvider.OpenOrCreateWindow().Show(focus);\n+ replProvider.OpenOrCreateWindow(-1).Show(focus);\n}\nprivate InteractiveWindowProvider GetInteractiveWindowProvider()\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/InteractiveWindowProvider.cs",
"diff": "@@ -37,17 +37,17 @@ namespace Microsoft.NodejsTools.Repl\nthis.nodeInteractiveContentType = contentTypeService.GetContentType(InteractiveWindowContentType.ContentType);\n}\n- public IVsInteractiveWindow OpenOrCreateWindow()\n+ public IVsInteractiveWindow OpenOrCreateWindow(int id)\n{\nif (this.window == null)\n{\n- this.window = CreateReplWindow();\n+ this.window = CreateReplWindow(id);\n}\nreturn this.window;\n}\n- public IVsInteractiveWindow CreateReplWindow(int replId = -1)\n+ private IVsInteractiveWindow CreateReplWindow(int replId)\n{\nif (replId < 0)\n{\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix assert where we try to open the interactive window twice
|
410,217 |
08.05.2018 17:36:47
| 25,200 |
2edf8ee47d986f239fb7338784c62884d3071bac
|
Update target version to 4.6.1
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.settings",
"new_path": "Build/Common.Build.settings",
"diff": "<VSTarget Condition=\"$(VSTarget)==''\">15.0</VSTarget>\n<BuildingInsideVisualStudio Condition=\"'$(BuildingInsideVisualStudio)' == ''\">false</BuildingInsideVisualStudio>\n- <TargetFrameworkVersion Condition=\"'$(TargetFrameworkVersion)' == ''\">v4.6</TargetFrameworkVersion>\n+ <TargetFrameworkVersion Condition=\"'$(TargetFrameworkVersion)' == ''\">v4.6.1</TargetFrameworkVersion>\n<TargetFrameworkMoniker>.NETFramework,Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>\n<VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Update target version to 4.6.1
|
410,217 |
08.05.2018 15:21:37
| 25,200 |
ecfbf66b5d6d8a7ea1d06c8afa7362005c9f7859
|
Clean up and PR feedback
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/ProcessOutput.cs",
"new_path": "Common/Product/SharedProject/ProcessOutput.cs",
"diff": "@@ -432,7 +432,7 @@ namespace Microsoft.VisualStudioTools.Project\ntry\n{\n- var started = this.Process.Start();\n+ this.Process.Start();\n}\ncatch (Exception ex)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -7,46 +7,46 @@ namespace Microsoft.NodejsTools\n{\ninternal static class NodejsConstants\n{\n- internal const string JavaScriptExtension = \".js\";\n- internal const string JavaScriptJsxExtension = \".jsx\";\n- internal const string TypeScriptExtension = \".ts\";\n- internal const string TypeScriptJsxExtension = \".tsx\";\n- internal const string TypeScriptDeclarationExtension = \".d.ts\";\n- internal const string MapExtension = \".map\";\n- internal const string NodejsProjectExtension = \".njsproj\";\n-\n- internal const string JavaScript = \"JavaScript\";\n- internal const string CSS = \"CSS\";\n- internal const string HTML = \"HTML\";\n- internal const string Nodejs = \"Node.js\";\n-\n- internal const string ProjectFileFilter = \"Node.js Project File (*.njsproj)\\n*.njsproj\\nAll Files (*.*)\\n*.*\\n\";\n-\n- internal const string NodeModulesFolder = \"node_modules\";\n- internal const string NodeModulesFolderWithSeparators = \"\\\\\" + NodeModulesFolder + \"\\\\\";\n- internal const string NodeModulesStagingFolder = \"node_modules\\\\.staging\\\\\";\n- internal const string BowerComponentsFolder = \"bower_components\";\n+ public const string JavaScriptExtension = \".js\";\n+ public const string JavaScriptJsxExtension = \".jsx\";\n+ public const string TypeScriptExtension = \".ts\";\n+ public const string TypeScriptJsxExtension = \".tsx\";\n+ public const string TypeScriptDeclarationExtension = \".d.ts\";\n+ public const string MapExtension = \".map\";\n+ public const string NodejsProjectExtension = \".njsproj\";\n+\n+ public const string JavaScript = \"JavaScript\";\n+ public const string CSS = \"CSS\";\n+ public const string HTML = \"HTML\";\n+ public const string Nodejs = \"Node.js\";\n+\n+ public const string ProjectFileFilter = \"Node.js Project File (*.njsproj)\\n*.njsproj\\nAll Files (*.*)\\n*.*\\n\";\n+\n+ public const string NodeModulesFolder = \"node_modules\";\n+ public const string NodeModulesFolderWithSeparators = \"\\\\\" + NodeModulesFolder + \"\\\\\";\n+ public const string NodeModulesStagingFolder = \"node_modules\\\\.staging\\\\\";\n+ public const string BowerComponentsFolder = \"bower_components\";\n/// <summary>\n/// The name of the package.json file\n/// </summary>\n- internal const string PackageJsonFile = \"package.json\";\n- internal const string PackageJsonMainFileKey = \"main\";\n- internal const string DefaultPackageMainFile = \"index.js\";\n+ public const string PackageJsonFile = \"package.json\";\n+ public const string PackageJsonMainFileKey = \"main\";\n+ public const string DefaultPackageMainFile = \"index.js\";\n- internal const string TsConfigJsonFile = \"tsconfig.json\";\n- internal const string JsConfigJsonFile = \"jsconfig.json\";\n+ public const string TsConfigJsonFile = \"tsconfig.json\";\n+ public const string JsConfigJsonFile = \"jsconfig.json\";\n- internal const string BaseRegistryKey = \"NodejsTools\";\n+ public const string BaseRegistryKey = \"NodejsTools\";\n- internal const ushort DefaultDebuggerPort = 5858;\n+ public const ushort DefaultDebuggerPort = 5858;\n- internal const string TypeScriptCompileItemType = \"TypeScriptCompile\";\n- internal const string CommonJSModuleKind = \"CommonJS\";\n- internal const string TypeScript = \"TypeScript\";\n+ public const string TypeScriptCompileItemType = \"TypeScriptCompile\";\n+ public const string CommonJSModuleKind = \"CommonJS\";\n+ public const string TypeScript = \"TypeScript\";\n- internal const string NodeToolsProcessIdEnvironmentVariable = \"_NTVS_PID\";\n- internal const string NodeToolsVsInstallRootEnvironmentVariable = \"_NTVS_VSINSTALLROOT\";\n+ public const string NodeToolsProcessIdEnvironmentVariable = \"_NTVS_PID\";\n+ public const string NodeToolsVsInstallRootEnvironmentVariable = \"_NTVS_VSINSTALLROOT\";\npublic static string NtvsLocalAppData => Path.Combine(\nSystem.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData),\n@@ -65,7 +65,7 @@ namespace Microsoft.NodejsTools\n/// <summary>\n/// Checks whether a relative and double-backslashed seperated path contains a folder name.\n/// </summary>\n- internal static bool ContainsNodeModulesOrBowerComponentsFolder(string path)\n+ public static bool ContainsNodeModulesOrBowerComponentsFolder(string path)\n{\nvar tmp = \"\\\\\" + path + \"\\\\\";\nreturn tmp.IndexOf(\"\\\\\" + NodeModulesFolder + \"\\\\\", StringComparison.OrdinalIgnoreCase) >= 0\n@@ -78,22 +78,22 @@ namespace Microsoft.NodejsTools\ninternal static class NodeProjectProperty\n{\n- internal const string DebuggerPort = \"DebuggerPort\";\n- internal const string EnableTypeScript = \"EnableTypeScript\";\n- internal const string Environment = \"Environment\";\n- internal const string EnvironmentVariables = \"EnvironmentVariables\";\n- internal const string LaunchUrl = \"LaunchUrl\";\n- internal const string NodeExeArguments = \"NodeExeArguments\";\n- internal const string NodeExePath = \"NodeExePath\";\n- internal const string NodejsPort = \"NodejsPort\";\n- internal const string ScriptArguments = \"ScriptArguments\";\n- internal const string StartWebBrowser = \"StartWebBrowser\";\n- internal const string TypeScriptCfgProperty = \"CfgPropertyPagesGuidsAddTypeScript\";\n- internal const string TypeScriptModuleKind = \"TypeScriptModuleKind\";\n- internal const string TypeScriptOutDir = \"TypeScriptOutDir\";\n- internal const string TypeScriptSourceMap = \"TypeScriptSourceMap\";\n- internal const string SaveNodeJsSettingsInProjectFile = \"SaveNodeJsSettingsInProjectFile\";\n- internal const string TestRoot = \"TestRoot\";\n- internal const string TestFramework = \"TestFramework\";\n+ public const string DebuggerPort = \"DebuggerPort\";\n+ public const string EnableTypeScript = \"EnableTypeScript\";\n+ public const string Environment = \"Environment\";\n+ public const string EnvironmentVariables = \"EnvironmentVariables\";\n+ public const string LaunchUrl = \"LaunchUrl\";\n+ public const string NodeExeArguments = \"NodeExeArguments\";\n+ public const string NodeExePath = \"NodeExePath\";\n+ public const string NodejsPort = \"NodejsPort\";\n+ public const string ScriptArguments = \"ScriptArguments\";\n+ public const string StartWebBrowser = \"StartWebBrowser\";\n+ public const string TypeScriptCfgProperty = \"CfgPropertyPagesGuidsAddTypeScript\";\n+ public const string TypeScriptModuleKind = \"TypeScriptModuleKind\";\n+ public const string TypeScriptOutDir = \"TypeScriptOutDir\";\n+ public const string TypeScriptSourceMap = \"TypeScriptSourceMap\";\n+ public const string SaveNodeJsSettingsInProjectFile = \"SaveNodeJsSettingsInProjectFile\";\n+ public const string TestRoot = \"TestRoot\";\n+ public const string TestFramework = \"TestFramework\";\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"new_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"diff": "@@ -21,7 +21,7 @@ namespace Microsoft.NodejsTools.TestFrameworks\nthrow new InvalidOperationException($\"Unable to find test framework folder. Tried: \\\"{testFrameworkRoot}\\\"\");\n}\n- return Directory.EnumerateDirectories(testFrameworkRoot).Select(dir => Path.GetFileName(dir)).ToArray();\n+ return Directory.EnumerateDirectories(testFrameworkRoot).Select(Path.GetFileName).ToArray();\n}\npublic static string[] GetFrameworkDirectories()\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"diff": "@@ -19,11 +19,15 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n- private struct TestFileEntryComparer : IEqualityComparer<TestFileEntry>\n+ private sealed class TestFileEntryComparer : IEqualityComparer<TestFileEntry>\n{\n- public bool Equals(TestFileEntry x, TestFileEntry y) => StringComparer.OrdinalIgnoreCase.Equals(x?.File, y?.File);\n+ public static readonly IEqualityComparer<TestFileEntry> Instance = new TestFileEntryComparer();\n- public int GetHashCode(TestFileEntry obj) => obj?.File?.GetHashCode() ?? 0;\n+ private TestFileEntryComparer() { }\n+\n+ bool IEqualityComparer<TestFileEntry>.Equals(TestFileEntry x, TestFileEntry y) => StringComparer.OrdinalIgnoreCase.Equals(x?.File, y?.File);\n+\n+ int IEqualityComparer<TestFileEntry>.GetHashCode(TestFileEntry obj) => obj?.File?.GetHashCode() ?? 0;\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -118,13 +118,13 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (!testItems.TryGetValue(testFrameworkName, out var fileList))\n{\n- fileList = new HashSet<TestFileEntry>(new TestFileEntryComparer());\n+ fileList = new HashSet<TestFileEntry>(TestFileEntryComparer.Instance);\ntestItems.Add(testFrameworkName, fileList);\n}\nfileList.Add(new TestFileEntry(fileAbsolutePath, typeScriptTest));\n}\n- DiscoverTests(testItems, proj, discoverySink, logger);\n+ this.DiscoverTests(testItems, proj, discoverySink, logger);\n}\n}\ncatch (Exception ex)\n@@ -198,7 +198,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nDisplayName = discoveredTest.TestName\n};\n- testcase.SetPropertyValue(JavaScriptTestCaseProperties.TestFramework, discoveredTest.TestFramework);\n+ testcase.SetPropertyValue(JavaScriptTestCaseProperties.TestFramework, testFx);\ndiscoverySink.SendTestCase(testcase);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "@@ -263,7 +263,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (runContext.IsBeingDebugged && startedFromVs)\n{\nthis.DetachDebugger(vsProcessId);\n- // Ensure that --debug-brk is the first argument\n+ // Ensure that --debug-brk or --inspect-brk is the first argument\nnodeArgs.Insert(0, GetDebugArgs(nodeVersion, out port));\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/ExportRunner/exportrunner.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/ExportRunner/exportrunner.js",
"diff": "@@ -22,7 +22,9 @@ function hook_outputs() {\nvar find_tests = function (testFileList, discoverResultFile) {\nvar debug;\ntry {\n+ if (vm.runInDebugContext) {\ndebug = vm.runInDebugContext('Debug');\n+ }\n} catch (ex) {\nconsole.error(\"NTVS_ERROR:\", ex);\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Clean up and PR feedback
|
410,226 |
11.05.2018 10:10:36
| 25,200 |
3b22d8f70d9a118b3b4d225cb728db9045938db8
|
Get Node.js and npm paths from VS package
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"new_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"diff": "@@ -135,6 +135,32 @@ namespace Microsoft.NodejsTools\n}\n}\n+ const string nodeJsPackageRegistryKey = \"Microsoft.VisualStudio.Package.NodeJs\";\n+ const string node32Value = \"NodeExecutablePath32\";\n+ const string node64Value = \"NodeExecutablePath64\";\n+ const string npmValue = \"NpmExecutablePath\";\n+\n+ // Attempt to find Node.js/NPM from the VS package\n+ using (var nodeJsPackageKey = VSRegistry.RegistryRoot(__VsLocalRegistryType.RegType_Configuration, true).CreateSubKey(nodeJsPackageRegistryKey))\n+ {\n+ if (executable == \"node.exe\")\n+ {\n+ var key;\n+ if (Environment.Is64BitOperatingSystem)\n+ {\n+ return nodeJsPackageKey.GetValue(node64Value) as string;\n+ }\n+ else\n+ {\n+ return nodeJsPackageKey.GetValue(node32Value) as string;\n+ }\n+ }\n+ else if (executable == \"npm.cmd\")\n+ {\n+ return nodeJsPackageKey.GetValue(npmValue) as string;\n+ }\n+ }\n+\n// we didn't find the path.\nreturn null;\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Get Node.js and npm paths from VS package
|
410,217 |
11.05.2018 10:12:22
| 25,200 |
77be33d019b8d2e510809465c7d52ff6fb5722b7
|
Update templates to target ES6 and Node 8
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/package.json",
"diff": "\"@types/express-serve-static-core\": \"^4.0.50\",\n\"@types/mime\": \"^1.3.1\",\n\"@types/serve-static\": \"^1.7.32\",\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n},\n\"engines\": {\n- \"node\": \"~6.10.x\"\n+ \"node\": \"^8.0.0\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"module\": \"commonjs\",\n- \"target\": \"es5\",\n- \"lib\": [\"es5\"],\n+ \"target\": \"es6\",\n+ \"lib\": [\"es6\"],\n\"sourceMap\": true\n},\n\"exclude\": [\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/package.json",
"diff": "\"name\": \"\"\n},\n\"devDependencies\": {\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n},\n\"engines\": {\n- \"node\": \"~6.10.x\"\n+ \"node\": \"^8.0.x\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/package.json",
"diff": "\"name\": \"\"\n},\n\"devDependencies\": {\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n},\n\"engines\": {\n- \"node\": \"~6.10.x\"\n+ \"node\": \"^8.0.0\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"module\": \"commonjs\",\n- \"target\": \"es5\",\n- \"lib\": [\"es5\"],\n+ \"target\": \"es6\",\n+ \"lib\": [\"es6\"],\n\"sourceMap\": true\n},\n\"exclude\": [\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/package.json",
"diff": "\"name\": \"\"\n},\n\"devDependencies\": {\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n},\n\"engines\": {\n- \"node\": \"~6.10.x\"\n+ \"node\": \"^8.0.0\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/package.json",
"diff": "\"name\": \"\"\n},\n\"devDependencies\": {\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"module\": \"commonjs\",\n- \"target\": \"es5\",\n- \"lib\": [\"es5\"],\n+ \"target\": \"es6\",\n+ \"lib\": [\"es6\"],\n\"sourceMap\": true\n},\n\"exclude\": [\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/package.json",
"diff": "\"@types/express-serve-static-core\": \"^4.0.50\",\n\"@types/mime\": \"^1.3.1\",\n\"@types/serve-static\": \"^1.7.32\",\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"module\": \"commonjs\",\n- \"target\": \"es5\",\n- \"lib\": [\"es5\"],\n+ \"target\": \"es6\",\n+ \"lib\": [\"es6\"],\n\"sourceMap\": true\n},\n\"exclude\": [\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/package.json",
"diff": "\"name\": \"\"\n},\n\"devDependencies\": {\n- \"@types/node\": \"^6.0.87\"\n+ \"@types/node\": \"^8.0.14\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"module\": \"commonjs\",\n- \"target\": \"es5\",\n- \"lib\": [\"es5\"],\n+ \"target\": \"es6\",\n+ \"lib\": [\"es6\"],\n\"sourceMap\": true\n},\n\"exclude\": [\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Update templates to target ES6 and Node 8
|
410,202 |
11.05.2018 14:02:36
| 25,200 |
ae617e83b42dc98ce839074e6305aaa962c69160
|
Removed NODE_ENV from njsproj
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "<PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n<DebugSymbols>true</DebugSymbols>\n- <NODE_ENV>development</NODE_ENV>\n</PropertyGroup>\n<PropertyGroup Condition=\" '$(Configuration)' == 'Release' \">\n<DebugSymbols>true</DebugSymbols>\n- <NODE_ENV>production</NODE_ENV>\n</PropertyGroup>\n<ItemGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"diff": "<PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n<DebugSymbols>true</DebugSymbols>\n- <NODE_ENV>development</NODE_ENV>\n</PropertyGroup>\n<PropertyGroup Condition=\" '$(Configuration)' == 'Release' \">\n<DebugSymbols>true</DebugSymbols>\n- <NODE_ENV>production</NODE_ENV>\n</PropertyGroup>\n<ItemGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removed NODE_ENV from njsproj
|
410,202 |
11.05.2018 15:55:57
| 25,200 |
2d9ec04cc4731720689130d72e84f689a7a73c20
|
Addressed PR comments, Small fixes
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n<IncludeInVSIX>true</IncludeInVSIX>\n</Content>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.vstemplate\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\.postcssrc.js\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\favicon.ico\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\index.html\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\.postcssrc.js\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\favicon.ico\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\index.html\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\VuejsApp.vstemplate\" />\n<ZipItem Include=\"Templates\\Files\\JavaScriptVueComponent\\JavaScriptVueComponent.vstemplate\" />\n<ZipItem Include=\"Templates\\Files\\TypeScriptVueComponent\\TypeScriptVueComponent.vstemplate\" />\n<Content Include=\"Workspace\\OpenFolderSchema.json\">\n<ZipItem Include=\"Templates\\Files\\EmptyPug\\EmptyPug.pug\" />\n<Compile Include=\"SharedProject\\CommonProjectNode.DiskMerger.cs\" />\n<ZipItem Include=\"Templates\\Files\\TypeScriptJsConfig\\jsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.njsproj\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\.babelrc\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\.postcssrc.js\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\App.vue\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\favicon.ico\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\Home.vue\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\index.html\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\main.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\package.json\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\README.md\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\shims.d.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\tsconfig.json\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.njsproj\" />\n+ <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.vstemplate\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\.babelrc\" />\n+ <ZipProject Include=\"ProjectTemplates\\VuejsApp\\.postcssrc.js\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\App.vue\" />\n+ <ZipProject Include=\"ProjectTemplates\\VuejsApp\\favicon.ico\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\Home.vue\" />\n+ <ZipProject Include=\"ProjectTemplates\\VuejsApp\\index.html\" />\n+ <ZipProject Include=\"ProjectTemplates\\VuejsApp\\main.js\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\package.json\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\README.md\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\VuejsApp.njsproj\" />\n<ZipItem Include=\"Templates\\Files\\TypeScriptVueComponent\\TypeScriptVueComponent.vue\" />\n+ <ZipItem Include=\"Templates\\Files\\JavaScriptVueComponent\\JavaScriptVueComponent.vue\" />\n<None Include=\"Theme\\contrast.vstheme\">\n<SubType>Designer</SubType>\n</None>\n<ZipItem Include=\"Templates\\Files\\TypeScriptJasmineUnitTest\\UnitTest.ts\" />\n</ItemGroup>\n<ItemGroup>\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\main.ts\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\shims.d.ts\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\main.js\" />\n- <ZipItem Include=\"Templates\\Files\\JavaScriptVueComponent\\JavaScriptVueComponent.vue\" />\n+\n</ItemGroup>\n<PropertyGroup>\n<!--\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.vstemplate",
"diff": "<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>\n<PromptForSaveOnCreation>true</PromptForSaveOnCreation>\n<PreviewImage>Preview.png</PreviewImage>\n- <TemplateGroupID>Node.jss</TemplateGroupID>\n+ <TemplateGroupID>Node.js</TemplateGroupID>\n</TemplateData>\n<TemplateContent>\n<Project File=\"TypeScriptWebApp.njsproj\" ReplaceParameters=\"true\">\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptAzureWebRole.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptAzureWebRole.vstemplate",
"diff": "<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>\n<PromptForSaveOnCreation>true</PromptForSaveOnCreation>\n<PreviewImage>Preview.png</PreviewImage>\n- <TemplateGroupID>Node.jss</TemplateGroupID>\n+ <TemplateGroupID>Node.js</TemplateGroupID>\n</TemplateData>\n<TemplateContent>\n<Project File=\"TypeScriptWebApp.njsproj\" ReplaceParameters=\"true\">\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/App.vue",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/App.vue",
"diff": "</script>\n<style>\n- #app {\n- font-family: 'Avenir', Helvetica, Arial, sans-serif;\n- -webkit-font-smoothing: antialiased;\n- -moz-osx-font-smoothing: grayscale;\n- text-align: center;\n- color: #2c3e50;\n- margin-top: 60px;\n- }\n</style>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/Home.vue",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/Home.vue",
"diff": "<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\n- h3 {\n- margin: 40px 0 0;\n- }\n-\n- ul {\n- list-style-type: none;\n- padding: 0;\n- }\n-\n- li {\n- display: inline-block;\n- margin: 0 10px;\n- }\n-\n- a {\n- color: #42b983;\n- }\n</style>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "<ScriptArguments>serve</ScriptArguments>\n</PropertyGroup>\n- <PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n- <DebugSymbols>true</DebugSymbols>\n- </PropertyGroup>\n- <PropertyGroup Condition=\" '$(Configuration)' == 'Release' \">\n- <DebugSymbols>true</DebugSymbols>\n- </PropertyGroup>\n-\n<ItemGroup>\n<Content Include=\".babelrc\" />\n<Content Include=\"public\\favicon.ico\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.vstemplate",
"diff": "<ProvideDefaultName>true</ProvideDefaultName>\n<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>\n<PromptForSaveOnCreation>true</PromptForSaveOnCreation>\n- <PreviewImage>Preview.png</PreviewImage>\n- <TemplateGroupID>Node.jss</TemplateGroupID>\n+ <TemplateGroupID>Node.js</TemplateGroupID>\n</TemplateData>\n<TemplateContent>\n<Project File=\"TypeScriptVuejsApp.njsproj\" ReplaceParameters=\"true\">\n<Folder Name=\"dist\" />\n<Folder Name=\"public\">\n<ProjectItem>favicon.ico</ProjectItem>\n- <ProjectItem>index.html</ProjectItem>\n+ <ProjectItem ReplaceParameters=\"true\">index.html</ProjectItem>\n</Folder>\n<Folder Name=\"src\">\n<Folder Name=\"assets\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/main.ts",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/main.ts",
"diff": "@@ -5,4 +5,4 @@ Vue.config.productionTip = true;\nnew Vue({\nrender: h => h(App)\n-}).$mount('#app')\n+}).$mount('#app');\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.vstemplate",
"diff": "<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>\n<PromptForSaveOnCreation>true</PromptForSaveOnCreation>\n<PreviewImage>Preview.png</PreviewImage>\n- <TemplateGroupID>Node.jss</TemplateGroupID>\n+ <TemplateGroupID>Node.js</TemplateGroupID>\n</TemplateData>\n<TemplateContent>\n<Project File=\"NodejsWebApp.njsproj\" ReplaceParameters=\"true\">\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/App.vue",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/App.vue",
"diff": "</script>\n<style>\n- #app {\n- font-family: 'Avenir', Helvetica, Arial, sans-serif;\n- -webkit-font-smoothing: antialiased;\n- -moz-osx-font-smoothing: grayscale;\n- text-align: center;\n- color: #2c3e50;\n- margin-top: 60px;\n- }\n</style>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/Home.vue",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/Home.vue",
"diff": "<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\n- h3 {\n- margin: 40px 0 0;\n- }\n-\n- ul {\n- list-style-type: none;\n- padding: 0;\n- }\n-\n- li {\n- display: inline-block;\n- margin: 0 10px;\n- }\n-\n- a {\n- color: #42b983;\n- }\n</style>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"diff": "<ScriptArguments>serve</ScriptArguments>\n</PropertyGroup>\n- <PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n- <DebugSymbols>true</DebugSymbols>\n- </PropertyGroup>\n- <PropertyGroup Condition=\" '$(Configuration)' == 'Release' \">\n- <DebugSymbols>true</DebugSymbols>\n- </PropertyGroup>\n-\n<ItemGroup>\n<Content Include=\".babelrc\" />\n<Content Include=\"public\\favicon.ico\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.vstemplate",
"diff": "<ProvideDefaultName>true</ProvideDefaultName>\n<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>\n<PromptForSaveOnCreation>true</PromptForSaveOnCreation>\n- <PreviewImage>Preview.png</PreviewImage>\n</TemplateData>\n<TemplateContent>\n<Project File=\"VuejsApp.njsproj\" ReplaceParameters=\"true\">\n<Folder Name=\"dist\" />\n<Folder Name=\"public\">\n<ProjectItem>favicon.ico</ProjectItem>\n- <ProjectItem>index.html</ProjectItem>\n+ <ProjectItem ReplaceParameters=\"true\">index.html</ProjectItem>\n</Folder>\n<Folder Name=\"src\">\n<Folder Name=\"assets\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/main.js",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/main.js",
"diff": "@@ -5,4 +5,4 @@ Vue.config.productionTip = true;\nnew Vue({\nrender: h => h(App)\n-}).$mount('#app')\n+}).$mount('#app');\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Addressed PR comments, Small fixes
|
410,217 |
14.05.2018 10:40:13
| 25,200 |
be9414a136e471a096d3731ffac8783505566844
|
Add manifest build version to make insertions into VS easier
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"new_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"diff": "<!-- Define properties that drive the manifest creation here. -->\n<FinalizeManifest>true</FinalizeManifest>\n<FinalizeSkipLayout>true</FinalizeSkipLayout>\n- <BuildNumber>$(VSTarget).$(BuildNumber)</BuildNumber>\n<TargetName>$(MSBuildProjectName)</TargetName>\n</PropertyGroup>\n<PropertyGroup>\n<!-- NTVS uses BuildVersion as 'major.minor.build.revision' and BuildNumber is 'build.revision'.\nBut VS Manifest task wants BuildNumber to be 'major.minor.build.revision' -->\n<BuildNumber>$(BuildVersion)</BuildNumber>\n+ <ManifestBuildVersion>$(BuildVersion)</ManifestBuildVersion>\n<OutputPath>$(BinDirectory)\\$(Configuration)\\</OutputPath>\n</PropertyGroup>\n<ItemGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Add manifest build version to make insertions into VS easier
|
410,217 |
11.05.2018 09:30:01
| 25,200 |
86247e58a2a5f2d1c31256391ca31a8e5337f433
|
Work to make unit tests work in AnyCode based on package.json
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Reference Include=\"envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n<EmbedInteropTypes>False</EmbedInteropTypes>\n</Reference>\n+ <Reference Include=\"Microsoft.VisualStudio.TestWindow.Interfaces\">\n+ <HintPath>$(DevEnvDir)CommonExtensions\\Microsoft\\TestWindow\\Microsoft.VisualStudio.TestWindow.Interfaces.dll</HintPath>\n+ <Private>False</Private>\n+ </Reference>\n+ <Reference Include=\"Microsoft.VisualStudio.TestPlatform.ObjectModel\">\n+ <HintPath>$(DevEnvDir)CommonExtensions\\Microsoft\\TestWindow\\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll</HintPath>\n+ <Private>False</Private>\n+ </Reference>\n<Reference Include=\"microsoft.visualstudio.textmanager.interop.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n<EmbedInteropTypes>True</EmbedInteropTypes>\n</Reference>\n<Compile Include=\"Workspace\\BaseFileScanner.cs\" />\n<Compile Include=\"Workspace\\ContextMenuProvider.cs\" />\n<Compile Include=\"Workspace\\LaunchDebugTargetProvider.cs\" />\n+ <Compile Include=\"Workspace\\PackageJsonTestContainer.cs\" />\n+ <Compile Include=\"Workspace\\PackageJsonTestContainerDiscoverer.cs\" />\n<Compile Include=\"Workspace\\NodeJsDebugLaunchTargetProvider.cs\" />\n<Compile Include=\"GeneratedHelpAboutVersion.cs\">\n<AutoGen>True</AutoGen>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -74,6 +74,12 @@ namespace Microsoft.NodejsTools\npublic const string ExecutorUriString = \"executor://NodejsTestExecutor/v1\";\npublic static readonly Uri ExecutorUri = new Uri(ExecutorUriString);\n+\n+ public const string PackageJsonExecutorUriString = \"executor://PackageJsonTestExecutor/v1\";\n+ public static readonly Uri PackageJsonExecutorUri = new Uri(PackageJsonExecutorUriString);\n+\n+ private const string TestRootDataValueGuidString = \"{FF41BE7F-6D8C-4D27-91D4-51E4233BC7E4}\";\n+ public readonly static Guid TestRootDataValueGuid = new Guid(TestRootDataValueGuidString);\n}\ninternal static class NodeProjectProperty\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonScannerFactory.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonScannerFactory.cs",
"diff": "@@ -87,6 +87,13 @@ namespace Microsoft.NodejsTools.Workspace\n// (See Microsoft.VisualStudio.Workspace.VSIntegration.UI.FileContextActionsCommandHandlersProvider.Provider.GetActionProviderForProjectConfiguration)\nfileDataValues.Add(new FileDataValue(DebugLaunchActionContext.ContextTypeGuid, main, null, target: null));\n}\n+\n+ var testRoot = packageJson.TestRoot;\n+ if (!string.IsNullOrEmpty(testRoot))\n+ {\n+ fileDataValues.Add(new FileDataValue(NodejsConstants.TestRootDataValueGuid, \"TestRoot\", testRoot));\n+ }\n+\nreturn Task.FromResult(fileDataValues);\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/WorkspaceExtensions.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/WorkspaceExtensions.cs",
"diff": "@@ -32,7 +32,7 @@ namespace Microsoft.NodejsTools.Workspace\nreturn null;\n}\n- private sealed class FileCollector : IProgress<string>\n+ public sealed class FileCollector : IProgress<string>\n{\npublic readonly List<string> FoundFiles = new List<string>();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/IPackageJson.cs",
"new_path": "Nodejs/Product/Npm/IPackageJson.cs",
"diff": "@@ -21,5 +21,6 @@ namespace Microsoft.NodejsTools.Npm\nIEnumerable<string> RequiredBy { get; }\nstring Main { get; }\nIPackageJsonScript[] Scripts { get; }\n+ string TestRoot { get; }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/PackageJson.cs",
"new_path": "Nodejs/Product/Npm/SPI/PackageJson.cs",
"diff": "@@ -31,6 +31,7 @@ namespace Microsoft.NodejsTools.Npm.SPI\nthis.Author = package.author == null ? null : Person.CreateFromJsonSource(package.author.ToString());\nthis.Main = package.main?.ToString();\nthis.Scripts = LoadScripts(package);\n+ this.TestRoot = LoadVsTestOptions(package);\n}\nprivate static PackageJsonException WrapRuntimeBinderException(string errorProperty, RuntimeBinderException rbe)\n@@ -44,7 +45,6 @@ The following error occurred:\nerrorProperty,\nrbe));\n}\n-\nprivate static IKeywords LoadKeywords(dynamic package)\n{\ntry\n@@ -172,6 +172,23 @@ The following error occurred:\n}\n}\n+ private string LoadVsTestOptions(dynamic package)\n+ {\n+ try\n+ {\n+ if (package[\"vsTest\"] is JObject vsTest && vsTest[\"testRoot\"] is JValue testRoot)\n+ {\n+ return testRoot.ToString();\n+ }\n+\n+ return null;\n+ }\n+ catch (RuntimeBinderException rbe)\n+ {\n+ throw WrapRuntimeBinderException(\"vsTestOptions\", rbe);\n+ }\n+ }\n+\npublic string Name { get; }\npublic SemverVersion Version\n@@ -202,5 +219,6 @@ The following error occurred:\npublic IEnumerable<string> RequiredBy { get; }\npublic string Main { get; }\npublic IPackageJsonScript[] Scripts { get; }\n+ public string TestRoot { get; }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"diff": "@@ -7,7 +7,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\npublic partial class JavaScriptTestDiscoverer\n{\n- private sealed class TestFileEntry\n+ internal sealed class TestFileEntry\n{\npublic readonly string File;\npublic readonly bool IsTypeScriptTest;\n@@ -19,7 +19,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n- private sealed class TestFileEntryComparer : IEqualityComparer<TestFileEntry>\n+ internal sealed class TestFileEntryComparer : IEqualityComparer<TestFileEntry>\n{\npublic static readonly IEqualityComparer<TestFileEntry> Instance = new TestFileEntryComparer();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -164,7 +164,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar testFramework = FrameworkDiscover.Intance.Get(testFx);\nif (testFramework == null)\n{\n- logger.SendMessage(TestMessageLevel.Warning, $\"Ignoring unsupported test framework \\'{testFx}\\'.\");\n+ logger.SendMessage(TestMessageLevel.Warning, $\"Ignoring unsupported test framework '{testFx}'.\");\ncontinue;\n}\n@@ -202,7 +202,7 @@ namespace Microsoft.NodejsTools.TestAdapter\ndiscoverySink.SendTestCase(testcase);\n}\n- logger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.CurrentCulture, \"Processing finished for framework \\'{0}\\'.\", testFx));\n+ logger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.CurrentCulture, \"Processing finished for framework '{0}'.\", testFx));\n}\nif (testCount == 0)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "@@ -198,7 +198,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n// May be null, but this is handled by RunTestCase if it matters.\n// No VS instance just means no debugging, but everything else is\n// okay.\n- if (tests.Count() == 0)\n+ if (!tests.Any())\n{\nreturn;\n}\n@@ -454,7 +454,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.currentTests.Remove(test);\n}\n- private sealed class TestExecutionRedirector : Redirector\n+ internal sealed class TestExecutionRedirector : Redirector\n{\nprivate readonly Action<string> writer;\n@@ -470,7 +470,7 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic override bool CloseStandardInput() => false;\n}\n- private sealed class TestReceiver : ITestCaseDiscoverySink\n+ internal sealed class TestReceiver : ITestCaseDiscoverySink\n{\npublic readonly List<TestCase> Tests = new List<TestCase>();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Link>TypeScriptHelpers.cs</Link>\n</Compile>\n<Compile Include=\"AssemblyResolver.cs\" />\n+ <Compile Include=\"PackageJsonTestDiscoverer.cs\" />\n+ <Compile Include=\"PackageJsonTestExecutor.cs\" />\n<Compile Include=\"Properties\\AssemblyInfo.cs\" />\n<Compile Include=\"SerializationHelpers.cs\" />\n<Compile Include=\"JavaScriptTestExecutor.cs\" />\n</Content>\n</ItemGroup>\n<ItemGroup>\n+ <ProjectReference Include=\"..\\Npm\\Npm.csproj\">\n+ <Project>{e5ef4b0a-ab41-4b98-8fa8-98d6348003a8}</Project>\n+ <Name>Npm</Name>\n+ </ProjectReference>\n<ProjectReference Include=\"..\\TestAdapterImpl\\TestAdapterImpl.csproj\">\n<Project>{5085df35-3a32-4894-835e-e5a3956d4f57}</Project>\n<Name>TestAdapterImpl</Name>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/JavaScriptTestCaseProperties.cs",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/JavaScriptTestCaseProperties.cs",
"diff": "@@ -6,6 +6,8 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n{\npublic static class JavaScriptTestCaseProperties\n{\n- public static readonly TestProperty TestFramework = TestProperty.Register(id: \"NodeTools.TestFramework\", label: \"TestFramework\", valueType: typeof(string), owner: typeof(TestCase));\n+ public static readonly TestProperty TestFramework = TestProperty.Register(id: $\"NodeTools.{nameof(TestFramework)}\", label: nameof(TestFramework), valueType: typeof(string), owner: typeof(TestCase));\n+ public static readonly TestProperty WorkingDir = TestProperty.Register(id: $\"NodeTools.{nameof(WorkingDir)}\", label: nameof(WorkingDir), valueType: typeof(string), owner: typeof(TestCase));\n+ public static readonly TestProperty NodeExePath = TestProperty.Register(id: $\"NodeTools.{nameof(NodeExePath)}\", label: nameof(NodeExePath), valueType: typeof(string), owner: typeof(TestCase));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj",
"new_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj",
"diff": "</None>\n</ItemGroup>\n<ItemGroup>\n+ <ProjectReference Include=\"..\\Npm\\Npm.csproj\">\n+ <Project>{e5ef4b0a-ab41-4b98-8fa8-98d6348003a8}</Project>\n+ <Name>Npm</Name>\n+ <IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>\n+ <IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>\n+ <Private>True</Private>\n+ </ProjectReference>\n<ProjectReference Include=\"..\\TestAdapter\\TestAdapter.csproj\">\n<Project>{a9609a35-b083-41a9-a0e8-aa1e2c4da9a9}</Project>\n<Name>TestAdapter</Name>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Work to make unit tests work in AnyCode based on package.json
|
410,202 |
16.05.2018 15:07:55
| 25,200 |
dc116ff0aaf1676cce8dc6b0baf398f79ff4db62
|
Fixed issues with Vue template
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "<VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">14.0</VisualStudioVersion>\n<VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n</PropertyGroup>\n+\n<Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n+\n<PropertyGroup>\n<Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n<SchemaVersion>2.0</SchemaVersion>\n<ProjectGuid>$guid1$</ProjectGuid>\n<ProjectHome>.</ProjectHome>\n<StartupFile>node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js</StartupFile>\n- <StartWebBrowser>True</StartWebBrowser>\n<SearchPath></SearchPath>\n<WorkingDirectory>.</WorkingDirectory>\n<OutputPath>.</OutputPath>\n<ScriptArguments>serve</ScriptArguments>\n</PropertyGroup>\n+ <PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n+ <DebugSymbols>true</DebugSymbols>\n+ </PropertyGroup>\n+ <PropertyGroup Condition=\" '$(Configuration)' == 'Release' \">\n+ <DebugSymbols>true</DebugSymbols>\n+ </PropertyGroup>\n+\n<ItemGroup>\n<Content Include=\".babelrc\" />\n<Content Include=\"public\\favicon.ico\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.vstemplate",
"diff": "<VSTemplate Version=\"3.0.0\" Type=\"Project\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\">\n<TemplateData>\n- <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4009\"/>\n- <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4010\"/>\n+ <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4015\"/>\n+ <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4016\"/>\n<Icon Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"412\"/>\n<ProjectType>TypeScript</ProjectType>\n<TemplateID>Microsoft.TypeScript.VuejsApp</TemplateID>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.vstemplate",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.vstemplate",
"diff": "<VSTemplate Version=\"3.0.0\" Type=\"Project\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\">\n<TemplateData>\n- <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4009\"/>\n- <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4010\"/>\n+ <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4015\"/>\n+ <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4016\"/>\n<Icon Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"406\"/>\n<ProjectType>JavaScript</ProjectType>\n<TemplateID>Microsoft.JavaScript.VuejsApp</TemplateID>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Templates/Files/JavaScriptVueComponent/JavaScriptVueComponent.vstemplate",
"new_path": "Nodejs/Product/Nodejs/Templates/Files/JavaScriptVueComponent/JavaScriptVueComponent.vstemplate",
"diff": "<VSTemplate Version=\"3.0.0\" Type=\"Item\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\">\n<TemplateData>\n- <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4007\"/>\n- <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4008\"/>\n+ <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4013\"/>\n+ <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4014\"/>\n<Icon Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"415\"/>\n<ProjectType>Node.js</ProjectType>\n<DefaultName>component.vue</DefaultName>\n<SortOrder>200</SortOrder>\n</TemplateData>\n<TemplateContent>\n- <ProjectItem SubType=\"Code\" TargetFileName=\"$fileinputname$.$fileinputextension$\" ReplaceParameters=\"true\">JavaScriptVueComponent.vue</ProjectItem>\n+ <ProjectItem SubType=\"Code\" TargetFileName=\"$fileinputname$.$fileinputextension$\">JavaScriptVueComponent.vue</ProjectItem>\n</TemplateContent>\n</VSTemplate>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptVueComponent/TypeScriptVueComponent.vstemplate",
"new_path": "Nodejs/Product/Nodejs/Templates/Files/TypeScriptVueComponent/TypeScriptVueComponent.vstemplate",
"diff": "<VSTemplate Version=\"3.0.0\" Type=\"Item\" xmlns=\"http://schemas.microsoft.com/developer/vstemplate/2005\">\n<TemplateData>\n- <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4005\"/>\n- <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4006\"/>\n+ <Name Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4011\"/>\n+ <Description Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"4012\"/>\n<Icon Package=\"{FE8A8C3D-328A-476D-99F9-2A24B75F8C7F}\" ID=\"415\"/>\n<ProjectType>Node.js</ProjectType>\n<DefaultName>component.vue</DefaultName>\n<SortOrder>200</SortOrder>\n</TemplateData>\n<TemplateContent>\n- <ProjectItem SubType=\"Code\" TargetFileName=\"$fileinputname$.$fileinputextension$\" ReplaceParameters=\"true\">TypeScriptVueComponent.vue</ProjectItem>\n+ <ProjectItem SubType=\"Code\" TargetFileName=\"$fileinputname$.$fileinputextension$\">TypeScriptVueComponent.vue</ProjectItem>\n</TemplateContent>\n</VSTemplate>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/VSPackage.resx",
"new_path": "Nodejs/Product/Nodejs/VSPackage.resx",
"diff": "<value>Node.js background processing service.</value>\n</data>\n<data name=\"4005\" xml:space=\"preserve\">\n- <value>TypeScript Vue Single File Component</value>\n+ <value>JavaScript Jasmine UnitTest file</value>\n</data>\n<data name=\"4006\" xml:space=\"preserve\">\n- <value>A TypeScript Vue Single File Component file</value>\n+ <value>A JavaScript Jasmine UnitTest file</value>\n</data>\n<data name=\"4007\" xml:space=\"preserve\">\n- <value>JavaScript Vue Single File Component</value>\n+ <value>TypeScript Jasmine UnitTest file</value>\n</data>\n<data name=\"4008\" xml:space=\"preserve\">\n- <value>A JavaScript Vue Single File Component file</value>\n+ <value>A TypeScript Jasmine UnitTest file</value>\n</data>\n<data name=\"4009\" xml:space=\"preserve\">\n- <value>Basic Vue.js Web Application</value>\n+ <value>JavaScript JSON Configuration File</value>\n</data>\n<data name=\"4010\" xml:space=\"preserve\">\n+ <value>JSON configuration file for the JavaScript Language Service</value>\n+ </data>\n+ <data name=\"4011\" xml:space=\"preserve\">\n+ <value>TypeScript Vue Single File Component</value>\n+ </data>\n+ <data name=\"4012\" xml:space=\"preserve\">\n+ <value>A TypeScript Vue Single File Component file</value>\n+ </data>\n+ <data name=\"4013\" xml:space=\"preserve\">\n+ <value>JavaScript Vue Single File Component</value>\n+ </data>\n+ <data name=\"4014\" xml:space=\"preserve\">\n+ <value>A JavaScript Vue Single File Component file</value>\n+ </data>\n+ <data name=\"4015\" xml:space=\"preserve\">\n+ <value>Basic Vue.js Web Application</value>\n+ </data>\n+ <data name=\"4016\" xml:space=\"preserve\">\n<value>A basic Vue.js Web application.</value>\n</data>\n+ <data name=\"6000\" xml:space=\"preserve\">\n+ <value>Launch for Node.js</value>\n+ </data>\n+ <data name=\"6001\" xml:space=\"preserve\">\n+ <value>Debug JavaScript/TypeScript files with Node.js</value>\n+ </data>\n<assembly alias=\"System.Windows.Forms\" name=\"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" />\n<data name=\"400\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n<value>_BUILDROOT_\\Nodejs\\Product\\Icons\\SystemRegisteredICO\\NodeJS.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n<value>_BUILDROOT_\\Nodejs\\Product\\Icons\\AddNewItemICO\\StylusSheet.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n<comment>{Locked}</comment>\n</data>\n- <data name=\"4005\" xml:space=\"preserve\">\n- <value>JavaScript Jasmine UnitTest file</value>\n- </data>\n- <data name=\"4006\" xml:space=\"preserve\">\n- <value>A JavaScript Jasmine UnitTest file</value>\n- </data>\n- <data name=\"4007\" xml:space=\"preserve\">\n- <value>TypeScript Jasmine UnitTest file</value>\n- </data>\n- <data name=\"4008\" xml:space=\"preserve\">\n- <value>A TypeScript Jasmine UnitTest file</value>\n- </data>\n- <data name=\"4009\" xml:space=\"preserve\">\n- <value>JavaScript JSON Configuration File</value>\n- </data>\n- <data name=\"4010\" xml:space=\"preserve\">\n- <value>JSON configuration file for the JavaScript Language Service</value>\n- </data>\n- <data name=\"6000\" xml:space=\"preserve\">\n- <value>Launch for Node.js</value>\n- </data>\n- <data name=\"6001\" xml:space=\"preserve\">\n- <value>Debug JavaScript/TypeScript files with Node.js</value>\n- </data>\n</root>\n\\ No newline at end of file\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixed issues with Vue template
|
410,217 |
16.05.2018 17:03:23
| 25,200 |
23335d9073f164a0c6b73fe18d11ea44b792db9c
|
PR feedback (part 1)
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainer.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainer.cs",
"diff": "@@ -34,20 +34,19 @@ namespace Microsoft.NodejsTools.Workspace\npublic string TestRoot { get; }\n- public IEnumerable<Guid> DebugEngines { get { yield break; } }\n+ public IEnumerable<Guid> DebugEngines => Array.Empty<Guid>();\n- public FrameworkVersion TargetFramework { get; } = FrameworkVersion.None;\n+ public FrameworkVersion TargetFramework => FrameworkVersion.None;\n- public Architecture TargetPlatform { get; } = Architecture.X86;\n+ public Architecture TargetPlatform => Architecture.Default;\n- public bool IsAppContainerTestContainer { get; } = false;\n+ public bool IsAppContainerTestContainer => false;\npublic int CompareTo(ITestContainer other)\n{\n- if (other == null || !(other is PackageJsonTestContainer testContainer))\n- {\n- return -1;\n- }\n+ Debug.Assert(other is PackageJsonTestContainer, \"Only test containers based on package.json are expected.\");\n+\n+ var testContainer = (PackageJsonTestContainer)other;\nif (this.version != testContainer.version)\n{\n@@ -56,7 +55,7 @@ namespace Microsoft.NodejsTools.Workspace\nvar sourceCompare = StringComparer.OrdinalIgnoreCase.Compare(this.Source, testContainer.Source);\n- return sourceCompare == 0 ? sourceCompare : StringComparer.OrdinalIgnoreCase.Compare(this.TestRoot, testContainer.TestRoot);\n+ return sourceCompare != 0 ? sourceCompare : StringComparer.OrdinalIgnoreCase.Compare(this.TestRoot, testContainer.TestRoot);\n}\npublic IDeploymentData DeployAppContainer() => null;\n@@ -65,7 +64,7 @@ namespace Microsoft.NodejsTools.Workspace\npublic bool IsContained(string javaScriptFilePath)\n{\n- Debug.Assert(Path.IsPathRooted(javaScriptFilePath) && !string.IsNullOrEmpty(javaScriptFilePath), \"Expected a rooted path.\");\n+ Debug.Assert(!string.IsNullOrEmpty(javaScriptFilePath) && Path.IsPathRooted(javaScriptFilePath), \"Expected a rooted path.\");\nreturn javaScriptFilePath.StartsWith(this.TestRoot, StringComparison.OrdinalIgnoreCase);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainerDiscoverer.cs",
"diff": "@@ -32,12 +32,7 @@ namespace Microsoft.NodejsTools.Workspace\nif (this.workspaceService.CurrentWorkspace != null)\n{\nthis.currentWorkspace = this.workspaceService.CurrentWorkspace;\n-\n- var fileWatcherService = this.currentWorkspace.GetFileWatcherService();\n- fileWatcherService.OnFileSystemChanged += this.FileSystemChangedAsync;\n-\n- var indexService = this.currentWorkspace.GetIndexWorkspaceService();\n- indexService.OnFileScannerCompleted += this.FileScannerCompletedAsync;\n+ this.RegisterEvents();\nthis.currentWorkspace.JTF.RunAsync(async () =>\n{\n@@ -50,7 +45,7 @@ namespace Microsoft.NodejsTools.Workspace\n}\n}\n- public Uri ExecutorUri { get; } = NodejsConstants.PackageJsonExecutorUri;\n+ public Uri ExecutorUri => NodejsConstants.PackageJsonExecutorUri;\npublic IEnumerable<ITestContainer> TestContainers\n{\n@@ -93,17 +88,51 @@ namespace Microsoft.NodejsTools.Workspace\nprivate async Task OnActiveWorkspaceChangedAsync(object sender, EventArgs e)\n{\n+ this.UnRegisterEvents();\n+\nthis.currentWorkspace = this.workspaceService.CurrentWorkspace;\n+ this.RegisterEvents();\n+\nawait AttemptUpdateAsync();\n}\n+ private void RegisterEvents()\n+ {\n+ var fileWatcherService = this.currentWorkspace?.GetFileWatcherService();\n+ if (fileWatcherService != null)\n+ {\n+ fileWatcherService.OnFileSystemChanged += this.FileSystemChangedAsync;\n+ }\n+\n+ var indexService = this.currentWorkspace?.GetIndexWorkspaceService();\n+ if (indexService != null)\n+ {\n+ indexService.OnFileScannerCompleted += this.FileScannerCompletedAsync;\n+ }\n+ }\n+\n+ private void UnRegisterEvents()\n+ {\n+ var fileWatcherService = this.currentWorkspace?.GetFileWatcherService();\n+ if (fileWatcherService != null)\n+ {\n+ fileWatcherService.OnFileSystemChanged -= this.FileSystemChangedAsync;\n+ }\n+\n+ var indexService = this.currentWorkspace?.GetIndexWorkspaceService();\n+ if (indexService != null)\n+ {\n+ indexService.OnFileScannerCompleted -= this.FileScannerCompletedAsync;\n+ }\n+ }\n+\nprivate Task FileSystemChangedAsync(object sender, FileSystemEventArgs args)\n{\n// We only need to raise the containers updated event in case a js file contained in the\n// test root is updated.\n// Any changes to the 'package.json' will be handled by the FileScannerCompleted event.\n- if (IsJavaScriptFile(args.FullPath))\n+ if (IsJavaScriptFile(args.FullPath) || args.IsDirectoryChanged())\n{\n// use a flag so we don't deadlock\nvar testsUpdated = false;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"new_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"diff": "@@ -42,7 +42,8 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\n// This is what comes in for args.Name, but we really just want the dll file name:\n// \"Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"\n- var resolveTargetAssemblyName = args.Name.Substring(0, args.Name.IndexOf(',')) + \".dll\";\n+ var requestedAssembly = new AssemblyName(args.Name);\n+ var resolveTargetAssemblyName = requestedAssembly.Name + \".dll\";\nforeach (var path in this.probePaths)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"diff": "@@ -37,6 +37,12 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn;\n}\n+ if (!Directory.Exists(packageJson.TestRoot))\n+ {\n+ logger.SendMessage(TestMessageLevel.Error, $\"Testroot '{packageJson.TestRoot}' doesn't exist.\");\n+ return;\n+ }\n+\nvar workingDir = Path.GetDirectoryName(packageJsonPath);\nvar testFolderPath = Path.Combine(workingDir, packageJson.TestRoot);\nTestFramework testFx = null;\n@@ -86,7 +92,7 @@ namespace Microsoft.NodejsTools.TestAdapter\ndiscoverySink.SendTestCase(testcase);\n}\n- logger.SendMessage(TestMessageLevel.Informational, \"Processing finished for framework 'mocha'.\");\n+ logger.SendMessage(TestMessageLevel.Informational, $\"Processing finished for framework '{testFx}'.\");\nif (testCount == 0)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"diff": "@@ -19,8 +19,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nprivate List<TestCase> currentTests;\nprivate IFrameworkHandle frameworkHandle;\n- private TestResult currentResult = null;\n- private ResultObject currentResultObject = null;\n+ private TestResult currentResult;\n+ private ResultObject currentResultObject;\n+\npublic void Cancel()\n{\n// We don't support cancellation\n@@ -46,8 +47,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.currentTests = new List<TestCase>(tests);\nvar nodeArgs = new List<string>();\n- // .njsproj file path -> project settings\n- var sourceToSettings = new Dictionary<string, NodejsProjectSettings>();\nvar testObjects = new List<TestCaseObject>();\n// All tests being run are for the same test file, so just use the first test listed to get the working dir\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainer.cs",
"diff": "@@ -12,16 +12,15 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nprivate readonly DateTime timeStamp;\n- public TestContainer(ITestContainerDiscoverer discoverer, string source, DateTime timeStamp, Architecture architecture)\n+ public TestContainer(ITestContainerDiscoverer discoverer, string source, DateTime timeStamp)\n{\nthis.Discoverer = discoverer;\nthis.Source = source;\n- this.TargetPlatform = architecture;\nthis.timeStamp = timeStamp;\n}\nprivate TestContainer(TestContainer copy)\n- : this(copy.Discoverer, copy.Source, copy.timeStamp, copy.TargetPlatform)\n+ : this(copy.Discoverer, copy.Source, copy.timeStamp)\n{\n}\n@@ -42,39 +41,21 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn this.timeStamp.CompareTo(container.timeStamp);\n}\n- public IEnumerable<Guid> DebugEngines\n- {\n- get\n- {\n- // TODO: Create a debug engine that can be used to attach to the (managed) test executor\n- // Mixed mode debugging is not strictly necessary, provided that\n- // the first engine returned from this method can attach to a\n- // managed executable. This may change in future versions of the\n- // test framework, in which case we may be able to start\n- // returning our own debugger and having it launch properly.\n- yield break;\n- }\n- }\n+ public IEnumerable<Guid> DebugEngines => Array.Empty<Guid>();\n- public IDeploymentData DeployAppContainer()\n- {\n- return null;\n- }\n+ public IDeploymentData DeployAppContainer() => null;\npublic ITestContainerDiscoverer Discoverer { get; }\npublic bool IsAppContainerTestContainer => false;\n- public ITestContainer Snapshot()\n- {\n- return new TestContainer(this);\n- }\n+ public ITestContainer Snapshot() => new TestContainer(this);\npublic string Source { get; }\npublic FrameworkVersion TargetFramework => FrameworkVersion.None;\n- public Architecture TargetPlatform { get; }\n+ public Architecture TargetPlatform => Architecture.Default;\npublic override string ToString()\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"diff": "@@ -338,10 +338,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn latest;\n});\n- var architecture = Architecture.X86;\n- // TODO: Read the architecture from the project\n-\n- yield return new TestContainer(this, path, latestWrite, architecture);\n+ yield return new TestContainer(this, path, latestWrite);\n}\nprivate void SaveModifiedFiles(IVsProject project)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
PR feedback (part 1)
|
410,217 |
16.05.2018 17:03:40
| 25,200 |
302a5581e94979a38360557856a51d558ad59eb5
|
Move JS TestCaseProperties
|
[
{
"change_type": "RENAME",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/JavaScriptTestCaseProperties.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestCaseProperties.cs",
"diff": "using Microsoft.VisualStudio.TestPlatform.ObjectModel;\n-namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n+namespace Microsoft.NodejsTools.TestAdapter\n{\npublic static class JavaScriptTestCaseProperties\n{\npublic static readonly TestProperty TestFramework = TestProperty.Register(id: $\"NodeTools.{nameof(TestFramework)}\", label: nameof(TestFramework), valueType: typeof(string), owner: typeof(TestCase));\npublic static readonly TestProperty WorkingDir = TestProperty.Register(id: $\"NodeTools.{nameof(WorkingDir)}\", label: nameof(WorkingDir), valueType: typeof(string), owner: typeof(TestCase));\npublic static readonly TestProperty NodeExePath = TestProperty.Register(id: $\"NodeTools.{nameof(NodeExePath)}\", label: nameof(NodeExePath), valueType: typeof(string), owner: typeof(TestCase));\n+ public static readonly TestProperty ProjectRootDir = TestProperty.Register(id: $\"NodeTools.{nameof(ProjectRootDir)}\", label: nameof(ProjectRootDir), valueType: typeof(string), owner: typeof(TestCase));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Compile Include=\"JavaScriptTestDiscoverer.cs\" />\n<Compile Include=\"JavaScriptTestDiscoverer.TestFileEntry.cs\" />\n<Compile Include=\"TestFrameworks\\FrameworkDiscover.cs\" />\n- <Compile Include=\"TestFrameworks\\JavaScriptTestCaseProperties.cs\" />\n+ <Compile Include=\"JavaScriptTestCaseProperties.cs\" />\n<Compile Include=\"TestFrameworks\\NodejsTestInfo.cs\" />\n<Compile Include=\"TestFrameworks\\TestFramework.cs\" />\n</ItemGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Move JS TestCaseProperties
|
410,217 |
21.05.2018 12:48:33
| 25,200 |
25dd6586102a016171e3ae73263e840a7b67ca90
|
refactoring after feedback
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -199,6 +199,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n};\ntestcase.SetPropertyValue(JavaScriptTestCaseProperties.TestFramework, testFx);\n+ testcase.SetPropertyValue(JavaScriptTestCaseProperties.NodeExePath, nodeExePath);\n+ testcase.SetPropertyValue(JavaScriptTestCaseProperties.ProjectRootDir, projectHome);\n+ testcase.SetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, projectHome);\ndiscoverySink.SendTestCase(testcase);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "@@ -14,7 +14,6 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\nusing Microsoft.VisualStudioTools;\nusing Microsoft.VisualStudioTools.Project;\nusing Newtonsoft.Json;\n-using MSBuild = Microsoft.Build.Evaluation;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n@@ -31,7 +30,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate readonly ManualResetEvent testsCompleted = new ManualResetEvent(false);\nprivate ProcessOutput nodeProcess;\n- private readonly object syncObject = new object();\nprivate List<TestCase> currentTests;\nprivate IFrameworkHandle frameworkHandle;\nprivate TestResult currentResult = null;\n@@ -151,8 +149,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n// .ts file path -> project settings\nvar fileToTests = new Dictionary<string, List<TestCase>>();\n- var sourceToSettings = new Dictionary<string, NodejsProjectSettings>();\n- NodejsProjectSettings projectSettings = null;\n// put tests into dictionary where key is their source file\nforeach (var test in tests)\n@@ -167,17 +163,11 @@ namespace Microsoft.NodejsTools.TestAdapter\n// where key is the file and value is a list of tests\nforeach (var entry in fileToTests)\n{\n- var firstTest = entry.Value.ElementAt(0);\n- if (!sourceToSettings.TryGetValue(firstTest.Source, out projectSettings))\n- {\n- sourceToSettings[firstTest.Source] = projectSettings = LoadProjectSettings(firstTest.Source);\n- }\n-\nthis.currentTests = entry.Value;\nthis.frameworkHandle = frameworkHandle;\n// Run all test cases in a given file\n- RunTestCases(entry.Value, runContext, frameworkHandle, projectSettings);\n+ RunTestCases(entry.Value, runContext, frameworkHandle);\n}\n}\n@@ -193,7 +183,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn int.TryParse(pid, out processId);\n}\n- private void RunTestCases(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle, NodejsProjectSettings settings)\n+ private void RunTestCases(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle)\n{\n// May be null, but this is handled by RunTestCase if it matters.\n// No VS instance just means no debugging, but everything else is\n@@ -206,23 +196,24 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar startedFromVs = this.HasVisualStudioProcessId(out var vsProcessId);\nvar nodeArgs = new List<string>();\n- // .njsproj file path -> project settings\n- var sourceToSettings = new Dictionary<string, NodejsProjectSettings>();\n- var testObjects = new List<TestCaseObject>();\n- if (!File.Exists(settings.NodeExePath))\n- {\n- frameworkHandle.SendMessage(TestMessageLevel.Error, \"Interpreter path does not exist: \" + settings.NodeExePath);\n- return;\n- }\n+ var testObjects = new List<TestCaseObject>();\n// All tests being run are for the same test file, so just use the first test listed to get the working dir\nvar firstTest = tests.First();\n- var testFramework = firstTest.GetPropertyValue<string>(JavaScriptTestCaseProperties.TestFramework, defaultValue: \"unknown\");\nvar testInfo = new NodejsTestInfo(firstTest.FullyQualifiedName, firstTest.CodeFilePath);\n- var workingDir = Path.GetDirectoryName(CommonUtils.GetAbsoluteFilePath(settings.WorkingDir, testInfo.ModulePath));\n+ var testFramework = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.TestFramework, defaultValue: \"ExportRunner\");\n+ var workingDir = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, defaultValue: Path.GetDirectoryName(firstTest.CodeFilePath));\n+ var nodeExePath = firstTest.GetPropertyValue<string>(JavaScriptTestCaseProperties.NodeExePath, defaultValue: null);\n+ var projectRootDir = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.ProjectRootDir, defaultValue: Path.GetDirectoryName(firstTest.CodeFilePath));\n- var nodeVersion = Nodejs.GetNodeVersion(settings.NodeExePath);\n+ if (string.IsNullOrEmpty(nodeExePath) || !File.Exists(nodeExePath))\n+ {\n+ frameworkHandle.SendMessage(TestMessageLevel.Error, \"Interpreter path does not exist: \" + nodeExePath);\n+ return;\n+ }\n+\n+ var nodeVersion = Nodejs.GetNodeVersion(nodeExePath);\n// We can only log telemetry when we're running in VS.\n// Since the required assemblies are not on disk if we're not running in VS, we have to reference them in a separate method\n@@ -239,16 +230,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nbreak;\n}\n- if (settings == null)\n- {\n- frameworkHandle.SendMessage(\n- TestMessageLevel.Error,\n- $\"Unable to determine interpreter to use for '{test.Source}'.\");\n- frameworkHandle.RecordEnd(test, TestOutcome.Failed);\n- }\n-\nvar args = new List<string>();\n- args.AddRange(GetInterpreterArgs(test, workingDir, settings.ProjectRootDir));\n+ args.AddRange(GetInterpreterArgs(test, workingDir, projectRootDir));\n// Fetch the run_tests argument for starting node.exe if not specified yet\nif (nodeArgs.Count == 0 && args.Count > 0)\n@@ -271,9 +254,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.testsCompleted.Reset();\nthis.nodeProcess = ProcessOutput.Run(\n- settings.NodeExePath,\n+ nodeExePath,\nnodeArgs,\n- settings.WorkingDir,\n+ workingDir,\nenv: null,\nvisible: false,\nredirector: new TestExecutionRedirector(this.ProcessTestRunnerEmit),\n@@ -284,7 +267,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.AttachDebugger(vsProcessId, port, nodeVersion);\n}\n-\n// Send the process the list of tests to run and wait for it to complete\nthis.nodeProcess.WriteInputLine(JsonConvert.SerializeObject(testObjects));\n@@ -363,12 +345,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\nprivate void KillNodeProcess()\n- {\n- lock (this.syncObject)\n{\nthis.nodeProcess?.Kill();\n}\n- }\nprivate static int GetFreePort()\n{\n@@ -397,39 +376,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn $\"--debug-brk={port}\";\n}\n- private NodejsProjectSettings LoadProjectSettings(string projectFile)\n- {\n- var env = new Dictionary<string, string>();\n-\n- var root = Environment.GetEnvironmentVariable(NodejsConstants.NodeToolsVsInstallRootEnvironmentVariable);\n- if (string.IsNullOrEmpty(root))\n- {\n- root = Environment.GetEnvironmentVariable(\"VSINSTALLDIR\");\n- }\n-\n- if (!string.IsNullOrEmpty(root))\n- {\n- env[\"VsInstallRoot\"] = root;\n- env[\"MSBuildExtensionsPath32\"] = Path.Combine(root, \"MSBuild\");\n- }\n-\n- var buildEngine = new MSBuild.ProjectCollection(env);\n- var proj = buildEngine.LoadProject(projectFile);\n-\n- var projectRootDir = Path.GetFullPath(Path.Combine(proj.DirectoryPath, proj.GetPropertyValue(CommonConstants.ProjectHome) ?? \".\"));\n-\n- return new NodejsProjectSettings()\n- {\n- ProjectRootDir = projectRootDir,\n-\n- WorkingDir = Path.GetFullPath(Path.Combine(projectRootDir, proj.GetPropertyValue(CommonConstants.WorkingDirectory) ?? \".\")),\n-\n- NodeExePath = Nodejs.GetAbsoluteNodeExePath(\n- projectRootDir,\n- proj.GetPropertyValue(NodeProjectProperty.NodeExePath))\n- };\n- }\n-\nprivate void RecordEnd(IFrameworkHandle frameworkHandle, TestCase test, TestResult result, ResultObject resultObject)\n{\nvar standardOutputLines = resultObject.stdout.Split('\\n');\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"diff": "@@ -108,6 +108,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nframeworkHandle.RecordEnd(notRunTest, TestOutcome.Failed);\n}\n}\n+\nprivate static IEnumerable<string> GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)\n{\nvar testInfo = new NodejsTestInfo(test.FullyQualifiedName, test.CodeFilePath);\n@@ -122,7 +123,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar testEvent = JsonConvert.DeserializeObject<TestEvent>(line);\n// Extract test from list of tests\nvar tests = this.currentTests.Where(n => n.DisplayName == testEvent.title);\n- if (tests.Count() > 0)\n+ if (tests.Any())\n{\nswitch (testEvent.type)\n{\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
refactoring after feedback
|
410,217 |
24.05.2018 16:45:31
| 25,200 |
c76f3e1ad55f941458ec0793b19176a3b3a368f0
|
Fix issue where we send the .ts file to the test runner instead of .js file
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestCaseProperties.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestCaseProperties.cs",
"diff": "@@ -10,5 +10,6 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic static readonly TestProperty WorkingDir = TestProperty.Register(id: $\"NodeTools.{nameof(WorkingDir)}\", label: nameof(WorkingDir), valueType: typeof(string), owner: typeof(TestCase));\npublic static readonly TestProperty NodeExePath = TestProperty.Register(id: $\"NodeTools.{nameof(NodeExePath)}\", label: nameof(NodeExePath), valueType: typeof(string), owner: typeof(TestCase));\npublic static readonly TestProperty ProjectRootDir = TestProperty.Register(id: $\"NodeTools.{nameof(ProjectRootDir)}\", label: nameof(ProjectRootDir), valueType: typeof(string), owner: typeof(TestCase));\n+ public static readonly TestProperty TestFile = TestProperty.Register(id: $\"NodeTools.{nameof(TestFile)}\", label: nameof(TestFile), valueType: typeof(string), owner: typeof(TestCase));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.TestFileEntry.cs",
"diff": "@@ -9,12 +9,12 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\ninternal sealed class TestFileEntry\n{\n- public readonly string File;\n+ public readonly string FullPath;\npublic readonly bool IsTypeScriptTest;\n- public TestFileEntry(string file, bool isTypeScriptTest)\n+ public TestFileEntry(string fullPath, bool isTypeScriptTest)\n{\n- this.File = file;\n+ this.FullPath = fullPath;\nthis.IsTypeScriptTest = isTypeScriptTest;\n}\n}\n@@ -25,9 +25,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate TestFileEntryComparer() { }\n- bool IEqualityComparer<TestFileEntry>.Equals(TestFileEntry x, TestFileEntry y) => StringComparer.OrdinalIgnoreCase.Equals(x?.File, y?.File);\n+ bool IEqualityComparer<TestFileEntry>.Equals(TestFileEntry x, TestFileEntry y) => StringComparer.OrdinalIgnoreCase.Equals(x?.FullPath, y?.FullPath);\n- int IEqualityComparer<TestFileEntry>.GetHashCode(TestFileEntry obj) => obj?.File?.GetHashCode() ?? 0;\n+ int IEqualityComparer<TestFileEntry>.GetHashCode(TestFileEntry obj) => obj?.FullPath?.GetHashCode() ?? 0;\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -169,26 +169,26 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\nvar fileList = testItems[testFx];\n- var files = string.Join(\";\", fileList.Select(p => p.File));\n+ var files = string.Join(\";\", fileList.Select(p => p.FullPath));\nlogger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.CurrentCulture, \"Processing: {0}\", files));\n- var discoveredTestCases = testFramework.FindTests(fileList.Select(p => p.File), nodeExePath, logger, projectRoot: projectHome);\n- testCount += discoveredTestCases.Count;\n+ var discoveredTestCases = testFramework.FindTests(fileList.Select(p => p.FullPath), nodeExePath, logger, projectRoot: projectHome);\n+ testCount += discoveredTestCases.Count();\nforeach (var discoveredTest in discoveredTestCases)\n{\nvar qualifiedName = discoveredTest.FullyQualifiedName;\nconst string indent = \" \";\nlogger.SendMessage(TestMessageLevel.Informational, $\"{indent}Creating TestCase:{qualifiedName}\");\n//figure out the test source info such as line number\n- var filePath = discoveredTest.ModulePath;\n- var entry = fileList.First(p => StringComparer.OrdinalIgnoreCase.Equals(p.File, filePath));\n+ var filePath = discoveredTest.TestPath;\n+ var entry = fileList.First(p => StringComparer.OrdinalIgnoreCase.Equals(p.FullPath, filePath));\nFunctionInformation fi = null;\nif (entry.IsTypeScriptTest)\n{\nfi = SourceMapper.MaybeMap(new FunctionInformation(string.Empty,\ndiscoveredTest.TestName,\ndiscoveredTest.SourceLine,\n- entry.File));\n+ entry.FullPath));\n}\nvar testcase = new TestCase(qualifiedName, NodejsConstants.ExecutorUri, projSource)\n@@ -202,6 +202,7 @@ namespace Microsoft.NodejsTools.TestAdapter\ntestcase.SetPropertyValue(JavaScriptTestCaseProperties.NodeExePath, nodeExePath);\ntestcase.SetPropertyValue(JavaScriptTestCaseProperties.ProjectRootDir, projectHome);\ntestcase.SetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, projectHome);\n+ testcase.SetPropertyValue(JavaScriptTestCaseProperties.TestFile, filePath);\ndiscoverySink.SendTestCase(testcase);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "@@ -201,7 +201,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n// All tests being run are for the same test file, so just use the first test listed to get the working dir\nvar firstTest = tests.First();\n- var testInfo = new NodejsTestInfo(firstTest.FullyQualifiedName, firstTest.CodeFilePath);\nvar testFramework = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.TestFramework, defaultValue: \"ExportRunner\");\nvar workingDir = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, defaultValue: Path.GetDirectoryName(firstTest.CodeFilePath));\nvar nodeExePath = firstTest.GetPropertyValue<string>(JavaScriptTestCaseProperties.NodeExePath, defaultValue: null);\n@@ -230,16 +229,15 @@ namespace Microsoft.NodejsTools.TestAdapter\nbreak;\n}\n- var args = new List<string>();\n- args.AddRange(GetInterpreterArgs(test, workingDir, projectRootDir));\n+ var args = GetInterpreterArgs(test, workingDir, projectRootDir);\n// Fetch the run_tests argument for starting node.exe if not specified yet\n- if (nodeArgs.Count == 0 && args.Count > 0)\n+ if (nodeArgs.Count == 0)\n{\n- nodeArgs.Add(args[0]);\n+ nodeArgs.Add(args.RunTestsScriptFile);\n}\n- testObjects.Add(new TestCaseObject(framework: args[1], testName: args[2], testFile: args[3], workingFolder: args[4], projectFolder: args[5]));\n+ testObjects.Add(new TestCaseObject(framework: args.TestFramework, testName: args.TestName, testFile: args.TestFile, workingFolder: args.WorkingDirectory, projectFolder: args.ProjectRootDir));\n}\nvar port = 0;\n@@ -267,8 +265,10 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.AttachDebugger(vsProcessId, port, nodeVersion);\n}\n+ var serializedObjects = JsonConvert.SerializeObject(testObjects);\n+\n// Send the process the list of tests to run and wait for it to complete\n- this.nodeProcess.WriteInputLine(JsonConvert.SerializeObject(testObjects));\n+ this.nodeProcess.WriteInputLine(serializedObjects);\n// for node 8 the process doesn't automatically exit when debugging, so always detach\nWaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted });\n@@ -357,11 +357,11 @@ namespace Microsoft.NodejsTools.TestAdapter\n).First();\n}\n- private IEnumerable<string> GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)\n+ private static TestFramework.ArgumentsToRunTests GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)\n{\n- var testInfo = new NodejsTestInfo(test.FullyQualifiedName, test.CodeFilePath);\n+ var testFile = test.GetPropertyValue(JavaScriptTestCaseProperties.TestFile, defaultValue: test.CodeFilePath);\nvar testFramework = test.GetPropertyValue<string>(JavaScriptTestCaseProperties.TestFramework, defaultValue: null);\n- return FrameworkDiscover.Intance.Get(testFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir);\n+ return FrameworkDiscover.Intance.Get(testFramework).GetArgumentsToRunTests(test.DisplayName, testFile, workingDir, projectRootDir);\n}\nprivate static string GetDebugArgs(Version nodeVersion, out int port)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"diff": "using System.Collections.Generic;\nusing System.IO;\n+using System.Linq;\nusing Microsoft.NodejsTools.Npm;\nusing Microsoft.NodejsTools.TestAdapter.TestFrameworks;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\n@@ -70,14 +71,19 @@ namespace Microsoft.NodejsTools.TestAdapter\nlogger.SendMessage(TestMessageLevel.Informational, $\"Processing: {files}\");\nvar discoveredTestCases = testFx.FindTests(fileList, nodeExePath, logger, projectRoot: workingDir);\n- var testCount = discoveredTestCases.Count;\n+ if (!discoveredTestCases.Any())\n+ {\n+ logger.SendMessage(TestMessageLevel.Warning, \"Discovered 0 testcases.\");\n+ return;\n+ }\n+\nforeach (var discoveredTest in discoveredTestCases)\n{\nvar qualifiedName = discoveredTest.FullyQualifiedName;\nconst string indent = \" \";\nlogger.SendMessage(TestMessageLevel.Informational, $\"{indent}Creating TestCase:{qualifiedName}\");\n//figure out the test source info such as line number\n- var filePath = discoveredTest.ModulePath;\n+ var filePath = discoveredTest.TestFile;\nvar testcase = new TestCase(qualifiedName, NodejsConstants.PackageJsonExecutorUri, packageJsonPath)\n{\n@@ -92,12 +98,8 @@ namespace Microsoft.NodejsTools.TestAdapter\ndiscoverySink.SendTestCase(testcase);\n}\n- logger.SendMessage(TestMessageLevel.Informational, $\"Processing finished for framework '{testFx}'.\");\n- if (testCount == 0)\n- {\n- logger.SendMessage(TestMessageLevel.Warning, \"Discovered 0 testcases.\");\n- }\n+ logger.SendMessage(TestMessageLevel.Informational, $\"Processing finished for framework '{testFx}'.\");\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"diff": "@@ -52,7 +52,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n// All tests being run are for the same test file, so just use the first test listed to get the working dir\nvar firstTest = tests.First();\nvar testFramework = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.TestFramework, defaultValue: \"ExportRunner\");\n- var testInfo = new NodejsTestInfo(firstTest.FullyQualifiedName, firstTest.CodeFilePath);\nvar workingDir = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, defaultValue: Path.GetDirectoryName(firstTest.Source));\nvar nodeExePath = firstTest.GetPropertyValue<string>(JavaScriptTestCaseProperties.NodeExePath, defaultValue: null);\n@@ -64,16 +63,15 @@ namespace Microsoft.NodejsTools.TestAdapter\nforeach (var test in tests)\n{\n- var args = new List<string>();\n- args.AddRange(GetInterpreterArgs(test, workingDir, workingDir));\n+ var args = GetInterpreterArgs(test, workingDir, workingDir);\n// Fetch the run_tests argument for starting node.exe if not specified yet\n- if (nodeArgs.Count == 0 && args.Count > 0)\n+ if (nodeArgs.Count == 0)\n{\n- nodeArgs.Add(args[0]);\n+ nodeArgs.Add(args.RunTestsScriptFile);\n}\n- testObjects.Add(new TestCaseObject(framework: args[1], testName: args[2], testFile: args[3], workingFolder: args[4], projectFolder: args[5]));\n+ testObjects.Add(new TestCaseObject(framework: args.TestFramework, testName: args.TestName, testFile: args.TestFile, workingFolder: args.WorkingDirectory, projectFolder: args.ProjectRootDir));\n}\nvar nodeProcess = ProcessOutput.Run(\n@@ -109,11 +107,11 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n- private static IEnumerable<string> GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)\n+ private static TestFramework.ArgumentsToRunTests GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)\n{\n- var testInfo = new NodejsTestInfo(test.FullyQualifiedName, test.CodeFilePath);\n+ var testFile = test.GetPropertyValue(JavaScriptTestCaseProperties.TestFile, defaultValue: test.CodeFilePath);\nvar testFramework = test.GetPropertyValue<string>(JavaScriptTestCaseProperties.TestFramework, defaultValue: null);\n- return FrameworkDiscover.Intance.Get(testFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir);\n+ return FrameworkDiscover.Intance.Get(testFramework).GetArgumentsToRunTests(test.DisplayName, testFile, workingDir, projectRootDir);\n}\nprivate void ProcessTestRunnerEmit(string line)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"diff": "using System;\nusing System.Collections.Generic;\n-using System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\n+using Microsoft.VisualStudio.TestPlatform.ObjectModel;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\nusing Microsoft.VisualStudioTools.Project;\nusing Newtonsoft.Json;\n@@ -28,7 +28,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\npublic string Name { get; }\n- public List<NodejsTestInfo> FindTests(IEnumerable<string> testFiles,\n+ public IEnumerable<NodejsTestInfo> FindTests(IEnumerable<string> testFiles,\nstring nodeExe,\nIMessageLogger logger,\nstring projectRoot)\n@@ -50,7 +50,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nlogger.SendMessage(TestMessageLevel.Error, s);\n}\n//There was an error during detection, return an empty set\n- return new List<NodejsTestInfo>();\n+ return Enumerable.Empty<NodejsTestInfo>();\n}\n}\n@@ -98,18 +98,17 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nreturn testCases;\n}\n- public string[] ArgumentsToRunTests(string testName, string testFile, string workingDirectory, string projectRootDir)\n+ public ArgumentsToRunTests GetArgumentsToRunTests(string testName, string testFile, string workingDirectory, string projectRootDir)\n{\nworkingDirectory = workingDirectory.TrimEnd('\\\\');\nprojectRootDir = projectRootDir.TrimEnd('\\\\');\n- return new[] {\n- WrapWithQuotes(this.runTestsScriptFile),\n+ return new ArgumentsToRunTests(\n+ this.runTestsScriptFile,\nthis.Name,\n- WrapTestNameWithQuotes(testName),\n- WrapWithQuotes(testFile),\n- WrapWithQuotes(workingDirectory),\n- WrapWithQuotes(projectRootDir)\n- };\n+ testName,\n+ testFile,\n+ workingDirectory,\n+ projectRootDir);\n}\nprivate static string WrapWithQuotes(string path)\n@@ -199,5 +198,25 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\nthis.logger.SendMessage(TestMessageLevel.Informational, line);\n}\n}\n+\n+ public sealed class ArgumentsToRunTests\n+ {\n+ public ArgumentsToRunTests(string runTestsScriptFile, string testFramework, string testName, string testFile, string workingDirectory, string projectRootDir)\n+ {\n+ this.RunTestsScriptFile = WrapWithQuotes(runTestsScriptFile);\n+ this.TestFramework = testFramework;\n+ this.TestName = WrapTestNameWithQuotes(testName);\n+ this.TestFile = WrapWithQuotes(testFile);\n+ this.WorkingDirectory = WrapWithQuotes(workingDirectory);\n+ this.ProjectRootDir = WrapWithQuotes(projectRootDir);\n+ }\n+\n+ public readonly string RunTestsScriptFile;\n+ public readonly string TestFramework;\n+ public readonly string TestName;\n+ public readonly string TestFile;\n+ public readonly string WorkingDirectory;\n+ public readonly string ProjectRootDir;\n+ }\n}\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix issue where we send the .ts file to the test runner instead of .js file
|
410,217 |
29.05.2018 14:27:53
| 25,200 |
eeecc4837357082de47263bad9131387bcaa0126
|
Don't crash when node is missing from hierarchy when trying to remove
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs",
"diff": "@@ -10,30 +10,25 @@ namespace Microsoft.NodejsTools.Project\n{\ninternal class NodejsFolderNode : CommonFolderNode\n{\n- private readonly CommonProjectNode _project;\n+ private readonly CommonProjectNode project;\npublic NodejsFolderNode(CommonProjectNode root, ProjectElement element) : base(root, element)\n{\n- this._project = root;\n+ this.project = root;\n}\npublic override string Caption => base.Caption;\n- public override void RemoveChild(HierarchyNode node)\n- {\n- base.RemoveChild(node);\n- }\n-\ninternal override int IncludeInProject(bool includeChildren)\n{\n// Include node_modules folder is generally unecessary and can cause VS to hang.\n// http://nodejstools.codeplex.com/workitem/1432\n// Check if the folder is node_modules, and warn the user to ensure they don't run into this issue or at least set expectations appropriately.\n- var nodeModulesPath = Path.Combine(this._project.FullPathToChildren, NodejsConstants.NodeModulesFolder);\n+ var nodeModulesPath = Path.Combine(this.project.FullPathToChildren, NodejsConstants.NodeModulesFolder);\nif (CommonUtils.IsSameDirectory(nodeModulesPath, this.ItemNode.Url))\n{\nUtilities.ShowMessageBox(\n- this._project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);\n+ this.project.Site, Resources.IncludeNodeModulesContent, SR.ProductName, OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);\nreturn VSConstants.S_OK;\n}\nreturn base.IncludeInProject(includeChildren);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/HierarchyNode.cs",
"diff": "@@ -574,28 +574,28 @@ namespace Microsoft.VisualStudioTools.Project\nthis.projectMgr.Site.GetUIThread().MustBeCalledFromUIThread();\nthis.projectMgr.ItemIdMap.Remove(node);\n- HierarchyNode last = null;\n- for (var n = this.firstChild; n != null; n = n.nextSibling)\n+ HierarchyNode previous = null;\n+ for (var current = this.firstChild; current != null; current = current.nextSibling)\n{\n- if (n == node)\n+ if (current == node)\n{\n- if (last != null)\n+ if (previous != null)\n{\n- last.nextSibling = n.nextSibling;\n+ previous.nextSibling = current.nextSibling;\n}\n- if (n == this.firstChild)\n+ if (current == this.firstChild)\n{\n- this.firstChild = n.nextSibling;\n+ this.firstChild = current.nextSibling;\n}\nif (object.ReferenceEquals(node, this.lastChild))\n{\n- this.lastChild = last;\n+ this.lastChild = previous;\n}\nreturn;\n}\n- last = n;\n+ previous = current;\n}\n- throw new InvalidOperationException(\"Node not found\");\n+ // Node is no longer in the tree\n}\n/// <summary>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Don't crash when node is missing from hierarchy when trying to remove
|
410,217 |
30.05.2018 15:59:56
| 25,200 |
f611307b0c65ccc66fbc046d9ae782ebaba7de87
|
Fix issue when tsconfig.json has no outfile specified
Fix an issues where neither the tsconfig or the ts file would show the
build command, when no outfile was specified.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/TsConfigScannerFactory.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/TsConfigScannerFactory.cs",
"diff": "@@ -42,7 +42,10 @@ namespace Microsoft.NodejsTools.Workspace\nvar tsconfig = await TsConfigJsonFactory.CreateAsync(filePath);\n- Debug.Assert(!string.IsNullOrEmpty(tsconfig?.OutFile), \"Should have an outfile specified.\");\n+ if (string.IsNullOrEmpty(tsconfig.OutFile))\n+ {\n+ return new List<FileReferenceInfo>();\n+ }\nvar tsconfigFolder = Path.GetDirectoryName(filePath);\nvar outFile = Path.Combine(tsconfigFolder, tsconfig.OutFile);\n@@ -64,7 +67,15 @@ namespace Microsoft.NodejsTools.Workspace\nvar tsconfig = await TsConfigJsonFactory.CreateAsync(filePath);\n- Debug.Assert(!string.IsNullOrEmpty(tsconfig?.OutFile), \"Should have an outfile specified.\");\n+ // Only use the tsconfig.json determine the debug target when there is an outfile specified,\n+ // otherwise each .ts file can (in theory) be the entry point.\n+ if (string.IsNullOrEmpty(tsconfig.OutFile))\n+ {\n+ return new List<FileDataValue> {\n+ new FileDataValue(BuildConfigurationContext.ContextTypeGuid, filePath, null,\n+ context: \"Debug\", target: null)\n+ };\n+ }\nvar tsconfigFolder = Path.GetDirectoryName(filePath);\nvar outFile = Path.Combine(tsconfigFolder, tsconfig.OutFile);\n@@ -93,17 +104,9 @@ namespace Microsoft.NodejsTools.Workspace\nreturn fileDataValues;\n}\n- protected override async Task<bool> IsValidFileAsync(string filePath)\n- {\n- // Only use the tsconfig.json determine the debug target when there is an outfile specified,\n- // otherwise each .ts file can (in theory) be the entry point.\n- if (TypeScriptHelpers.IsTsJsConfigJsonFile(filePath))\n+ protected override Task<bool> IsValidFileAsync(string filePath)\n{\n- var tsconfig = await TsConfigJsonFactory.CreateAsync(filePath);\n- return !string.IsNullOrEmpty(tsconfig?.OutFile);\n- }\n-\n- return false;\n+ return Task.FromResult(TypeScriptHelpers.IsTsJsConfigJsonFile(filePath));\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptActionProviderFactory.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptActionProviderFactory.cs",
"diff": "@@ -96,7 +96,6 @@ namespace Microsoft.NodejsTools.Workspace\n}\n}\n-\nprivate sealed class BuildTsConfigContextAction : BuildFileContextAction, IFileContextAction, IVsCommandItem\n{\npublic BuildTsConfigContextAction(string filePath, FileContext fileContext, OutputPaneWrapper outputPane)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptContextProviderFactory.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptContextProviderFactory.cs",
"diff": "using System;\nusing System.Collections.Generic;\n-using System.IO;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.NodejsTools.TypeScript;\n@@ -47,19 +46,12 @@ namespace Microsoft.NodejsTools.Workspace\npublic async Task<IReadOnlyCollection<FileContext>> GetContextsForFileAsync(string filePath, CancellationToken cancellationToken)\n{\n- if (string.IsNullOrEmpty(filePath) || !IsSupportedFile(filePath))\n+ if (string.IsNullOrEmpty(filePath) || !(await IsSupportedFileAsync(filePath)))\n{\nreturn FileContext.EmptyFileContexts;\n}\n- var tsconfigJson = await this.workspace.IsContainedByTsConfig(filePath);\n-\n- if (tsconfigJson != null)\n- {\n- return FileContext.EmptyFileContexts;\n- }\n-\n- var list = new List<FileContext>\n+ return new List<FileContext>\n{\nnew FileContext(\nProviderTypeGuid,\n@@ -68,13 +60,26 @@ namespace Microsoft.NodejsTools.Workspace\nnew[]{ filePath },\ndisplayName: \"TypeScript Build\")\n};\n+ }\n- return list;\n+ private async Task<bool> IsSupportedFileAsync(string filePath)\n+ {\n+ // config files are always good\n+ if (TypeScriptHelpers.IsTsJsConfigJsonFile(filePath))\n+ {\n+ return true;\n}\n- private static bool IsSupportedFile(string filePath)\n+ // TypeScript files should only build when there is no containing config file\n+ if (TypeScriptHelpers.IsTypeScriptFile(filePath))\n+ {\n+ if (await this.workspace.IsContainedByTsConfig(filePath) == null)\n{\n- return TypeScriptHelpers.IsTypeScriptFile(filePath) || TypeScriptHelpers.IsTsJsConfigJsonFile(filePath);\n+ return true;\n+ }\n+ }\n+\n+ return false;\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptScannerFactory.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/TypeScriptScannerFactory.cs",
"diff": "@@ -16,7 +16,7 @@ namespace Microsoft.NodejsTools.Workspace\n{\n[ExportFileScanner(\nProviderType, \"TypeScriptFile\",\n- new string[] { \"*.ts\" },\n+ new string[] { \"*.ts\", \"*.tsx\" },\nnew Type[] { typeof(IReadOnlyCollection<FileDataValue>), typeof(IReadOnlyCollection<FileReferenceInfo>) },\nProviderPriority.Normal)]\npublic sealed class TypeScriptScannerFactory : IWorkspaceProviderFactory<IFileScanner>\n@@ -113,13 +113,23 @@ namespace Microsoft.NodejsTools.Workspace\nvar rootDir = Path.GetDirectoryName(tsConfig.FilePath);\nvar relativeTsFile = filePath.Substring(rootDir.Length).TrimStart('\\\\'); // save since we already know they have the same root\n- return this.workspace.MakeRelative(Path.Combine(rootDir, tsConfig.OutDir, Path.ChangeExtension(relativeTsFile, \"js\"))); // this works if outdir is null\n+ return this.workspace.MakeRelative(Path.Combine(rootDir, tsConfig.OutDir, ChangeExtension(relativeTsFile))); // this works if outdir is null\n}\nelse\n{\n- return this.workspace.MakeRelative(Path.ChangeExtension(filePath, \"js\"));\n+ return this.workspace.MakeRelative(ChangeExtension(filePath));\n}\n}\n+\n+ private static string ChangeExtension(string filePath)\n+ {\n+ if(filePath.EndsWith(\"tsx\", StringComparison.OrdinalIgnoreCase))\n+ {\n+ return Path.ChangeExtension(filePath, \"jsx\");\n+ }\n+\n+ return Path.ChangeExtension(filePath, \"js\");\n+ }\n}\n}\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix issue when tsconfig.json has no outfile specified
Fix an issues where neither the tsconfig or the ts file would show the
build command, when no outfile was specified.
|
410,217 |
31.05.2018 15:52:39
| 25,200 |
c91592a9eddc8444edae610620b64461ddf2e8fe
|
Clean up AssemblyResolver code
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"new_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"diff": "@@ -7,9 +7,12 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n- internal sealed class AssemblyResolver : IDisposable\n+ internal sealed class AssemblyResolver\n{\n- public AssemblyResolver()\n+ private const string ResolveHandlerKey = \"JavaScriptUnitTest_ResolveHandler\";\n+ private static AssemblyResolver resolver;\n+\n+ private AssemblyResolver()\n{\n// Use the setup API to find the VS install Dir, then build paths to the Private and Public Assemblies folders\nvar installPath = GetVSInstallDir();\n@@ -24,9 +27,19 @@ namespace Microsoft.NodejsTools.TestAdapter\nAppDomain.CurrentDomain.AssemblyResolve += this.OnAssemblyResolve;\n}\n+ public static void SetupHandler()\n+ {\n+ var handler = AppDomain.CurrentDomain.GetData(ResolveHandlerKey);\n+ if(handler == null)\n+ {\n+ resolver = new AssemblyResolver();\n+ AppDomain.CurrentDomain.SetData(ResolveHandlerKey, \"set\");\n+ }\n+ }\n+\nprivate readonly string[] probePaths;\n- internal static string GetVSInstallDir()\n+ private static string GetVSInstallDir()\n{\nvar vsTestFrameworkAssembly = typeof(ITestExecutor).Assembly;\nvar testAdapterPath = vsTestFrameworkAssembly.Location;\n@@ -58,10 +71,5 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\nreturn null;\n}\n-\n- public void Dispose()\n- {\n- AppDomain.CurrentDomain.AssemblyResolve -= this.OnAssemblyResolve;\n- }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -19,14 +19,9 @@ namespace Microsoft.NodejsTools.TestAdapter\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\npublic partial class JavaScriptTestDiscoverer : ITestDiscoverer\n{\n- internal static AssemblyResolver AssemblyResolver { get; set; }\n-\npublic void DiscoverTests(IEnumerable<string> sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\n- if (JavaScriptTestDiscoverer.AssemblyResolver == null)\n- {\n- JavaScriptTestDiscoverer.AssemblyResolver = new AssemblyResolver();\n- }\n+ AssemblyResolver.SetupHandler();\nthis.DiscoverTestsCore(sources, discoveryContext, logger, discoverySink);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "@@ -13,14 +13,14 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle)\n{\n- this.EnsureInitialized();\n+ AssemblyResolver.SetupHandler();\nthis.worker = new TestExecutorWorker(runContext, frameworkHandle);\nthis.worker.RunTests(tests);\n}\npublic void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrameworkHandle frameworkHandle)\n{\n- this.EnsureInitialized();\n+ AssemblyResolver.SetupHandler();\nthis.worker = new TestExecutorWorker(runContext, frameworkHandle);\nthis.worker.RunTests(sources, new JavaScriptTestDiscoverer());\n}\n@@ -29,13 +29,5 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nthis.worker?.Cancel();\n}\n-\n- private void EnsureInitialized()\n- {\n- if (JavaScriptTestDiscoverer.AssemblyResolver == null)\n- {\n- JavaScriptTestDiscoverer.AssemblyResolver = new AssemblyResolver();\n- }\n- }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"diff": "@@ -18,6 +18,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\npublic void DiscoverTests(IEnumerable<string> sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\n+ AssemblyResolver.SetupHandler();\nforeach (var source in sources)\n{\n// we're only interested in package.json files here.\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestExecutor.cs",
"diff": "@@ -18,12 +18,14 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrameworkHandle frameworkHandle)\n{\n+ AssemblyResolver.SetupHandler();\nthis.worker = new TestExecutorWorker(runContext, frameworkHandle);\nthis.worker.RunTests(sources, new PackageJsonTestDiscoverer());\n}\npublic void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle)\n{\n+ AssemblyResolver.SetupHandler();\nthis.worker = new TestExecutorWorker(runContext, frameworkHandle);\nthis.worker.RunTests(tests);\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Clean up AssemblyResolver code
|
410,217 |
01.06.2018 14:24:16
| 25,200 |
f7ae46392c95b030c8106c713a7d24713b673ed2
|
Last PR Feedback
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/Nodejs/Workspace/PackageJsonTestContainerDiscoverer.cs",
"diff": "@@ -21,7 +21,7 @@ namespace Microsoft.NodejsTools.Workspace\nprivate readonly List<PackageJsonTestContainer> containers = new List<PackageJsonTestContainer>();\nprivate readonly object containerLock = new object();\n- private IWorkspace currentWorkspace;\n+ private IWorkspace activeWorkspace;\n[ImportingConstructor]\npublic PackageJsonTestContainerDiscoverer(IVsFolderWorkspaceService workspaceService)\n@@ -31,10 +31,10 @@ namespace Microsoft.NodejsTools.Workspace\nif (this.workspaceService.CurrentWorkspace != null)\n{\n- this.currentWorkspace = this.workspaceService.CurrentWorkspace;\n+ this.activeWorkspace = this.workspaceService.CurrentWorkspace;\nthis.RegisterEvents();\n- this.currentWorkspace.JTF.RunAsync(async () =>\n+ this.activeWorkspace.JTF.RunAsync(async () =>\n{\n// Yield so we don't do this now. Don't want to block the constructor.\nawait Task.Yield();\n@@ -62,7 +62,7 @@ namespace Microsoft.NodejsTools.Workspace\nprivate async Task AttemptUpdateAsync()\n{\n- var workspace = this.currentWorkspace;\n+ var workspace = this.activeWorkspace;\nif (workspace != null)\n{\nvar indexService = workspace.GetIndexWorkspaceService();\n@@ -91,7 +91,7 @@ namespace Microsoft.NodejsTools.Workspace\n{\nthis.UnRegisterEvents();\n- this.currentWorkspace = this.workspaceService.CurrentWorkspace;\n+ this.activeWorkspace = this.workspaceService.CurrentWorkspace;\nthis.RegisterEvents();\n@@ -100,28 +100,32 @@ namespace Microsoft.NodejsTools.Workspace\nprivate void RegisterEvents()\n{\n- var fileWatcherService = this.currentWorkspace?.GetFileWatcherService();\n+ var workspace = this.activeWorkspace;\n+ if (workspace != null)\n+ {\n+ var fileWatcherService = workspace.GetFileWatcherService();\nif (fileWatcherService != null)\n{\nfileWatcherService.OnFileSystemChanged += this.FileSystemChangedAsync;\n}\n- var indexService = this.currentWorkspace?.GetIndexWorkspaceService();\n+ var indexService = workspace.GetIndexWorkspaceService();\nif (indexService != null)\n{\nindexService.OnFileScannerCompleted += this.FileScannerCompletedAsync;\n}\n}\n+ }\nprivate void UnRegisterEvents()\n{\n- var fileWatcherService = this.currentWorkspace?.GetFileWatcherService();\n+ var fileWatcherService = this.activeWorkspace?.GetFileWatcherService();\nif (fileWatcherService != null)\n{\nfileWatcherService.OnFileSystemChanged -= this.FileSystemChangedAsync;\n}\n- var indexService = this.currentWorkspace?.GetIndexWorkspaceService();\n+ var indexService = this.activeWorkspace?.GetIndexWorkspaceService();\nif (indexService != null)\n{\nindexService.OnFileScannerCompleted -= this.FileScannerCompletedAsync;\n@@ -135,7 +139,7 @@ namespace Microsoft.NodejsTools.Workspace\n// Any changes to the 'package.json' will be handled by the FileScannerCompleted event.\nif (IsJavaScriptFile(args.FullPath) || args.IsDirectoryChanged())\n{\n- // use a flag so we don't deadlock\n+ // use a flag so we don't raise the event while under the lock\nvar testsUpdated = false;\nlock (this.containerLock)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -281,9 +281,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.currentResult.Outcome = resultObject.passed ? TestOutcome.Passed : TestOutcome.Failed;\n}\n+ var errorMessage = string.Join(Environment.NewLine, standardErrorLines);\n+\nthis.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, string.Join(Environment.NewLine, standardOutputLines)));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, string.Join(Environment.NewLine, standardErrorLines)));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, string.Join(Environment.NewLine, standardErrorLines)));\n+ this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, errorMessage));\n+ this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, errorMessage));\nthis.frameworkHandle.RecordResult(this.currentResult);\nthis.frameworkHandle.RecordEnd(test, this.currentResult.Outcome);\nthis.currentTests.Remove(test);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Last PR Feedback
|
410,217 |
06.06.2018 13:46:21
| 25,200 |
047038ce4cb4aa08c3b097280331cf1aecf9fe2f
|
clean up the node process when the tests are cancelled
don't double cancel test runs
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -59,9 +59,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nValidateArg.NotNull(sources, nameof(sources));\nValidateArg.NotNull(discoverer, nameof(discoverer));\n- // Cancel any running tests before starting a new batch\n- this.Cancel();\n-\nvar receiver = new TestReceiver();\ndiscoverer.DiscoverTests(sources, /*discoveryContext*/null, this.frameworkHandle, receiver);\n@@ -83,9 +80,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nValidateArg.NotNull(tests, nameof(tests));\n- // Cancel any running tests before starting a new batch\n- this.Cancel();\n-\n// .ts file path -> project settings\nvar fileToTests = new Dictionary<string, List<TestCase>>();\n@@ -152,6 +146,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nif (this.cancelRequested.WaitOne(0))\n{\n+ this.frameworkHandle.SendMessage(TestMessageLevel.Warning, \"Test run was cancelled.\");\nbreak;\n}\n@@ -177,14 +172,15 @@ namespace Microsoft.NodejsTools.TestAdapter\n// make sure the tests completed is not signalled.\nthis.testsCompleted.Reset();\n- this.nodeProcess = ProcessOutput.Run(\n+ using (this.nodeProcess = ProcessOutput.Run(\nnodeExePath,\nnodeArgs,\nworkingDir,\nenv: null,\nvisible: false,\nredirector: new TestExecutionRedirector(this.ProcessTestRunnerEmit),\n- quoteArgs: false);\n+ quoteArgs: false))\n+ {\nif (this.runContext.IsBeingDebugged && startedFromVs)\n{\n@@ -197,11 +193,12 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.nodeProcess.WriteInputLine(serializedObjects);\n// for node 8 the process doesn't automatically exit when debugging, so always detach\n- WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted });\n+ WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted, this.cancelRequested });\nif (this.runContext.IsBeingDebugged && startedFromVs)\n{\nthis.DetachDebugger(vsProcessId);\n}\n+ }\n// Automatically fail tests that haven't been run by this point (failures in before() hooks)\nforeach (var notRunTest in this.currentTests)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
clean up the node process when the tests are cancelled
don't double cancel test runs
|
410,217 |
06.06.2018 14:36:21
| 25,200 |
744807a27d0c27ca3f7cfea80f34bb4f248bf86c
|
Remove telemetry infra since it was never invoked.
Telemetry doesn't work from the sattelite process that runs the tests,
we depend on the events we get from the test framework
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -134,14 +134,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar nodeVersion = Nodejs.GetNodeVersion(nodeExePath);\n- // We can only log telemetry when we're running in VS.\n- // Since the required assemblies are not on disk if we're not running in VS, we have to reference them in a separate method\n- // this way the .NET framework only tries to load the assemblies when we actually need them.\n- if (startedFromVs)\n- {\n- this.LogTelemetry(tests.Count(), nodeVersion, this.runContext.IsBeingDebugged, testFramework);\n- }\n-\nforeach (var test in tests)\n{\nif (this.cancelRequested.WaitOne(0))\n@@ -301,11 +293,6 @@ namespace Microsoft.NodejsTools.TestAdapter\nVisualStudioApp.DetachDebugger(vsProcessId);\n}\n- private void LogTelemetry(int testCount, Version nodeVersion, bool isDebugging, string testFramework)\n- {\n- VisualStudioApp.LogTelemetry(testCount, nodeVersion, isDebugging, testFramework);\n- }\n-\nprivate void AttachDebugger(int vsProcessId, int port, Version nodeVersion)\n{\ntry\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"diff": "<PackageReference Include=\"Microsoft.VisualStudio.SDK.EmbedInteropTypes\">\n<Version>15.0.17</Version>\n</PackageReference>\n- <PackageReference Include=\"Microsoft.VisualStudio.Telemetry\">\n- <Version>15.7.942-master669188BE</Version>\n- </PackageReference>\n<PackageReference Include=\"Newtonsoft.Json\">\n<Version>9.0.1</Version>\n</PackageReference>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"diff": "@@ -9,7 +9,6 @@ using EnvDTE;\nusing Microsoft.VisualStudio.OLE.Interop;\nusing Microsoft.VisualStudio.Shell;\nusing Microsoft.VisualStudio.Shell.Interop;\n-using Microsoft.VisualStudio.Telemetry;\nusing Process = System.Diagnostics.Process;\nnamespace Microsoft.VisualStudioTools\n@@ -31,18 +30,6 @@ namespace Microsoft.VisualStudioTools\nreturn inst;\n}\n- public static void LogTelemetry(int testCount, Version nodeVersion, bool isDebugging, string testFramework)\n- {\n- var userTask = new UserTaskEvent(\"VS/NodejsTools/UnitTestsExecuted\", TelemetryResult.Success);\n- userTask.Properties[\"VS.NodejsTools.TestCount\"] = testCount;\n- // This is safe, since changes to the ToString method are very unlikely, as the current output is widely documented.\n- userTask.Properties[\"VS.NodejsTools.NodeVersion\"] = nodeVersion.ToString() ?? \"0.0\";\n- userTask.Properties[\"VS.NodejsTools.IsDebugging\"] = isDebugging;\n- userTask.Properties[\"VS.NodejsTools.TestFramework\"] = testFramework;\n-\n- TelemetryService.DefaultSession?.PostEvent(userTask);\n- }\n-\npublic static bool AttachToProcessNode2DebugAdapter(int vsProcessId, int port)\n{\nvar app = FromProcessId(vsProcessId);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Remove telemetry infra since it was never invoked.
Telemetry doesn't work from the sattelite process that runs the tests,
we depend on the events we get from the test framework
|
410,217 |
06.06.2018 14:52:03
| 25,200 |
091d2c15eb8d96ccd8176e4e208641d7d3447d41
|
Clarify project properties only apply to JavaScript/TypeScript
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -101,7 +101,7 @@ namespace Microsoft.NodejsTools\npublic const string TypeScriptOutDir = \"TypeScriptOutDir\";\npublic const string TypeScriptSourceMap = \"TypeScriptSourceMap\";\npublic const string SaveNodeJsSettingsInProjectFile = \"SaveNodeJsSettingsInProjectFile\";\n- public const string TestRoot = \"TestRoot\";\n- public const string TestFramework = \"TestFramework\";\n+ public const string TestRoot = \"JavaScriptTestRoot\";\n+ public const string TestFramework = \"JavaScriptTestFramework\";\n}\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Clarify project properties only apply to JavaScript/TypeScript
|
410,204 |
12.06.2018 13:39:21
| 25,200 |
b319909814b205aec4a4da759bc8d02cf4a9ca47
|
Enable debug adapter logging by default
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -93,7 +93,7 @@ namespace Microsoft.NodejsTools.Project\n{\nvar optionString = NodejsDialogPage.LoadString(name: \"DiagnosticLogging\", cat: \"Debugging\");\n- return StringComparer.OrdinalIgnoreCase.Equals(optionString, \"true\");\n+ return !StringComparer.OrdinalIgnoreCase.Equals(optionString, \"false\");\n}\nprivate void StartNodeProcess(string file, string nodePath, bool startBrowser)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Enable debug adapter logging by default
|
410,217 |
12.06.2018 15:18:06
| 25,200 |
dc4b1d87207b2ac16f18ee42b4239b3f7ce2d494
|
Skip Discovery of test cases when no test files are found
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -94,7 +94,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\n//Check to see if this is a TestCase\ntestFrameworkName = item.GetMetadataValue(\"TestFramework\");\n- if (!TestFrameworks.TestFramework.IsValidTestFramework(testFrameworkName))\n+ if (!TestFramework.IsValidTestFramework(testFrameworkName))\n{\ncontinue;\n}\n@@ -119,9 +119,12 @@ namespace Microsoft.NodejsTools.TestAdapter\nfileList.Add(new TestFileEntry(fileAbsolutePath, typeScriptTest));\n}\n+ if (testItems.Any())\n+ {\nthis.DiscoverTests(testItems, proj, discoverySink, logger);\n}\n}\n+ }\ncatch (Exception ex)\n{\nlogger.SendMessage(TestMessageLevel.Error, ex.Message);\n@@ -138,7 +141,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate void DiscoverTests(Dictionary<string, HashSet<TestFileEntry>> testItems, MSBuild.Project proj, ITestCaseDiscoverySink discoverySink, IMessageLogger logger)\n{\n- var result = new List<TestFrameworks.NodejsTestInfo>();\n+ var result = new List<NodejsTestInfo>();\nvar projectHome = Path.GetFullPath(Path.Combine(proj.DirectoryPath, \".\"));\nvar projSource = proj.FullPath;\n@@ -203,10 +206,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\nlogger.SendMessage(TestMessageLevel.Informational, string.Format(CultureInfo.CurrentCulture, \"Processing finished for framework '{0}'.\", testFx));\n}\n- if (testCount == 0)\n- {\n- logger.SendMessage(TestMessageLevel.Warning, string.Format(CultureInfo.CurrentCulture, \"Discovered 0 testcases.\"));\n- }\n}\n}\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Skip Discovery of test cases when no test files are found
|
410,217 |
12.06.2018 15:18:20
| 25,200 |
3ccaf58e2dd2d30aaa0907368ec264c19259587e
|
Fix build error in vsmanproj
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"new_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"diff": "<Target Name=\"Build\" />\n<Target Name=\"Clean\" />\n<Target Name=\"ReBuild\" />\n+ <Target Name=\"BuiltProjectOutputGroup\" />\n<Import Project=\".\\SetupProjectAfter.settings\" />\n<Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n<PropertyGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix build error in vsmanproj
|
410,217 |
01.06.2018 11:16:38
| 25,200 |
0571ee968462b7b65949ebd791a22b5fc30af32f
|
Create test adapter to use with .NET Core apps
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/NodejsTools.sln",
"new_path": "Nodejs/NodejsTools.sln",
"diff": "@@ -32,6 +32,8 @@ Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"NodejsTools\", \"Setup\\Nodejs\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Setup\", \"Setup\", \"{8AB8B6AC-77EB-47E7-904F-422588542C4D}\"\nEndProject\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"TestAdapterNetStandard\", \"Product\\TestAdapterNetStandard\\TestAdapterNetStandard.csproj\", \"{06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8}\"\n+EndProject\nGlobal\nGlobalSection(SolutionConfigurationPlatforms) = preSolution\nDebug|Any CPU = Debug|Any CPU\n@@ -82,6 +84,10 @@ Global\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Debug|Any CPU.Build.0 = Debug|Any CPU\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.ActiveCfg = Release|Any CPU\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}.Release|Any CPU.Build.0 = Release|Any CPU\n+ {06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n+ {06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8}.Debug|Any CPU.Build.0 = Debug|Any CPU\n+ {06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8}.Release|Any CPU.ActiveCfg = Release|Any CPU\n+ {06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8}.Release|Any CPU.Build.0 = Release|Any CPU\nEndGlobalSection\nGlobalSection(SolutionProperties) = preSolution\nHideSolutionNode = FALSE\n@@ -98,6 +104,7 @@ Global\n{CBA217C4-4338-4E50-9DEC-9227705F8124} = {F9719B35-F359-47A7-A2F8-34F42E53C809}\n{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9} = {F9719B35-F359-47A7-A2F8-34F42E53C809}\n{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9} = {8AB8B6AC-77EB-47E7-904F-422588542C4D}\n+ {06A4F57E-3E4F-40F0-AA7D-1C0204CE88B8} = {F9719B35-F359-47A7-A2F8-34F42E53C809}\nEndGlobalSection\nGlobalSection(ExtensibilityGlobals) = postSolution\nSolutionGuid = {B1CAB318-7961-42BF-A7B1-FBDB3EC225E9}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"new_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"diff": "@@ -58,6 +58,7 @@ namespace Microsoft.NodejsTools\npublic static string GetPathToNodeExecutableFromEnvironment(string executable = \"node.exe\")\n{\n+#if !NO_WINDOWS\n// Attempt to find Node.js/NPM in the Registry. (Currrent User)\nusing (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default))\nusing (var node = baseKey.OpenSubKey(NodejsRegPath))\n@@ -105,7 +106,7 @@ namespace Microsoft.NodejsTools\n}\n}\n}\n-\n+#endif\n// If we didn't find node.js in the registry we should look at the user's path.\nforeach (var dir in Environment.GetEnvironmentVariable(\"PATH\").Split(Path.PathSeparator))\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"new_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"diff": "@@ -48,7 +48,8 @@ namespace Microsoft.NodejsTools.TestFrameworks\nvar currentAssembly = typeof(TestFrameworkDirectories).Assembly;\n- if (currentAssembly.FullName.StartsWith(\"Microsoft.NodejsTools.TestAdapter\", StringComparison.OrdinalIgnoreCase))\n+ if (currentAssembly.FullName.StartsWith(\"Microsoft.NodejsTools.TestAdapter\", StringComparison.OrdinalIgnoreCase) ||\n+ (currentAssembly.FullName.StartsWith(\"Microsoft.JavaScript.TestAdapter\", StringComparison.OrdinalIgnoreCase)))\n{\ntestAdapterAssemblyFolder = Path.GetDirectoryName(currentAssembly.Location);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -5,6 +5,7 @@ using System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n+using System.Xml.Linq;\nusing Microsoft.NodejsTools.SourceMapping;\nusing Microsoft.NodejsTools.TestAdapter.TestFrameworks;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\n@@ -15,15 +16,120 @@ using MSBuild = Microsoft.Build.Evaluation;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n+#if NETSTANDARD2_0\n+ [FileExtension(\".dll\")]\n+#else\n[FileExtension(\".njsproj\"), FileExtension(\".csproj\"), FileExtension(\".vbproj\")]\n+#endif\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\npublic partial class JavaScriptTestDiscoverer : ITestDiscoverer\n{\npublic void DiscoverTests(IEnumerable<string> sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\n+#if !NETSTANDARD2_0\nAssemblyResolver.SetupHandler();\nthis.DiscoverTestsCore(sources, discoveryContext, logger, discoverySink);\n+#else\n+ this.DiscoverTestsCoreNetStandard(sources, logger, discoverySink);\n+#endif\n+ }\n+\n+#if NETSTANDARD2_0\n+ private void DiscoverTestsCoreNetStandard(IEnumerable<string> sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n+ {\n+ ValidateArg.NotNull(sources, nameof(sources));\n+ ValidateArg.NotNull(discoverySink, nameof(discoverySink));\n+ ValidateArg.NotNull(logger, nameof(logger));\n+\n+ var projects = new List<(string projectFilePath, IEnumerable<XElement> propertyGroup)>();\n+\n+ // There's an issue when loading the project using the .NET Core msbuild bits,\n+ // so we load the xml, and extract the properties we care about.\n+ // Downside is we only have the raw contents of the XmlElements, i.e. we don't\n+ // expand any variables.\n+ try\n+ {\n+ foreach (var source in sources)\n+ {\n+ var cleanPath = source.Trim('\\'', '\"');\n+ var project = XDocument.Load(cleanPath);\n+\n+ // structure looks like Project/PropertyGroup/JsTestRoot and Project/PropertyGroup/JsTestFramework\n+ var propertyGroup = project.Descendants(\"Project\").Descendants(\"PropertyGroup\");\n+\n+ projects.Add((cleanPath, propertyGroup));\n+ }\n+\n+ foreach (var (projectFile, propertyGroup) in projects)\n+ {\n+ var testFramework = propertyGroup.Descendants(NodeProjectProperty.TestFramework).FirstOrDefault()?.Value;\n+ var testRoot = propertyGroup.Descendants(NodeProjectProperty.TestRoot).FirstOrDefault()?.Value;\n+ var outDir = propertyGroup.Descendants(NodeProjectProperty.TypeScriptOutDir).FirstOrDefault()?.Value ?? \"\";\n+\n+ if (string.IsNullOrEmpty(testRoot) || string.IsNullOrEmpty(testFramework))\n+ {\n+ logger.SendMessage(TestMessageLevel.Warning, $\"No TestRoot or TestFramework specified for '{Path.GetFileName(projectFile)}'.\");\n+ continue;\n+ }\n+\n+ var projectHome = Path.GetDirectoryName(projectFile);\n+ var testItems = new Dictionary<string, HashSet<TestFileEntry>>(StringComparer.OrdinalIgnoreCase);\n+ var testFolder = Path.Combine(projectHome, testRoot);\n+\n+ if (!Directory.Exists(testFolder))\n+ {\n+ logger.SendMessage(TestMessageLevel.Warning, $\"Test folder path '{testFolder}' doesn't exist.\");\n+ continue;\n+ }\n+\n+ // grab all files, we try for .ts files first, and only parse the .js files if we don't find any\n+ foreach (var file in Directory.EnumerateFiles(testFolder, \"*.ts\", SearchOption.AllDirectories))\n+ {\n+ ProcessFiles(file);\n+ }\n+\n+ if (!testItems.Any())\n+ {\n+ foreach (var file in Directory.EnumerateFiles(Path.Combine(projectHome, testRoot), \"*.ts\", SearchOption.AllDirectories))\n+ {\n+ ProcessFiles(file);\n+ }\n+ }\n+\n+ if (testItems.Any())\n+ {\n+ var nodeExePath = Nodejs.GetAbsoluteNodeExePath(projectHome, propertyGroup.Descendants(NodeProjectProperty.NodeExePath).FirstOrDefault()?.Value);\n+ this.DiscoverTests(testItems, discoverySink, logger, nodeExePath, projectHome, projectFile);\n+ }\n+\n+ void ProcessFiles(string fileAbsolutePath)\n+ {\n+ var typeScriptTest = TypeScript.TypeScriptHelpers.IsTypeScriptFile(fileAbsolutePath);\n+ if (typeScriptTest)\n+ {\n+ fileAbsolutePath = TypeScript.TypeScriptHelpers.GetTypeScriptBackedJavaScriptFile(projectHome, outDir, fileAbsolutePath);\n+ }\n+ else if (!StringComparer.OrdinalIgnoreCase.Equals(Path.GetExtension(fileAbsolutePath), \".js\"))\n+ {\n+ return;\n+ }\n+\n+ if (!testItems.TryGetValue(testFramework, out var fileList))\n+ {\n+ fileList = new HashSet<TestFileEntry>(TestFileEntryComparer.Instance);\n+ testItems.Add(testFramework, fileList);\n+ }\n+ fileList.Add(new TestFileEntry(fileAbsolutePath, typeScriptTest));\n}\n+ }\n+ }\n+ catch (Exception ex)\n+ {\n+ logger.SendMessage(TestMessageLevel.Error, ex.Message);\n+ throw;\n+ }\n+ }\n+#endif\n/// <summary>\n/// ITestDiscover, Given a list of test sources this method pulls out the test cases\n@@ -58,7 +164,8 @@ namespace Microsoft.NodejsTools.TestAdapter\n// Load all the test containers passed in (.njsproj msbuild files)\nforeach (var source in sources)\n{\n- buildEngine.LoadProject(source);\n+ var cleanPath = source.Trim('\\'', '\"');\n+ buildEngine.LoadProject(cleanPath);\n}\nforeach (var proj in buildEngine.LoadedProjects)\n@@ -150,6 +257,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nprojectHome,\nproj.GetPropertyValue(NodeProjectProperty.NodeExePath));\n+ this.DiscoverTests(testItems, discoverySink, logger, nodeExePath, projectHome, projSource);\n+ }\n+\n+ private void DiscoverTests(Dictionary<string, HashSet<TestFileEntry>> testItems, ITestCaseDiscoverySink discoverySink, IMessageLogger logger, string nodeExePath, string projectHome, string projectFullPath)\n+ {\nif (!File.Exists(nodeExePath))\n{\nlogger.SendMessage(TestMessageLevel.Error, \"Node.exe was not found. Please install Node.js before running tests.\");\n@@ -189,7 +301,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nentry.FullPath));\n}\n- var testcase = new TestCase(qualifiedName, NodejsConstants.ExecutorUri, projSource)\n+ var testcase = new TestCase(qualifiedName, NodejsConstants.ExecutorUri, projectFullPath)\n{\nCodeFilePath = fi?.Filename ?? filePath,\nLineNumber = fi?.LineNumber ?? discoveredTest.SourceLine,\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Name>TestAdapterImpl</Name>\n</ProjectReference>\n</ItemGroup>\n+ <ItemGroup>\n+ <Compile Include=\"TestExecutorWorker.TestExecutionRedirector.cs\" />\n+ </ItemGroup>\n<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n<Import Project=\"..\\ProjectAfter.targets\" />\n</Project>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -44,7 +44,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\n//let us just kill the node process there, rather do it late, because VS engine process\n//could exit right after this call and our node process will be left running.\n- KillNodeProcess();\n+ this.KillNodeProcess();\nthis.cancelRequested.Set();\n}\n@@ -59,6 +59,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nValidateArg.NotNull(sources, nameof(sources));\nValidateArg.NotNull(discoverer, nameof(discoverer));\n+ this.cancelRequested.Reset();\n+\nvar receiver = new TestReceiver();\ndiscoverer.DiscoverTests(sources, /*discoveryContext*/null, this.frameworkHandle, receiver);\n@@ -79,6 +81,7 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic void RunTests(IEnumerable<TestCase> tests)\n{\nValidateArg.NotNull(tests, nameof(tests));\n+ this.cancelRequested.Reset();\n// .ts file path -> project settings\nvar fileToTests = new Dictionary<string, List<TestCase>>();\n@@ -94,12 +97,12 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n// where key is the file and value is a list of tests\n- foreach (var testcaseList in fileToTests.Values)\n+ foreach (var entry in fileToTests)\n{\n- this.currentTests = testcaseList;\n+ this.currentTests = entry.Value;\n// Run all test cases in a given file\n- RunTestCases(testcaseList);\n+ this.RunTestCases(entry.Value);\n}\n}\n@@ -138,7 +141,6 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nif (this.cancelRequested.WaitOne(0))\n{\n- this.frameworkHandle.SendMessage(TestMessageLevel.Warning, \"Test run was cancelled.\");\nbreak;\n}\n@@ -164,15 +166,14 @@ namespace Microsoft.NodejsTools.TestAdapter\n// make sure the tests completed is not signalled.\nthis.testsCompleted.Reset();\n- using (this.nodeProcess = ProcessOutput.Run(\n+ this.nodeProcess = ProcessOutput.Run(\nnodeExePath,\nnodeArgs,\nworkingDir,\nenv: null,\nvisible: false,\nredirector: new TestExecutionRedirector(this.ProcessTestRunnerEmit),\n- quoteArgs: false))\n- {\n+ quoteArgs: false);\nif (this.runContext.IsBeingDebugged && startedFromVs)\n{\n@@ -185,12 +186,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.nodeProcess.WriteInputLine(serializedObjects);\n// for node 8 the process doesn't automatically exit when debugging, so always detach\n- WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted, this.cancelRequested });\n+ WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted });\nif (this.runContext.IsBeingDebugged && startedFromVs)\n{\nthis.DetachDebugger(vsProcessId);\n}\n- }\n// Automatically fail tests that haven't been run by this point (failures in before() hooks)\nforeach (var notRunTest in this.currentTests)\n@@ -270,11 +270,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.currentResult.Outcome = resultObject.passed ? TestOutcome.Passed : TestOutcome.Failed;\n}\n- var errorMessage = string.Join(Environment.NewLine, standardErrorLines);\n-\nthis.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, string.Join(Environment.NewLine, standardOutputLines)));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, errorMessage));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, errorMessage));\n+ this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, string.Join(Environment.NewLine, standardErrorLines)));\n+ this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, string.Join(Environment.NewLine, standardErrorLines)));\nthis.frameworkHandle.RecordResult(this.currentResult);\nthis.frameworkHandle.RecordEnd(test, this.currentResult.Outcome);\nthis.currentTests.Remove(test);\n@@ -290,11 +288,14 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate void DetachDebugger(int vsProcessId)\n{\n+#if !NETSTANDARD2_0\nVisualStudioApp.DetachDebugger(vsProcessId);\n+#endif\n}\nprivate void AttachDebugger(int vsProcessId, int port, Version nodeVersion)\n{\n+#if !NETSTANDARD2_0\ntry\n{\nif (nodeVersion >= Node8Version)\n@@ -320,7 +321,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nthis.frameworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\nthis.frameworkHandle.SendMessage(TestMessageLevel.Error, ex.ToString());\n- KillNodeProcess();\n+ this.KillNodeProcess();\n}\n#else\n}\n@@ -329,9 +330,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nframeworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\nKillNodeProcess();\n}\n+#endif\n#endif\n}\n+\nprivate static int GetFreePort()\n{\nreturn Enumerable.Range(new Random().Next(49152, 65536), 60000).Except(\n@@ -358,21 +361,5 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nthis.nodeProcess?.Kill();\n}\n-\n- internal sealed class TestExecutionRedirector : Redirector\n- {\n- private readonly Action<string> writer;\n-\n- public TestExecutionRedirector(Action<string> onWriteLine)\n- {\n- this.writer = onWriteLine;\n- }\n-\n- public override void WriteErrorLine(string line) => this.writer(line);\n-\n- public override void WriteLine(string line) => this.writer(line);\n-\n- public override bool CloseStandardInput() => false;\n- }\n}\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Nodejs/Product/TestAdapterNetStandard/TestAdapterNetStandard.csproj",
"diff": "+<Project Sdk=\"Microsoft.NET.Sdk\">\n+\n+ <PropertyGroup>\n+ <TargetFramework>netstandard2.0</TargetFramework>\n+ <AssemblyName>Microsoft.JavaScript.TestAdapter</AssemblyName>\n+ <RootNamespace>Microsoft.NodejsTools.TestAdapter</RootNamespace>\n+ </PropertyGroup>\n+\n+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|AnyCPU'\">\n+ <DefineConstants>NO_WINDOWS;NOVS</DefineConstants>\n+ </PropertyGroup>\n+\n+ <ItemGroup>\n+ <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonConstants.cs\" Link=\"CommonConstants.cs\" />\n+ <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\CommonUtils.cs\" Link=\"CommonUtils.cs\" />\n+ <Compile Include=\"..\\..\\..\\Common\\Product\\SharedProject\\ProcessOutput.cs\" Link=\"ProcessOutput.cs\" />\n+ <Compile Include=\"..\\Nodejs\\Nodejs.cs\" Link=\"Nodejs.cs\" />\n+ <Compile Include=\"..\\Nodejs\\NodejsConstants.cs\" Link=\"NodejsConstants.cs\" />\n+ <Compile Include=\"..\\Nodejs\\SourceMapping\\FunctionInfo.cs\" Link=\"SourceMapping\\FunctionInfo.cs\" />\n+ <Compile Include=\"..\\Nodejs\\SourceMapping\\JavaScriptSourceMapInfo.cs\" Link=\"SourceMapping\\JavaScriptSourceMapInfo.cs\" />\n+ <Compile Include=\"..\\Nodejs\\SourceMapping\\SourceMap.cs\" Link=\"SourceMapping\\SourceMap.cs\" />\n+ <Compile Include=\"..\\Nodejs\\SourceMapping\\SourceMapper.cs\" Link=\"SourceMapping\\SourceMapper.cs\" />\n+ <Compile Include=\"..\\Nodejs\\TestFrameworks\\TestFrameworkDirectories.cs\" Link=\"TestFrameworks\\TestFrameworkDirectories.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\JavaScriptTestCaseProperties.cs\" Link=\"JavaScriptTestCaseProperties.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\JavaScriptTestDiscoverer.cs\" Link=\"JavaScriptTestDiscoverer.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\JavaScriptTestDiscoverer.TestFileEntry.cs\" Link=\"JavaScriptTestDiscoverer.TestFileEntry.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\JavaScriptTestExecutor.cs\" Link=\"JavaScriptTestExecutor.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\SerializationHelpers.cs\" Link=\"SerializationHelpers.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestExecutorWorker.cs\" Link=\"TestExecutorWorker.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestExecutorWorker.TestExecutionRedirector.cs\" Link=\"TestExecutorWorker.TestExecutionRedirector.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestExecutorWorker.TestReceiver.cs\" Link=\"TestExecutorWorker.TestReceiver.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestFrameworks\\FrameworkDiscoverer.cs\" Link=\"TestFrameworks\\FrameworkDiscoverer.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestFrameworks\\NodejsTestInfo.cs\" Link=\"TestFrameworks\\NodejsTestInfo.cs\" />\n+ <Compile Include=\"..\\TestAdapter\\TestFrameworks\\TestFramework.cs\" Link=\"TestFrameworks\\TestFramework.cs\" />\n+ <Compile Include=\"..\\TypeScript\\TypeScriptHelpers.cs\" Link=\"TypeScriptHelpers.cs\" />\n+ </ItemGroup>\n+\n+ <ItemGroup>\n+ <PackageReference Include=\"MicroBuild.Core\" Version=\"0.3.0\">\n+ <PrivateAssets>all</PrivateAssets>\n+ <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>\n+ </PackageReference>\n+ <PackageReference Include=\"Microsoft.Build\" Version=\"15.7.179\" />\n+ <PackageReference Include=\"Microsoft.TestPlatform.ObjectModel\" Version=\"15.7.2\" />\n+ <PackageReference Include=\"Newtonsoft.Json\" Version=\"9.0.1\" />\n+ </ItemGroup>\n+\n+ <ItemGroup>\n+ <Folder Include=\"TestFrameworks\\\" />\n+ <Folder Include=\"SourceMapping\\\" />\n+ </ItemGroup>\n+\n+</Project>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -35,7 +35,7 @@ namespace Microsoft.NodejsTools.TypeScript\nreturn GetTypeScriptBackedJavaScriptFile(project.DirectoryPath, typeScriptOutDir, pathToFile);\n}\n- private static string GetTypeScriptBackedJavaScriptFile(string projectHome, string typeScriptOutDir, string pathToFile)\n+ internal static string GetTypeScriptBackedJavaScriptFile(string projectHome, string typeScriptOutDir, string pathToFile)\n{\nvar jsFilePath = Path.ChangeExtension(pathToFile, NodejsConstants.JavaScriptExtension);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/UnitTestAdapter.sln",
"new_path": "Nodejs/UnitTestAdapter.sln",
"diff": "@@ -9,6 +9,8 @@ Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TestAdapterImpl\", \"Product\\\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TestAdapter\", \"Product\\TestAdapter\\TestAdapter.csproj\", \"{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}\"\nEndProject\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"TestAdapterNetStandard\", \"Product\\TestAdapterNetStandard\\TestAdapterNetStandard.csproj\", \"{10B653E3-4576-4F4C-A1F1-5A5CD2DE60FA}\"\n+EndProject\nGlobal\nGlobalSection(SolutionConfigurationPlatforms) = preSolution\nDebug|Any CPU = Debug|Any CPU\n@@ -27,6 +29,10 @@ Global\n{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}.Debug|Any CPU.Build.0 = Debug|Any CPU\n{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}.Release|Any CPU.ActiveCfg = Release|Any CPU\n{A9609A35-B083-41A9-A0E8-AA1E2C4DA9A9}.Release|Any CPU.Build.0 = Release|Any CPU\n+ {10B653E3-4576-4F4C-A1F1-5A5CD2DE60FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n+ {10B653E3-4576-4F4C-A1F1-5A5CD2DE60FA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n+ {10B653E3-4576-4F4C-A1F1-5A5CD2DE60FA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n+ {10B653E3-4576-4F4C-A1F1-5A5CD2DE60FA}.Release|Any CPU.Build.0 = Release|Any CPU\nEndGlobalSection\nGlobalSection(SolutionProperties) = preSolution\nHideSolutionNode = FALSE\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Create test adapter to use with .NET Core apps
|
410,217 |
27.06.2018 12:58:04
| 25,200 |
6a0a6498abc7fa734600be3926259b18d43143c1
|
Implement changes for build.
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.settings",
"new_path": "Build/Common.Build.settings",
"diff": "</MSBuildAllProjects>\n</PropertyGroup>\n+ <PropertyGroup Condition=\"'$(TargetFramework)' == ''\">\n+ <TargetFrameworkVersion Condition=\"'$(TargetFrameworkVersion)' == ''\">v4.6.1</TargetFrameworkVersion>\n+ <TargetFrameworkMoniker>.NETFramework,Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>\n+ </PropertyGroup>\n<PropertyGroup>\n<Configuration Condition=\"'$(Configuration)' == ''\">Debug</Configuration>\n<VSTarget Condition=\"$(VSTarget)==''\">15.0</VSTarget>\n<BuildingInsideVisualStudio Condition=\"'$(BuildingInsideVisualStudio)' == ''\">false</BuildingInsideVisualStudio>\n- <TargetFrameworkVersion Condition=\"'$(TargetFrameworkVersion)' == ''\">v4.6.1</TargetFrameworkVersion>\n- <TargetFrameworkMoniker>.NETFramework,Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>\n-\n<VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>\n<BuildRoot Condition=\"'$(BuildRoot)' == ''\">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</BuildRoot>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Implement changes for build.
|
410,217 |
03.07.2018 10:52:14
| 25,200 |
862f6b737e25edf3f58049d98bb8d5c44492a714
|
Make TestFramework directory a variable for Nugetpackage use
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"new_path": "Nodejs/Product/Nodejs/TestFrameworks/TestFrameworkDirectories.cs",
"diff": "@@ -26,7 +26,6 @@ namespace Microsoft.NodejsTools.TestFrameworks\npublic static string[] GetFrameworkDirectories()\n{\n-\nvar testFrameworkRoot = GetTestframeworkFolderRoot();\nif (!Directory.Exists(testFrameworkRoot))\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -12,8 +12,9 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;\nusing Microsoft.VisualStudioTools;\n+#if !NETSTANDARD2_0\nusing MSBuild = Microsoft.Build.Evaluation;\n-\n+#endif\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n#if NETSTANDARD2_0\n@@ -22,15 +23,15 @@ namespace Microsoft.NodejsTools.TestAdapter\n[FileExtension(\".njsproj\"), FileExtension(\".csproj\"), FileExtension(\".vbproj\")]\n#endif\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\n- public partial class JavaScriptTestDiscoverer : ITestDiscoverer\n+ public partial class JavaScriptTestDiscoverer : IJavaScriptTestDiscoverer\n{\npublic void DiscoverTests(IEnumerable<string> sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\n-#if !NETSTANDARD2_0\n+#if NETSTANDARD2_0\n+ this.DiscoverTestsCoreNetStandard(sources, logger, discoverySink);\n+#else\nAssemblyResolver.SetupHandler();\nthis.DiscoverTestsCore(sources, discoveryContext, logger, discoverySink);\n-#else\n- this.DiscoverTestsCoreNetStandard(sources, logger, discoverySink);\n#endif\n}\n@@ -129,7 +130,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthrow;\n}\n}\n-#endif\n+#else\n/// <summary>\n/// ITestDiscover, Given a list of test sources this method pulls out the test cases\n@@ -259,7 +260,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.DiscoverTests(testItems, discoverySink, logger, nodeExePath, projectHome, projSource);\n}\n-\n+#endif\nprivate void DiscoverTests(Dictionary<string, HashSet<TestFileEntry>> testItems, ITestCaseDiscoverySink discoverySink, IMessageLogger logger, string nodeExePath, string projectHome, string projectFullPath)\n{\nif (!File.Exists(nodeExePath))\n@@ -320,4 +321,10 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n}\n+\n+\n+ public interface IJavaScriptTestDiscoverer : ITestDiscoverer\n+ {\n+ void DiscoverTests(UnitTestSettings testSettings, IMessageLogger logger, ITestCaseDiscoverySink discoverySink);\n+ }\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestExecutor.cs",
"diff": "using System.Collections.Generic;\nusing System.Linq;\n-using System.Xml;\nusing System.Xml.Linq;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;\n@@ -20,6 +19,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nAssemblyResolver.SetupHandler();\n#endif\nthis.Cancel();\n+\n+ var unitTestSettings = new UnitTestSettings(runContext.RunSettings);\n+\nthis.worker = new TestExecutorWorker(runContext, frameworkHandle);\nthis.worker.RunTests(tests);\n}\n@@ -29,7 +31,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n#if !NETSTANDARD2_0\nAssemblyResolver.SetupHandler();\n#endif\n- // If we have a source file specified in the runtContext we should use that.\n+ // If we have a source file specified in the runtContext we should use that, otherwise sources should've been set.\n// This happens in the case of .NET Core where the source is the output dll for the project,\n// so we set the projectfile for the current project in the props file we import.\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/PackageJsonTestDiscoverer.cs",
"diff": "@@ -14,7 +14,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\n[FileExtension(\".json\")]\n[DefaultExecutorUri(NodejsConstants.PackageJsonExecutorUriString)]\n- public sealed class PackageJsonTestDiscoverer : ITestDiscoverer\n+ public sealed class PackageJsonTestDiscoverer : IJavaScriptTestDiscoverer\n{\npublic void DiscoverTests(IEnumerable<string> sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\n@@ -29,6 +29,11 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n}\n+ public void DiscoverTests(UnitTestSettings unitTestSettings, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n+ {\n+\n+ }\n+\nprivate void DiscoverTestFiles(string packageJsonPath, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n{\nlogger.SendMessage(TestMessageLevel.Informational, $\"Parsing '{packageJsonPath}'.\");\n@@ -61,6 +66,14 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\ntestFx = testFx ?? FrameworkDiscoverer.Instance.Get(\"ExportRunner\");\n+ this.DiscoverTestFiles(testFolderPath, testFx, logger, discoverySink);\n+ }\n+\n+ private void DiscoverTestFiles(string testFolderPath, TestFramework testFx, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)\n+ {\n+ var workingDir = \".\";\n+ var packageJsonPath = \".\\\\package.json\";\n+\nvar nodeExePath = Nodejs.GetPathToNodeExecutableFromEnvironment();\nif (!File.Exists(nodeExePath))\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Compile Include=\"JavaScriptTestExecutor.cs\" />\n<Compile Include=\"JavaScriptTestDiscoverer.cs\" />\n<Compile Include=\"JavaScriptTestDiscoverer.TestFileEntry.cs\" />\n+ <Compile Include=\"TestDiscovererWorker.cs\" />\n<Compile Include=\"TestExecutorWorker.cs\" />\n<Compile Include=\"TestFrameworks\\FrameworkDiscoverer.cs\" />\n<Compile Include=\"JavaScriptTestCaseProperties.cs\" />\n<Compile Include=\"TestFrameworks\\NodejsTestInfo.cs\" />\n<Compile Include=\"TestFrameworks\\TestFramework.cs\" />\n<Compile Include=\"TestExecutorWorker.TestReceiver.cs\" />\n+ <Compile Include=\"UnitTestSettings.cs\" />\n</ItemGroup>\n<ItemGroup>\n<Reference Include=\"Microsoft.VisualStudio.TestPlatform.ObjectModel\">\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -62,7 +62,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.cancelRequested.Reset();\nvar receiver = new TestReceiver();\n- discoverer.DiscoverTests(sources, /*discoveryContext*/null, this.frameworkHandle, receiver);\n+ discoverer.DiscoverTests(sources, this.runContext, this.frameworkHandle, receiver);\nif (this.cancelRequested.WaitOne(0))\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -8,8 +8,9 @@ using Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.Shell.Interop;\n#endif\nusing Microsoft.VisualStudioTools;\n+#if !NETSTANDARD2_0\nusing MSBuild = Microsoft.Build.Evaluation;\n-\n+#endif\nnamespace Microsoft.NodejsTools.TypeScript\n{\ninternal static class TypeScriptHelpers\n@@ -28,13 +29,13 @@ namespace Microsoft.NodejsTools.TypeScript\nreturn StringComparer.OrdinalIgnoreCase.Equals(fileName, NodejsConstants.TsConfigJsonFile) ||\nStringComparer.OrdinalIgnoreCase.Equals(fileName, NodejsConstants.JsConfigJsonFile);\n}\n-\n+#if !NETSTANDARD2_0\ninternal static string GetTypeScriptBackedJavaScriptFile(MSBuild.Project project, string pathToFile)\n{\nvar typeScriptOutDir = project.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir);\nreturn GetTypeScriptBackedJavaScriptFile(project.DirectoryPath, typeScriptOutDir, pathToFile);\n}\n-\n+#endif\ninternal static string GetTypeScriptBackedJavaScriptFile(string projectHome, string typeScriptOutDir, string pathToFile)\n{\nvar jsFilePath = Path.ChangeExtension(pathToFile, NodejsConstants.JavaScriptExtension);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make TestFramework directory a variable for Nugetpackage use
|
410,217 |
03.07.2018 15:17:31
| 25,200 |
a7db42da7a425956066dc21ae45cefbcc3b2fdf4
|
Fix location for dev16
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"new_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"diff": "<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n<IncludeInVSIX>true</IncludeInVSIX>\n<InstallRoot>MSBuild</InstallRoot>\n- <VSIXSubPath>Microsoft\\VisualStudio\\v15.0\\Node.js Tools</VSIXSubPath>\n+ <VSIXSubPath>Microsoft\\VisualStudio\\v16.0\\Node.js Tools</VSIXSubPath>\n</Content>\n<None Include=\"source.extension.vsixmanifest\">\n<SubType>Designer</SubType>\n<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>\n<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>\n<InstallRoot>MSBuild</InstallRoot>\n- <VSIXSubPath>Microsoft\\VisualStudio\\v15.0\\Node.js Tools</VSIXSubPath>\n+ <VSIXSubPath>Microsoft\\VisualStudio\\v16.0\\Node.js Tools</VSIXSubPath>\n<Private>True</Private>\n</ProjectReference>\n</ItemGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix location for dev16
|
410,217 |
06.07.2018 15:19:35
| 25,200 |
6294b5d3f38364692a3d522ac780fad6ef98e992
|
target release
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Nuget/Microsoft.UnitTest.JavaScript.nuspec",
"new_path": "Nodejs/Nuget/Microsoft.UnitTest.JavaScript.nuspec",
"diff": "<package xmlns=\"http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd\">\n<metadata>\n<id>Microsoft.UnitTest.JavaScript</id>\n+ <!-- build updates the version -->\n<version>0.0.0</version>\n<title>Microsoft.UnitTest.JavaScript</title>\n<authors>Microsoft</authors>\n</metadata>\n<files>\n<!-- unit test framework specific and shared js files -->\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapter\\TestFrameworks\\*.js\" target=\"build\\_common\\TestFrameworks\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapter\\TestFrameworks\\ExportRunner\\ExportRunner.js\" target=\"build\\_common\\TestFrameworks\\ExportRunner\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapter\\TestFrameworks\\Jasmine\\Jasmine.js\" target=\"build\\_common\\TestFrameworks\\Jasmine\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapter\\TestFrameworks\\Mocha\\Mocha.js\" target=\"build\\_common\\TestFrameworks\\Mocha\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapter\\TestFrameworks\\Tape\\Tape.js\" target=\"build\\_common\\TestFrameworks\\Tape\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapter\\TestFrameworks\\*.js\" target=\"build\\_common\\TestFrameworks\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapter\\TestFrameworks\\ExportRunner\\ExportRunner.js\" target=\"build\\_common\\TestFrameworks\\ExportRunner\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapter\\TestFrameworks\\Jasmine\\Jasmine.js\" target=\"build\\_common\\TestFrameworks\\Jasmine\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapter\\TestFrameworks\\Mocha\\Mocha.js\" target=\"build\\_common\\TestFrameworks\\Mocha\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapter\\TestFrameworks\\Tape\\Tape.js\" target=\"build\\_common\\TestFrameworks\\Tape\\\" />\n<!-- net standard library -->\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapterNetStandard\\Microsoft.UnitTest.JavaScript.props\" target=\"build\\netstandard2.0\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapterNetStandard\\Microsoft.UnitTest.JavaScript.targets\" target=\"build\\netstandard2.0\\\" />\n- <file src=\"..\\..\\BuildOutput\\Debug\\Binaries\\TestAdapterNetStandard\\Microsoft.JavaScript.TestAdapter.dll\" target=\"build\\netstandard2.0\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapterNetStandard\\Microsoft.UnitTest.JavaScript.props\" target=\"build\\netstandard2.0\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapterNetStandard\\Microsoft.UnitTest.JavaScript.targets\" target=\"build\\netstandard2.0\\\" />\n+ <file src=\"..\\..\\BuildOutput\\Release\\Binaries\\TestAdapterNetStandard\\Microsoft.JavaScript.TestAdapter.dll\" target=\"build\\netstandard2.0\\\" />\n</files>\n</package>\n\\ No newline at end of file\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
target release
|
410,217 |
11.07.2018 14:59:59
| 25,200 |
7cda86a29494fbf5e50aa341fa5147567bfe68e0
|
Ensure SVsBuildManagerAccessor is initialize at the creation of the project
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -680,8 +680,8 @@ namespace Microsoft.VisualStudioTools.Project\nprotected ProjectNode(IServiceProvider serviceProvider)\n{\nthis.extensibilityEventsDispatcher = new ExtensibilityEventsDispatcher(this);\n- this.Initialize();\nthis.site = serviceProvider;\n+ this.Initialize();\nthis.taskProvider = new TaskProvider(this.site);\n}\n@@ -5686,6 +5686,9 @@ If the files in the existing folder have the same names as files in the folder y\n{\nthis.ID = VSConstants.VSITEMID_ROOT;\nthis.tracker = new TrackDocumentsHelper(this);\n+\n+ var accessor = (IVsBuildManagerAccessor)this.Site.GetService(typeof(SVsBuildManagerAccessor));\n+ Utilities.CheckNotNull(accessor);\n}\n/// <summary>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Ensure SVsBuildManagerAccessor is initialize at the creation of the project
|
410,217 |
11.07.2018 17:03:50
| 25,200 |
308871df05a7a78a517510ef70de22b3868e1ca9
|
Fix build of vsmanproj
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.targets",
"new_path": "Build/Common.Build.targets",
"diff": "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n<Import Project=\"Common.Build.CSharp.targets\" Condition=\"'$(Language)' == 'C#'\" />\n- <Import Project=\"Common.Build.VSSDK.targets\" Condition=\"$(UseVSSDK) or $(UseVSSDKTemplateOnly)\" />\n+ <Import Project=\"Common.Build.VSSDK.targets\" Condition=\"'$(UseVSSDK)'=='true' or '$(UseVSSDKTemplateOnly)'=='true'\" />\n<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" Condition=\"'$(Language)' == 'C++'\" />\n<Import Project=\"fileVersion.targets\" Condition=\"'$(Language)' == 'C#'\" />\n<Target Name=\"_CopyOutputsToPath\"\nAfterTargets=\"AfterBuild\"\nDependsOnTargets=\"BuiltProjectOutputGroup;SatelliteDllsProjectOutputGroup;DebugSymbolsFinalOutputProjectOutputGroup\"\n- Condition=\"'$(CopyOutputsToPath)' != '' and $(MSBuildProjectExtension) != '.wixproj' and Exists($(TargetPath))\">\n+ Condition=\"'$(CopyOutputsToPath)' != '' and $(MSBuildProjectExtension) != '.vsmanproj' and Exists($(TargetPath))\">\n<PropertyGroup>\n<CopyOutputsToPath Condition=\"!HasTrailingSlash($(CopyOutputsToPath))\">$(CopyOutputsToPath)\\</CopyOutputsToPath>\n</PropertyGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"new_path": "Nodejs/Setup/NodejsTools.vsmanproj",
"diff": "<ProjectGuid>{D9BADB3D-B6E9-4A54-8196-9374CFB93DA9}</ProjectGuid>\n<NuGetPackageImportStamp>\n</NuGetPackageImportStamp>\n+ <UseVSSDK>false</UseVSSDK>\n+ <Language>xml</Language>\n</PropertyGroup>\n<PropertyGroup Condition=\"$(Configuration) == 'Release' \" />\n<PropertyGroup Condition=\"$(Configuration) == 'Debug' \" />\n<Target Name=\"Clean\" />\n<Target Name=\"ReBuild\" />\n<Target Name=\"BuiltProjectOutputGroup\" />\n+ <Target Name=\"BuiltProjectOutputGroupDependencies\" />\n+ <Target Name=\"DebugSymbolsProjectOutputGroup\" />\n+ <Target Name=\"DebugSymbolsProjectOutputGroupDependencies\" />\n+ <Target Name=\"DocumentationProjectOutputGroup\" />\n+ <Target Name=\"DocumentationProjectOutputGroupDependencies\" />\n+ <Target Name=\"SGenFilesOutputGroup\" />\n+ <Target Name=\"SGenFilesOutputGroupDependencies\" />\n+ <Target Name=\"SatelliteDllsProjectOutputGroup\" />\n+ <Target Name=\"SatelliteDllsProjectOutputGroupDependencies\" />\n<Import Project=\".\\SetupProjectAfter.settings\" />\n<Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n<PropertyGroup>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix build of vsmanproj
|
410,217 |
12.07.2018 13:38:41
| 25,200 |
da50fd228e829027f02d7145bfda962e892bbee9
|
Use build-in pack option to create NuGet package.
|
[
{
"change_type": "MODIFY",
"old_path": "Build/Common.Build.settings",
"new_path": "Build/Common.Build.settings",
"diff": "<TargetsPath>$(BuildRoot)Build</TargetsPath>\n<PackagesPath Condition=\"'$(PackagesPath)' == ''\">$(BUILD_BINARIESDIRECTORY)</PackagesPath>\n- <PackagesPath Condition=\"'$(PackagesPath)' == ''\">$(BuildRoot)\\packages\\</PackagesPath>\n+ <PackagesPath Condition=\"'$(PackagesPath)' == ''\">$(BuildRoot)packages\\</PackagesPath>\n<PackagesPath Condition=\"!HasTrailingSlash($(PackagesPath))\">$(PackagesPath)\\</PackagesPath>\n<!-- BuildOutputRoot contains all build files.\nRather than customizing OutputPath or IntermediateOutputPath in projects,\n$(OutputPathSuffix) and $(IntermediateOutputPathSuffix) should be set.\n-->\n- <BuildOutputRoot Condition=\"'$(BuildOutputRoot)' == ''\">$(BuildRoot)\\BuildOutput\\$(Configuration)\\</BuildOutputRoot>\n+ <BuildOutputRoot Condition=\"'$(BuildOutputRoot)' == ''\">$(BuildRoot)BuildOutput\\$(Configuration)\\</BuildOutputRoot>\n<BuildOutputRoot Condition=\"!HasTrailingSlash($(BuildOutputRoot))\">$(BuildOutputRoot)\\</BuildOutputRoot>\n<OutputPathSuffix Condition=\"'$(OutputPathSuffix)' != '' and !HasTrailingSlash($(OutputPathSuffix))\">$(OutputPathSuffix)\\</OutputPathSuffix>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterNetStandard/TestAdapterNetStandard.csproj",
"new_path": "Nodejs/Product/TestAdapterNetStandard/TestAdapterNetStandard.csproj",
"diff": "<TargetFramework>netstandard2.0</TargetFramework>\n<AssemblyName>Microsoft.JavaScript.TestAdapter</AssemblyName>\n<RootNamespace>Microsoft.NodejsTools.TestAdapter</RootNamespace>\n- <GeneratePackageOnBuild>false</GeneratePackageOnBuild>\n+ <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\n+ <NuspecFile>Microsoft.UnitTest.JavaScript.nuspec</NuspecFile>\n<!--\nDisable default assemblyinfo generation and replace with custom from\nfileversion.targets imported below\n<Compile Include=\"..\\TypeScript\\TypeScriptHelpers.cs\" Link=\"TypeScriptHelpers.cs\" />\n</ItemGroup>\n+ <ItemGroup>\n+ <Content Include=\"Microsoft.UnitTest.JavaScript.targets\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"Microsoft.UnitTest.JavaScript.props\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\find_tests.js\" Link=\"TestFrameworks\\find_tests.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\run_tests.js\" Link=\"TestFrameworks\\run_tests.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\ExportRunner\\ExportRunner.js\" Link=\"TestFrameworks\\ExportRunner\\ExportRunner.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\Jasmine\\jasmine.js\" Link=\"TestFrameworks\\Jasmine\\jasmine.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\Mocha\\mocha.js\" Link=\"TestFrameworks\\Mocha\\mocha.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ <Content Include=\"..\\TestAdapter\\TestFrameworks\\Tape\\tape.js\" Link=\"TestFrameworks\\Tape\\tape.js\">\n+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n+ </Content>\n+ </ItemGroup>\n+\n<ItemGroup>\n<PackageReference Include=\"MicroBuild.Core\" Version=\"0.3.0\">\n<PrivateAssets>all</PrivateAssets>\n</ItemGroup>\n<ItemGroup>\n- <Folder Include=\"TestFrameworks\\\" />\n<Folder Include=\"SourceMapping\\\" />\n</ItemGroup>\n</FilesToSign>\n</ItemGroup>\n- <ItemGroup>\n- <Content Include=\"Microsoft.UnitTest.JavaScript.targets\">\n- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n- </Content>\n- <Content Include=\"Microsoft.UnitTest.JavaScript.props\">\n- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n- </Content>\n- </ItemGroup>\n<Import Project=\"Sdk.targets\" Sdk=\"Microsoft.NET.Sdk\" />\n<Import Project=\"..\\ProjectAfter.targets\" />\n+\n+ <Target Name=\"SetNuspecProperties\" BeforeTargets=\"GenerateNuspec\">\n+ <PropertyGroup>\n+ <NuspecProperties>$(NuspecProperties);version=$(VSIXBuildVersion)</NuspecProperties>\n+ <NuspecProperties>$(NuspecProperties);outDir=$(OutDir)</NuspecProperties>\n+ </PropertyGroup>\n+ </Target>\n+\n</Project>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Use build-in pack option to create NuGet package.
|
410,217 |
13.07.2018 15:07:40
| 25,200 |
f10090e13e9c8ad8b1180f3f86753565f2fa414c
|
And more feedback
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -2617,7 +2617,6 @@ namespace Microsoft.VisualStudioTools.Project\nvar result = MSBuildResult.Failed;\nconst bool designTime = true;\n- var accessor = this.Site.GetService(typeof(SVsBuildManagerAccessor)) as IVsBuildManagerAccessor;\nBuildSubmission submission = null;\ntry\n@@ -2640,9 +2639,9 @@ namespace Microsoft.VisualStudioTools.Project\nvar requestData = new BuildRequestData(this.currentConfig, targetsToBuild, this.BuildProject.ProjectCollection.HostServices, BuildRequestDataFlags.ReplaceExistingProjectInstance);\nsubmission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData);\n- if (accessor != null)\n+ if (this.buildManagerAccessor != null)\n{\n- ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n+ ErrorHandler.ThrowOnFailure(buildManagerAccessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n}\nvar buildResult = submission.Execute();\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
And more feedback
|
410,217 |
16.07.2018 14:48:44
| 25,200 |
daf1f3931d0af73e0cc786e845f49382f83bc46a
|
Make sure we use a valid value for the storage we're targeting.
See:
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -62,7 +62,7 @@ namespace Microsoft.NodejsTools.TypeScript\n{\n//Need to deal with the format being relative and explicit\nvar props = (IVsBuildPropertyStorage)project;\n- ErrorHandler.ThrowOnFailure(props.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir, null, 0, out var outDir));\n+ ErrorHandler.ThrowOnFailure(props.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir, null, (uint)_PersistStorageType.PST_PROJECT_FILE, out var outDir));\nvar projHome = GetProjectHome(project);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make sure we use a valid value for the storage we're targeting.
See:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.interop._persiststoragetype?view=visualstudiosdk-2017
|
410,217 |
17.07.2018 15:43:40
| 25,200 |
8d4e60a1232ae80b24d40391a376cd6023bc861a
|
Fix reporting for tape.js
Since tape doesn't report results in order for the first and last test
we have to keep a list of tests and handle them as their results become
available.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"new_path": "Nodejs/Product/TestAdapter/TestExecutorWorker.cs",
"diff": "@@ -19,6 +19,12 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\ninternal sealed partial class TestExecutorWorker\n{\n+ private class TestCaseResult\n+ {\n+ public TestCase TestCase;\n+ public TestResult TestResult;\n+ }\n+\nprivate static readonly Version Node8Version = new Version(8, 0);\n//get from NodeRemoteDebugPortSupplier::PortSupplierId\n@@ -29,9 +35,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nprivate readonly IFrameworkHandle frameworkHandle;\nprivate readonly IRunContext runContext;\n- private List<TestCase> currentTests;\n+ private List<TestCaseResult> currentTests;\nprivate ProcessOutput nodeProcess;\n- private TestResult currentResult;\nprivate ResultObject currentResultObject;\npublic TestExecutorWorker(IRunContext runContext, IFrameworkHandle frameworkHandle)\n@@ -44,7 +49,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\n//let us just kill the node process there, rather do it late, because VS engine process\n//could exit right after this call and our node process will be left running.\n- KillNodeProcess();\n+ this.KillNodeProcess();\nthis.cancelRequested.Set();\n}\n@@ -81,16 +86,16 @@ namespace Microsoft.NodejsTools.TestAdapter\nValidateArg.NotNull(tests, nameof(tests));\n// .ts file path -> project settings\n- var fileToTests = new Dictionary<string, List<TestCase>>();\n+ var fileToTests = new Dictionary<string, List<TestCaseResult>>();\n// put tests into dictionary where key is their source file\nforeach (var test in tests)\n{\nif (!fileToTests.ContainsKey(test.CodeFilePath))\n{\n- fileToTests[test.CodeFilePath] = new List<TestCase>();\n+ fileToTests[test.CodeFilePath] = new List<TestCaseResult>();\n}\n- fileToTests[test.CodeFilePath].Add(test);\n+ fileToTests[test.CodeFilePath].Add(new TestCaseResult() { TestCase = test });\n}\n// where key is the file and value is a list of tests\n@@ -99,15 +104,14 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.currentTests = testcaseList;\n// Run all test cases in a given file\n- RunTestCases(testcaseList);\n+ this.RunTestCases(testcaseList);\n}\n}\n- private void RunTestCases(IEnumerable<TestCase> tests)\n+ private void RunTestCases(IEnumerable<TestCaseResult> tests)\n{\n// May be null, but this is handled by RunTestCase if it matters.\n- // No VS instance just means no debugging, but everything else is\n- // okay.\n+ // No VS instance just means no debugging, but everything else is okay.\nif (!tests.Any())\n{\nreturn;\n@@ -120,7 +124,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nvar testObjects = new List<TestCaseObject>();\n// All tests being run are for the same test file, so just use the first test listed to get the working dir\n- var firstTest = tests.First();\n+ var firstTest = tests.First().TestCase;\nvar testFramework = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.TestFramework, defaultValue: \"ExportRunner\");\nvar workingDir = firstTest.GetPropertyValue(JavaScriptTestCaseProperties.WorkingDir, defaultValue: Path.GetDirectoryName(firstTest.CodeFilePath));\nvar nodeExePath = firstTest.GetPropertyValue<string>(JavaScriptTestCaseProperties.NodeExePath, defaultValue: null);\n@@ -142,7 +146,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nbreak;\n}\n- var args = GetInterpreterArgs(test, workingDir, projectRootDir);\n+ var args = GetInterpreterArgs(test.TestCase, workingDir, projectRootDir);\n// Fetch the run_tests argument for starting node.exe if not specified yet\nif (nodeArgs.Count == 0)\n@@ -195,7 +199,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n// Automatically fail tests that haven't been run by this point (failures in before() hooks)\nforeach (var notRunTest in this.currentTests)\n{\n- var result = new TestResult(notRunTest)\n+ var result = new TestResult(notRunTest.TestCase)\n{\nOutcome = TestOutcome.Failed\n};\n@@ -206,7 +210,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nresult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, this.currentResultObject.stderr));\n}\nthis.frameworkHandle.RecordResult(result);\n- this.frameworkHandle.RecordEnd(notRunTest, TestOutcome.Failed);\n+ this.frameworkHandle.RecordEnd(notRunTest.TestCase, TestOutcome.Failed);\n}\n}\n@@ -216,30 +220,27 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nvar testEvent = JsonConvert.DeserializeObject<TestEvent>(line);\n// Extract test from list of tests\n- var tests = this.currentTests.Where(n => n.DisplayName == testEvent.title);\n- if (tests.Any())\n+ var test = this.currentTests\n+ .Where(n => n.TestCase.DisplayName == testEvent.title)\n+ .FirstOrDefault();\n+\n+ if (test != null)\n{\nswitch (testEvent.type)\n{\ncase \"test start\":\n- {\n- this.currentResult = new TestResult(tests.First())\n+ test.TestResult = new TestResult(test.TestCase)\n{\nStartTime = DateTimeOffset.Now\n};\n- this.frameworkHandle.RecordStart(tests.First());\n- }\n+ this.frameworkHandle.RecordStart(test.TestCase);\nbreak;\ncase \"result\":\n- {\n- RecordEnd(tests.First(), testEvent.result);\n- }\n+ RecordEnd(test, testEvent.result);\nbreak;\ncase \"pending\":\n- {\n- this.currentResult = new TestResult(tests.First());\n- RecordEnd(tests.First(), testEvent.result);\n- }\n+ test.TestResult = new TestResult(test.TestCase);\n+ RecordEnd(test, testEvent.result);\nbreak;\n}\n}\n@@ -254,29 +255,29 @@ namespace Microsoft.NodejsTools.TestAdapter\n// Often lines emitted while running tests are not test results, and thus will fail to parse above\n}\n- void RecordEnd(TestCase test, ResultObject resultObject)\n+ void RecordEnd(TestCaseResult test, ResultObject resultObject)\n{\nvar standardOutputLines = resultObject.stdout.Split('\\n');\nvar standardErrorLines = resultObject.stderr.Split('\\n');\nif (resultObject.pending == true)\n{\n- this.currentResult.Outcome = TestOutcome.Skipped;\n+ test.TestResult.Outcome = TestOutcome.Skipped;\n}\nelse\n{\n- this.currentResult.EndTime = DateTimeOffset.Now;\n- this.currentResult.Duration = this.currentResult.EndTime - this.currentResult.StartTime;\n- this.currentResult.Outcome = resultObject.passed ? TestOutcome.Passed : TestOutcome.Failed;\n+ test.TestResult.EndTime = DateTimeOffset.Now;\n+ test.TestResult.Duration = test.TestResult.EndTime - test.TestResult.StartTime;\n+ test.TestResult.Outcome = resultObject.passed ? TestOutcome.Passed : TestOutcome.Failed;\n}\nvar errorMessage = string.Join(Environment.NewLine, standardErrorLines);\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, string.Join(Environment.NewLine, standardOutputLines)));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, errorMessage));\n- this.currentResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, errorMessage));\n- this.frameworkHandle.RecordResult(this.currentResult);\n- this.frameworkHandle.RecordEnd(test, this.currentResult.Outcome);\n+ test.TestResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, string.Join(Environment.NewLine, standardOutputLines)));\n+ test.TestResult.Messages.Add(new TestResultMessage(TestResultMessage.StandardErrorCategory, errorMessage));\n+ test.TestResult.Messages.Add(new TestResultMessage(TestResultMessage.AdditionalInfoCategory, errorMessage));\n+ this.frameworkHandle.RecordResult(test.TestResult);\n+ this.frameworkHandle.RecordEnd(test.TestCase, test.TestResult.Outcome);\nthis.currentTests.Remove(test);\n}\n}\n@@ -320,14 +321,14 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nthis.frameworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\nthis.frameworkHandle.SendMessage(TestMessageLevel.Error, ex.ToString());\n- KillNodeProcess();\n+ this.KillNodeProcess();\n}\n#else\n}\ncatch (COMException)\n{\n- frameworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\n- KillNodeProcess();\n+ this.frameworkHandle.SendMessage(TestMessageLevel.Error, \"Error occurred connecting to debuggee.\");\n+ this.KillNodeProcess();\n}\n#endif\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/Tape/tape.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/Tape/tape.js",
"diff": "var EOL = require('os').EOL;\nvar fs = require('fs');\nvar path = require('path');\n-var result = {\n- 'title': '',\n- 'passed': false,\n- 'stdOut': '',\n- 'stdErr': ''\n-};\nfunction append_stdout(string, encoding, fd) {\nresult.stdOut += string;\n@@ -57,19 +51,25 @@ function run_tests(testInfo, callback) {\nreturn;\n}\n+ // Since the test events don't come in order we store all of them in this array\n+ // in the 'onFinish' event we loop through them and process anything remaining.\n+ var testState = [];\nvar harness = tape.getHarness({ objectMode: true });\n- var capture = false; // Only capture between 'test' and 'end' events to avoid skipped test events.\n+\nharness.createStream({ objectMode: true }).on('data', function (evt) {\nswitch (evt.type) {\ncase 'test':\n- capture = true;\n- // Test is starting. Reset the result object. Send a \"test start\" event.\n- result = {\n+\n+ var result = {\n'title': evt.name,\n- 'passed': true,\n+ 'passed': undefined,\n'stdOut': '',\n'stdErr': ''\n};\n+\n+ testState[evt.id] = result;\n+\n+ // Test is starting. Reset the result object. Send a \"test start\" event.\ncallback({\n'type': 'test start',\n'title': result.title,\n@@ -77,25 +77,29 @@ function run_tests(testInfo, callback) {\n});\nbreak;\ncase 'assert':\n- if (!capture) break;\n+ var result = testState[evt.test];\n+ if (!result) { break; }\n+\n// Correlate the success/failure asserts for this test. There may be multiple per test\n- var msg = \"Operator: \" + evt.operator + \". Expected: \" + evt.expected + \". Actual: \" + evt.actual + \"\\n\";\n+ var msg = \"Operator: \" + evt.operator + \". Expected: \" + evt.expected + \". Actual: \" + evt.actual + \". evt: \" + JSON.stringify(evt) + \"\\n\";\nif (evt.ok) {\nresult.stdOut += msg;\n+ result.passed = true;\n} else {\nresult.stdErr += msg + (evt.error.stack || evt.error.message) + \"\\n\";\nresult.passed = false;\n}\nbreak;\ncase 'end':\n- if (!capture) break;\n+ var result = testState[evt.test];\n+ if (!result) { break; }\n// Test is done. Send a \"result\" event.\ncallback({\n'type': 'result',\n'title': result.title,\n'result': result\n});\n- capture = false;\n+ testState[evt.test] = undefined;\nbreak;\ndefault:\nbreak;\n@@ -112,15 +116,18 @@ function run_tests(testInfo, callback) {\n});\nharness.onFinish(function () {\n- if (capture) {\n- // Something didn't finish. Finish it now.\n- result.passed = false;\n+ // loop through items in testState\n+ for (var i = 0; i < testState.length; i++) {\n+ if (testState[i]) {\n+ var result = testState[i];\n+ if (result.passed == undefined) { result.passed = false; }\ncallback({\n'type': 'result',\n'title': result.title,\n'result': result\n});\n}\n+ }\nprocess.exit(0);\n});\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix reporting for tape.js
Since tape doesn't report results in order for the first and last test
we have to keep a list of tests and handle them as their results become
available.
|
410,217 |
17.07.2018 16:35:39
| 25,200 |
dd74f4e7d1fc56a26efeea3275a7f462aa2ed437
|
Sync
* Ensure SVsBuildManagerAccessor is initialize at the creation of the project
* Add comment
* PR feedback
* More feedback
* And more feedback
* Make sure we use a valid value for the storage we're targeting.
See:
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -259,6 +259,8 @@ namespace Microsoft.VisualStudioTools.Project\nprivate List<HierarchyNode> itemsDraggedOrCutOrCopied;\nprivate readonly ExtensibilityEventsDispatcher extensibilityEventsDispatcher;\n+ private IVsBuildManagerAccessor buildManagerAccessor;\n+\n#endregion\n#region abstract properties\n@@ -680,8 +682,8 @@ namespace Microsoft.VisualStudioTools.Project\nprotected ProjectNode(IServiceProvider serviceProvider)\n{\nthis.extensibilityEventsDispatcher = new ExtensibilityEventsDispatcher(this);\n- this.Initialize();\nthis.site = serviceProvider;\n+ this.Initialize();\nthis.taskProvider = new TaskProvider(this.site);\n}\n@@ -2615,7 +2617,6 @@ namespace Microsoft.VisualStudioTools.Project\nvar result = MSBuildResult.Failed;\nconst bool designTime = true;\n- var accessor = this.Site.GetService(typeof(SVsBuildManagerAccessor)) as IVsBuildManagerAccessor;\nBuildSubmission submission = null;\ntry\n@@ -2638,9 +2639,9 @@ namespace Microsoft.VisualStudioTools.Project\nvar requestData = new BuildRequestData(this.currentConfig, targetsToBuild, this.BuildProject.ProjectCollection.HostServices, BuildRequestDataFlags.ReplaceExistingProjectInstance);\nsubmission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData);\n- if (accessor != null)\n+ if (this.buildManagerAccessor != null)\n{\n- ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n+ ErrorHandler.ThrowOnFailure(buildManagerAccessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n}\nvar buildResult = submission.Execute();\n@@ -2667,9 +2668,6 @@ namespace Microsoft.VisualStudioTools.Project\n{\nconst bool designTime = false;\n- var accessor = (IVsBuildManagerAccessor)this.Site.GetService(typeof(SVsBuildManagerAccessor));\n- Utilities.CheckNotNull(accessor);\n-\nif (!TryBeginBuild(designTime, false))\n{\nif (uiThreadCallback != null)\n@@ -2699,7 +2697,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (this.BuildLogger != null)\n{\n- ErrorHandler.ThrowOnFailure(accessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n+ ErrorHandler.ThrowOnFailure(this.buildManagerAccessor.RegisterLogger(submission.SubmissionId, this.BuildLogger));\n}\nsubmission.ExecuteAsync(sub =>\n@@ -5686,6 +5684,11 @@ If the files in the existing folder have the same names as files in the folder y\n{\nthis.ID = VSConstants.VSITEMID_ROOT;\nthis.tracker = new TrackDocumentsHelper(this);\n+\n+ // Ensure the SVsBuildManagerAccessor is initialized, so there is an IVsUpdateSolutionEvents4 for\n+ // solution update events (through Microsoft.VisualStudio.CommonIDE.BuildManager.BuildManagerAccessor).\n+ // This ensures that the first build after project creation succeeds.\n+ this.buildManagerAccessor = (IVsBuildManagerAccessor)this.Site.GetService(typeof(SVsBuildManagerAccessor));\n}\n/// <summary>\n@@ -6018,23 +6021,16 @@ If the files in the existing folder have the same names as files in the folder y\n/// </remarks>\nprivate bool TryBeginBuild(bool designTime, bool requiresUIThread = false)\n{\n- IVsBuildManagerAccessor accessor = null;\n-\n- if (this.Site != null)\n- {\n- accessor = this.Site.GetService(typeof(SVsBuildManagerAccessor)) as IVsBuildManagerAccessor;\n- }\n-\nvar releaseUIThread = false;\ntry\n{\n// If the SVsBuildManagerAccessor service is absent, we're not running within Visual Studio.\n- if (accessor != null)\n+ if (this.buildManagerAccessor != null)\n{\nif (requiresUIThread)\n{\n- var result = accessor.ClaimUIThreadForBuild();\n+ var result = this.buildManagerAccessor.ClaimUIThreadForBuild();\nif (result < 0)\n{\n// Not allowed to claim the UI thread right now. Try again later.\n@@ -6046,7 +6042,7 @@ If the files in the existing folder have the same names as files in the folder y\nif (designTime)\n{\n- var result = accessor.BeginDesignTimeBuild();\n+ var result = this.buildManagerAccessor.BeginDesignTimeBuild();\nif (result < 0)\n{\n// Not allowed to begin a design-time build at this time. Try again later.\n@@ -6072,8 +6068,8 @@ If the files in the existing folder have the same names as files in the folder y\n// we need to release the UI thread.\nif (releaseUIThread)\n{\n- Debug.Assert(accessor != null, \"We think we need to release the UI thread for an accessor we don't have!\");\n- accessor.ReleaseUIThreadForBuild();\n+ Debug.Assert(this.buildManagerAccessor != null, \"We think we need to release the UI thread for an accessor we don't have!\");\n+ this.buildManagerAccessor.ReleaseUIThreadForBuild();\n}\n}\n}\n@@ -6089,21 +6085,14 @@ If the files in the existing folder have the same names as files in the folder y\n/// </remarks>\nprivate void EndBuild(BuildSubmission submission, bool designTime, bool requiresUIThread = false)\n{\n- IVsBuildManagerAccessor accessor = null;\n-\n- if (this.Site != null)\n- {\n- accessor = this.Site.GetService(typeof(SVsBuildManagerAccessor)) as IVsBuildManagerAccessor;\n- }\n-\n- if (accessor != null)\n+ if (this.buildManagerAccessor != null)\n{\n// It's very important that we try executing all three end-build steps, even if errors occur partway through.\ntry\n{\nif (submission != null)\n{\n- Marshal.ThrowExceptionForHR(accessor.UnregisterLoggers(submission.SubmissionId));\n+ Marshal.ThrowExceptionForHR(this.buildManagerAccessor.UnregisterLoggers(submission.SubmissionId));\n}\n}\ncatch (Exception ex) when (!ExceptionExtensions.IsCriticalException(ex))\n@@ -6115,7 +6104,7 @@ If the files in the existing folder have the same names as files in the folder y\n{\nif (designTime)\n{\n- Marshal.ThrowExceptionForHR(accessor.EndDesignTimeBuild());\n+ Marshal.ThrowExceptionForHR(this.buildManagerAccessor.EndDesignTimeBuild());\n}\n}\ncatch (Exception ex) when (!ExceptionExtensions.IsCriticalException(ex))\n@@ -6127,7 +6116,7 @@ If the files in the existing folder have the same names as files in the folder y\n{\nif (requiresUIThread)\n{\n- Marshal.ThrowExceptionForHR(accessor.ReleaseUIThreadForBuild());\n+ Marshal.ThrowExceptionForHR(this.buildManagerAccessor.ReleaseUIThreadForBuild());\n}\n}\ncatch (Exception ex) when (!ExceptionExtensions.IsCriticalException(ex))\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -62,7 +62,7 @@ namespace Microsoft.NodejsTools.TypeScript\n{\n//Need to deal with the format being relative and explicit\nvar props = (IVsBuildPropertyStorage)project;\n- ErrorHandler.ThrowOnFailure(props.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir, null, 0, out var outDir));\n+ ErrorHandler.ThrowOnFailure(props.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir, null, (uint)_PersistStorageType.PST_PROJECT_FILE, out var outDir));\nvar projHome = GetProjectHome(project);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Sync (#2007)
* Ensure SVsBuildManagerAccessor is initialize at the creation of the project
* Add comment
* PR feedback
* More feedback
* And more feedback
* Make sure we use a valid value for the storage we're targeting.
See:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.interop._persiststoragetype?view=visualstudiosdk-2017
|
410,202 |
03.07.2018 14:21:08
| 25,200 |
f6a5c0dfde674bb1dc123cc2a82bbef4a8036bd7
|
Added jest test framework
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Content Include=\"TestFrameworks\\Jasmine\\jasmine.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n+ <Content Include=\"TestFrameworks\\Jest\\jest.js\">\n+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n+ </Content>\n<Content Include=\"TestFrameworks\\mocha\\mocha.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added jest test framework
|
410,202 |
03.07.2018 17:10:54
| 25,200 |
3c7e117d16828716f73d120b276519f5a8578a2b
|
Improved support for running tests in parallel
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jest/jest.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jest/jest.js",
"diff": "@@ -59,27 +59,26 @@ const run_tests = function (testCases, post) {\nlocalJestMajorVersion: 23 // TODO: Get the jest version from the package.\n};\n- // Promise chain to make it process the test cases one by one.\n- testCases.reduce((promise, testCase) => {\n- return promise.then(() => {\n- return runTest(testCase, post);\n- });\n- }, Promise.resolve())\n+ runTest(testCases)\n.then(() => post({\ntype: 'suite end',\nresult: {}\n- }));\n+ }))\n+ .catch((error) => logError(error));\n- function runTest(testCase, post) {\n+ function runTest(testCases) {\nreturn new Promise((resolve, reject) => {\n+\n+ // Start all test cases. Jest doesn't report when each test start, only reports the whole file.\n+ for (const testCase of testCases) {\npost({\ntype: 'test start',\ntitle: testCase.testName\n});\n+ }\nconst runner = new jestEditorSupport.Runner(workspace, {\n- testFileNamePattern: escapeRegExp(testCase.testFile),\n- testNamePattern: escapeRegExp(testCase.testName)\n+ testFileNamePattern: escapeRegExp(testCases[0].testFile)\n});\nrunner\n@@ -96,28 +95,24 @@ const run_tests = function (testCases, post) {\nconst parsedResult = JSON.parse(resultFile.toString());\nfor (const testResult of parsedResult.testResults) {\n- // Filter out pending test cases.\n- const assertionResult = testResult.assertionResults.find(x => x.status !== 'pending');\n- if (assertionResult.length !== 0) {\n+ for (const assertionResult of testResult.assertionResults) {\nconst result = {\npassed: assertionResult.status === 'passed',\n- pending: false,\n+ pending: assertionResult.status === 'pending',\nstderr: assertionResult.failureMessages.join('\\n'),\nstdout: \"\",\ntitle: assertionResult.title\n};\npost({\n- type: 'result',\n+ type: result.pending ? 'pending' : 'result',\ntitle: assertionResult.title,\nresult: result\n});\n-\n- return resolve(testCase);\n}\n}\n- return reject(new Error('Test case has no result or was not found.'));\n+ return resolve(testCases);\n});\n}\n})\n@@ -129,7 +124,7 @@ const run_tests = function (testCases, post) {\n};\nfunction getJestPath(projectFolder) {\n- return path.join(projectFolder, \"node_modules/.bin/jest.cmd\");\n+ return path.join(projectFolder, \"node_modules\", \".bin\", \"jest.cmd\");\n}\nfunction escapeRegExp(string) {\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Improved support for running tests in parallel
|
410,202 |
03.07.2018 17:51:46
| 25,200 |
2c420593a19780e66b1ee77ae234c948e98f61af
|
Added Jest Unit Test template
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n<IncludeInVSIX>true</IncludeInVSIX>\n</Content>\n+ <ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.js\" />\n+ <ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.vstemplate\" />\n<Content Include=\"Workspace\\OpenFolderSchema.json\">\n<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n<IncludeInVSIX>true</IncludeInVSIX>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/VSPackage.resx",
"new_path": "Nodejs/Product/Nodejs/VSPackage.resx",
"diff": "<data name=\"4016\" xml:space=\"preserve\">\n<value>A basic Vue.js Web application.</value>\n</data>\n+ <data name=\"4017\" xml:space=\"preserve\">\n+ <value>JavaScript Jest UnitTest file</value>\n+ </data>\n+ <data name=\"4018\" xml:space=\"preserve\">\n+ <value>A JavaScript Mocha UnitTest file</value>\n+ </data>\n<data name=\"6000\" xml:space=\"preserve\">\n<value>Launch for Node.js</value>\n</data>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added Jest Unit Test template
|
410,202 |
06.07.2018 18:20:30
| 25,200 |
719ac5fc6143d849fce94c0e61ca8e001b829d98
|
Changed to use reporter instead of ouput streams
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"new_path": "Nodejs/Product/TestAdapter/TestAdapter.csproj",
"diff": "<Content Include=\"TestFrameworks\\Jest\\jest.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n+ <Content Include=\"TestFrameworks\\Jest\\jestReporter.js\">\n+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n+ </Content>\n<Content Include=\"TestFrameworks\\mocha\\mocha.js\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n</Content>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jest/jest.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/Jest/jest.js",
"diff": "@@ -43,33 +43,12 @@ const find_tests = function (testFileList, discoverResultFile, projectFolder) {\n};\nconst run_tests = function (testCases, post) {\n- // Jest package is not required for this tests to run, but it's still good to check\n- // in case the user have a build system or an automation that requires Jest.\nconst jest = detectPackage(testCases[0].projectFolder, 'jest');\n- const jestEditorSupport = detectPackage(testCases[0].projectFolder, 'jest-editor-support');\n-\n- if (!jest || !jestEditorSupport) {\n+ if (!jest) {\nreturn;\n}\n- const workspace = {\n- rootPath: testCases[0].projectFolder,\n- pathToJest: getJestPath(testCases[0].projectFolder),\n- pathToConfig: '',\n- localJestMajorVersion: 23 // TODO: Get the jest version from the package.\n- };\n-\n- runTest(testCases)\n- .then(() => post({\n- type: 'suite end',\n- result: {}\n- }))\n- .catch((error) => logError(error));\n-\n- function runTest(testCases) {\n- return new Promise((resolve, reject) => {\n-\n- // Start all test cases. Jest doesn't report when each test start, only reports the whole file.\n+ // Start all test cases, as jest is unable to filter out independently\nfor (const testCase of testCases) {\npost({\ntype: 'test start',\n@@ -77,60 +56,16 @@ const run_tests = function (testCases, post) {\n});\n}\n- const runner = new jestEditorSupport.Runner(workspace, {\n- testFileNamePattern: escapeRegExp(testCases[0].testFile)\n- });\n-\n- runner\n- // Jest uses the stdErr for output to the console.\n- .on('executableStdErr', (data) => {\n- if (data.toString().indexOf(\"Test results written to\") !== -1) {\n- const tempFile = os.tmpdir + '/jest_runner.json';\n- fs.readFile(tempFile, (err, resultFile) => {\n-\n- if (err) {\n- return reject(err);\n- }\n-\n- const parsedResult = JSON.parse(resultFile.toString());\n-\n- for (const testResult of parsedResult.testResults) {\n- for (const assertionResult of testResult.assertionResults) {\n- const result = {\n- passed: assertionResult.status === 'passed',\n- pending: assertionResult.status === 'pending',\n- stderr: assertionResult.failureMessages.join('\\n'),\n- stdout: \"\",\n- title: assertionResult.title\n+ const config = {\n+ json: true,\n+ reporters: [[__dirname + '/jestReporter.js', { post: post }]],\n+ testMatch: [testCases[0].testFile]\n};\n- post({\n- type: result.pending ? 'pending' : 'result',\n- title: assertionResult.title,\n- result: result\n- });\n- }\n- }\n-\n- return resolve(testCases);\n- });\n- }\n- })\n- .on('terminalError', (error) => reject(error));\n-\n- runner.start(false);\n- });\n- }\n+ jest.runCLI(config, [testCases[0].projectFolder])\n+ .catch((error) => logError(error));\n};\n-function getJestPath(projectFolder) {\n- return path.join(projectFolder, \"node_modules\", \".bin\", \"jest.cmd\");\n-}\n-\n-function escapeRegExp(string) {\n- return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n-}\n-\nfunction detectPackage(projectFolder, packageName) {\ntry {\nconst packagePath = path.join(projectFolder, 'node_modules', packageName);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Changed to use reporter instead of ouput streams
|
410,202 |
30.07.2018 16:49:46
| 25,200 |
fd2acd1b1c380dbf173f80386ff2145bbf1ee41c
|
Added npm install check
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"new_path": "Nodejs/Product/Nodejs/Nodejs.cs",
"diff": "@@ -179,6 +179,16 @@ namespace Microsoft.NodejsTools\n);\n}\n+ public static void ShowNpmIsInstalling()\n+ {\n+ MessageBox.Show(\n+ SR.GetString(SR.NpmIsInstalling),\n+ SR.ProductName,\n+ MessageBoxButtons.OK,\n+ MessageBoxIcon.Error\n+ );\n+ }\n+\npublic static void ShowNodejsPathNotFound(string path)\n{\nMessageBox.Show(\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -16,6 +16,7 @@ using System.Web;\nusing System.Windows.Forms;\nusing Microsoft.NodejsTools.Debugger;\nusing Microsoft.NodejsTools.Debugger.DebugEngine;\n+using Microsoft.NodejsTools.Npm.SPI;\nusing Microsoft.NodejsTools.Options;\nusing Microsoft.NodejsTools.Telemetry;\nusing Microsoft.NodejsTools.TypeScript;\n@@ -55,6 +56,12 @@ namespace Microsoft.NodejsTools.Project\n{\nvar nodePath = GetNodePath();\n+ if(NpmInstallCommand.IsInstalling)\n+ {\n+ Nodejs.ShowNpmIsInstalling();\n+ return VSConstants.E_ABORT;\n+ }\n+\nif (nodePath == null)\n{\nNodejs.ShowNodejsNotInstalled();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/ProjectResources.cs",
"new_path": "Nodejs/Product/Nodejs/Project/ProjectResources.cs",
"diff": "@@ -13,6 +13,7 @@ namespace Microsoft.NodejsTools.Project\ninternal const string NodeExeDoesntExist = \"NodeExeDoesntExist\";\ninternal const string NodejsNotInstalled = \"NodejsNotInstalled\";\n+ internal const string NpmIsInstalling = \"NpmIsInstalling\";\ninternal const string TestFramework = \"TestFramework\";\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"diff": "@@ -868,6 +868,15 @@ namespace Microsoft.NodejsTools {\n}\n}\n+ /// <summary>\n+ /// Looks up a localized string similar to Debugging could not be started because NPM is installing packages. Please wait untill NPM finishes and try again..\n+ /// </summary>\n+ internal static string NpmIsInstalling {\n+ get {\n+ return ResourceManager.GetString(\"NpmIsInstalling\", resourceCulture);\n+ }\n+ }\n+\n/// <summary>\n/// Looks up a localized string similar to Package Installations.\n/// </summary>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.resx",
"new_path": "Nodejs/Product/Nodejs/Resources.resx",
"diff": "@@ -759,4 +759,7 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<data name=\"TestRootToolTip\" xml:space=\"preserve\">\n<value>Specifies the directory where the unit tests are located.</value>\n</data>\n+ <data name=\"NpmIsInstalling\" xml:space=\"preserve\">\n+ <value>Debugging could not be started because NPM is installing packages. Please wait untill NPM finishes and try again.</value>\n+ </data>\n</root>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"diff": "@@ -10,7 +10,7 @@ using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Npm.SPI\n{\n- internal abstract class NpmCommand : AbstractNpmLogSource\n+ public abstract class NpmCommand : AbstractNpmLogSource\n{\nprivate string pathToNpm;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"diff": "namespace Microsoft.NodejsTools.Npm.SPI\n{\n- internal class NpmInstallCommand : NpmCommand\n+ public class NpmInstallCommand : NpmCommand\n{\n+ public static bool IsInstalling { get; private set; } = false;\n+\npublic NpmInstallCommand(\nstring fullPathToRootPackageDirectory,\nstring pathToNpm = null,\n@@ -11,6 +13,9 @@ namespace Microsoft.NodejsTools.Npm.SPI\n: base(fullPathToRootPackageDirectory, showConsole: false, pathToNpm: pathToNpm)\n{\nthis.Arguments = \"install\";\n+\n+ this.CommandStarted += (sender, eventArgs) => { IsInstalling = true; };\n+ this.CommandStarted += (sender, eventArgs) => { IsInstalling = false; };\n}\npublic NpmInstallCommand(\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added npm install check
|
410,202 |
30.07.2018 16:51:39
| 25,200 |
78cfa34b0901d767eb85df17f39faf10121a71b2
|
Fixed npm name
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"diff": "@@ -869,7 +869,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Debugging could not be started because NPM is installing packages. Please wait untill NPM finishes and try again..\n+ /// Looks up a localized string similar to Debugging could not be started because npm is installing packages. Please wait untill npm finishes and try again..\n/// </summary>\ninternal static string NpmIsInstalling {\nget {\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.resx",
"new_path": "Nodejs/Product/Nodejs/Resources.resx",
"diff": "@@ -760,6 +760,6 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Specifies the directory where the unit tests are located.</value>\n</data>\n<data name=\"NpmIsInstalling\" xml:space=\"preserve\">\n- <value>Debugging could not be started because NPM is installing packages. Please wait untill NPM finishes and try again.</value>\n+ <value>Debugging could not be started because npm is installing packages. Please wait untill npm finishes and try again.</value>\n</data>\n</root>\n\\ No newline at end of file\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixed npm name
|
410,202 |
31.07.2018 13:16:23
| 25,200 |
28d711ccb10349f906c54e2c867d4d84f1862271
|
Fix unhandled cast
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"diff": "@@ -171,7 +171,11 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn false;\n}\n- var propStore = (IVsBuildPropertyStorage)project;\n+ if(!(project is IVsBuildPropertyStorage propStore))\n+ {\n+ return false;\n+ }\n+\nvar hr = propStore.GetPropertyValue(NodeProjectProperty.TestRoot,/*configuration*/ \"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out var testRoot);\n// if test root is specified check if the file is contained, otherwise fall back to old logic\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix unhandled cast
|
410,202 |
31.07.2018 16:38:13
| 25,200 |
7b56a593722dd1a9fc0819e99123ef6a16ece6f9
|
PR comments for blocking during npm install
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -59,7 +59,7 @@ namespace Microsoft.NodejsTools.Project\nif(NpmInstallCommand.IsInstalling)\n{\nNodejs.ShowNpmIsInstalling();\n- return VSConstants.E_ABORT;\n+ return VSConstants.S_OK;\n}\nif (nodePath == null)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"diff": "@@ -74,38 +74,46 @@ namespace Microsoft.NodejsTools.Npm.SPI\npublic virtual async Task<bool> ExecuteAsync()\n{\n- OnCommandStarted();\n+ this.OnCommandStarted();\n+\nvar redirector = this.showConsole ? null : new NpmCommandRedirector(this);\n+ var cancelled = false;\ntry\n{\n- GetPathToNpm();\n- }\n- catch (NpmNotFoundException)\n- {\n- redirector?.WriteErrorLine(Resources.CouldNotFindNpm);\n- return false;\n- }\n+ this.GetPathToNpm();\n+\nredirector?.WriteLine(\nstring.Format(CultureInfo.InvariantCulture, \"===={0}====\\r\\n\\r\\n\",\nstring.Format(CultureInfo.InvariantCulture, Resources.ExecutingCommand, this.Arguments)));\n- var cancelled = false;\n- try\n- {\nawait NpmHelpers.ExecuteNpmCommandAsync(\nredirector,\n- GetPathToNpm(),\n+ this.GetPathToNpm(),\nthis.FullPathToRootPackageDirectory,\nnew[] { this.Arguments },\nthis.showConsole,\ncancellationResetEvent: this.cancellation);\n}\n+ catch (NpmNotFoundException)\n+ {\n+ redirector?.WriteErrorLine(Resources.CouldNotFindNpm);\n+ return false;\n+ }\ncatch (OperationCanceledException)\n{\ncancelled = true;\n}\n- OnCommandCompleted(this.Arguments, redirector?.HasErrors ?? false, cancelled);\n+ catch (Exception)\n+ {\n+ // Catch exception to run the finally block during an unhandled exception.\n+ throw;\n+ }\n+ finally\n+ {\n+ this.OnCommandCompleted(this.Arguments, redirector?.HasErrors ?? false, cancelled);\n+ }\n+\nreturn redirector?.HasErrors != true; // return true when the command completed without errors, or redirector is null (which means we can't track)\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"diff": "@@ -15,7 +15,7 @@ namespace Microsoft.NodejsTools.Npm.SPI\nthis.Arguments = \"install\";\nthis.CommandStarted += (sender, eventArgs) => { IsInstalling = true; };\n- this.CommandStarted += (sender, eventArgs) => { IsInstalling = false; };\n+ this.CommandCompleted += (sender, eventArgs) => { IsInstalling = false; };\n}\npublic NpmInstallCommand(\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
PR comments for blocking during npm install
|
410,202 |
01.08.2018 10:48:22
| 25,200 |
898700c25c156e763f26abc11316e3a5bb5817ae
|
Updated Vue dependencies to latest version
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"diff": "},\n\"dependencies\": {\n\"vue\": \"^2.5.16\",\n- \"vue-class-component\": \"^6.0.0\",\n- \"vue-property-decorator\": \"^6.0.0\"\n+ \"vue-class-component\": \"^6.2.0\",\n+ \"vue-property-decorator\": \"^7.0.0\"\n},\n\"devDependencies\": {\n- \"@vue/cli-plugin-babel\": \"^3.0.0-beta.9\",\n- \"@vue/cli-plugin-typescript\": \"^3.0.0-beta.9\",\n- \"@vue/cli-service\": \"^3.0.0-beta.9\",\n- \"vue-template-compiler\": \"^2.5.13\"\n+ \"@vue/cli-plugin-babel\": \"^3.0.0-rc.10\",\n+ \"@vue/cli-plugin-typescript\": \"^3.0.0-rc.10\",\n+ \"@vue/cli-service\": \"^3.0.0-rc.10\",\n+ \"typescript\": \"^3.0.1\",\n+ \"vue-template-compiler\": \"^2.5.16\"\n},\n\"browserslist\": [\n\"> 1%\",\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"diff": "\"vue\": \"^2.5.16\"\n},\n\"devDependencies\": {\n- \"@vue/cli-plugin-babel\": \"^3.0.0-beta.9\",\n- \"@vue/cli-service\": \"^3.0.0-beta.9\",\n- \"vue-template-compiler\": \"^2.5.13\"\n+ \"@vue/cli-plugin-babel\": \"^3.0.0-rc.10\",\n+ \"@vue/cli-service\": \"^3.0.0-rc.10\",\n+ \"vue-template-compiler\": \"^2.5.16\"\n},\n\"browserslist\": [\n\"> 1%\",\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Updated Vue dependencies to latest version
|
410,202 |
06.08.2018 16:02:39
| 25,200 |
bfcfdfb15407263d97c358d3102e7142b252f6db
|
Refactored IsInstalling logic to track on the project not on the command
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs",
"diff": "@@ -56,9 +56,11 @@ namespace Microsoft.NodejsTools.Project\n{\nvar nodePath = GetNodePath();\n- if(NpmInstallCommand.IsInstalling)\n+ if(this._project.IsInstallingMissingModules)\n{\nNodejs.ShowNpmIsInstalling();\n+ this._project.NpmOutputPane?.Show();\n+\nreturn VSConstants.S_OK;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"diff": "@@ -37,6 +37,8 @@ namespace Microsoft.NodejsTools.Project\nprivate Timer _idleNodeModulesTimer;\n#pragma warning restore 0414\n+ public bool IsInstallingMissingModules { get; private set; } = false;\n+\npublic NodejsProjectNode(NodejsProjectPackage package) : base(package, null)\n{\nvar projectNodePropsType = typeof(NodejsProjectNodeProperties);\n@@ -553,9 +555,11 @@ namespace Microsoft.NodejsTools.Project\nTask INodePackageModulesCommands.InstallMissingModulesAsync()\n{\n- //Fire off the command to update the missing modules\n- // through NPM\n- return this.ModulesNode.InstallMissingModules();\n+ this.IsInstallingMissingModules = true;\n+\n+ //Fire off the command to update the missing modules through NPM\n+ return this.ModulesNode.InstallMissingModules()\n+ .ContinueWith(task => this.IsInstallingMissingModules = false, TaskScheduler.Default);\n}\ninternal event EventHandler OnDispose;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"diff": "@@ -4,8 +4,6 @@ namespace Microsoft.NodejsTools.Npm.SPI\n{\npublic class NpmInstallCommand : NpmCommand\n{\n- public static bool IsInstalling { get; private set; } = false;\n-\npublic NpmInstallCommand(\nstring fullPathToRootPackageDirectory,\nstring pathToNpm = null,\n@@ -13,9 +11,6 @@ namespace Microsoft.NodejsTools.Npm.SPI\n: base(fullPathToRootPackageDirectory, showConsole: false, pathToNpm: pathToNpm)\n{\nthis.Arguments = \"install\";\n-\n- this.CommandStarted += (sender, eventArgs) => { IsInstalling = true; };\n- this.CommandCompleted += (sender, eventArgs) => { IsInstalling = false; };\n}\npublic NpmInstallCommand(\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Refactored IsInstalling logic to track on the project not on the command
|
410,202 |
06.08.2018 16:08:33
| 25,200 |
04034a558649855d925ab0dfc1dc2091debff692
|
Make InstallCommand internal again
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"diff": "@@ -869,7 +869,7 @@ namespace Microsoft.NodejsTools {\n}\n/// <summary>\n- /// Looks up a localized string similar to Debugging could not be started because npm is installing packages. Please wait untill npm finishes and try again..\n+ /// Looks up a localized string similar to Debugging could not be started because npm is installing packages. Please wait until npm finishes and try again..\n/// </summary>\ninternal static string NpmIsInstalling {\nget {\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.resx",
"new_path": "Nodejs/Product/Nodejs/Resources.resx",
"diff": "@@ -760,6 +760,6 @@ Error retrieving websocket debug proxy information from web.config.</value>\n<value>Specifies the directory where the unit tests are located.</value>\n</data>\n<data name=\"NpmIsInstalling\" xml:space=\"preserve\">\n- <value>Debugging could not be started because npm is installing packages. Please wait untill npm finishes and try again.</value>\n+ <value>Debugging could not be started because npm is installing packages. Please wait until npm finishes and try again.</value>\n</data>\n</root>\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/AbstractNpmLogSource.cs",
"new_path": "Nodejs/Product/Npm/SPI/AbstractNpmLogSource.cs",
"diff": "@@ -4,7 +4,7 @@ using System;\nnamespace Microsoft.NodejsTools.Npm.SPI\n{\n- public abstract class AbstractNpmLogSource : INpmLogSource\n+ internal abstract class AbstractNpmLogSource : INpmLogSource\n{\npublic event EventHandler CommandStarted;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmCommand.cs",
"diff": "@@ -10,7 +10,7 @@ using Microsoft.VisualStudioTools.Project;\nnamespace Microsoft.NodejsTools.Npm.SPI\n{\n- public abstract class NpmCommand : AbstractNpmLogSource\n+ internal abstract class NpmCommand : AbstractNpmLogSource\n{\nprivate string pathToNpm;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"new_path": "Nodejs/Product/Npm/SPI/NpmInstallCommand.cs",
"diff": "namespace Microsoft.NodejsTools.Npm.SPI\n{\n- public class NpmInstallCommand : NpmCommand\n+ internal class NpmInstallCommand : NpmCommand\n{\n- public NpmInstallCommand(\n+ internal NpmInstallCommand(\nstring fullPathToRootPackageDirectory,\nstring pathToNpm = null,\nbool useFallbackIfNpmNotFound = true)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make InstallCommand internal again
|
410,202 |
10.08.2018 17:38:18
| 25,200 |
f4e0214ec11e77c19fcc6af9f5623a50f2c2cba6
|
Removed process.exit for process.exitCode on Mocha test adapter
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/mocha/mocha.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/mocha/mocha.js",
"diff": "@@ -111,7 +111,7 @@ var run_tests = function (testCases, callback) {\nmocha.addFile(testCases[0].testFile);\nvar runner = mocha.run(function (code) {\n- process.exit(code);\n+ process.exitCode = code ? code : 0;\n});\n// See events available at https://github.com/mochajs/mocha/blob/8cae7a34f0b6eafeb16567beb8852b827cc5956b/lib/runner.js#L47-L57\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/run_tests.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/run_tests.js",
"diff": "@@ -7,7 +7,7 @@ var rl = readline.createInterface({\noutput: process.stdout\n});\n-rl.on('line', (line) => {\n+rl.on('line', function (line) {\nrl.close();\n// strip the BOM in case of UTF-8\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removed process.exit for process.exitCode on Mocha test adapter
|
410,202 |
13.08.2018 17:52:04
| 25,200 |
b2671aca18ad6ef598a6f39ab5918355b8ac1cfe
|
Update Vue.js templates and packages
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "</Content>\n<ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.js\" />\n<ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.vstemplate\" />\n+ <Content Include=\"ProjectTemplates\\VuejsApp\\babel.config.js\" />\n<Content Include=\"Workspace\\OpenFolderSchema.json\">\n<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n<IncludeInVSIX>true</IncludeInVSIX>\n<ZipItem Include=\"Templates\\Files\\EmptyPug\\EmptyPug.pug\" />\n<Compile Include=\"SharedProject\\CommonProjectNode.DiskMerger.cs\" />\n<ZipItem Include=\"Templates\\Files\\TypeScriptJsConfig\\jsconfig.json\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\.babelrc\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\.postcssrc.js\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\App.vue\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\favicon.ico\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\Home.vue\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\main.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\package.json\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\README.md\" />\n- <TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\shims.d.ts\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\tsconfig.json\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.njsproj\" />\n<TypeScriptProject Include=\"ProjectTemplates\\TypeScriptVuejsApp\\TypeScriptVuejsApp.vstemplate\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\.babelrc\" />\n- <ZipProject Include=\"ProjectTemplates\\VuejsApp\\.postcssrc.js\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\App.vue\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\favicon.ico\" />\n<ZipProject Include=\"ProjectTemplates\\VuejsApp\\Home.vue\" />\n<ItemGroup>\n<ZipItem Include=\"Templates\\Files\\TypeScriptJasmineUnitTest\\UnitTest.ts\" />\n</ItemGroup>\n+ <ItemGroup>\n+ <TypeScriptCompile Include=\"ProjectTemplates\\TypeScriptVuejsApp\\shims-tsx.d.ts\" />\n+ <TypeScriptCompile Include=\"ProjectTemplates\\TypeScriptVuejsApp\\shims-vue.d.ts\" />\n+ </ItemGroup>\n<PropertyGroup>\n<!--\nTo specify a different registry root to register your package, uncomment the TargetRegistryRoot\n"
},
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/.babelrc",
"new_path": null,
"diff": "-{\n- \"presets\": [\n- \"@vue/app\"\n- ]\n-}\n\\ No newline at end of file\n"
},
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/.postcssrc.js",
"new_path": null,
"diff": "-module.exports = {\n- plugins: {\n- autoprefixer: {}\n- }\n-}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Content Include=\".babelrc\" />\n<Content Include=\"public\\favicon.ico\" />\n<Content Include=\"public\\index.html\" />\n<Content Include=\"src\\App.vue\" />\n</ItemGroup>\n<ItemGroup>\n<TypeScriptCompile Include=\"src\\main.ts\" />\n- <TypeScriptCompile Include=\"src\\shims.d.ts\" />\n- </ItemGroup>\n- <ItemGroup>\n- <Compile Include=\".postcssrc.js\" />\n+ <TypeScriptCompile Include=\"src\\shims-vue.d.ts\" />\n+ <TypeScriptCompile Include=\"src\\shims-tsx.d.ts\" />\n</ItemGroup>\n<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"diff": "\"name\": \"\"\n},\n\"dependencies\": {\n- \"vue\": \"^2.5.16\",\n+ \"vue\": \"^2.5.17\",\n\"vue-class-component\": \"^6.0.0\",\n- \"vue-property-decorator\": \"^6.0.0\"\n+ \"vue-property-decorator\": \"^7.0.0\"\n},\n\"devDependencies\": {\n- \"@vue/cli-plugin-babel\": \"^3.0.0-beta.9\",\n- \"@vue/cli-plugin-typescript\": \"^3.0.0-beta.9\",\n- \"@vue/cli-service\": \"^3.0.0-beta.9\",\n- \"vue-template-compiler\": \"^2.5.13\"\n+ \"@vue/cli-plugin-typescript\": \"^3.0.0\",\n+ \"@vue/cli-service\": \"^3.0.0\",\n+ \"typescript\": \"^3.0.0\",\n+ \"vue-template-compiler\": \"^2.5.17\"\n+ },\n+ \"postcss\": {\n+ \"plugins\": {\n+ \"autoprefixer\": {}\n+ }\n},\n\"browserslist\": [\n\"> 1%\",\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/shims-tsx.d.ts",
"diff": "+import Vue, { VNode } from 'vue'\n+\n+declare global {\n+ namespace JSX {\n+ // tslint:disable no-empty-interface\n+ interface Element extends VNode {}\n+ // tslint:disable no-empty-interface\n+ interface ElementClass extends Vue {}\n+ interface IntrinsicElements {\n+ [elem: string]: any\n+ }\n+ }\n+}\n"
},
{
"change_type": "RENAME",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/shims.d.ts",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/shims-vue.d.ts",
"diff": ""
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/tsconfig.json",
"diff": "\"module\": \"esnext\",\n\"strict\": true,\n\"jsx\": \"preserve\",\n+ \"importHelpers\": true,\n\"moduleResolution\": \"node\",\n\"experimentalDecorators\": true,\n- \"emitDecoratorMetadata\": true,\n+ \"esModuleInterop\": true,\n\"allowSyntheticDefaultImports\": true,\n\"sourceMap\": true,\n\"baseUrl\": \".\",\n\"@/*\": [\n\"src/*\"\n]\n- }\n+ },\n+ \"lib\": [\n+ \"esnext\",\n+ \"dom\",\n+ \"dom.iterable\",\n+ \"scripthost\"\n+ ]\n},\n\"include\": [\n\"src/**/*.ts\",\n"
},
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/.babelrc",
"new_path": null,
"diff": "-{\n- \"presets\": [\n- \"@vue/app\"\n- ]\n-}\n\\ No newline at end of file\n"
},
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/.postcssrc.js",
"new_path": null,
"diff": "-module.exports = {\n- plugins: {\n- autoprefixer: {}\n- }\n-}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/VuejsApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Content Include=\".babelrc\" />\n<Content Include=\"public\\favicon.ico\" />\n<Content Include=\"public\\index.html\" />\n<Content Include=\"src\\App.vue\" />\n<Folder Include=\"src\\components\\\" />\n</ItemGroup>\n<ItemGroup>\n+ <Compile Include=\"babel.config.js\" />\n<Compile Include=\"src\\main.js\" />\n- <Compile Include=\".postcssrc.js\" />\n</ItemGroup>\n<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/babel.config.js",
"diff": "+module.exports = {\n+ presets: [\n+ '@vue/app'\n+ ]\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"diff": "\"private\": true,\n\"scripts\": {\n\"serve\": \"vue-cli-service serve\",\n- \"build\": \"vue-cli-service build\"\n+ \"build\": \"vue-cli-service build\",\n+ \"lint\": \"vue-cli-service lint\"\n},\n\"description\": \"$projectname$\",\n\"author\": {\n\"name\": \"\"\n},\n\"dependencies\": {\n- \"vue\": \"^2.5.16\"\n+ \"vue\": \"^2.5.17\"\n},\n\"devDependencies\": {\n- \"@vue/cli-plugin-babel\": \"^3.0.0-beta.9\",\n- \"@vue/cli-service\": \"^3.0.0-beta.9\",\n- \"vue-template-compiler\": \"^2.5.13\"\n+ \"@vue/cli-plugin-babel\": \"^3.0.0\",\n+ \"@vue/cli-plugin-eslint\": \"^3.0.0\",\n+ \"@vue/cli-service\": \"^3.0.0\",\n+ \"vue-template-compiler\": \"^2.5.17\"\n+ },\n+ \"eslintConfig\": {\n+ \"root\": true,\n+ \"env\": {\n+ \"node\": true\n+ },\n+ \"extends\": [\n+ \"plugin:vue/essential\",\n+ \"eslint:recommended\"\n+ ],\n+ \"rules\": {},\n+ \"parserOptions\": {\n+ \"parser\": \"babel-eslint\"\n+ }\n+ },\n+ \"postcss\": {\n+ \"plugins\": {\n+ \"autoprefixer\": {}\n+ }\n},\n\"browserslist\": [\n\"> 1%\",\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Update Vue.js templates and packages
|
410,202 |
14.08.2018 12:44:49
| 25,200 |
fa785728d7cb8ab4a102a8e245b6ea6ba60e1864
|
Fixed eslint warning and added babel config to Vue templates
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "</Content>\n<ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.js\" />\n<ZipItem Include=\"Templates\\Files\\JestUnitTest\\UnitTest.vstemplate\" />\n+ <Content Include=\"ProjectTemplates\\TypeScriptVuejsApp\\babel.config.js\" />\n<Content Include=\"ProjectTemplates\\VuejsApp\\babel.config.js\" />\n<Content Include=\"Workspace\\OpenFolderSchema.json\">\n<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "<TypeScriptCompile Include=\"src\\shims-vue.d.ts\" />\n<TypeScriptCompile Include=\"src\\shims-tsx.d.ts\" />\n</ItemGroup>\n+ <ItemGroup>\n+ <Compile Include=\"babel.config.js\" />\n+ </ItemGroup>\n<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->\n<Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\TypeScript\\Microsoft.TypeScript.targets\" Condition=\"False\" />\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/babel.config.js",
"diff": "+module.exports = {\n+ presets: [\n+ '@vue/app'\n+ ]\n+};\n+\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/package.json",
"diff": "\"vue-property-decorator\": \"^7.0.0\"\n},\n\"devDependencies\": {\n+ \"@vue/cli-plugin-babel\": \"^3.0.0\",\n\"@vue/cli-plugin-typescript\": \"^3.0.0\",\n\"@vue/cli-service\": \"^3.0.0\",\n\"typescript\": \"^3.0.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/tsconfig.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n\"noEmit\": true,\n- \"target\": \"es5\",\n+ \"target\": \"esnext\",\n\"module\": \"esnext\",\n\"strict\": true,\n\"jsx\": \"preserve\",\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/babel.config.js",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/babel.config.js",
"diff": "@@ -2,4 +2,4 @@ module.exports = {\npresets: [\n'@vue/app'\n]\n-}\n+};\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/VuejsApp/package.json",
"diff": "\"@vue/cli-plugin-babel\": \"^3.0.0\",\n\"@vue/cli-plugin-eslint\": \"^3.0.0\",\n\"@vue/cli-service\": \"^3.0.0\",\n+ \"eslint\": \"^5.3.0\",\n+ \"eslint-plugin-vue\": \"^4.7.1\",\n\"vue-template-compiler\": \"^2.5.17\"\n},\n\"eslintConfig\": {\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixed eslint warning and added babel config to Vue templates
|
410,203 |
06.09.2018 10:05:20
| 25,200 |
3e2e387c83ce87ed23b4a98a828f79db47589387
|
Fixing path length exception.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/TestFramework.cs",
"diff": "@@ -35,9 +35,15 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\n{\nvar testInfo = string.Empty;\nvar discoverResultFile = Path.GetTempFileName();\n+\n+ // Create a temp file with the list of test files.\n+ var testFilesString = string.Join(\";\", testFiles);\n+ var testFilesListFile = Path.GetTempFileName();\n+ File.AppendAllText(testFilesListFile, testFilesString, System.Text.Encoding.UTF8);\n+\ntry\n{\n- var stdout = EvaluateJavaScript(nodeExe, string.Join(\";\", testFiles), discoverResultFile, logger, projectRoot);\n+ var stdout = EvaluateJavaScript(nodeExe, testFilesListFile, discoverResultFile, logger, projectRoot);\nif (!string.IsNullOrWhiteSpace(stdout))\n{\nvar stdoutLines = stdout.Split(new[] { Environment.NewLine },\n@@ -74,6 +80,7 @@ namespace Microsoft.NodejsTools.TestAdapter.TestFrameworks\ntry\n{\nFile.Delete(discoverResultFile);\n+ File.Delete(testFilesListFile);\n}\ncatch (Exception)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/TestFrameworks/find_tests.js",
"new_path": "Nodejs/Product/TestAdapter/TestFrameworks/find_tests.js",
"diff": "+var fs = require(\"fs\");\nvar framework;\ntry {\nframework = require('./' + process.argv[2] + '/' + process.argv[2] + '.js');\n@@ -6,7 +7,19 @@ try {\nprocess.exit(1);\n}\ntry {\n- framework.find_tests(process.argv[3], process.argv[4], process.argv[5]);\n+ var testFilesListInputFile = process.argv[3];\n+ if (!fs.existsSync(testFilesListInputFile)) {\n+ throw new Error(\"testFilesListInputFile '\" + testFilesListInputFile + \"' does not exist.\");\n+ }\n+\n+ var testFilesList = fs.readFileSync(testFilesListInputFile, \"utf-8\");\n+\n+ // strip the BOM in case of UTF-8\n+ if (testFilesList.charCodeAt(0) === 0xFEFF) {\n+ testFilesList = testFilesList.slice(1);\n+ }\n+\n+ framework.find_tests(testFilesList, process.argv[4], process.argv[5]);\n} catch (exception) {\nconsole.log(\"NTVS_ERROR:TestFramework (\" + process.argv[2] + \") threw an exception processing (\" + process.argv[3] + \"), \" + exception);\nprocess.exit(1);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixing path length exception.
|
410,197 |
07.09.2018 10:49:57
| 25,200 |
910ff604279cd868bc02c24c4c9c066c662de6db
|
Exclude files that shouldn't be in our vsixes
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj",
"new_path": "Nodejs/Product/NodejsToolsVsix/NodejsToolsVsix.csproj",
"diff": "<IsProductComponent>true</IsProductComponent>\n<ExtensionInstallationRoot>Extensions</ExtensionInstallationRoot>\n<ExtensionInstallationFolder>Microsoft\\NodeJsTools\\NodeJsTools</ExtensionInstallationFolder>\n+ <IncludePackageReferencesInVSIXContainer>false</IncludePackageReferencesInVSIXContainer>\n<!--For F5 debugging-->\n<StartAction>Program</StartAction>\n<StartProgram>$(DevEnvDir)\\devenv.exe</StartProgram>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"new_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"diff": "<InstallRoot>MSBuild</InstallRoot>\n<!--For VSMAN authoring-->\n<IsProductComponent>true</IsProductComponent>\n+ <IncludePackageReferencesInVSIXContainer>false</IncludePackageReferencesInVSIXContainer>\n<!--For F5 debugging-->\n<StartAction>Program</StartAction>\n<StartProgram>$(DevEnvDir)\\devenv.exe</StartProgram>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj",
"new_path": "Nodejs/Product/TestAdapterVsix/TestAdapterVsix.csproj",
"diff": "<IsProductComponent>true</IsProductComponent>\n<ExtensionInstallationRoot>Extensions</ExtensionInstallationRoot>\n<ExtensionInstallationFolder>Microsoft\\NodeJsTools\\TestAdapter</ExtensionInstallationFolder>\n+ <IncludePackageReferencesInVSIXContainer>false</IncludePackageReferencesInVSIXContainer>\n<!--For F5 debugging-->\n<StartAction>Program</StartAction>\n<StartProgram>$(DevEnvDir)\\devenv.exe</StartProgram>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Exclude files that shouldn't be in our vsixes
|
410,202 |
27.09.2018 12:45:22
| 25,200 |
0a273f6aa8c847c902b2d6a84fb51162e5daf284
|
Removed dependencies in Server Explorer
|
[
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/Azure/WebSiteServiceShims.cs",
"new_path": null,
"diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-// This file contains Reflection-based shims for interfaces from the Microsoft.VisualStudio.Web.WindowsAzure.Contracts.\n-// They are used for the time being because the interfaces in question are only going to be stabilized in Visual Studio 2013 Update 2,\n-// and until then using them directly requires private builds of Azure Tools to build against. Using Reflection avoids that dependency.\n-// The interfaces correspond directly to those in the contracts assembly, but only those members that are actually used by our code are\n-// exposed and shimmed.\n-//\n-// TODO: get rid of the shims and use the contracts assembly directly once Update 2 RTM is out.\n-\n-using System;\n-using System.Collections.Generic;\n-using System.Diagnostics;\n-using System.Linq;\n-using System.Reflection;\n-using System.Runtime.CompilerServices;\n-using System.Runtime.ExceptionServices;\n-using System.Runtime.InteropServices;\n-using System.Threading.Tasks;\n-using Microsoft.VisualStudio.WindowsAzure.Authentication;\n-\n-namespace Microsoft.VisualStudio.Web.WindowsAzure.Contracts.Shims\n-{\n- internal class ContractShim<T>\n- {\n- private static readonly Assembly contractAssembly = Assembly.Load(\"Microsoft.VisualStudio.Web.WindowsAzure.Contracts, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\");\n- private static readonly Type _interface;\n- private readonly object _impl;\n-\n- static ContractShim()\n- {\n- var shimName = typeof(T).FullName;\n- Debug.Assert(shimName.StartsWith(\"Microsoft.VisualStudio.Web.WindowsAzure.Contracts.Shims.\", StringComparison.Ordinal));\n- var realName = shimName.Replace(\".Shims.\", \".\");\n- _interface = contractAssembly.GetType(realName, throwOnError: true);\n- }\n-\n- protected ContractShim(object impl)\n- {\n- this._impl = impl;\n- }\n-\n- public static bool CanShim(object impl)\n- {\n- return impl != null && impl.GetType().GetInterfaces().Contains(_interface);\n- }\n-\n- private object InvokeByName(string name, object[] args)\n- {\n- var types = args != null ?\n- args.Select(arg => { return arg.GetType(); }).ToArray() :\n- new Type[] { };\n- var method =\n- new[] { _interface }\n- .Concat(_interface.GetInterfaces())\n- .Select(t => t.GetMethod(name, types))\n- .Where(m => m != null)\n- .FirstOrDefault();\n- if (method == null)\n- {\n- throw new MissingMethodException(_interface.FullName, name);\n- }\n- try\n- {\n- return method.Invoke(this._impl, args);\n- }\n- catch (TargetInvocationException tex)\n- {\n- ExceptionDispatchInfo.Capture(tex.InnerException ?? tex).Throw();\n- return null;\n- }\n- }\n-\n- protected object Invoke([CallerMemberName] string name = null)\n- {\n- return InvokeByName(name, null);\n- }\n-\n- protected object Invoke(object arg1, [CallerMemberName] string name = null)\n- {\n- return InvokeByName(name, new[] { arg1 });\n- }\n-\n- protected object Invoke(object arg1, object arg2, [CallerMemberName] string name = null)\n- {\n- return InvokeByName(name, new[] { arg1, arg2 });\n- }\n-\n- protected object Get([CallerMemberName] string name = null)\n- {\n- var prop =\n- new[] { _interface }\n- .Concat(_interface.GetInterfaces())\n- .Select(t => t.GetProperty(name))\n- .Where(p => p != null)\n- .FirstOrDefault();\n- if (prop == null)\n- {\n- throw new MissingMemberException(_interface.FullName, name);\n- }\n- try\n- {\n- return prop.GetValue(this._impl);\n- }\n- catch (TargetInvocationException tex)\n- {\n- ExceptionDispatchInfo.Capture(tex.InnerException ?? tex).Throw();\n- return null;\n- }\n- }\n- }\n-\n- [Guid(\"D756EDAE-0998-42AA-AA02-6B4FD029E731\")]\n- internal interface IVsAzureServices\n- {\n- IAzureWebSitesService GetAzureWebSitesService();\n- }\n-\n- internal class VsAzureServicesShim : ContractShim<IVsAzureServices>, IVsAzureServices\n- {\n- public VsAzureServicesShim(object impl)\n- : base(impl)\n- {\n- }\n-\n- public IAzureWebSitesService GetAzureWebSitesService()\n- {\n- return new AzureWebSitesServiceShim(Invoke());\n- }\n- }\n-\n- internal interface IAzureService\n- {\n- Task<List<IAzureSubscription>> GetSubscriptionsAsync();\n- }\n-\n- internal interface IAzureWebSitesService : IAzureService\n- {\n- }\n-\n- internal class AzureWebSitesServiceShim : ContractShim<IAzureWebSitesService>, IAzureWebSitesService\n- {\n- public AzureWebSitesServiceShim(object impl)\n- : base(impl)\n- {\n- }\n-\n- public Task<List<IAzureSubscription>> GetSubscriptionsAsync()\n- {\n- return ((Task)Invoke()).ContinueWith(task =>\n- ((IEnumerable<object>)((dynamic)task).Result)\n- .Select(item => (IAzureSubscription)new AzureSubscriptionShim(item))\n- .ToList()\n- );\n- }\n- }\n-\n- internal interface IAzureSubscription\n- {\n- string SubscriptionId { get; }\n- Uri ServiceManagementEndpointUri { get; }\n- IAzureSubscriptionContext AzureCredentials { get; }\n- Task<List<IAzureResource>> GetResourcesAsync(bool refresh);\n- }\n-\n- internal class AzureSubscriptionShim : ContractShim<IAzureSubscription>, IAzureSubscription\n- {\n- public AzureSubscriptionShim(object impl)\n- : base(impl)\n- {\n- }\n-\n- public string SubscriptionId => (string)Get();\n- public Uri ServiceManagementEndpointUri => (Uri)Get();\n- public IAzureSubscriptionContext AzureCredentials => (IAzureSubscriptionContext)Get();\n- public Task<List<IAzureResource>> GetResourcesAsync(bool refresh)\n- {\n- // The caller will only use websites from this list, and we don't\n- // want to shim other resource types, so filter them out.\n- return ((Task)Invoke(refresh)).ContinueWith(task =>\n- ((IEnumerable<object>)((dynamic)task).Result)\n- .Where(item => AzureWebSiteShim.CanShim(item))\n- .Select(item => (IAzureResource)new AzureWebSiteShim(item))\n- .ToList()\n- );\n- }\n- }\n-\n- internal interface IAzureResource\n- {\n- string Name { get; }\n- }\n-\n- internal interface IAzureWebSite : IAzureResource\n- {\n- string WebSpace { get; }\n- string BrowseURL { get; }\n- }\n-\n- internal class AzureWebSiteShim : ContractShim<IAzureWebSite>, IAzureWebSite\n- {\n- public AzureWebSiteShim(object impl)\n- : base(impl)\n- {\n- }\n-\n- public string WebSpace => (string)Get();\n- public string BrowseURL => (string)Get();\n- public string Name => (string)Get();\n- }\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "Nodejs/Product/Nodejs/Commands/AzureExplorerAttachDebuggerCommand.cs",
"new_path": null,
"diff": "-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n-\n-using System;\n-using System.Globalization;\n-using System.IO;\n-using System.Linq;\n-using System.Net;\n-using System.Net.WebSockets;\n-using System.Reflection;\n-using System.Runtime.InteropServices;\n-using System.Threading.Tasks;\n-using System.Windows.Forms;\n-using System.Xml;\n-using System.Xml.Linq;\n-using Microsoft.NodejsTools.Debugger.DebugEngine;\n-using Microsoft.NodejsTools.Debugger.Remote;\n-using Microsoft.VisualStudio.Shell;\n-using Microsoft.VisualStudio.Shell.Interop;\n-using Microsoft.VisualStudio.Web.WindowsAzure.Contracts.Shims;\n-using Microsoft.VisualStudio.WindowsAzure.Authentication;\n-using Microsoft.VisualStudioTools;\n-using Microsoft.VisualStudioTools.Project;\n-\n-namespace Microsoft.NodejsTools.Commands\n-{\n- /// <summary>\n- /// Provides the command to attach to an Azure Website selected in Server Explorer.\n- /// </summary>\n- internal class AzureExplorerAttachDebuggerCommand : Command\n- {\n- private readonly Type azureServicesType;\n-\n- public AzureExplorerAttachDebuggerCommand()\n- {\n- // Will throw PlatformNotSupportedException on any unsupported OS (Win7 and below).\n- using (new ClientWebSocket()) { }\n-\n- try\n- {\n- var contractsAssembly = Assembly.Load(\"Microsoft.VisualStudio.Web.WindowsAzure.Contracts, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\");\n- this.azureServicesType = contractsAssembly.GetType(\"Microsoft.VisualStudio.Web.WindowsAzure.Contracts.IVsAzureServices\", throwOnError: true);\n- }\n- catch (FileNotFoundException)\n- {\n- throw new NotSupportedException();\n- }\n- catch (FileLoadException)\n- {\n- throw new NotSupportedException();\n- }\n- catch (TypeLoadException)\n- {\n- throw new NotSupportedException();\n- }\n- }\n-\n- public override int CommandId => (int)PkgCmdId.cmdidAzureExplorerAttachNodejsDebugger;\n-\n- public override EventHandler BeforeQueryStatus => (sender, args) =>\n- {\n- var oleMenuCmd = (OleMenuCommand)sender;\n- oleMenuCmd.Supported = oleMenuCmd.Visible = (GetSelectedAzureWebSite() != null);\n- };\n-\n- public override void DoCommand(object sender, EventArgs args)\n- {\n- var webSite = GetSelectedAzureWebSite();\n- if (webSite == null)\n- {\n- throw new NotSupportedException();\n- }\n-\n- Action<Task<bool>> onAttach = null;\n- onAttach = (attachTask) =>\n- {\n- if (!attachTask.Result)\n- {\n- var msg = string.Format(CultureInfo.CurrentCulture, Resources.AzureRemoveDebugCouldNotAttachToWebsiteErrorMessage, webSite.Uri);\n- if (MessageBox.Show(msg, null, MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) == DialogResult.Retry)\n- {\n- AttachWorker(webSite).ContinueWith(onAttach);\n- }\n- }\n- };\n-\n- // We will need to do a bunch of async calls here, and they will deadlock if the UI thread is\n- // blocked, so we can't use Wait() or Result, and have to let the task run on its own.\n- AttachWorker(webSite).ContinueWith(onAttach);\n- }\n-\n- /// <returns>\n- /// Information about the current selected Azure Website node in Solution Explorer, or <c>null</c>\n- /// if no node is selected, it's not a website node, or the information could not be retrieved.\n- /// </returns>\n- private AzureWebSiteInfo GetSelectedAzureWebSite()\n- {\n- // Get the current selected node in Solution Explorer.\n-\n- var shell = (IVsUIShell)NodejsPackage.GetGlobalService(typeof(SVsUIShell));\n- var serverExplorerToolWindowGuid = new Guid(ToolWindowGuids.ServerExplorer);\n- shell.FindToolWindow(0, ref serverExplorerToolWindowGuid, out var serverExplorerFrame);\n- if (serverExplorerFrame == null)\n- {\n- return null;\n- }\n-\n- serverExplorerFrame.GetProperty((int)__VSFPROPID.VSFPROPID_DocView, out var obj);\n- var serverExplorerHierWnd = obj as IVsUIHierarchyWindow;\n- if (serverExplorerHierWnd == null)\n- {\n- return null;\n- }\n-\n- serverExplorerHierWnd.GetCurrentSelection(out var hierPtr, out var itemid, out var mis);\n- if (hierPtr == IntPtr.Zero)\n- {\n- return null;\n- }\n-\n- IVsHierarchy hier;\n- try\n- {\n- hier = (IVsHierarchy)Marshal.GetObjectForIUnknown(hierPtr);\n- }\n- finally\n- {\n- Marshal.Release(hierPtr);\n- }\n-\n- // Get the browse object of that node - this is the object that exposes properties to show in the Properties window.\n-\n- hier.GetProperty(itemid, (int)__VSHPROPID.VSHPROPID_SelContainer, out obj);\n- var selCtr = obj as ISelectionContainer;\n- if (selCtr == null)\n- {\n- return null;\n- }\n-\n- var objs = new object[1];\n- selCtr.GetObjects((uint)Microsoft.VisualStudio.Shell.Interop.Constants.GETOBJS_SELECTED, 1, objs);\n- obj = objs[0];\n- if (obj == null)\n- {\n- return null;\n- }\n-\n- // We need to find out whether this is an Azure Website object. We can't do a type check because the type of the\n- // browse object is private. We can, however, query for properties with specific names, and we can check the types\n- // of those properties. In particular, WebSiteState is a public enum type that is a part of the Azure Explorer contract,\n- // so we can check for it, and we can be reasonably sure that it is only exposed by website nodes. It seems that\n- // the namespace is subject to change, however, as it was marked internal in VS2015.\n-\n- var statusProp = obj.GetType().GetProperty(\"Status\");\n- if (statusProp == null ||\n- (statusProp.PropertyType.FullName != \"Microsoft.VisualStudio.Web.WindowsAzure.Contracts.WebSiteState\" &&\n- statusProp.PropertyType.FullName != \"Microsoft.VisualStudio.Web.Internal.Contracts.WebSiteState\")\n- )\n- {\n- return null;\n- }\n-\n- // Is the website running?\n- var status = (int)statusProp.GetValue(obj);\n- if (status != 1)\n- {\n- return null;\n- }\n-\n- // Get the URI\n- var urlProp = obj.GetType().GetProperty(\"Url\");\n- if (urlProp == null || urlProp.PropertyType != typeof(string))\n- {\n- return null;\n- }\n- if (!Uri.TryCreate((string)urlProp.GetValue(obj), UriKind.Absolute, out var uri))\n- {\n- return null;\n- }\n-\n- // Get Azure subscription ID\n- var subIdProp = obj.GetType().GetProperty(\"SubscriptionID\");\n- if (subIdProp == null || subIdProp.PropertyType != typeof(string))\n- {\n- return null;\n- }\n- var subscriptionId = (string)subIdProp.GetValue(obj);\n-\n- return new AzureWebSiteInfo(uri, subscriptionId);\n- }\n-\n- private async Task<bool> AttachWorker(AzureWebSiteInfo webSite)\n- {\n- using (new WaitDialog(\n- Resources.AzureRemoteDebugWaitCaption,\n- string.Format(CultureInfo.CurrentCulture, Resources.AzureRemoteDebugWaitMessage, webSite.Uri),\n- NodejsPackage.Instance,\n- showProgress: true))\n- {\n- // Get path (relative to site URL) for the debugger endpoint.\n- XDocument webConfig;\n- try\n- {\n- webConfig = await GetWebConfig(webSite);\n- }\n- catch (WebException)\n- {\n- return false;\n- }\n- catch (IOException)\n- {\n- return false;\n- }\n- catch (XmlException)\n- {\n- return false;\n- }\n- if (webConfig == null)\n- {\n- return false;\n- }\n-\n- var path =\n- (from add in webConfig.Elements(\"configuration\").Elements(\"system.webServer\").Elements(\"handlers\").Elements(\"add\")\n- let type = (string)add.Attribute(\"type\")\n- where type != null\n- let components = type.Split(',')\n- where components[0].Trim() == \"Microsoft.NodejsTools.Debugger.WebSocketProxy\"\n- select (string)add.Attribute(\"path\")\n- ).FirstOrDefault();\n- if (path == null)\n- {\n- return false;\n- }\n-\n- try\n- {\n- AttachDebugger(new UriBuilder(webSite.Uri) { Scheme = \"wss\", Port = -1, Path = path }.Uri);\n- }\n- catch (Exception ex)\n- {\n- // If we got to this point, the attach logic in debug engine will catch exceptions, display proper error message and\n- // ask the user to retry, so the only case where we actually get here is if user canceled on error. If this is the case,\n- // we don't want to pop any additional error messages, so always return true, but log the error in the Output window.\n- var output = OutputWindowRedirector.GetGeneral(NodejsPackage.Instance);\n- output.WriteErrorLine(string.Format(CultureInfo.CurrentCulture, Resources.AzureRemoveDebugCouldNotAttachToWebsiteExceptionErrorMessage, ex.Message));\n- output.ShowAndActivate();\n- }\n- return true;\n- }\n- }\n-\n- /// <summary>\n- /// Retrieves web.config for a given Azure Website.\n- /// </summary>\n- /// <returns>XML document with the contents of web.config, or <c>null</c> if it could not be retrieved.</returns>\n- private async Task<XDocument> GetWebConfig(AzureWebSiteInfo webSite)\n- {\n- var publishXml = await GetPublishXml(webSite);\n- if (publishXml == null)\n- {\n- return null;\n- }\n-\n- // Get FTP publish URL and credentials from publish settings.\n-\n- var publishProfile = publishXml.Elements(\"publishData\").Elements(\"publishProfile\").FirstOrDefault(el => (string)el.Attribute(\"publishMethod\") == \"FTP\");\n- if (publishProfile == null)\n- {\n- return null;\n- }\n-\n- var publishUrl = (string)publishProfile.Attribute(\"publishUrl\");\n- var userName = (string)publishProfile.Attribute(\"userName\");\n- var userPwd = (string)publishProfile.Attribute(\"userPWD\");\n- if (publishUrl == null || userName == null || userPwd == null)\n- {\n- return null;\n- }\n-\n- // Get web.config for the site via FTP.\n-\n- if (!publishUrl.EndsWith(\"/\", StringComparison.Ordinal))\n- {\n- publishUrl += \"/\";\n- }\n- publishUrl += \"web.config\";\n-\n- if (!Uri.TryCreate(publishUrl, UriKind.Absolute, out var webConfigUri))\n- {\n- return null;\n- }\n-\n- var request = WebRequest.Create(webConfigUri) as FtpWebRequest;\n- // Check that this is actually an FTP request, in case we get some valid but weird URL back.\n- if (request == null)\n- {\n- return null;\n- }\n- request.Credentials = new NetworkCredential(userName, userPwd);\n-\n- using (var response = await request.GetResponseAsync())\n- using (var stream = response.GetResponseStream())\n- {\n- // There is no XDocument.LoadAsync, but we want the networked I/O at least to be async, even if parsing is not.\n- var xmlData = new MemoryStream();\n- await stream.CopyToAsync(xmlData);\n- xmlData.Position = 0;\n- return XDocument.Load(xmlData);\n- }\n- }\n-\n- /// <summary>\n- /// Retrieves the publish settings file (.pubxml) for the given Azure Website.\n- /// </summary>\n- /// <returns>XML document with the contents of .pubxml, or <c>null</c> if it could not be retrieved.</returns>\n- private async Task<XDocument> GetPublishXml(AzureWebSiteInfo webSiteInfo)\n- {\n- // To build the publish settings request URL, we need to know subscription ID, site name, and web region to which it belongs,\n- // but we only have subscription ID and the public URL of the site at this point. Use the Azure Website service to look up\n- // the site from those two, and retrieve the missing info.\n-\n- var webSiteServices = new VsAzureServicesShim(NodejsPackage.GetGlobalService(this.azureServicesType));\n- if (webSiteServices == null)\n- {\n- return null;\n- }\n-\n- var webSiteService = webSiteServices.GetAzureWebSitesService();\n- if (webSiteService == null)\n- {\n- return null;\n- }\n-\n- var subscriptions = await webSiteService.GetSubscriptionsAsync();\n- var subscription = subscriptions.FirstOrDefault(sub => sub.SubscriptionId == webSiteInfo.SubscriptionId);\n- if (subscription == null)\n- {\n- return null;\n- }\n-\n- var resources = await subscription.GetResourcesAsync(false);\n- var webSite = resources.OfType<IAzureWebSite>().FirstOrDefault(ws =>\n- {\n- Uri.TryCreate(ws.BrowseURL, UriKind.Absolute, out var browseUri);\n- return browseUri != null && browseUri.Equals(webSiteInfo.Uri);\n- });\n- if (webSite == null)\n- {\n- return null;\n- }\n-\n- // Prepare a web request to get the publish settings.\n- // See http://msdn.microsoft.com/en-us/library/windowsazure/dn166996.aspx\n- var requestPath = string.Format(CultureInfo.InvariantCulture,\n- \"{0}/services/WebSpaces/{1}/sites/{2}/publishxml\",\n- subscription.SubscriptionId,\n- webSite.WebSpace,\n- webSite.Name);\n- var requestUri = new Uri(((IAzureSubscription)subscription).ServiceManagementEndpointUri, requestPath);\n- var request = (HttpWebRequest)WebRequest.Create(requestUri);\n- request.Method = \"GET\";\n- request.ContentType = \"application/xml\";\n- request.Headers.Add(\"x-ms-version\", \"2010-10-28\");\n-\n- // Set up authentication for the request, depending on whether the associated subscription context is\n- // account-based or certificate-based.\n- object context = subscription.AzureCredentials;\n- if (context is IAzureAuthenticationCertificateSubscriptionContext certContext)\n- {\n- var cert = await certContext.AuthenticationCertificate.GetCertificateFromStoreAsync();\n- request.ClientCertificates.Add(cert);\n- }\n- else\n- {\n- if (context is IAzureUserAccountSubscriptionContext accountCountext)\n- {\n- var authHeader = await accountCountext.GetAuthenticationHeaderAsync(false);\n- request.Headers.Add(HttpRequestHeader.Authorization, authHeader);\n- }\n- else\n- {\n- return null;\n- }\n- }\n-\n- using (var response = await request.GetResponseAsync())\n- using (var stream = response.GetResponseStream())\n- {\n- // There is no XDocument.LoadAsync, but we want the networked I/O at least to be async, even if parsing is not.\n- Stream xmlData = new MemoryStream();\n- await stream.CopyToAsync(xmlData);\n- xmlData.Position = 0;\n- return XDocument.Load(xmlData);\n- }\n- }\n-\n- private unsafe void AttachDebugger(Uri uri)\n- {\n- var debugger = (IVsDebugger2)NodejsPackage.GetGlobalService(typeof(SVsShellDebugger));\n- var debugInfo = new VsDebugTargetInfo2();\n-\n- var pDebugEngines = stackalloc Guid[1];\n- pDebugEngines[0] = AD7Engine.DebugEngineGuid;\n-\n- debugInfo.cbSize = (uint)Marshal.SizeOf(typeof(VsDebugTargetInfo2));\n- debugInfo.dlo = (uint)DEBUG_LAUNCH_OPERATION.DLO_AlreadyRunning;\n- debugInfo.guidLaunchDebugEngine = AD7Engine.DebugEngineGuid;\n- debugInfo.dwDebugEngineCount = 1;\n- debugInfo.pDebugEngines = (IntPtr)pDebugEngines;\n- debugInfo.guidPortSupplier = NodeRemoteDebugPortSupplier.PortSupplierGuid;\n- debugInfo.bstrPortName = uri.ToString();\n- debugInfo.dwProcessId = NodeRemoteDebugProcess.RemoteId;\n- debugInfo.bstrExe = (char)0 + \"0x\" + debugInfo.dwProcessId.ToString(\"X\"); // this must be set to NUL + process ID in hex when DLO_AlreadyRunning is specified\n- debugInfo.LaunchFlags = 0;\n-\n- var pDebugInfo = stackalloc byte[Marshal.SizeOf(debugInfo)];\n- Marshal.StructureToPtr(debugInfo, (IntPtr)pDebugInfo, false);\n- Marshal.ThrowExceptionForHR(debugger.LaunchDebugTargets2(1, (IntPtr)pDebugInfo));\n- }\n-\n- /// <summary>\n- /// Information about an Azure Website node in Server Explorer.\n- /// </summary>\n- private class AzureWebSiteInfo\n- {\n- public readonly Uri Uri;\n- public readonly string SubscriptionId;\n-\n- public AzureWebSiteInfo(Uri uri, string subscriptionId)\n- {\n- this.Uri = uri;\n- this.SubscriptionId = subscriptionId;\n- }\n- }\n- }\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"..\\TypeScript\\TypeScriptHelpers.cs\">\n<Link>TypeScriptHelpers\\TypeScriptHelpers.cs</Link>\n</Compile>\n- <Compile Include=\"Azure\\WebSiteServiceShims.cs\" />\n<Compile Include=\"ClassifierProviderMetadata.cs\" />\n- <Compile Include=\"Commands\\AzureExplorerAttachDebuggerCommand.cs\" />\n<Compile Include=\"Commands\\ImportWizardCommand.cs\" />\n<Compile Include=\"Commands\\OpenReplWindowCommand.cs\" />\n<Compile Include=\"Debugger\\DebugEngine\\AD7EvalErrorProperty.cs\" />\n<ConditionalEmbeddedResource Include=\"VSPackage.resx\">\n<MergeWithCTO>true</MergeWithCTO>\n<LogicalName>VSPackage.Resources</LogicalName>\n+ <SubType>Designer</SubType>\n</ConditionalEmbeddedResource>\n</ItemGroup>\n<ItemGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsPackage.cs",
"diff": "@@ -114,14 +114,6 @@ namespace Microsoft.NodejsTools\nnew ImportWizardCommand(),\n};\n- try\n- {\n- commands.Add(new AzureExplorerAttachDebuggerCommand());\n- }\n- catch (NotSupportedException)\n- {\n- }\n-\nRegisterCommands(commands, Guids.NodejsCmdSet);\nMakeDebuggerContextAvailable();\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsTools.vsct",
"new_path": "Nodejs/Product/Nodejs/NodejsTools.vsct",
"diff": "</Strings>\n</Button>\n- <Button guid=\"guidNodeToolsCmdSet\" id=\"cmdidAzureExplorerAttachNodejsDebugger\" priority=\"0x0110\" type=\"Button\">\n- <Parent guid=\"guidAzureExplorerCmdId\" id=\"groupAzureDiagnostics\"/>\n- <CommandFlag>DefaultInvisible</CommandFlag>\n- <CommandFlag>DynamicVisibility</CommandFlag>\n- <Strings>\n- <ButtonText>Attach Debugger (&Node.js)</ButtonText>\n- <MenuText>Attach Debugger (&Node.js)</MenuText>\n- <ToolTipText>Attach the Node.js debugger to the remote Microsoft Azure site</ToolTipText>\n- <CommandName>Attach Node.js Debugger</CommandName>\n- </Strings>\n- </Button>\n-\n<!-- This button is invoked by code in the Import Wizard. So it's invisible, but still very much needed. -->\n<Button guid=\"guidNodeToolsCmdSet\" id=\"cmdidImportWizard\" priority=\"0x010\" type=\"Button\">\n<CommandFlag>DefaultInvisible</CommandFlag>\n<IDSymbol name=\"cmdidSetAsNodejsStartupFile\" value=\"0x0203\" />\n<IDSymbol name=\"cmdidImportWizard\" value =\"0x0205\" />\n- <IDSymbol name=\"cmdidAzureExplorerAttachNodejsDebugger\" value=\"0x0207\" />\n<IDSymbol name=\"cmdidAddNewFileCommand\" value=\"0x0211\" />\n<!-- Shared commands, defined in CommonConstants.cs -->\n<!-- Groups -->\n<IDSymbol name=\"CodeFileGroup\" value=\"0x1012\" />\n- <IDSymbol name=\"AzureExplorerCommandsGroup\" value=\"0x1015\" />\n<IDSymbol name=\"AddNewFileGroup\" value=\"0x1016\"/>\n</GuidSymbol>\n<IDSymbol name=\"cmdidWorkSpaceNpmDynamicScript\" value=\"0x1000\"/>\n</GuidSymbol>\n- <GuidSymbol name=\"guidAzureExplorerCmdId\" value=\"{2F32C14E-B908-42E6-AE7E-B8B3E2DED633}\">\n- <IDSymbol name=\"groupAzureDiagnostics\" value=\"400\" />\n- </GuidSymbol>\n-\n<!-- InteractiveWindow Guid -->\n<GuidSymbol name=\"guidInteractiveWindowCmdSet\" value=\"{00B8868B-F9F5-4970-A048-410B05508506}\">\n<!-- https://github.com/dotnet/roslyn/blob/releases/VS2015/src/InteractiveWindow/VisualStudio/InteractiveWindow.vsct -->\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/PkgCmdId.cs",
"new_path": "Nodejs/Product/Nodejs/PkgCmdId.cs",
"diff": "@@ -10,8 +10,6 @@ namespace Microsoft.NodejsTools\npublic const int cmdidImportWizard = 0x205;\n- public const uint cmdidAzureExplorerAttachNodejsDebugger = 0x207;\n-\npublic const int cmdidDiagnostics = 0x208;\npublic const int cmdidAddFileCommand = 0x211;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"new_path": "Nodejs/Product/Nodejs/Resources.Designer.cs",
"diff": "@@ -60,44 +60,6 @@ namespace Microsoft.NodejsTools {\n}\n}\n- /// <summary>\n- /// Looks up a localized string similar to Azure remote debugging.\n- /// </summary>\n- internal static string AzureRemoteDebugWaitCaption {\n- get {\n- return ResourceManager.GetString(\"AzureRemoteDebugWaitCaption\", resourceCulture);\n- }\n- }\n-\n- /// <summary>\n- /// Looks up a localized string similar to Attaching to Azure Website at {0}.\n- /// </summary>\n- internal static string AzureRemoteDebugWaitMessage {\n- get {\n- return ResourceManager.GetString(\"AzureRemoteDebugWaitMessage\", resourceCulture);\n- }\n- }\n-\n- /// <summary>\n- /// Looks up a localized string similar to Could not attach to node.exe process on Azure Website at {0}.\n- ///\n- ///Error retrieving websocket debug proxy information from web.config..\n- /// </summary>\n- internal static string AzureRemoveDebugCouldNotAttachToWebsiteErrorMessage {\n- get {\n- return ResourceManager.GetString(\"AzureRemoveDebugCouldNotAttachToWebsiteErrorMessage\", resourceCulture);\n- }\n- }\n-\n- /// <summary>\n- /// Looks up a localized string similar to Failed to attach to Azure Website: {0}.\n- /// </summary>\n- internal static string AzureRemoveDebugCouldNotAttachToWebsiteExceptionErrorMessage {\n- get {\n- return ResourceManager.GetString(\"AzureRemoveDebugCouldNotAttachToWebsiteExceptionErrorMessage\", resourceCulture);\n- }\n- }\n-\n/// <summary>\n/// Looks up a localized string similar to Select Working Dir.\n/// </summary>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Resources.resx",
"new_path": "Nodejs/Product/Nodejs/Resources.resx",
"diff": "@@ -498,20 +498,6 @@ The following error occurred trying to execute npm.cmd:\n{0}</value>\n</data>\n- <data name=\"AzureRemoteDebugWaitCaption\" xml:space=\"preserve\">\n- <value>Azure remote debugging</value>\n- </data>\n- <data name=\"AzureRemoteDebugWaitMessage\" xml:space=\"preserve\">\n- <value>Attaching to Azure Website at {0}</value>\n- </data>\n- <data name=\"AzureRemoveDebugCouldNotAttachToWebsiteErrorMessage\" xml:space=\"preserve\">\n- <value>Could not attach to node.exe process on Azure Website at {0}.\n-\n-Error retrieving websocket debug proxy information from web.config.</value>\n- </data>\n- <data name=\"AzureRemoveDebugCouldNotAttachToWebsiteExceptionErrorMessage\" xml:space=\"preserve\">\n- <value>Failed to attach to Azure Website: {0}</value>\n- </data>\n<data name=\"RemoteDebugCheckProxyAndPortErrorMessage\" xml:space=\"preserve\">\n<value>Make sure that the process is running behind the remote debug proxy (RemoteDebug.js), and the debugger port (default {0}) is open on the target host.</value>\n</data>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removed dependencies in Server Explorer (#2080)
|
410,210 |
01.10.2018 13:47:46
| -7,200 |
a33247d698ee0dd53861dd98586c1368d66972ca
|
fix spelling of 'high-level' in CONTRIBUTING.md
|
[
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -19,7 +19,7 @@ pull requests:\n- Clearly state what the pull request accomplishes.\n- If it's a bug fix, what was the bug and how has it been fixed?\n- If you're adding a new feature, explain the feature and its use cases.\n-- Provide a high level explanation of your changes. This will help reviewers understand implementation choices\n+- Provide a high-level explanation of your changes. This will help reviewers understand implementation choices\nand will speed up the review process.\n- Try to keep pull requests small and focused.\n- There is no formal code style-guide, but please try to match the style of any file you are editing. There is\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
fix spelling of 'high-level' in CONTRIBUTING.md
|
410,202 |
10.10.2018 17:24:58
| 25,200 |
5495ec7f2207c52b045574f2f6f603c56a495e35
|
Change references to version 15 to 16
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Theme/make_theme_pkgdef.py",
"new_path": "Nodejs/Product/Nodejs/Theme/make_theme_pkgdef.py",
"diff": "@@ -8,7 +8,7 @@ import xml.etree.ElementTree\nfrom pathlib import WindowsPath\nfrom uuid import UUID\n-for VS_VERSION in (11, 12, 14, 15):\n+for VS_VERSION in (11, 12, 14, 15, 16):\nprint('Writing to {}'.format(THEME_PKGDEF.format(VS_VERSION)))\noutput = open(THEME_PKGDEF.format(VS_VERSION), 'w', encoding='ascii')\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/NodejsToolsVsix/source.extension.vsixmanifest",
"new_path": "Nodejs/Product/NodejsToolsVsix/source.extension.vsixmanifest",
"diff": "Id specifications are minimums; any SKU equal or 'higher' will accept\nthem. -->\n<Installation SystemComponent=\"true\">\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n</Installation>\n<Assets>\n<Asset Type=\"Microsoft.VisualStudio.VsPackage\" d:Source=\"Project\" d:ProjectName=\"Nodejs\" Path=\"|Nodejs;PkgdefProjectOutputGroup|\" />\n<Asset Type=\"Microsoft.VisualStudio.ItemTemplate\" d:Source=\"Project\" d:ProjectName=\"Nodejs\" d:TargetPath=\"|Nodejs;TemplateProjectOutputGroup|\" Path=\"ItemTemplates\" d:VsixSubPath=\"ItemTemplates\" />\n</Assets>\n<Prerequisites>\n- <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[15.0,16.0)\" DisplayName=\"Visual Studio core editor\" />\n+ <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[16.0,17.0)\" DisplayName=\"Visual Studio core editor\" />\n</Prerequisites>\n</PackageManifest>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsTools.targets",
"new_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsTools.targets",
"diff": "<Target Name=\"CopyFilesToOutputDirectory\"/>\n<Target Name=\"CoreCompile\">\n- <Error Condition=\"!Exists('$(VSToolsPath)\\TypeScript\\Microsoft.TypeScript.targets') And '$(EnableTypeScript)' == 'true' And '$(VisualStudioVersion)' != '15.0'\" Text=\"TypeScript is not installed but TypeScript support is enabled in this project. Please download and install TypeScript http://go.microsoft.com/fwlink/?LinkID=393159&clcid=0x409.\"></Error>\n+ <Error Condition=\"!Exists('$(VSToolsPath)\\TypeScript\\Microsoft.TypeScript.targets') And '$(EnableTypeScript)' == 'true' And '$(VisualStudioVersion)' != '16.0'\" Text=\"TypeScript is not installed but TypeScript support is enabled in this project. Please download and install TypeScript http://go.microsoft.com/fwlink/?LinkID=393159&clcid=0x409.\"></Error>\n<PropertyGroup>\n<_NodeModulesContentProperty>@(NodeModulesContent)</_NodeModulesContentProperty>\n</PropertyGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/source.extension.vsixmanifest",
"new_path": "Nodejs/Product/TargetsVsix/source.extension.vsixmanifest",
"diff": "<PackageId>Microsoft.VisualStudio.NodejsTools.Targets</PackageId>\n</Metadata>\n<Installation SystemComponent=\"true\" AllUsers=\"true\">\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n</Installation>\n<Dependencies>\n<Dependency Id=\"Microsoft.Framework.NDP\" DisplayName=\"Microsoft .NET Framework\" d:Source=\"Manual\" Version=\"[4.5,)\" />\n<Asset Type=\"Microsoft.VisualStudio.MefComponent\" d:Source=\"Project\" d:ProjectName=\"WebRole\" Path=\"|WebRole|\" />\n</Assets>\n<Prerequisites>\n- <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[15.0,16.0)\" DisplayName=\"Visual Studio core editor\" />\n+ <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[16.0,17.0)\" DisplayName=\"Visual Studio core editor\" />\n</Prerequisites>\n</PackageManifest>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"new_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"diff": "@@ -20,7 +20,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.probePaths = new[] {\nPath.Combine(ideFolder, \"PrivateAssemblies\"),\nPath.Combine(ideFolder, \"PublicAssemblies\"),\n- Path.Combine(installPath, \"MSBuild\",\"15.0\",\"Bin\"),\n+ Path.Combine(installPath, \"MSBuild\",\"16.0\",\"Bin\"),\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"TestWindow\"),\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"WebClient\",\"Project System\") };\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/VisualStudioApp.cs",
"diff": "@@ -103,7 +103,7 @@ namespace Microsoft.VisualStudioTools\nprefix = \"VisualStudio\";\n}\n- var progId = $\"!{prefix}.DTE.15.0:{processId}\";\n+ var progId = $\"!{prefix}.DTE.16.0:{processId}\";\nobject runningObject = null;\nIBindCtx bindCtx = null;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterVsix/source.extension.vsixmanifest",
"new_path": "Nodejs/Product/TestAdapterVsix/source.extension.vsixmanifest",
"diff": "<PackageId>Microsoft.VisualStudio.NodejsTools.TestAdapter</PackageId>\n</Metadata>\n<Installation SystemComponent=\"true\">\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n</Installation>\n<Dependencies>\n<Dependency Id=\"Microsoft.Framework.NDP\" DisplayName=\"Microsoft .NET Framework\" d:Source=\"Manual\" Version=\"[4.5,)\" />\n</Dependencies>\n<Prerequisites>\n- <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[15.0,16.0)\" DisplayName=\"Visual Studio core editor\" />\n+ <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[16.0,17.0)\" DisplayName=\"Visual Studio core editor\" />\n</Prerequisites>\n<Assets>\n<Asset Type=\"Microsoft.VisualStudio.MefComponent\" d:Source=\"Project\" d:ProjectName=\"TestAdapter\" Path=\"|TestAdapter|\" />\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Change references to version 15 to 16
|
410,202 |
10.10.2018 17:30:42
| 25,200 |
7a3cf9c37d3d1870dc969d12dad88e311ccc1deb
|
Updated missing file in version update
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/source.extension.vsixmanifest",
"new_path": "Nodejs/Product/Nodejs/source.extension.vsixmanifest",
"diff": "<PackageId>Microsoft.VisualStudio.NodejsTools.NodejsTools</PackageId>\n</Metadata>\n<Installation SystemComponent=\"true\">\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n- <InstallationTarget Version=\"[15.0.0,16.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Community\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Pro\" />\n+ <InstallationTarget Version=\"[16.0.0,17.0)\" Id=\"Microsoft.VisualStudio.Enterprise\" />\n</Installation>\n<Dependencies>\n<Dependency Id=\"Microsoft.Framework.NDP\" DisplayName=\"Microsoft .NET Framework\" Version=\"4.5\" />\n</Dependencies>\n<Prerequisites>\n- <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[15.0,16.0)\" DisplayName=\"Visual Studio core editor\" />\n- <Prerequisite Id=\"Microsoft.VisualStudio.Component.JavaScript.TypeScript\" Version=\"[15.0,16.0)\" DisplayName=\"JavaScript and TypeScript language support\" />\n+ <Prerequisite Id=\"Microsoft.VisualStudio.Component.CoreEditor\" Version=\"[16.0,17.0)\" DisplayName=\"Visual Studio core editor\" />\n+ <Prerequisite Id=\"Microsoft.VisualStudio.Component.JavaScript.TypeScript\" Version=\"[16.0,17.0)\" DisplayName=\"JavaScript and TypeScript language support\" />\n</Prerequisites>\n<Assets>\n<Asset Type=\"Microsoft.VisualStudio.Package\" Path=\"|%CurrentProject%|\" d:Source=\"Project\" d:ProjectName=\"%CurrentProject%\" />\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Updated missing file in version update
|
410,202 |
11.10.2018 11:51:55
| 25,200 |
194635c6316c29e3bf2fd7fdf54653c73f53c835
|
Rollback assemblyresolver.cs
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"new_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"diff": "@@ -20,7 +20,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.probePaths = new[] {\nPath.Combine(ideFolder, \"PrivateAssemblies\"),\nPath.Combine(ideFolder, \"PublicAssemblies\"),\n- Path.Combine(installPath, \"MSBuild\",\"16.0\",\"Bin\"),\n+ Path.Combine(installPath, \"MSBuild\",\"15.0\",\"Bin\"), // TODO: Update this to version 16.0 when the folder exists.\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"TestWindow\"),\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"WebClient\",\"Project System\") };\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Rollback assemblyresolver.cs
|
410,202 |
23.10.2018 17:32:40
| 25,200 |
242b4f9e5169195e43ed1590ccdd7df71f926a72
|
Suppress ObjectDisposedException on BoldStartupItem
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"diff": "@@ -399,7 +399,13 @@ namespace Microsoft.VisualStudioTools.Project\nprivate void BoldStartupItem()\n{\n- var startupPath = GetStartupFile();\n+ string startupPath = null;\n+ try\n+ {\n+ startupPath = GetStartupFile();\n+ }\n+ catch (ObjectDisposedException) { } // Supress the exception as VS crashes when closing a solution.\n+\nif (!string.IsNullOrEmpty(startupPath))\n{\nvar startup = FindNodeByFullPath(startupPath);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -1834,12 +1834,8 @@ namespace Microsoft.VisualStudioTools.Project\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\nvar property = GetMsBuildProperty(propertyName, resetCache);\n- if (property == null)\n- {\n- return null;\n- }\n- return property.EvaluatedValue;\n+ return property?.EvaluatedValue;\n}\n/// <summary>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Suppress ObjectDisposedException on BoldStartupItem
|
410,197 |
13.11.2018 14:20:16
| 28,800 |
9c1ebcc26b0d010d4da139821eb6fda2b8e438ee
|
Update AssemblyResolver probe path for dev16
Fixes
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"new_path": "Nodejs/Product/TestAdapter/AssemblyResolver.cs",
"diff": "@@ -20,7 +20,8 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.probePaths = new[] {\nPath.Combine(ideFolder, \"PrivateAssemblies\"),\nPath.Combine(ideFolder, \"PublicAssemblies\"),\n- Path.Combine(installPath, \"MSBuild\",\"15.0\",\"Bin\"), // TODO: Update this to version 16.0 when the folder exists.\n+ Path.Combine(installPath, \"MSBuild\",\"Current\",\"Bin\"),\n+ Path.Combine(installPath, \"MSBuild\",\"15.0\",\"Bin\"),\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"TestWindow\"),\nPath.Combine(ideFolder, \"CommonExtensions\",\"Microsoft\",\"WebClient\",\"Project System\") };\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Update AssemblyResolver probe path for dev16
Fixes #2113
|
410,202 |
29.11.2018 15:49:10
| 28,800 |
393cd654044584cc67c52a50e3f0edd67f455059
|
Filter out unconfigured unit tests projects
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -13,7 +13,10 @@ namespace Microsoft.NodejsTools\npublic const string TypeScriptJsxExtension = \".tsx\";\npublic const string TypeScriptDeclarationExtension = \".d.ts\";\npublic const string MapExtension = \".map\";\n+\npublic const string NodejsProjectExtension = \".njsproj\";\n+ public const string CSharpProjectExtension = \".csproj\";\n+ public const string VisualBasicProjectExtension = \".vsproj\";\npublic const string JavaScript = \"JavaScript\";\npublic const string CSS = \"CSS\";\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -15,7 +15,7 @@ using MSBuild = Microsoft.Build.Evaluation;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n- [FileExtension(\".njsproj\"), FileExtension(\".csproj\"), FileExtension(\".vbproj\")]\n+ [FileExtension(NodejsConstants.NodejsProjectExtension), FileExtension(NodejsConstants.CSharpProjectExtension), FileExtension(NodejsConstants.VisualBasicProjectExtension)]\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\npublic partial class JavaScriptTestDiscoverer : ITestDiscoverer\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"diff": "@@ -99,37 +99,51 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn false;\n}\n}\n- else if (!StringComparer.OrdinalIgnoreCase.Equals(Path.GetExtension(pathToFile), NodejsConstants.JavaScriptExtension))\n+ else if (!TypeScriptHelpers.IsJavaScriptFile(pathToFile))\n{\nreturn false;\n}\n+ if (TryGetProjectUnitTestProperties(project, out var testRoot, out _) && !string.IsNullOrEmpty(testRoot))\n+ {\n+ project.TryGetProjectDirectory(out var root);\n+ var testRootPath = Path.Combine(root, testRoot);\n+\n+ return CommonUtils.IsSubpathOf(testRootPath, pathToFile);\n+ }\n+\n+ ErrorHandler.Succeeded(((IVsHierarchy)project).ParseCanonicalName(pathToFile, out var itemId));\n+\n+ return IsTestFile(itemId, project);\n+ }\n+\n+ private static bool TryGetProjectUnitTestProperties(IVsProject project, out string testRoot, out string testFramework)\n+ {\nif (!(project is IVsBuildPropertyStorage propStore))\n{\nDebug.Fail($\"Why is {nameof(project)} not of type {nameof(IVsBuildPropertyStorage)}?\");\n+ testRoot = null;\n+ testFramework = null;\n+\nreturn false;\n}\n- var hr = propStore.GetPropertyValue(NodeProjectProperty.TestRoot,/*configuration*/ \"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out var testRoot);\n+ // .NET Framework returns error, .NET Core returns success with \"\" as output, NTVS returns success with null as output\n+ var hrTestRoot = propStore.GetPropertyValue(NodeProjectProperty.TestRoot, /*configuration*/\"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out testRoot);\n+ var hrTestFramework = propStore.GetPropertyValue(NodeProjectProperty.TestFramework, /*configuration*/\"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out testFramework);\n- // if test root is specified check if the file is contained, otherwise fall back to old logic\n- if (ErrorHandler.Succeeded(hr) && !string.IsNullOrEmpty(testRoot))\n+ if (ErrorHandler.Failed(hrTestRoot) && ErrorHandler.Failed(hrTestFramework)\n+ || testRoot == string.Empty && testFramework == string.Empty)\n{\n- project.TryGetProjectPath(out var root);\n- var testRootPath = Path.Combine(root, testRoot);\n-\n- return CommonUtils.IsSubpathOf(root, pathToFile);\n+ return false;\n}\n- ErrorHandler.Succeeded(((IVsHierarchy)project).ParseCanonicalName(pathToFile, out var itemId));\n-\n- return IsTestFile(itemId, project);\n+ return true;\n}\nprivate static bool IsTestFile(uint itemId, IVsProject project)\n{\n-\nif (!(project is IVsHierarchy hierarchy))\n{\nreturn false;\n@@ -194,7 +208,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.building = false;\n}\n- #region IDispoable\n+ #region IDisposable\nvoid IDisposable.Dispose()\n{\nif (!this.isDisposed)\n@@ -208,6 +222,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n#endregion\n#region ITestContainerDiscoverer\n+\npublic event EventHandler TestContainersUpdated;\npublic Uri ExecutorUri => NodejsConstants.ExecutorUri;\n@@ -236,11 +251,12 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn EnumerateLoadedProjects(solution).SelectMany(p => this.GetTestContainers(p));\n}\n}\n+\n#endregion\npublic IEnumerable<ITestContainer> GetTestContainers(IVsProject project)\n{\n- if (ErrorHandler.Failed(project.GetMkDocument(VSConstants.VSITEMID_ROOT, out var path)) || string.IsNullOrEmpty(path))\n+ if (!project.TryGetProjectPath(out var path))\n{\nyield break;\n}\n@@ -250,9 +266,9 @@ namespace Microsoft.NodejsTools.TestAdapter\nthis.SaveModifiedFiles(project);\n}\n- if (!this.knownProjects.TryGetValue(path, out var projectInfo))\n+ if (!this.knownProjects.TryGetValue(path, out var projectInfo) || !TryGetProjectUnitTestProperties(projectInfo.Project, out _, out _))\n{\n- // Don't return any containers for projects we don't know about.\n+ // Don't return any containers for projects we don't know about or that we know that they are not configured for JavaScript unit tests.\nyield break;\n}\nprojectInfo.HasRequestedContainers = true;\n@@ -304,8 +320,8 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n//Setting/updating \"TestFramework\" property on a file item will cause metedata change in the project file,\n- //so we need to re-discover when file change happens. Since we support all project files, this is a safe check\n- if (pathToItem.EndsWith(\"proj\", StringComparison.OrdinalIgnoreCase))\n+ //so we need to re-discover when file change happens.\n+ if (TypeScriptHelpers.IsProjectFile(pathToItem))\n{\nreturn true;\n}\n@@ -316,8 +332,10 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nEqtTrace.Verbose(\"TestContainerDiscoverer: Found a test {0}.\", pathToItem);\n}\n+\nreturn true;\n}\n+\nreturn false;\n}\n@@ -341,14 +359,13 @@ namespace Microsoft.NodejsTools.TestAdapter\n// watchers into a single recursive watcher.\n}\n- if (e.Project.TryGetProjectPath(out var path) &&\n- !this.knownProjects.ContainsKey(path))\n+ if (e.Project.TryGetProjectPath(out var path) && !this.knownProjects.ContainsKey(path))\n{\nvar dteProject = ((IVsHierarchy)e.Project).GetProject();\nvar projectInfo = new ProjectInfo(\ne.Project,\n- this\n+ discoverer: this\n);\nthis.knownProjects.Add(path, projectInfo);\n@@ -390,8 +407,8 @@ namespace Microsoft.NodejsTools.TestAdapter\n// project. We just won't get the benefits of merging\n// watchers into a single recursive watcher.\n}\n- if (e.Project.TryGetProjectPath(out var projectPath) &&\n- this.knownProjects.TryGetValue(projectPath, out var projectInfo))\n+\n+ if (e.Project.TryGetProjectPath(out var projectPath) && this.knownProjects.TryGetValue(projectPath, out var projectInfo))\n{\nthis.knownProjects.Remove(projectPath);\n@@ -401,8 +418,10 @@ namespace Microsoft.NodejsTools.TestAdapter\n{\nthis.testFilesUpdateWatcher.RemoveFileWatch(p);\n}\n+\nthis.fileRootMap.Remove(p);\n}\n+\nif (!string.IsNullOrEmpty(root))\n{\nthis.testFilesUpdateWatcher.RemoveFolderWatch(root);\n@@ -449,6 +468,7 @@ namespace Microsoft.NodejsTools.TestAdapter\nif (this.fileRootMap.TryGetValue(e.File, out root))\n{\nthis.fileRootMap.Remove(e.File);\n+\nif (!this.fileRootMap.Values.Contains(root))\n{\nthis.testFilesUpdateWatcher.RemoveFolderWatch(root);\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/VsProjectExtensions.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/VsProjectExtensions.cs",
"diff": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\n+using System.IO;\n+using Microsoft.NodejsTools.TypeScript;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.Shell.Flavor;\nusing Microsoft.VisualStudio.Shell.Interop;\n@@ -45,6 +47,21 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn ErrorHandler.Succeeded(project.GetMkDocument(VSConstants.VSITEMID_ROOT, out path)) && !string.IsNullOrEmpty(path);\n}\n+ public static bool TryGetProjectDirectory(this IVsProject project, out string path)\n+ {\n+ ValidateArg.NotNull(project, \"project\");\n+\n+ var succeeded = ErrorHandler.Succeeded(project.GetMkDocument(VSConstants.VSITEMID_ROOT, out path)) && !string.IsNullOrEmpty(path);\n+\n+ if (succeeded && TypeScriptHelpers.IsProjectFile(path))\n+ {\n+ // remove project name from the path.\n+ path = Path.GetDirectoryName(path);\n+ }\n+\n+ return succeeded;\n+ }\n+\nprivate static string GetAggregateProjectTypeGuids(this IVsProject project)\n{\nValidateArg.NotNull(project, \"project\");\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -22,6 +22,13 @@ namespace Microsoft.NodejsTools.TypeScript\n|| StringComparer.OrdinalIgnoreCase.Equals(extension, NodejsConstants.TypeScriptJsxExtension);\n}\n+ internal static bool IsJavaScriptFile(string filename)\n+ {\n+ var extension = Path.GetExtension(filename);\n+\n+ return StringComparer.OrdinalIgnoreCase.Equals(extension, NodejsConstants.JavaScriptExtension);\n+ }\n+\ninternal static bool IsTsJsConfigJsonFile(string filePath)\n{\nvar fileName = Path.GetFileName(filePath);\n@@ -29,6 +36,15 @@ namespace Microsoft.NodejsTools.TypeScript\nStringComparer.OrdinalIgnoreCase.Equals(fileName, NodejsConstants.JsConfigJsonFile);\n}\n+ internal static bool IsProjectFile(string filePath)\n+ {\n+ var extension = Path.GetExtension(filePath);\n+\n+ return StringComparer.OrdinalIgnoreCase.Equals(extension, NodejsConstants.NodejsProjectExtension)\n+ || StringComparer.OrdinalIgnoreCase.Equals(extension, NodejsConstants.CSharpProjectExtension)\n+ || StringComparer.OrdinalIgnoreCase.Equals(extension, NodejsConstants.VisualBasicProjectExtension);\n+ }\n+\ninternal static string GetTypeScriptBackedJavaScriptFile(MSBuild.Project project, string pathToFile)\n{\nvar typeScriptOutDir = project.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Filter out unconfigured unit tests projects
|
410,202 |
29.11.2018 19:07:42
| 28,800 |
61f00d93180c0fc388e63fcc264bdd85f86e4038
|
Added sync supported project types comment
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/JavaScriptTestDiscoverer.cs",
"diff": "@@ -15,6 +15,7 @@ using MSBuild = Microsoft.Build.Evaluation;\nnamespace Microsoft.NodejsTools.TestAdapter\n{\n+ // Keep in sync the method TypeScriptHelpers.IsSupportedTestProjectFile if there's a change on the supported projects.\n[FileExtension(NodejsConstants.NodejsProjectExtension), FileExtension(NodejsConstants.CSharpProjectExtension), FileExtension(NodejsConstants.VisualBasicProjectExtension)]\n[DefaultExecutorUri(NodejsConstants.ExecutorUriString)]\npublic partial class JavaScriptTestDiscoverer : ITestDiscoverer\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -36,6 +36,7 @@ namespace Microsoft.NodejsTools.TypeScript\nStringComparer.OrdinalIgnoreCase.Equals(fileName, NodejsConstants.JsConfigJsonFile);\n}\n+ // Keep in sync the JavaScriptTestDiscoverer class if there's a change on the supported projects.\ninternal static bool IsSupportedTestProjectFile(string filePath)\n{\nvar extension = Path.GetExtension(filePath);\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added sync supported project types comment
|
410,202 |
30.11.2018 13:26:38
| 28,800 |
09ce7f7f1021f5843c21b67fbe7cf06b5c7b3b62
|
Refactored TryGetProjectUnitTestProperties return and added documentation comments
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs",
"diff": "@@ -130,17 +130,16 @@ namespace Microsoft.NodejsTools.TestAdapter\nreturn false;\n}\n- // .NET Framework returns error, .NET Core returns success with \"\" as output, NTVS returns success with null as output\n+ // If a property has not been configured, depending on the project type the result and output will be diffent.\n+ // .NET Framework returns a failure code and null as output, .NET Core returns a success code and \"\" as output, NTVS returns success code and null as output\nvar hrTestRoot = propStore.GetPropertyValue(NodeProjectProperty.TestRoot, /*configuration*/\"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out testRoot);\nvar hrTestFramework = propStore.GetPropertyValue(NodeProjectProperty.TestFramework, /*configuration*/\"\", (uint)_PersistStorageType.PST_PROJECT_FILE, out testFramework);\n- if (ErrorHandler.Failed(hrTestRoot) && ErrorHandler.Failed(hrTestFramework)\n- || testRoot == string.Empty && testFramework == string.Empty)\n- {\n- return false;\n- }\n-\n- return true;\n+ // If it doesnt succeed it's a .NET Framework project not configured.\n+ // If it succeeds but it's empty, it might be a .NET Core project not configured or a misconfigured project.\n+ // Anything else can be a NTVS project, in which case, we want to always return true.\n+ return ErrorHandler.Succeeded(hrTestRoot) && testRoot != string.Empty\n+ || ErrorHandler.Succeeded(hrTestFramework) && testFramework != string.Empty;\n}\nprivate static bool IsTestFile(uint itemId, IVsProject project)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Refactored TryGetProjectUnitTestProperties return and added documentation comments
|
410,202 |
13.12.2018 15:51:53
| 28,800 |
1104a7439c6042fd4708d7fc728ddf63c9a01774
|
Added NodeJsToolsEventSource and telemetry to OnItemAdded
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"Commands\\ImportWizardCommand.cs\" />\n<Compile Include=\"Commands\\OpenReplWindowCommand.cs\" />\n<Compile Include=\"Debugger\\DebugEngine\\AD7EvalErrorProperty.cs\" />\n+ <Compile Include=\"Diagnostics\\NodeJsToolsEventSource.cs\" />\n<Compile Include=\"Repl\\InteractiveWindowContentType.cs\" />\n<Compile Include=\"SharedProject\\SystemUtilities.cs\" />\n<Compile Include=\"TypeScriptHelpers\\TsConfigJson.cs\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -14,6 +14,7 @@ using System.Windows.Forms;\nusing System.Xml;\nusing EnvDTE;\nusing Microsoft.Build.Execution;\n+using Microsoft.NodejsTools.Diagnostics;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.OLE.Interop;\nusing Microsoft.VisualStudio.Shell;\n@@ -6459,13 +6460,19 @@ If the files in the existing folder have the same names as files in the folder y\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\n+ var isDiskNode = false;\n+\nif (child is IDiskBasedNode diskNode)\n{\nthis.DiskNodes[diskNode.Url] = child;\n+ isDiskNode = true;\n}\n+ NodejsToolsEventSource.Instance.HierarchyEventStart(parent.HierarchyId, parent.GetItemName(), child.HierarchyId, child.GetItemName(), previousVisible?.HierarchyId, previousVisible?.GetItemName(), isDiskNode);\n+\nif ((this.EventTriggeringFlag & ProjectNode.EventTriggering.DoNotTriggerHierarchyEvents) != 0)\n{\n+ NodejsToolsEventSource.Instance.HierarchyEventStop(\"Do not trigger OnItemAdded.\");\nreturn;\n}\n@@ -6475,12 +6482,25 @@ If the files in the existing folder have the same names as files in the folder y\nvar prevId = (prev != null) ? prev.HierarchyId : VSConstants.VSITEMID_NIL;\nforeach (IVsHierarchyEvents sink in this.hierarchyEventSinks)\n{\n- var result = sink.OnItemAdded(parent.HierarchyId, prevId, child.HierarchyId);\n+ var result = 0;\n+ try\n+ {\n+ result = sink.OnItemAdded(parent.HierarchyId, prevId, child.HierarchyId);\nif (ErrorHandler.Failed(result) && result != VSConstants.E_NOTIMPL)\n{\n+ NodejsToolsEventSource.Instance.HierarchyEventException(\"OnItemAdded failed.\", result, parent.HierarchyId, prevId, child.HierarchyId);\nErrorHandler.ThrowOnFailure(result);\n}\n}\n+ catch (InvalidOperationException ex)\n+ {\n+ // TODO: Get the whole hierarchy nodes information.\n+ NodejsToolsEventSource.Instance.HierarchyEventException(ex.Message, result, parent.HierarchyId, prevId, child.HierarchyId);\n+ throw;\n+ }\n+ }\n+\n+ NodejsToolsEventSource.Instance.HierarchyEventStop(\"OnItemAdded successful.\");\n}\ninternal void OnItemDeleted(HierarchyNode deletedItem)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added NodeJsToolsEventSource and telemetry to OnItemAdded
|
410,202 |
14.12.2018 12:27:12
| 28,800 |
52a3de65dbab452c5d82828f425fb236aa9db171
|
Added HierarchyItem table to EventSource
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"new_path": "Nodejs/Product/Nodejs/Nodejs.csproj",
"diff": "<Compile Include=\"Commands\\ImportWizardCommand.cs\" />\n<Compile Include=\"Commands\\OpenReplWindowCommand.cs\" />\n<Compile Include=\"Debugger\\DebugEngine\\AD7EvalErrorProperty.cs\" />\n+ <Compile Include=\"Diagnostics\\HierarchyItem.cs\" />\n<Compile Include=\"Diagnostics\\NodeJsToolsEventSource.cs\" />\n<Compile Include=\"Repl\\InteractiveWindowContentType.cs\" />\n<Compile Include=\"SharedProject\\SystemUtilities.cs\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -14,6 +14,7 @@ using System.Windows.Forms;\nusing System.Xml;\nusing EnvDTE;\nusing Microsoft.Build.Execution;\n+using Microsoft.NodejsTools;\nusing Microsoft.NodejsTools.Diagnostics;\nusing Microsoft.VisualStudio;\nusing Microsoft.VisualStudio.OLE.Interop;\n@@ -6480,6 +6481,7 @@ If the files in the existing folder have the same names as files in the folder y\nvar prev = previousVisible ?? child.PreviousVisibleSibling;\nvar prevId = (prev != null) ? prev.HierarchyId : VSConstants.VSITEMID_NIL;\n+\nforeach (IVsHierarchyEvents sink in this.hierarchyEventSinks)\n{\nvar result = 0;\n@@ -6488,14 +6490,13 @@ If the files in the existing folder have the same names as files in the folder y\nresult = sink.OnItemAdded(parent.HierarchyId, prevId, child.HierarchyId);\nif (ErrorHandler.Failed(result) && result != VSConstants.E_NOTIMPL)\n{\n- NodejsToolsEventSource.Instance.HierarchyEventException(\"OnItemAdded failed.\", result, parent.HierarchyId, prevId, child.HierarchyId);\n+ NodejsToolsEventSource.Instance.HierarchyEventException(\"OnItemAdded failed.\", result, parent.HierarchyId, prevId, child.HierarchyId, this.GetHierarchyItems());\nErrorHandler.ThrowOnFailure(result);\n}\n}\ncatch (InvalidOperationException ex)\n{\n- // TODO: Get the whole hierarchy nodes information.\n- NodejsToolsEventSource.Instance.HierarchyEventException(ex.Message, result, parent.HierarchyId, prevId, child.HierarchyId);\n+ NodejsToolsEventSource.Instance.HierarchyEventException(ex.Message, result, parent.HierarchyId, prevId, child.HierarchyId, this.GetHierarchyItems());\nthrow;\n}\n}\n@@ -6503,6 +6504,13 @@ If the files in the existing folder have the same names as files in the folder y\nNodejsToolsEventSource.Instance.HierarchyEventStop(\"OnItemAdded successful.\");\n}\n+ private IEnumerable<HierarchyItem> GetHierarchyItems()\n+ {\n+ var solution = Package.GetGlobalService(typeof(SVsSolution)) as IVsSolution;\n+\n+ return solution.EnumerateHierarchyItems();\n+ }\n+\ninternal void OnItemDeleted(HierarchyNode deletedItem)\n{\nthis.Site.GetUIThread().MustBeCalledFromUIThread();\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Added HierarchyItem table to EventSource
|
410,226 |
21.12.2018 14:43:16
| 28,800 |
6d1c014d2d51638eaf23e034172f56c8f0340803
|
Only catch ERR_XML_ATTRIBUTE_NOT_FOUND
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"new_path": "Nodejs/Product/TypeScript/TypeScriptHelpers.cs",
"diff": "@@ -89,14 +89,11 @@ namespace Microsoft.NodejsTools.TypeScript\n{\nErrorHandler.ThrowOnFailure(props.GetPropertyValue(NodeProjectProperty.TypeScriptOutDir, null, (uint)_PersistStorageType.PST_PROJECT_FILE, out outDir));\n}\n- catch (System.Runtime.InteropServices.COMException e)\n- {\n- if (e.ErrorCode == ERR_XML_ATTRIBUTE_NOT_FOUND)\n+ catch (System.Runtime.InteropServices.COMException e) when (e.ErrorCode == ERR_XML_ATTRIBUTE_NOT_FOUND)\n{\nreturn null;\n}\n}\n- }\nelse\n{\nDebug.Fail($\"Why is {nameof(project)} not of type {nameof(IVsBuildPropertyStorage)}?\");\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Only catch ERR_XML_ATTRIBUTE_NOT_FOUND
|
410,202 |
21.12.2018 16:15:52
| 28,800 |
d5260b8f854fdb9e2371d86e1908329bae624174
|
Distinguish between project and user project file
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectNode.cs",
"diff": "@@ -1916,8 +1916,9 @@ namespace Microsoft.VisualStudioTools.Project\nreturn false;\n}\n- // Check out the project file.\n- if (!this.QueryEditProjectFile(false))\n+ // Check out the project or user file.\n+ var editFile = userProjectFile ? this.UserProjectFilename : this.filename;\n+ if (!this.QueryEditFiles(false, editFile))\n{\nthrow Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);\n}\n@@ -1929,7 +1930,7 @@ namespace Microsoft.VisualStudioTools.Project\n}\nelse\n{\n- var newProp = this.buildProject.SetProperty(propertyName, propertyValue);\n+ this.buildProject.SetProperty(propertyName, propertyValue);\n}\nRaiseProjectPropertyChanged(propertyName, oldValue, propertyValue);\n@@ -5657,12 +5658,18 @@ If the files in the existing folder have the same names as files in the folder y\n/// <returns>HRESULT</returns>\nint IVsBuildPropertyStorage.SetPropertyValue(string propertyName, string configName, uint storage, string propertyValue)\n{\n- // TODO: when adding support for User files, we need to update this method\nif (string.IsNullOrEmpty(configName))\n+ {\n+ if (storage == (uint)_PersistStorageType.PST_PROJECT_FILE)\n{\nthis.SetProjectProperty(propertyName, propertyValue);\n}\nelse\n+ {\n+ this.SetUserProjectProperty(propertyName, propertyValue);\n+ }\n+ }\n+ else\n{\nErrorHandler.ThrowOnFailure(this.ConfigProvider.GetCfgOfName(configName, string.Empty, out var configurationInterface));\nvar config = (ProjectConfig)configurationInterface;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Distinguish between project and user project file
|
410,226 |
27.12.2018 19:12:27
| 28,800 |
059933da63f147651a2f36f4bcda32da6befcd06
|
Make VSHPROPID_IsNonSearchable return true for project files
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"diff": "@@ -173,6 +173,16 @@ namespace Microsoft.VisualStudioTools.Project\npublic override bool IsShowingAllFiles => this.isShowingAllFiles;\n+ /// <summary>\n+ /// Returns true if the item should be included in search results\n+ /// </summary>\n+ ///\n+ // Starting with 16.0 Preview 2, it is important for the\n+ // project to report as not searchable. Otherwise, find in\n+ // files will return results in project file, and IsItemDirty\n+ // and SaveItem won't work properly.\n+ public override bool IsSearchable => false;\n+\n/// <summary>\n/// Since we appended the language images to the base image list in the constructor,\n/// this should be the offset in the ImageList of the langauge project icon.\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make VSHPROPID_IsNonSearchable return true for project files
|
410,202 |
09.01.2019 13:29:43
| 28,800 |
9ca9eb9d122ba6f3cfbc9a92db8eade4568c2610
|
Removed unused commented conde for the TS SDK removal.
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs",
"new_path": "Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs",
"diff": "@@ -19,7 +19,6 @@ namespace Microsoft.NodejsTools.ProjectWizard\n{\nvar projectName = replacementsDictionary[\"$projectname$\"];\nreplacementsDictionary.Add(\"$npmsafeprojectname$\", NormalizeNpmPackageName(projectName));\n- replacementsDictionary.Add(\"$typescriptversion$\", \"\");\n}\npublic void ProjectFinishedGenerating(EnvDTE.Project project)\n@@ -66,49 +65,5 @@ namespace Microsoft.NodejsTools.ProjectWizard\nreturn npmProjectNameTransform.Substring(0, Math.Min(npmProjectNameTransform.Length, NpmPackageNameMaxLength));\n}\n-\n- //private static string GetLatestAvailableTypeScriptVersionFromSetup()\n- //{\n- // var setupCompositionService = (IVsSetupCompositionService)Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider.GetService(typeof(SVsSetupCompositionService));\n-\n- // // Populate the package status\n- // setupCompositionService.GetSetupPackagesInfo(0, null, out var sizeNeeded);\n-\n- // if (sizeNeeded > 0)\n- // {\n- // var packages = new IVsSetupPackageInfo[sizeNeeded];\n- // setupCompositionService.GetSetupPackagesInfo(sizeNeeded, packages, out _);\n-\n- // var typeScriptSdkPackageGroups = packages.Where(p => p.PackageId.StartsWith(tsSdkSetupPackageIdPrefix, StringComparison.OrdinalIgnoreCase))\n- // .GroupBy(p => p.CurrentState, p => p.PackageId);\n-\n- // var installed = typeScriptSdkPackageGroups.Where(g => g.Key == (uint)__VsSetupPackageState.INSTALL_PACKAGE_PRESENT);\n- // if (installed.Any())\n- // {\n- // return GetVersion(installed.First());\n- // }\n-\n- // // There is an issue in the installer where components aren't registered as 'Present', however they do show up as unknown.\n- // // So use that as a fallback.\n- // var unknown = typeScriptSdkPackageGroups.Where(g => g.Key == (uint)__VsSetupPackageState.INSTALL_PACKAGE_UNKNOWN);\n- // if (unknown.Any())\n- // {\n- // return GetVersion(unknown.First());\n- // }\n-\n- // // This should not happen, since TS should be installed as a required component, however we should guard against\n- // // bugs in the installer, and use a good default for the user.\n- // Debug.Fail(\"Failed to find a valid install of the TypeScript SDK.\");\n- // }\n-\n- // return \"\";\n-\n- // string GetVersion(IEnumerable<string> installed)\n- // {\n- // return installed.Select(p => p.Substring(tsSdkSetupPackageIdPrefix.Length, p.Length - tsSdkSetupPackageIdPrefix.Length))\n- // .OrderByDescending(v => v)\n- // .First();\n- // }\n- //}\n}\n}\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removed unused commented conde for the TS SDK removal.
|
410,202 |
09.01.2019 13:31:03
| 28,800 |
aa382780d58c53ef5a0ede492f9b668eeaa3b9e7
|
Remove more unused commented code
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs",
"new_path": "Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs",
"diff": "@@ -13,8 +13,6 @@ namespace Microsoft.NodejsTools.ProjectWizard\n{\ninternal class NodejsPackageParametersExtension : IWizard\n{\n- //private const string tsSdkSetupPackageIdPrefix = \"Microsoft.VisualStudio.Component.TypeScript.\";\n-\npublic void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)\n{\nvar projectName = replacementsDictionary[\"$projectname$\"];\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Remove more unused commented code
|
410,202 |
14.01.2019 12:59:53
| 28,800 |
d8e329de3e1e115917540cc7203b50e327aa9837
|
Fix a deadlock when updating test files and directories
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs",
"new_path": "Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs",
"diff": "@@ -5,6 +5,7 @@ using System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing Microsoft.VisualStudio;\n+using Microsoft.VisualStudio.Shell;\nusing Microsoft.VisualStudio.Shell.Interop;\nusing Microsoft.VisualStudio.TestPlatform.ObjectModel;\n@@ -86,11 +87,17 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic int FilesChanged(uint cChanges, string[] rgpszFile, uint[] rggrfChange)\n{\n+ return ThreadHelper.JoinableTaskFactory.Run(async () =>\n+ {\n+ await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();\n+\nfor (var i = 0; i < cChanges; i++)\n{\nthis.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(rgpszFile[i], ConvertVSFILECHANGEFLAGS(rggrfChange[i])));\n}\n+\nreturn VSConstants.S_OK;\n+ });\n}\npublic int DirectoryChanged(string directory)\n@@ -115,11 +122,17 @@ namespace Microsoft.NodejsTools.TestAdapter\npublic int DirectoryChangedEx2(string directory, uint numberOfFilesChanged, string[] filesChanged, uint[] flags)\n{\n+ return ThreadHelper.JoinableTaskFactory.Run(async () =>\n+ {\n+ await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();\n+\nfor (var i = 0; i < numberOfFilesChanged; i++)\n{\nthis.FileChangedEvent?.Invoke(this, new TestFileChangedEventArgs(filesChanged[i], ConvertVSFILECHANGEFLAGS(flags[i])));\n}\n+\nreturn VSConstants.S_OK;\n+ });\n}\nprivate static WatcherChangeTypes ConvertVSFILECHANGEFLAGS(uint flag)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix a deadlock when updating test files and directories
|
410,202 |
16.01.2019 12:40:57
| 28,800 |
04d3029e61354d41269ff2f6ba6e856dc2402aa6
|
Removed message on nodejstools.target
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsTools.targets",
"new_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsTools.targets",
"diff": "</Target>\n<Target Name=\"AfterCompile\">\n- <Message Text=\"AfterCompile executed\" />\n<Exec Condition=\"'$(EnableTypeScript)' == 'true'\" Command=\""$(Tsc)" --build\" />\n</Target>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Removed message on nodejstools.target
|
410,202 |
16.01.2019 19:25:35
| 28,800 |
02020352a71ac5f8a7599b752bd0746f6d882ba5
|
Fixes targets V2 not installed in msbuild
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -116,9 +116,5 @@ namespace Microsoft.NodejsTools\npublic const string SaveNodeJsSettingsInProjectFile = \"SaveNodeJsSettingsInProjectFile\";\npublic const string TestRoot = \"JavaScriptTestRoot\";\npublic const string TestFramework = \"JavaScriptTestFramework\";\n-\n-\n-\n-\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"new_path": "Nodejs/Product/TargetsVsix/TargetsVsix.csproj",
"diff": "</Content>\n<Content Include=\"Microsoft.NodejsToolsV2.targets\">\n<CopyToOutputDirectory>Always</CopyToOutputDirectory>\n+ <IncludeInVSIX>true</IncludeInVSIX>\n+ <InstallRoot>MSBuild</InstallRoot>\n+ <VSIXSubPath>Microsoft\\VisualStudio\\v16.0\\Node.js Tools</VSIXSubPath>\n</Content>\n<None Include=\"source.extension.vsixmanifest\">\n<SubType>Designer</SubType>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fixes targets V2 not installed in msbuild
|
410,202 |
22.01.2019 19:07:12
| 28,800 |
a7a184b38153f2c87d6334eef787d0800cdf78d1
|
Fix missing threading dll
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"new_path": "Nodejs/Product/TestAdapterImpl/TestAdapterImpl.csproj",
"diff": "<Reference Include=\"Microsoft.VisualStudio.ComponentModelHost, Version=$(VSTarget).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" />\n<Reference Include=\"Microsoft.VisualStudio.CoreUtility\" />\n<Reference Include=\"Microsoft.VisualStudio.OLE.Interop\" />\n+ <Reference Include=\"Microsoft.VisualStudio.Threading\" />\n<Reference Include=\"PresentationCore\" />\n<Reference Include=\"PresentationFramework\" />\n<Reference Include=\"System\" />\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix missing threading dll
|
410,202 |
23.01.2019 17:46:52
| 28,800 |
efbda64508c2af9216f0fe2864f9093d7e032fd2
|
Make project always dirty to enable build
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"new_path": "Nodejs/Product/Nodejs/NodejsConstants.cs",
"diff": "@@ -44,10 +44,10 @@ namespace Microsoft.NodejsTools\npublic const ushort DefaultDebuggerPort = 5858;\n- public const string CompileItemType = \"Compile\";\n+ public const string NoneItemType = \"None\";\npublic const string ContentItemType = \"Content\";\n- [Obsolete(\"This property will be removed as an effort to eliminate the TypeScript SDK. Use \\\"Compile\\\" item type instead.\")]\n+ [Obsolete(\"This property will be removed as an effort to eliminate the TypeScript SDK. Use \\\"None\\\" item type instead.\")]\npublic const string TypeScriptCompileItemType = \"TypeScriptCompile\";\n[Obsolete(\"This property will be removed as an effort to eliminate the TypeScript SDK. Consider designing for tsconfig.json instead.\")]\npublic const string CommonJSModuleKind = \"CommonJS\";\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/ImportWizard/ImportSettings.cs",
"new_path": "Nodejs/Product/Nodejs/Project/ImportWizard/ImportSettings.cs",
"diff": "@@ -445,7 +445,7 @@ $@\"{{\n{\nif (TypeScriptHelpers.IsTypeScriptFile(file) || TypeScriptHelpers.IsTsJsConfigJsonFile(file))\n{\n- writer.WriteStartElement(NodejsConstants.CompileItemType);\n+ writer.WriteStartElement(NodejsConstants.NoneItemType);\n}\nelse\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs",
"diff": "@@ -161,7 +161,7 @@ namespace Microsoft.NodejsTools.Project\nreturn node.ItemNode.ItemTypeName;\n}\n- // We need to return TypeScriptCompile for now to maintain backwards compatibility. In the future we will return \"Compile\" once the TypeScript SDK has been removed.\n+ // We need to return TypeScriptCompile for now to maintain backwards compatibility. In the future we will return \"None\" once the TypeScript SDK has been removed.\nif (TypeScriptHelpers.IsTypeScriptFile(filename))\n{\nreturn NodejsConstants.TypeScriptCompileItemType;\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/TypeScriptExpressApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/TypeScriptExpressApp.njsproj",
"diff": "<DebugSymbols>true</DebugSymbols>\n</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"app.ts\" />\n- <Compile Include=\"routes\\index.ts\" />\n- <Compile Include=\"routes\\user.ts\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"app.ts\" />\n+ <None Include=\"routes\\index.ts\" />\n+ <None Include=\"routes\\user.ts\" />\n+ <None Include=\"tsconfig.json\" />\n<Content Include=\"package.json\" />\n<Content Include=\"public\\stylesheets\\main.css\" />\n<Content Include=\"README.md\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/Worker.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/Worker.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"server.ts\" />\n- <Compile Include=\"startup.ts\" />\n+ <None Include=\"server.ts\" />\n+ <None Include=\"startup.ts\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n</ItemGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/TypeScriptWebApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"server.ts\" />\n+ <None Include=\"server.ts\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n<Content Include=\"Web.config\" />\n<Content Include=\"Web.Debug.config\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"tsconfig.json\" />\n</ItemGroup>\n<Import Project=\"$(VSToolsPath)\\Node.js Tools\\Microsoft.NodejsToolsV2.targets\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptWebApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/TypeScriptWebApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"server.ts\" />\n+ <None Include=\"server.ts\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n<Content Include=\"Web.config\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptConsoleApp/NodejsConsoleApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"app.ts\" />\n+ <None Include=\"app.ts\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"tsconfig.json\" />\n</ItemGroup>\n<Import Project=\"$(VSToolsPath)\\Node.js Tools\\Microsoft.NodejsToolsV2.targets\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptExpressApp/ExpressApp.njsproj",
"diff": "<DebugSymbols>true</DebugSymbols>\n</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"app.ts\" />\n- <Compile Include=\"routes\\index.ts\" />\n- <Compile Include=\"routes\\user.ts\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"app.ts\" />\n+ <None Include=\"routes\\index.ts\" />\n+ <None Include=\"routes\\user.ts\" />\n+ <None Include=\"tsconfig.json\" />\n<Content Include=\"package.json\" />\n<Content Include=\"public\\stylesheets\\main.css\" />\n<Content Include=\"README.md\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptVuejsApp/TypeScriptVuejsApp.njsproj",
"diff": "<Content Include=\"public\\index.html\" />\n<Content Include=\"src\\App.vue\" />\n<Content Include=\"src\\components\\Home.vue\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"tsconfig.json\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n</ItemGroup>\n<Folder Include=\"src\\components\\\" />\n</ItemGroup>\n<ItemGroup>\n- <Compile Include=\"src\\main.ts\" />\n- <Compile Include=\"src\\shims-vue.d.ts\" />\n- <Compile Include=\"src\\shims-tsx.d.ts\" />\n+ <None Include=\"src\\main.ts\" />\n+ <None Include=\"src\\shims-vue.d.ts\" />\n+ <None Include=\"src\\shims-tsx.d.ts\" />\n</ItemGroup>\n<ItemGroup>\n<Content Include=\"babel.config.js\" />\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.njsproj",
"new_path": "Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptWebApp/NodejsWebApp.njsproj",
"diff": "</PropertyGroup>\n<ItemGroup>\n- <Compile Include=\"server.ts\" />\n- <Compile Include=\"tsconfig.json\" />\n+ <None Include=\"server.ts\" />\n+ <None Include=\"tsconfig.json\" />\n<Content Include=\"package.json\" />\n<Content Include=\"README.md\" />\n</ItemGroup>\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/CommonProjectNode.cs",
"diff": "@@ -1112,7 +1112,7 @@ namespace Microsoft.VisualStudioTools.Project\n{\nif (TypeScriptHelpers.IsTypeScriptFile(filename))\n{\n- return NodejsConstants.CompileItemType;\n+ return NodejsConstants.NoneItemType;\n}\nelse\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/OutputGroup.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/OutputGroup.cs",
"diff": "@@ -113,12 +113,6 @@ namespace Microsoft.VisualStudioTools.Project\nthis._project.OnProjectPropertyChanged += new EventHandler<ProjectPropertyChangedArgs>(this.OnProjectPropertyChanged);\n}\n- public virtual IList<Output> EnumerateOutputs()\n- {\n- this._project.Site.GetUIThread().Invoke(this.Refresh);\n- return this._outputs;\n- }\n-\npublic virtual void InvalidateGroup()\n{\n// Set keyOutput to null so that a refresh will be performed the next time\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/SharedProject/ProjectConfig.cs",
"new_path": "Nodejs/Product/Nodejs/SharedProject/ProjectConfig.cs",
"diff": "@@ -634,208 +634,6 @@ namespace Microsoft.VisualStudioTools.Project\n}\n}\n- internal virtual bool IsInputGroup(string groupName)\n- {\n- return groupName == \"SourceFiles\";\n- }\n-\n- private static DateTime? TryGetLastWriteTimeUtc(string path, Redirector output = null)\n- {\n- try\n- {\n- return File.GetLastWriteTimeUtc(path);\n- }\n- catch (UnauthorizedAccessException ex)\n- {\n- if (output != null)\n- {\n- output.WriteErrorLine(string.Format(\"Failed to access {0}: {1}\", path, ex.Message));\n-#if DEBUG\n- output.WriteErrorLine(ex.ToString());\n-#endif\n- }\n- }\n- catch (ArgumentException ex)\n- {\n- if (output != null)\n- {\n- output.WriteErrorLine(string.Format(\"Failed to access {0}: {1}\", path, ex.Message));\n-#if DEBUG\n- output.WriteErrorLine(ex.ToString());\n-#endif\n- }\n- }\n- catch (PathTooLongException ex)\n- {\n- if (output != null)\n- {\n- output.WriteErrorLine(string.Format(\"Failed to access {0}: {1}\", path, ex.Message));\n-#if DEBUG\n- output.WriteErrorLine(ex.ToString());\n-#endif\n- }\n- }\n- catch (NotSupportedException ex)\n- {\n- if (output != null)\n- {\n- output.WriteErrorLine(string.Format(\"Failed to access {0}: {1}\", path, ex.Message));\n-#if DEBUG\n- output.WriteErrorLine(ex.ToString());\n-#endif\n- }\n- }\n- return null;\n- }\n-\n- internal virtual bool IsUpToDate()\n- {\n- var outputWindow = OutputWindowRedirector.GetGeneral(this.ProjectMgr.Site);\n-#if DEBUG\n- outputWindow.WriteLine(string.Format(\"Checking whether {0} needs to be rebuilt:\", this.ProjectMgr.Caption));\n-#endif\n-\n- var latestInput = DateTime.MinValue;\n- var earliestOutput = DateTime.MaxValue;\n- var mustRebuild = false;\n-\n- var allInputs = new HashSet<string>(this.OutputGroups\n- .Where(g => IsInputGroup(g.Name))\n- .SelectMany(x => x.EnumerateOutputs())\n- .Select(input => input.CanonicalName),\n- StringComparer.OrdinalIgnoreCase\n- );\n- foreach (var group in this.OutputGroups.Where(g => !IsInputGroup(g.Name)))\n- {\n- foreach (var output in group.EnumerateOutputs())\n- {\n- var path = output.CanonicalName;\n-#if DEBUG\n- var dt = TryGetLastWriteTimeUtc(path);\n- outputWindow.WriteLine(string.Format(\n- \" Out: {0}: {1} [{2}]\",\n- group.Name,\n- path,\n- dt.HasValue ? dt.Value.ToString(\"s\") : \"err\"\n- ));\n-#endif\n- DateTime? modifiedTime;\n-\n- if (!File.Exists(path) ||\n- !(modifiedTime = TryGetLastWriteTimeUtc(path, outputWindow)).HasValue)\n- {\n- mustRebuild = true;\n- break;\n- }\n-\n- string inputPath;\n- if (File.Exists(inputPath = output.GetMetadata(\"SourceFile\")))\n- {\n- var inputModifiedTime = TryGetLastWriteTimeUtc(inputPath, outputWindow);\n- if (inputModifiedTime.HasValue && inputModifiedTime.Value > modifiedTime.Value)\n- {\n- mustRebuild = true;\n- break;\n- }\n- else\n- {\n- continue;\n- }\n- }\n-\n- // output is an input, ignore it...\n- if (allInputs.Contains(path))\n- {\n- continue;\n- }\n-\n- if (modifiedTime.Value < earliestOutput)\n- {\n- earliestOutput = modifiedTime.Value;\n- }\n- }\n-\n- if (mustRebuild)\n- {\n- // Early exit if we know we're going to have to rebuild\n- break;\n- }\n- }\n-\n- if (mustRebuild)\n- {\n-#if DEBUG\n- outputWindow.WriteLine(string.Format(\n- \"Rebuilding {0} because mustRebuild is true\",\n- this.ProjectMgr.Caption\n- ));\n-#endif\n- return false;\n- }\n-\n- foreach (var group in this.OutputGroups.Where(g => IsInputGroup(g.Name)))\n- {\n- foreach (var input in group.EnumerateOutputs())\n- {\n- var path = input.CanonicalName;\n-#if DEBUG\n- var dt = TryGetLastWriteTimeUtc(path);\n- outputWindow.WriteLine(string.Format(\n- \" In: {0}: {1} [{2}]\",\n- group.Name,\n- path,\n- dt.HasValue ? dt.Value.ToString(\"s\") : \"err\"\n- ));\n-#endif\n- if (!File.Exists(path))\n- {\n- continue;\n- }\n-\n- var modifiedTime = TryGetLastWriteTimeUtc(path, outputWindow);\n- if (modifiedTime.HasValue && modifiedTime.Value > latestInput)\n- {\n- latestInput = modifiedTime.Value;\n- if (earliestOutput < latestInput)\n- {\n- break;\n- }\n- }\n- }\n-\n- if (earliestOutput < latestInput)\n- {\n- // Early exit if we know we're going to have to rebuild\n- break;\n- }\n- }\n-\n- if (earliestOutput < latestInput)\n- {\n-#if DEBUG\n- outputWindow.WriteLine(string.Format(\n- \"Rebuilding {0} because {1:s} < {2:s}\",\n- this.ProjectMgr.Caption,\n- earliestOutput,\n- latestInput\n- ));\n-#endif\n- return false;\n- }\n- else\n- {\n-#if DEBUG\n- outputWindow.WriteLine(string.Format(\n- \"Not rebuilding {0} because {1:s} >= {2:s}\",\n- this.ProjectMgr.Caption,\n- earliestOutput,\n- latestInput\n- ));\n-#endif\n- return true;\n- }\n- }\n-\n#endregion\n#region IVsProjectFlavorCfg Members\n@@ -997,9 +795,8 @@ namespace Microsoft.VisualStudioTools.Project\npublic virtual int StartUpToDateCheck(IVsOutputWindowPane pane, uint options)\n{\n- return this.config.IsUpToDate() ?\n- VSConstants.S_OK :\n- VSConstants.E_FAIL;\n+ // Always return \"outdated\" to make TS handle the incremental build.\n+ return VSConstants.E_FAIL;\n}\npublic virtual int Stop(int fsync)\n"
},
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsToolsV2.targets",
"new_path": "Nodejs/Product/TargetsVsix/Microsoft.NodejsToolsV2.targets",
"diff": "<ItemGroup>\n<NodeModulesContent Include=\"$(ProjectHome)\\node_modules\\**\\*.*\" />\n+ <TypeScriptSource Exclude=\"$(ProjectHome)\\node_modules\\**\\*.*;$(ProjectHome)\\obj\\**\\*.*;$(ProjectHome)\\bin\\**\\*.*;$(ProjectHome)\\**\\*.d.ts\" Include=\"$(ProjectHome)\\**\\*.ts;$(ProjectHome)\\**\\*.tsx;$(ProjectHome)\\**\\*.jsx;\" />\n</ItemGroup>\n<Target Name=\"CopyFilesToOutputDirectory\"/>\nthe paths for the generated code here. We also don't get to rely upon\nTypeScriptCollectPublishFiles to include the files for publishing because\nWorker Roles won't invoke PublishPipeline, they invoke some targets directly -->\n- <_GeneratedJavascript Include=\"@(TypeScriptCompile->'%(RelativeDir)%(Filename).js');@(Compile->'%(RelativeDir)%(Filename).js')\"\n- Condition=\"'%(Filename)' != '' and '$([System.IO.Path]::GetExtension(%(Filename)))' != '.d'\"/>\n+ <_GeneratedJavascript Include=\"@(TypeScriptSource->'%(RelativeDir)%(Filename).js')\" />\n<!-- Building scripts results in the scripts -->\n<_TempBuiltProjectOutputGroup Include=\"@(Compile->'%(FullPath)');@(Content->'%(FullPath)');@(_GeneratedJavascript->'%(FullPath)');@(NodeModulesContent->'%(FullPath)')\"/>\nReturns=\"@(SourceFilesProjectOutputGroupOutput)\"\nDependsOnTargets=\"$(SourceFilesProjectOutputGroupDependsOn)\">\n- <AssignTargetPath Files=\"@(Compile);@(Content);@(NodeModulesContent)\" RootFolder=\"$(MSBuildProjectDirectory)\">\n+ <AssignTargetPath Files=\"@(Compile);@(Content);@(TypeScriptSource);@(NodeModulesContent)\" RootFolder=\"$(MSBuildProjectDirectory)\">\n<Output TaskParameter=\"AssignedFiles\" ItemName=\"_CompileWithTargetPath\" />\n</AssignTargetPath>\n<ItemGroup>\n<ItemGroup>\n<!-- JS files are actually content -->\n- <Content Include=\"@(Compile->'%(RelativeDir)%(Filename).js')\" />\n- <Content Include=\"@(Compile->'%(RelativeDir)%(Filename).js.map')\" Condition=\"Exists(@(Compile->'%(RootDir)%(Directory)%(Filename).js.map'))\" />\n+ <Content Include=\"@(TypeScriptSource->'%(RelativeDir)%(Filename).js');@(TypeScriptSource->'%(RelativeDir)%(Filename).js.map')\" />\n</ItemGroup>\n<!-- Override content collection to look in the intermediate directory where we've copied\nDependsOnTargets=\"$(CollectFilesFromContentDependsOn)\"\nCondition=\"'@(Content)'!=''\">\n<ItemGroup>\n- <FilesForPackagingFromProject Include=\"@(Content)\" Condition=\"'%(Content.Link)'==''\">\n+ <FilesForPackagingFromProject Include=\"@(Content)\" Condition=\"'%(Content.Link)'=='' and Exists(@(Content->'%(FullPath)'))\">\n<DestinationRelativePath>%(Content.Identity)</DestinationRelativePath>\n<FromTarget>CollectFilesFromContent</FromTarget>\n<Category>Run</Category>\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Make project always dirty to enable build
|
410,197 |
12.02.2019 15:27:23
| 28,800 |
2f30d528b9b8d5e912e4f48bae0d4a0e5facd911
|
Delete ProcessOutput.RunElevated
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/ProcessOutput.cs",
"new_path": "Common/Product/SharedProject/ProcessOutput.cs",
"diff": "@@ -4,7 +4,6 @@ using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\n-using System.IO;\nusing System.Linq;\nusing System.Runtime.CompilerServices;\nusing System.Text;\n@@ -121,10 +120,6 @@ namespace Microsoft.VisualStudioTools.Project\n/// <param name=\"quoteArgs\">\n/// True to ensure each argument is correctly quoted.\n/// </param>\n- /// <param name=\"elevate\">\n- /// True to run the process as an administrator. See\n- /// <see cref=\"RunElevated\"/>.\n- /// </param>\n/// <returns>A <see cref=\"ProcessOutput\"/> object.</returns>\npublic static ProcessOutput Run(\nstring filename,\n@@ -134,7 +129,6 @@ namespace Microsoft.VisualStudioTools.Project\nbool visible,\nRedirector redirector,\nbool quoteArgs = true,\n- bool elevate = false,\nEncoding outputEncoding = null,\nEncoding errorEncoding = null\n)\n@@ -143,17 +137,6 @@ namespace Microsoft.VisualStudioTools.Project\n{\nthrow new ArgumentException(\"Filename required\", nameof(filename));\n}\n- if (elevate)\n- {\n- return RunElevated(\n- filename,\n- arguments,\n- workingDirectory,\n- redirector,\n- quoteArgs,\n- outputEncoding,\n- errorEncoding);\n- }\nvar psi = new ProcessStartInfo(\"cmd.exe\")\n{\n@@ -187,126 +170,6 @@ namespace Microsoft.VisualStudioTools.Project\nreturn new ProcessOutput(process, redirector);\n}\n- /// <summary>\n- /// Runs the file with the provided settings as a user with\n- /// administrative permissions. The window is always hidden and output\n- /// is provided to the redirector when the process terminates.\n- /// </summary>\n- /// <param name=\"filename\">Executable file to run.</param>\n- /// <param name=\"arguments\">Arguments to pass.</param>\n- /// <param name=\"workingDirectory\">Starting directory.</param>\n- /// <param name=\"redirector\">\n- /// An object to receive redirected output.\n- /// </param>\n- /// <param name=\"quoteArgs\"></param>\n- /// <returns>A <see cref=\"ProcessOutput\"/> object.</returns>\n- public static ProcessOutput RunElevated(\n- string filename,\n- IEnumerable<string> arguments,\n- string workingDirectory,\n- Redirector redirector,\n- bool quoteArgs = true,\n- Encoding outputEncoding = null,\n- Encoding errorEncoding = null\n- )\n- {\n- var outFile = Path.GetTempFileName();\n- var errFile = Path.GetTempFileName();\n- var psi = new ProcessStartInfo(\"cmd.exe\")\n- {\n- WindowStyle = ProcessWindowStyle.Hidden,\n- Verb = \"runas\",\n- CreateNoWindow = true,\n- UseShellExecute = true,\n- Arguments = string.Format(@\"/S /C pushd {0} & \"\"{1} {2} >>{3} 2>>{4}\"\"\",\n- QuoteSingleArgument(workingDirectory),\n- QuoteSingleArgument(filename),\n- GetArguments(arguments, quoteArgs),\n- QuoteSingleArgument(outFile),\n- QuoteSingleArgument(errFile))\n- };\n-\n- var process = new Process\n- {\n- StartInfo = psi\n- };\n-\n- var result = new ProcessOutput(process, redirector);\n- if (redirector != null)\n- {\n- result.Exited += (s, e) =>\n- {\n- try\n- {\n- try\n- {\n- var lines = File.ReadAllLines(outFile, outputEncoding ?? Encoding.Default);\n- foreach (var line in lines)\n- {\n- redirector.WriteLine(line);\n- }\n- }\n- catch (Exception ex)\n- {\n- if (IsCriticalException(ex))\n- {\n- throw;\n- }\n- redirector.WriteErrorLine(\"Failed to obtain standard output from elevated process.\");\n-#if DEBUG\n- foreach (var line in SplitLines(ex.ToString()))\n- {\n- redirector.WriteErrorLine(line);\n- }\n-#else\n- Trace.TraceError(\"Failed to obtain standard output from elevated process.\");\n- Trace.TraceError(ex.ToString());\n-#endif\n- }\n- try\n- {\n- var lines = File.ReadAllLines(errFile, errorEncoding ?? outputEncoding ?? Encoding.Default);\n- foreach (var line in lines)\n- {\n- redirector.WriteErrorLine(line);\n- }\n- }\n- catch (Exception ex)\n- {\n- if (IsCriticalException(ex))\n- {\n- throw;\n- }\n- redirector.WriteErrorLine(\"Failed to obtain standard error from elevated process.\");\n-#if DEBUG\n- foreach (var line in SplitLines(ex.ToString()))\n- {\n- redirector.WriteErrorLine(line);\n- }\n-#else\n- Trace.TraceError(\"Failed to obtain standard error from elevated process.\");\n- Trace.TraceError(ex.ToString());\n-#endif\n- }\n- }\n- finally\n- {\n- try\n- {\n- File.Delete(outFile);\n- }\n- catch { }\n- try\n- {\n- File.Delete(errFile);\n- }\n- catch { }\n- }\n- };\n- }\n- return result;\n- }\n-\npublic static string GetArguments(IEnumerable<string> arguments, bool quoteArgs)\n{\nif (quoteArgs)\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Delete ProcessOutput.RunElevated
|
410,202 |
20.02.2019 18:23:29
| 28,800 |
e84d3fd652ce393033b286729a1cbd3a97414835
|
Refactored ProcessOutput.Run to not use cmd.exe
|
[
{
"change_type": "MODIFY",
"old_path": "Common/Product/SharedProject/ProcessOutput.cs",
"new_path": "Common/Product/SharedProject/ProcessOutput.cs",
"diff": "@@ -138,14 +138,12 @@ namespace Microsoft.VisualStudioTools.Project\nthrow new ArgumentException(\"Filename required\", nameof(filename));\n}\n- var psi = new ProcessStartInfo(\"cmd.exe\")\n+ var psi = new ProcessStartInfo(filename)\n{\n- Arguments = string.Format(@\"/S /C pushd {0} & {1} {2}\",\n- QuoteSingleArgument(workingDirectory),\n- QuoteSingleArgument(filename),\n- GetArguments(arguments, quoteArgs)),\n+ Arguments = GetArguments(arguments, quoteArgs),\nCreateNoWindow = !visible,\n- UseShellExecute = false\n+ UseShellExecute = false,\n+ WorkingDirectory = workingDirectory\n};\nif (!visible || (redirector != null))\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Refactored ProcessOutput.Run to not use cmd.exe
|
410,226 |
28.02.2019 13:13:45
| 28,800 |
fccfd0ae3a3b047feca126b94c49bdd98d8239e4
|
Handle beginning of list in span list search
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/Nodejs/Repl/ReplOutputClassifier.cs",
"new_path": "Nodejs/Product/Nodejs/Repl/ReplOutputClassifier.cs",
"diff": "@@ -48,6 +48,9 @@ namespace Microsoft.NodejsTools.Repl\nif (startIndex < 0)\n{\nstartIndex = ~startIndex - 1;\n+ if (startIndex < 0) {\n+ startIndex = 0;\n+ }\n}\nvar spanEnd = span.End.Position;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Handle beginning of list in span list search
|
410,202 |
04.03.2019 12:57:35
| 28,800 |
67b17fb023dd14536aad96e951e537b596191c10
|
Fix discovering tests with action 'none'
|
[
{
"change_type": "MODIFY",
"old_path": "Nodejs/Product/TestAdapter/ProjectTestDiscoverer.cs",
"new_path": "Nodejs/Product/TestAdapter/ProjectTestDiscoverer.cs",
"diff": "@@ -77,7 +77,7 @@ namespace Microsoft.NodejsTools.TestAdapter\n}\n// Provide all files to the test analyzer\n- foreach (var item in proj.Items.Where(item => item.ItemType != \"None\"))\n+ foreach (var item in proj.Items)\n{\nstring testFrameworkName;\nstring fileAbsolutePath;\n"
}
] |
C#
|
Apache License 2.0
|
microsoft/nodejstools
|
Fix discovering tests with action 'none'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.