File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 17901790 "md5" : " ^2.2.1" ,
17911791 "minimatch" : " ^3.0.3" ,
17921792 "named-js-regexp" : " ^1.3.1" ,
1793- "once" : " ^1.4.0" ,
17941793 "opn" : " ^5.1.0" ,
17951794 "pidusage" : " ^1.2.0" ,
17961795 "reflect-metadata" : " ^0.1.12" ,
18251824 "@types/md5" : " ^2.1.32" ,
18261825 "@types/mocha" : " ^2.2.43" ,
18271826 "@types/node" : " ^6.0.40" ,
1828- "@types/once" : " ^1.4.0" ,
18291827 "@types/semver" : " ^5.4.0" ,
18301828 "@types/shortid" : " 0.0.29" ,
18311829 "@types/sinon" : " ^2.3.2" ,
Original file line number Diff line number Diff line change 1+ // Copyright (c) Microsoft Corporation. All rights reserved.
2+ // Licensed under the MIT License.
3+
4+ 'use strict' ;
5+
6+ export async function sleep ( timeout : number ) {
7+ return new Promise ( resolve => setTimeout ( resolve , timeout ) ) ;
8+ }
9+
10+ // tslint:disable-next-line:no-empty
11+ export function noop ( ) { }
Original file line number Diff line number Diff line change 11import { EventEmitter } from 'events' ;
22import { injectable } from 'inversify' ;
33import * as net from 'net' ;
4+ import { noop } from '../../core.utils' ;
45import { createDeferred , Deferred } from '../../helpers' ;
56import { ISocketServer } from '../../types' ;
67
@@ -56,8 +57,7 @@ export class SocketServer extends EventEmitter implements ISocketServer {
5657 client . on ( 'data' , ( data : Buffer ) => {
5758 this . emit ( 'data' , client , data ) ;
5859 } ) ;
59- // tslint:disable-next-line:no-empty
60- client . on ( 'error' , ( err : Error ) => { } ) ;
60+ client . on ( 'error' , ( err : Error ) => noop ) ;
6161
6262 client . on ( 'timeout' , d => {
6363 // let msg = "Debugger client timedout, " + d;
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import { EnvironmentVariables } from '../variables/types';
44
55@injectable ( )
66export class CurrentProcess implements ICurrentProcess {
7+ public on = ( event : string | symbol , listener : Function ) : this => {
8+ process . on ( event , listener ) ;
9+ // tslint:disable-next-line:no-any
10+ return process as any ;
11+ }
712 public get env ( ) : EnvironmentVariables {
813 return process . env ;
914 }
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ export interface ICurrentProcess {
9191 readonly argv : string [ ] ;
9292 readonly stdout : NodeJS . WriteStream ;
9393 readonly stdin : NodeJS . ReadStream ;
94+ on ( event : string | symbol , listener : Function ) : this;
9495}
9596
9697export interface IPythonSettings {
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ import { EnvironmentVariables } from '../../client/common/variables/types';
99@injectable ( )
1010export class MockProcess implements ICurrentProcess {
1111 constructor ( public env : EnvironmentVariables = { ...process . env } ) { }
12+ public on ( event : string | symbol , listener : Function ) : this {
13+ return this ;
14+ }
1215 public get argv ( ) : string [ ] {
1316 return [ ] ;
1417 }
Original file line number Diff line number Diff line change 9494 version "6.0.95"
9595 resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.95.tgz#0d027612a77c55b84497ff90a4a7d597e5ac0fab"
9696
97- " @types/once@^1.4.0 " :
98- version "1.4.0"
99- resolved "https://registry.yarnpkg.com/@types/once/-/once-1.4.0.tgz#7bfe3d99a0951f3141bac2617c9827525788b8f5"
100-
10197" @types/semver@^5.4.0 " :
10298 version "5.4.0"
10399 resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.4.0.tgz#f3658535af7f1f502acd6da7daf405ffeb1f7ee4"
You can’t perform that action at this time.
0 commit comments