File tree Expand file tree Collapse file tree 12 files changed +42
-15
lines changed Expand file tree Collapse file tree 12 files changed +42
-15
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ vscode-powershell.zip
1111vscps-preview.zip
1212* .vsix
1313npm-debug.log
14+ .vscode-test /
Original file line number Diff line number Diff line change 99 "args" : [ " --extensionDevelopmentPath=${workspaceRoot}" ],
1010 "stopOnEntry" : false ,
1111 "sourceMaps" : true ,
12- "outFiles" : [" ${workspaceRoot}/out" ],
12+ "outFiles" : [" ${workspaceRoot}/out/src/**/*.js " ],
1313 "preLaunchTask" : " BuildAll"
1414 },
1515 {
2020 "args" : [ " --extensionDevelopmentPath=${workspaceRoot}" ],
2121 "stopOnEntry" : false ,
2222 "sourceMaps" : true ,
23- "outFiles" : [" ${workspaceRoot}/out" ],
23+ "outFiles" : [" ${workspaceRoot}/out/src/**/*.js" ],
24+ "preLaunchTask" : " Build"
25+ },
26+ {
27+ "name" : " Launch Extension Tests" ,
28+ "type" : " extensionHost" ,
29+ "request" : " launch" ,
30+ "runtimeExecutable" : " ${execPath}" ,
31+ "args" : [" --extensionDevelopmentPath=${workspaceRoot}" , " --extensionTestsPath=${workspaceRoot}/out/test" ],
32+ "stopOnEntry" : false ,
33+ "sourceMaps" : true ,
34+ "outFiles" : [" ${workspaceRoot}/out/test/**/*.js" ],
2435 "preLaunchTask" : " Build"
2536 },
2637 {
Original file line number Diff line number Diff line change 11.vscode /**
2+ .vscode-test /**
23vscode-powershell.build.ps1
34typings /**
45** /* .ts
@@ -10,5 +11,7 @@ bin/DebugAdapter.log
1011bin /* .vshost. *
1112bin /PowerShell /**
1213logs /**
14+ out /test /**
15+ test /**
1316sessions /**
1417scripts /Install-VSCode.ps1
Original file line number Diff line number Diff line change 2424 "type" : " git" ,
2525 "url" : " https://github.com/PowerShell/vscode-powershell.git"
2626 },
27- "main" : " ./out/main" ,
27+ "main" : " ./out/src/ main" ,
2828 "activationEvents" : [
2929 " onLanguage:powershell" ,
3030 " onCommand:PowerShell.NewProjectFromTemplate" ,
4141 "@types/node" : " ^6.0.40" ,
4242 "typescript" : " ^2.0.3" ,
4343 "vsce" : " ^1.18.0" ,
44- "vscode" : " ^1.1.0"
44+ "vscode" : " ^1.1.0" ,
45+ "mocha" : " ^2.3.3" ,
46+ "@types/mocha" : " ^2.2.32"
4547 },
4648 "extensionDependencies" : [
4749 " vscode.powershell"
4850 ],
4951 "scripts" : {
5052 "compile" : " tsc -p ./" ,
5153 "compile-watch" : " tsc -watch -p ./" ,
52- "postinstall" : " node ./node_modules/vscode/bin/install"
54+ "postinstall" : " node ./node_modules/vscode/bin/install" ,
55+ "test" : " node ./node_modules/vscode/bin/test"
5356 },
5457 "contributes" : {
5558 "keybindings" : [
188191 " powershell"
189192 ]
190193 },
191- "program" : " ./out/debugAdapter.js" ,
194+ "program" : " ./out/src/ debugAdapter.js" ,
192195 "runtime" : " node" ,
193196 "variables" : {
194197 "PickPSHostProcess" : " PowerShell.PickPSHostProcess" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { Logger } from './logging';
1414// named pipes or a network protocol). It is purely a naive data
1515// relay between the two transports.
1616
17- var logBasePath = path . resolve ( __dirname , "../logs" ) ;
17+ var logBasePath = path . resolve ( __dirname , "../../ logs" ) ;
1818
1919var debugAdapterLogWriter =
2020 fs . createWriteStream (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export class ExamplesFeature implements IFeature {
1212 private examplesPath : string ;
1313
1414 constructor ( ) {
15- this . examplesPath = path . resolve ( __dirname , "../../examples" ) ;
15+ this . examplesPath = path . resolve ( __dirname , "../../../ examples" ) ;
1616 this . command = vscode . commands . registerCommand ( 'PowerShell.OpenExamplesFolder' , ( ) => {
1717 vscode . commands . executeCommand (
1818 "vscode.openFolder" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class Logger {
2929 constructor ( ) {
3030 this . logChannel = vscode . window . createOutputChannel ( "PowerShell Extension Logs" ) ;
3131
32- this . logBasePath = path . resolve ( __dirname , "../logs" ) ;
32+ this . logBasePath = path . resolve ( __dirname , "../../ logs" ) ;
3333 utils . ensurePathExists ( this . logBasePath ) ;
3434
3535 this . commands = [
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ function checkForUpdatedVersion(context: vscode.ExtensionContext) {
161161 if ( choice === showReleaseNotes ) {
162162 vscode . commands . executeCommand (
163163 'markdown.showPreview' ,
164- vscode . Uri . file ( path . resolve ( __dirname , "../CHANGELOG.md" ) ) ) ;
164+ vscode . Uri . file ( path . resolve ( __dirname , "../../ CHANGELOG.md" ) ) ) ;
165165 }
166166 } ) ;
167167 }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export class PowerShellProcess {
4040 let startScriptPath =
4141 path . resolve (
4242 __dirname ,
43- '../scripts/Start-EditorServices.ps1' ) ;
43+ '../../ scripts/Start-EditorServices.ps1' ) ;
4444
4545 var editorServicesLogPath = this . log . getLogFilePath ( logFileName ) ;
4646
@@ -77,7 +77,7 @@ export class PowerShellProcess {
7777 // NOTE: This batch file approach is needed temporarily until VS Code's
7878 // createTerminal API gets an argument for setting environment variables
7979 // on the launched process.
80- var batScriptPath = path . resolve ( __dirname , '../sessions/powershell.bat' ) ;
80+ var batScriptPath = path . resolve ( __dirname , '../../ sessions/powershell.bat' ) ;
8181 fs . writeFileSync (
8282 batScriptPath ,
8383 `@set DEVPATH=${ path . dirname ( powerShellExePath ) } \r\n@${ powerShellExePath } %*` ) ;
Original file line number Diff line number Diff line change @@ -121,15 +121,15 @@ export class SessionManager implements Middleware {
121121
122122 if ( this . powerShellExePath ) {
123123
124- var bundledModulesPath = path . resolve ( __dirname , "../modules" ) ;
124+ var bundledModulesPath = path . resolve ( __dirname , "../../ modules" ) ;
125125
126126 if ( this . inDevelopmentMode ) {
127127 var devBundledModulesPath =
128128 // this.sessionSettings.developer.bundledModulesPath ||
129129 path . resolve (
130130 __dirname ,
131131 this . sessionSettings . developer . bundledModulesPath ||
132- "../../PowerShellEditorServices/module" ) ;
132+ "../../../ PowerShellEditorServices/module" ) ;
133133
134134 // Make sure the module's bin path exists
135135 if ( fs . existsSync ( path . join ( devBundledModulesPath , "PowerShellEditorServices/bin" ) ) ) {
You can’t perform that action at this time.
0 commit comments