@@ -160,7 +160,7 @@ var harnessSources = harnessCoreSources.concat([
160160 "protocol.d.ts" ,
161161 "session.ts" ,
162162 "client.ts" ,
163- "editorServices.ts" ,
163+ "editorServices.ts"
164164] . map ( function ( f ) {
165165 return path . join ( serverDirectory , f ) ;
166166} ) ) ;
@@ -174,7 +174,7 @@ var es2015LibrarySources = [
174174 "es2015.proxy.d.ts" ,
175175 "es2015.reflect.d.ts" ,
176176 "es2015.symbol.d.ts" ,
177- "es2015.symbol.wellknown.d.ts" ,
177+ "es2015.symbol.wellknown.d.ts"
178178] ;
179179
180180var es2015LibrarySourceMap = es2015LibrarySources . map ( function ( source ) {
@@ -183,34 +183,34 @@ var es2015LibrarySourceMap = es2015LibrarySources.map(function(source) {
183183
184184var es2016LibrarySource = [ "es2016.array.include.d.ts" ] ;
185185
186- var es2016LibrarySourceMap = es2016LibrarySource . map ( function ( source ) {
186+ var es2016LibrarySourceMap = es2016LibrarySource . map ( function ( source ) {
187187 return { target : "lib." + source , sources : [ "header.d.ts" , source ] } ;
188- } )
188+ } ) ;
189189
190190var es2017LibrarySource = [ "es2017.object.d.ts" ] ;
191191
192- var es2017LibrarySourceMap = es2017LibrarySource . map ( function ( source ) {
192+ var es2017LibrarySourceMap = es2017LibrarySource . map ( function ( source ) {
193193 return { target : "lib." + source , sources : [ "header.d.ts" , source ] } ;
194- } )
194+ } ) ;
195195
196- var hostsLibrarySources = [ "dom.generated.d.ts" , "webworker.importscripts.d.ts" , "scripthost.d.ts" ]
196+ var hostsLibrarySources = [ "dom.generated.d.ts" , "webworker.importscripts.d.ts" , "scripthost.d.ts" ] ;
197197
198198var librarySourceMap = [
199199 // Host library
200- { target : "lib.dom.d.ts" , sources : [ "header.d.ts" , "dom.generated.d.ts" ] , } ,
201- { target : "lib.dom.iterable.d.ts" , sources : [ "header.d.ts" , "dom.iterable.d.ts" ] , } ,
202- { target : "lib.webworker.d.ts" , sources : [ "header.d.ts" , "webworker.generated.d.ts" ] , } ,
203- { target : "lib.scripthost.d.ts" , sources : [ "header.d.ts" , "scripthost.d.ts" ] , } ,
204-
200+ { target : "lib.dom.d.ts" , sources : [ "header.d.ts" , "dom.generated.d.ts" ] } ,
201+ { target : "lib.dom.iterable.d.ts" , sources : [ "header.d.ts" , "dom.iterable.d.ts" ] } ,
202+ { target : "lib.webworker.d.ts" , sources : [ "header.d.ts" , "webworker.generated.d.ts" ] } ,
203+ { target : "lib.scripthost.d.ts" , sources : [ "header.d.ts" , "scripthost.d.ts" ] } ,
204+
205205 // JavaScript library
206206 { target : "lib.es5.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] } ,
207207 { target : "lib.es2015.d.ts" , sources : [ "header.d.ts" , "es2015.d.ts" ] } ,
208208 { target : "lib.es2016.d.ts" , sources : [ "header.d.ts" , "es2016.d.ts" ] } ,
209209 { target : "lib.es2017.d.ts" , sources : [ "header.d.ts" , "es2017.d.ts" ] } ,
210210
211211 // JavaScript + all host library
212- { target : "lib.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( hostsLibrarySources ) , } ,
213- { target : "lib.es6.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) , } ,
212+ { target : "lib.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( hostsLibrarySources ) } ,
213+ { target : "lib.es6.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) }
214214] . concat ( es2015LibrarySourceMap , es2016LibrarySourceMap , es2017LibrarySourceMap ) ;
215215
216216var libraryTargets = librarySourceMap . map ( function ( f ) {
@@ -251,7 +251,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
251251}
252252
253253var useDebugMode = true ;
254- var host = ( process . env . TYPESCRIPT_HOST || process . env . host || "node" ) ;
254+ var host = process . env . TYPESCRIPT_HOST || process . env . host || "node" ;
255255var compilerFilename = "tsc.js" ;
256256var LKGCompiler = path . join ( LKGDirectory , compilerFilename ) ;
257257var builtLocalCompiler = path . join ( builtLocalDirectory , compilerFilename ) ;
@@ -300,7 +300,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
300300 options += " --out " + outFile ;
301301 }
302302 else {
303- options += " --module commonjs"
303+ options += " --module commonjs" ;
304304 }
305305
306306 if ( opts . noResolve ) {
@@ -315,7 +315,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
315315 }
316316
317317 if ( opts . stripInternal ) {
318- options += " --stripInternal"
318+ options += " --stripInternal" ;
319319 }
320320
321321 var cmd = host + " " + compilerPath + " " + options + " " ;
@@ -453,9 +453,9 @@ file(scriptsTsdJson);
453453
454454task ( "tsd-scripts" , [ scriptsTsdJson ] , function ( ) {
455455 var cmd = "tsd --config " + scriptsTsdJson + " install" ;
456- console . log ( cmd )
456+ console . log ( cmd ) ;
457457 exec ( cmd ) ;
458- } , { async : true } )
458+ } , { async : true } ) ;
459459
460460var importDefinitelyTypedTestsDirectory = path . join ( scriptsDirectory , "importDefinitelyTypedTests" ) ;
461461var importDefinitelyTypedTestsJs = path . join ( importDefinitelyTypedTestsDirectory , "importDefinitelyTypedTests.js" ) ;
@@ -525,9 +525,9 @@ compileFile(servicesFileInBrowserTest, servicesSources,[builtLocalDirectory, cop
525525var serverFile = path . join ( builtLocalDirectory , "tsserver.js" ) ;
526526compileFile ( serverFile , serverSources , [ builtLocalDirectory , copyright ] . concat ( serverSources ) , /*prefixes*/ [ copyright ] , /*useBuiltCompiler*/ true ) ;
527527
528- var lsslFile = path . join ( builtLocalDirectory , "tslssl .js" ) ;
528+ var tsserverLibraryFile = path . join ( builtLocalDirectory , "tsserverlibrary .js" ) ;
529529compileFile (
530- lsslFile ,
530+ tsserverLibraryFile ,
531531 languageServiceLibrarySources ,
532532 [ builtLocalDirectory , copyright ] . concat ( languageServiceLibrarySources ) ,
533533 /*prefixes*/ [ copyright ] ,
@@ -536,7 +536,7 @@ compileFile(
536536
537537// Local target to build the language service server library
538538desc ( "Builds language service server library" ) ;
539- task ( "lssl" , [ lsslFile ] ) ;
539+ task ( "lssl" , [ tsserverLibraryFile ] ) ;
540540
541541// Local target to build the compiler and services
542542desc ( "Builds the full compiler and services" ) ;
@@ -595,8 +595,8 @@ task("generate-spec", [specMd]);
595595
596596// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
597597desc ( "Makes a new LKG out of the built js files" ) ;
598- task ( "LKG" , [ "clean" , "release" , "local" ] . concat ( libraryTargets ) , function ( ) {
599- var expectedFiles = [ tscFile , servicesFile , serverFile , nodePackageFile , nodeDefinitionsFile , standaloneDefinitionsFile ] . concat ( libraryTargets ) ;
598+ task ( "LKG" , [ "clean" , "release" , "local" , "lssl" ] . concat ( libraryTargets ) , function ( ) {
599+ var expectedFiles = [ tscFile , servicesFile , serverFile , nodePackageFile , nodeDefinitionsFile , standaloneDefinitionsFile , tsserverLibraryFile ] . concat ( libraryTargets ) ;
600600 var missingFiles = expectedFiles . filter ( function ( f ) {
601601 return ! fs . existsSync ( f ) ;
602602 } ) ;
@@ -622,7 +622,7 @@ directory(builtLocalDirectory);
622622var run = path . join ( builtLocalDirectory , "run.js" ) ;
623623compileFile ( run , harnessSources , [ builtLocalDirectory , tscFile ] . concat ( libraryTargets ) . concat ( harnessSources ) , [ ] , /*useBuiltCompiler:*/ true ) ;
624624
625- var internalTests = "internal/"
625+ var internalTests = "internal/" ;
626626
627627var localBaseline = "tests/baselines/local/" ;
628628var refBaseline = "tests/baselines/reference/" ;
@@ -709,7 +709,7 @@ function runConsoleTests(defaultReporter, defaultSubsets) {
709709 testTimeout = 100000 ;
710710 }
711711
712- colors = process . env . colors || process . env . color
712+ colors = process . env . colors || process . env . color ;
713713 colors = colors ? ' --no-colors ' : ' --colors ' ;
714714 reporter = process . env . reporter || process . env . r || defaultReporter ;
715715 var lintFlag = process . env . lint !== 'false' ;
@@ -718,7 +718,7 @@ function runConsoleTests(defaultReporter, defaultSubsets) {
718718 // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
719719 var subsetRegexes ;
720720 if ( defaultSubsets . length === 0 ) {
721- subsetRegexes = [ tests ]
721+ subsetRegexes = [ tests ] ;
722722 }
723723 else {
724724 var subsets = tests ? tests . split ( "|" ) : defaultSubsets ;
@@ -765,8 +765,8 @@ task("generate-code-coverage", ["tests", builtLocalDirectory], function () {
765765} , { async : true } ) ;
766766
767767// Browser tests
768- var nodeServerOutFile = ' tests/webTestServer.js'
769- var nodeServerInFile = ' tests/webTestServer.ts'
768+ var nodeServerOutFile = " tests/webTestServer.js" ;
769+ var nodeServerInFile = " tests/webTestServer.ts" ;
770770compileFile ( nodeServerOutFile , [ nodeServerInFile ] , [ builtLocalDirectory , tscFile ] , [ ] , /*useBuiltCompiler:*/ true , { noOutFile : true } ) ;
771771
772772desc ( "Runs browserify on run.js to produce a file suitable for running tests in the browser" ) ;
@@ -778,7 +778,7 @@ task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function()
778778desc ( "Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], port=, browser=[chrome|IE]" ) ;
779779task ( "runtests-browser" , [ "tests" , "browserify" , builtLocalDirectory , servicesFileInBrowserTest ] , function ( ) {
780780 cleanTestDirs ( ) ;
781- host = "node"
781+ host = "node" ;
782782 port = process . env . port || process . env . p || '8888' ;
783783 browser = process . env . browser || process . env . b || "IE" ;
784784 tests = process . env . test || process . env . tests || process . env . t ;
@@ -792,13 +792,13 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFi
792792 }
793793
794794 tests = tests ? tests : '' ;
795- var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests
795+ var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests ;
796796 console . log ( cmd ) ;
797797 exec ( cmd ) ;
798798} , { async : true } ) ;
799799
800800function getDiffTool ( ) {
801- var program = process . env [ 'DIFF' ]
801+ var program = process . env [ 'DIFF' ] ;
802802 if ( ! program ) {
803803 fail ( "Add the 'DIFF' environment variable to the path of the program you want to use." ) ;
804804 }
@@ -827,11 +827,11 @@ task("tests-debug", ["setDebugMode", "tests"]);
827827// Makes the test results the new baseline
828828desc ( "Makes the most recent test results the new baseline, overwriting the old baseline" ) ;
829829task ( "baseline-accept" , function ( hardOrSoft ) {
830- if ( ! hardOrSoft || hardOrSoft == "hard" ) {
830+ if ( ! hardOrSoft || hardOrSoft === "hard" ) {
831831 jake . rmRf ( refBaseline ) ;
832832 fs . renameSync ( localBaseline , refBaseline ) ;
833833 }
834- else if ( hardOrSoft == "soft" ) {
834+ else if ( hardOrSoft === "soft" ) {
835835 var files = jake . readdirR ( localBaseline ) ;
836836 for ( var i in files ) {
837837 jake . cpR ( files [ i ] , refBaseline ) ;
@@ -910,14 +910,14 @@ task("update-sublime", ["local", serverFile], function() {
910910} ) ;
911911
912912var tslintRuleDir = "scripts/tslint" ;
913- var tslintRules = ( [
913+ var tslintRules = [
914914 "nextLineRule" ,
915915 "preferConstRule" ,
916916 "booleanTriviaRule" ,
917917 "typeOperatorSpacingRule" ,
918918 "noInOperatorRule" ,
919919 "noIncrementDecrementRule"
920- ] ) ;
920+ ] ;
921921var tslintRulesFiles = tslintRules . map ( function ( p ) {
922922 return path . join ( tslintRuleDir , p + ".ts" ) ;
923923} ) ;
@@ -942,7 +942,7 @@ function getLinterOptions() {
942942
943943function lintFileContents ( options , path , contents ) {
944944 var ll = new Linter ( path , contents , options ) ;
945- console . log ( "Linting '" + path + "'." )
945+ console . log ( "Linting '" + path + "'." ) ;
946946 return ll . lint ( ) ;
947947}
948948
0 commit comments