Skip to content

Commit 53ebde8

Browse files
author
Paul van Brenk
committed
Merge branch 'master' into UnitTestJavaScriptPhase1
# Conflicts: # Nodejs/Product/Nodejs/Nodejs.cs
2 parents ecfbf66 + 0bd757f commit 53ebde8

File tree

24 files changed

+99
-46
lines changed

24 files changed

+99
-46
lines changed

Build/Common.Build.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<VSTarget Condition="$(VSTarget)==''">15.0</VSTarget>
3030
<BuildingInsideVisualStudio Condition="'$(BuildingInsideVisualStudio)' == ''">false</BuildingInsideVisualStudio>
3131

32-
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.6</TargetFrameworkVersion>
32+
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.6.1</TargetFrameworkVersion>
3333
<TargetFrameworkMoniker>.NETFramework,Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
3434

3535
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

Nodejs/Product/Nodejs/Nodejs.cs

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
using System.IO;
66
#if !NO_WINDOWS
77
using System.Windows.Forms;
8-
using Microsoft.NodejsTools.Project;
98
#endif
109
using Microsoft.Win32;
10+
11+
#if !NO_WINDOWS
12+
using Microsoft.NodejsTools.Project;
13+
#endif
1114
using Microsoft.VisualStudioTools;
15+
//using Microsoft.VisualStudio.Shell;
16+
//using Microsoft.VisualStudio.Shell.Interop;
1217

1318
namespace Microsoft.NodejsTools
1419
{
@@ -133,6 +138,32 @@ public static string GetPathToNodeExecutableFromEnvironment(string executable =
133138
}
134139
}
135140

141+
// TODO: this doesn't work in the NPM assembly figure out how to make that work.
142+
//const string nodeJsPackageRegistryKey = "Microsoft.VisualStudio.Package.NodeJs";
143+
//const string node32Value = "NodeExecutablePath32";
144+
//const string node64Value = "NodeExecutablePath64";
145+
//const string npmValue = "NpmExecutablePath";
146+
147+
//// Attempt to find Node.js/NPM from the VS package
148+
//using (var nodeJsPackageKey = VSRegistry.RegistryRoot(__VsLocalRegistryType.RegType_Configuration, writable: false).CreateSubKey(nodeJsPackageRegistryKey))
149+
//{
150+
// if (executable == "node.exe")
151+
// {
152+
// if (Environment.Is64BitOperatingSystem)
153+
// {
154+
// return nodeJsPackageKey.GetValue(node64Value) as string;
155+
// }
156+
// else
157+
// {
158+
// return nodeJsPackageKey.GetValue(node32Value) as string;
159+
// }
160+
// }
161+
// else if (executable == "npm.cmd")
162+
// {
163+
// return nodeJsPackageKey.GetValue(npmValue) as string;
164+
// }
165+
//}
166+
136167
// we didn't find the path.
137168
return null;
138169
}
@@ -158,5 +189,5 @@ public static void ShowNodejsPathNotFound(string path)
158189
);
159190
}
160191
#endif
161-
}
192+
}
162193
}

Nodejs/Product/Nodejs/Nodejs.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
<Compile Include="Commands\ImportWizardCommand.cs" />
191191
<Compile Include="Commands\OpenReplWindowCommand.cs" />
192192
<Compile Include="Debugger\DebugEngine\AD7EvalErrorProperty.cs" />
193+
<Compile Include="Repl\InteractiveWindowContentType.cs" />
193194
<Compile Include="TypeScriptHelpers\TsConfigJson.cs" />
194195
<Compile Include="TypeScriptHelpers\TsConfigJsonFactory.cs" />
195196
<Compile Include="TypeScriptHelpers\TypeScriptCompile.cs" />
@@ -958,7 +959,7 @@
958959
<Content Include="visualstudio_nodejs_repl.js">
959960
<IncludeInVSIX>true</IncludeInVSIX>
960961
<VSIXSubpath>.</VSIXSubpath>
961-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
962+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
962963
</Content>
963964
<ZipProject Include="ProjectTemplates\NodejsWebApp\NodejsWebApp.vstemplate">
964965
<SubType>Designer</SubType>

Nodejs/Product/Nodejs/NodejsPackage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected override int CreateToolWindow(ref Guid toolWindowType, int id)
171171
{
172172
var replProvider = this.GetInteractiveWindowProvider();
173173

174-
replProvider.CreateReplWindow(id);
174+
replProvider.OpenOrCreateWindow(id);
175175
return VSConstants.S_OK;
176176
}
177177

@@ -182,7 +182,7 @@ internal void OpenReplWindow(bool focus = true)
182182
{
183183
var replProvider = this.GetInteractiveWindowProvider();
184184

185-
replProvider.OpenOrCreateWindow().Show(focus);
185+
replProvider.OpenOrCreateWindow(-1).Show(focus);
186186
}
187187

188188
private InteractiveWindowProvider GetInteractiveWindowProvider()

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"@types/express-serve-static-core": "^4.0.50",
2121
"@types/mime": "^1.3.1",
2222
"@types/serve-static": "^1.7.32",
23-
"@types/node": "^6.0.87"
23+
"@types/node": "^8.0.14"
2424
},
2525
"engines": {
26-
"node": "~6.10.x"
26+
"node": "^8.0.0"
2727
}
2828
}

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureExpressApp/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"module": "commonjs",
4-
"target": "es5",
5-
"lib": ["es5"],
4+
"target": "es6",
5+
"lib": ["es6"],
66
"sourceMap": true
77
},
88
"exclude": [

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureNodejsWorker/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"name": ""
1010
},
1111
"devDependencies": {
12-
"@types/node": "^6.0.87"
12+
"@types/node": "^8.0.14"
1313
},
1414
"engines": {
15-
"node": "~6.10.x"
15+
"node": "^8.0.x"
1616
}
1717
}

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"name": ""
1010
},
1111
"devDependencies": {
12-
"@types/node": "^6.0.87"
12+
"@types/node": "^8.0.14"
1313
},
1414
"engines": {
15-
"node": "~6.10.x"
15+
"node": "^8.0.0"
1616
}
1717
}

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebApp/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"module": "commonjs",
4-
"target": "es5",
5-
"lib": ["es5"],
4+
"target": "es6",
5+
"lib": ["es6"],
66
"sourceMap": true
77
},
88
"exclude": [

Nodejs/Product/Nodejs/ProjectTemplates/TypeScriptAzureWebRole/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"name": ""
1010
},
1111
"devDependencies": {
12-
"@types/node": "^6.0.87"
12+
"@types/node": "^8.0.14"
1313
},
1414
"engines": {
15-
"node": "~6.10.x"
15+
"node": "^8.0.0"
1616
}
1717
}

0 commit comments

Comments
 (0)