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
11
11
vscps-preview.zip
12
12
* .vsix
13
13
npm-debug.log
14
+ .vscode-test /
Original file line number Diff line number Diff line change 9
9
"args" : [ " --extensionDevelopmentPath=${workspaceRoot}" ],
10
10
"stopOnEntry" : false ,
11
11
"sourceMaps" : true ,
12
- "outFiles" : [" ${workspaceRoot}/out" ],
12
+ "outFiles" : [" ${workspaceRoot}/out/src/**/*.js " ],
13
13
"preLaunchTask" : " BuildAll"
14
14
},
15
15
{
20
20
"args" : [ " --extensionDevelopmentPath=${workspaceRoot}" ],
21
21
"stopOnEntry" : false ,
22
22
"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" ],
24
35
"preLaunchTask" : " Build"
25
36
},
26
37
{
Original file line number Diff line number Diff line change 1
1
.vscode /**
2
+ .vscode-test /**
2
3
vscode-powershell.build.ps1
3
4
typings /**
4
5
** /* .ts
@@ -10,5 +11,7 @@ bin/DebugAdapter.log
10
11
bin /* .vshost. *
11
12
bin /PowerShell /**
12
13
logs /**
14
+ out /test /**
15
+ test /**
13
16
sessions /**
14
17
scripts /Install-VSCode.ps1
Original file line number Diff line number Diff line change 24
24
"type" : " git" ,
25
25
"url" : " https://github.com/PowerShell/vscode-powershell.git"
26
26
},
27
- "main" : " ./out/main" ,
27
+ "main" : " ./out/src/ main" ,
28
28
"activationEvents" : [
29
29
" onLanguage:powershell" ,
30
30
" onCommand:PowerShell.NewProjectFromTemplate" ,
41
41
"@types/node" : " ^6.0.40" ,
42
42
"typescript" : " ^2.0.3" ,
43
43
"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"
45
47
},
46
48
"extensionDependencies" : [
47
49
" vscode.powershell"
48
50
],
49
51
"scripts" : {
50
52
"compile" : " tsc -p ./" ,
51
53
"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"
53
56
},
54
57
"contributes" : {
55
58
"keybindings" : [
188
191
" powershell"
189
192
]
190
193
},
191
- "program" : " ./out/debugAdapter.js" ,
194
+ "program" : " ./out/src/ debugAdapter.js" ,
192
195
"runtime" : " node" ,
193
196
"variables" : {
194
197
"PickPSHostProcess" : " PowerShell.PickPSHostProcess" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { Logger } from './logging';
14
14
// named pipes or a network protocol). It is purely a naive data
15
15
// relay between the two transports.
16
16
17
- var logBasePath = path . resolve ( __dirname , "../logs" ) ;
17
+ var logBasePath = path . resolve ( __dirname , "../../ logs" ) ;
18
18
19
19
var debugAdapterLogWriter =
20
20
fs . createWriteStream (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export class ExamplesFeature implements IFeature {
12
12
private examplesPath : string ;
13
13
14
14
constructor ( ) {
15
- this . examplesPath = path . resolve ( __dirname , "../../examples" ) ;
15
+ this . examplesPath = path . resolve ( __dirname , "../../../ examples" ) ;
16
16
this . command = vscode . commands . registerCommand ( 'PowerShell.OpenExamplesFolder' , ( ) => {
17
17
vscode . commands . executeCommand (
18
18
"vscode.openFolder" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class Logger {
29
29
constructor ( ) {
30
30
this . logChannel = vscode . window . createOutputChannel ( "PowerShell Extension Logs" ) ;
31
31
32
- this . logBasePath = path . resolve ( __dirname , "../logs" ) ;
32
+ this . logBasePath = path . resolve ( __dirname , "../../ logs" ) ;
33
33
utils . ensurePathExists ( this . logBasePath ) ;
34
34
35
35
this . commands = [
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ function checkForUpdatedVersion(context: vscode.ExtensionContext) {
161
161
if ( choice === showReleaseNotes ) {
162
162
vscode . commands . executeCommand (
163
163
'markdown.showPreview' ,
164
- vscode . Uri . file ( path . resolve ( __dirname , "../CHANGELOG.md" ) ) ) ;
164
+ vscode . Uri . file ( path . resolve ( __dirname , "../../ CHANGELOG.md" ) ) ) ;
165
165
}
166
166
} ) ;
167
167
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export class PowerShellProcess {
40
40
let startScriptPath =
41
41
path . resolve (
42
42
__dirname ,
43
- '../scripts/Start-EditorServices.ps1' ) ;
43
+ '../../ scripts/Start-EditorServices.ps1' ) ;
44
44
45
45
var editorServicesLogPath = this . log . getLogFilePath ( logFileName ) ;
46
46
@@ -77,7 +77,7 @@ export class PowerShellProcess {
77
77
// NOTE: This batch file approach is needed temporarily until VS Code's
78
78
// createTerminal API gets an argument for setting environment variables
79
79
// on the launched process.
80
- var batScriptPath = path . resolve ( __dirname , '../sessions/powershell.bat' ) ;
80
+ var batScriptPath = path . resolve ( __dirname , '../../ sessions/powershell.bat' ) ;
81
81
fs . writeFileSync (
82
82
batScriptPath ,
83
83
`@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 {
121
121
122
122
if ( this . powerShellExePath ) {
123
123
124
- var bundledModulesPath = path . resolve ( __dirname , "../modules" ) ;
124
+ var bundledModulesPath = path . resolve ( __dirname , "../../ modules" ) ;
125
125
126
126
if ( this . inDevelopmentMode ) {
127
127
var devBundledModulesPath =
128
128
// this.sessionSettings.developer.bundledModulesPath ||
129
129
path . resolve (
130
130
__dirname ,
131
131
this . sessionSettings . developer . bundledModulesPath ||
132
- "../../PowerShellEditorServices/module" ) ;
132
+ "../../../ PowerShellEditorServices/module" ) ;
133
133
134
134
// Make sure the module's bin path exists
135
135
if ( fs . existsSync ( path . join ( devBundledModulesPath , "PowerShellEditorServices/bin" ) ) ) {
You can’t perform that action at this time.
0 commit comments