Commit Graph

134 Commits

Author SHA1 Message Date
Sheetal Nandi
18269c0fc8 Add assumeChangesOnlyAffectDirectDependencies as a option to skip checking and generating .d.ts files for files indirectly importing affected file (#35711)
* Baselining tsc --watch output

* Add noIndirectImports as a option to skip checking and generating .d.ts files for files indirectly importing affected file
Fixes #33329

* Rename option to assumeChangesOnlyAffectDirectDependencies

* Description change as per feedback
2020-01-03 13:02:45 -08:00
Sheetal Nandi
ec84392f2e Use resolvedPath consistently in the builder (#35757)
* Add baseline for #35468

* Use resolvedPath consistently in the builder
Fixes #35468
2019-12-19 10:10:17 -08:00
Sheetal Nandi
8c1900c74b Baselining tsc --watch output just like tsc baselines for easier updates (#35710)
* Baselining tsc --watch output

* Fix lint errors
2019-12-18 10:23:58 -08:00
Sheetal Nandi
c3b2aea9f9 Do not write files directly from builder when noEmitOnError is true (#34832)
* Add tests for noEmitOnError

* Do not write files directly from builder when noEmitOnError is true
Fixes #34823

* make linter happy

* Instead of generating output in memory, check errors before doing the emit in case of noEmitOnError
2019-12-12 19:51:18 -08:00
Sheetal Nandi
236012e47b Add watchOptions to tsconfig and allow supplying them on command line as well (#35615)
* Create different watch options in compiler options

* Thread through the new watch options

* Actually use the options passed through for watch strategy

* Support delay on updating child directory watches

* Make watchOptions separate from compilerOptions

* Support passing watch options from command line

* Handle displaying of watchOptions
2019-12-11 13:26:44 -08:00
Sheetal Nandi
07364595e4 Handle consistent file name during editor and tsc --watch scenarios (#34622)
* Add isInferredProject, isConfiguredProject and isExternalProject

* Add test for rename on file with case change that fails
Test for #25460

* Dont store fileName on text storage

* Store root file names in the root file map to reflect their name

* Delay open file triggering watches

* Correct the name of source file as we query it (eg. it could be same source file returned in old program with different casing on case insensitive file name)

* More tests

* Refactoring

* Cache bind And check diagnostics and always get program diagnostics from the program

* Another test

* Try to report conflicting file error on file instead of global diagnostics

* Create better tests for module resolution diagnostics check

* Fix lint errors
2019-12-10 18:25:10 -08:00
Wesley Wigham
c447ebc59c Refactor: No more than 1 namespace declaration per file (#35373)
* Refactor: No more than 1 namespace declaration per file

* Simplify refs where possible
2019-11-27 13:44:31 -08:00
Sheetal Nandi
afee423a84 Feedback on formatting 2019-10-17 11:54:26 -07:00
Sheetal Nandi
bb4872b063 Do not write build info if there are no files to emit 2019-10-15 08:37:23 -07:00
Sheetal Nandi
4b10145340 Make sure commandline options are absolute paths so they dont conflict with tsbuildinfo paths
Fixes #33667
2019-10-14 14:44:47 -07:00
Sheetal Nandi
992c211c22 Merge pull request #32028 from microsoft/referencesPrototypeSourceFile
For editing experience, use source instead of .d.ts files from project references
2019-09-24 13:16:53 -07:00
Sheetal Nandi
7f004ad8df Merge pull request #33380 from microsoft/isolatedModules
With --isolatedModules, --declaration emit is now allowed and builder handles it for incremental compilation
2019-09-19 16:20:21 -07:00
Sheetal Nandi
e430f2a81c Add output file names api for supporting ts-loader 2019-09-18 14:13:49 -07:00
Sheetal Nandi
0019cee6de Handle --isolatedModules and d.ts emit in the builder 2019-09-11 12:52:23 -07:00
Sheetal Nandi
c0f0d9f798 Merge branch 'master' into dtsOnlyEmit 2019-09-11 12:42:48 -07:00
Sheetal Nandi
b26ca160f4 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-11 12:27:58 -07:00
Sheetal Nandi
686e9a42db Do not emit .js files if only d.ts file will be impacted. 2019-09-10 12:53:17 -07:00
Sheetal Nandi
54d9ce9247 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-05 13:51:56 -07:00
Alexander
b1d748b644 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-31 22:12:41 +03:00
Sheetal Nandi
79bcb3d547 Handle seenEmittedFiles which was not being set when emit of a file was complete (#33145)
* Add test that fails because file is written multiple times
Reported from #33061

* Handle seenEmittedFiles which was not being set when emit of a file was complete.
It was issue only when errors are reported before emitting (which puts the files into pendingEmit that needs to check only in seenEmittedFiles)
If emit happens before semantic diagnostics query this issue is not repro, because the affected files come into play and those are being set correctly
Fixes #31398

* make baselining source map optional

* Handle emitDeclarationOnly in --build scenario

* Ensure we are using d.ts emit as signature even when --declarationMap is on (map files are emitted before d.ts)

* Move module specifiers to verifyTsBuildOutput

* implement create Hash to be default hashing plus data so we can verify it easily in baseline

* Remove failing baseline

* Accept correct baseline name
2019-08-30 16:33:44 -07:00
Sheetal Nandi
5ea4257e6e Fix the semantic diagnostics caching in builder to handle conversion from relative to buildInfo to absolute path (#33168)
Fixes #33161
2019-08-30 15:44:51 -07:00
Alexander
023e4c6249 disable no-redeclare 2019-08-09 07:30:40 +03:00
Alexander
ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander T
11ec6118fb @typescript-eslint/array-type 2019-07-29 18:39:11 +03:00
Sheetal Nandi
666c4be844 Merge branch 'master' into referencesPrototypeSourceFile 2019-07-25 14:03:48 -07:00
Alexander T
64baa804a8 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-15 18:35:34 +03:00
Sheetal Nandi
fd4f4fe5a2 Ensure that the filePaths in compiler options are absolute before getting relative path to buildInfo directory
Fixes #32353
2019-07-11 13:18:35 -07:00
Sheetal Nandi
15b68a9396 Skip typechecking of source of project reference redirect 2019-07-03 15:39:29 -07:00
Alexander T
9f474150c6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-02 17:57:44 +03:00
Alexander T
136f4cfc0f no-redeclare 2019-06-27 12:29:32 +03:00
Sheetal Nandi
d36099c98d Use absolute paths for buildInfoDirectory 2019-06-20 12:55:02 -07:00
Sheetal Nandi
9446fc0c0c Convert options to relative paths 2019-06-19 12:54:22 -07:00
Sheetal Nandi
d760cbb74b Make any paths in buildInfoFile to be relative to it. 2019-06-19 12:54:21 -07:00
Alexander T
123ca0d639 no-empty 2019-06-14 10:21:51 +03:00
Sheetal Nandi
098c9008b8 Make more build options internal which correspond to internal compiler options
Also fix return type of readBuilderProgram
2019-05-16 14:50:09 -07:00
Sheetal Nandi
9f9ae000cb Enable getSemanticDiagnosticsOfNextAffectedFile for EmitAndSemanticDiagnosticsBuilder 2019-05-07 16:32:52 -07:00
Sheetal Nandi
d5100bb95e Merge branch 'master' into dtsSignatureChange 2019-04-17 16:36:09 -07:00
Sheetal Nandi
4a55025f20 Code review feedback 2019-04-17 16:32:33 -07:00
Sheetal Nandi
15ae8a7273 Make sure to emit again if change in compiler option affects emit
Fixes #30736
2019-04-16 16:18:37 -07:00
Sheetal Nandi
ae7e00e741 Combine semantic diagnostics of files using exported entities from modules and their dts emit 2019-04-16 14:18:03 -07:00
Sheetal Nandi
17d2c8bcfb Handle dts change as well as signature update when exported module affects dts but not js file 2019-04-16 13:27:51 -07:00
Sheetal Nandi
db8c6ee67a When exported types from module change, the modules exporting these types indirectly mean d.ts change too (not just semantic diagnostics) 2019-04-16 13:05:23 -07:00
Sheetal Nandi
0be9a22dbf Remove unnecessary check since seenEmittedFiles is set when getting pending affected files 2019-04-16 12:53:45 -07:00
Sheetal Nandi
35470b3f3b Make tsbuildInfoFile as commandline option to tsc (and not tsc -b) 2019-03-25 14:47:36 -07:00
Sheetal Nandi
bd229b5ed1 Exclude Json files from Project reference redirects from files to be emitted list
Fixes #30382
2019-03-14 11:22:26 -07:00
Sheetal Nandi
d4cfa41931 To test platform independent buildInfo baselines, move the logic to writeFile of SolutionBuilderHost 2019-03-08 13:00:29 -08:00
Sheetal Nandi
67930ead81 Store semantic diagnostics as well (for future tsc without build but incremental) 2019-03-05 13:51:44 -08:00
Sheetal Nandi
7d464b81d4 Redirect getProgramBuildInfo onto builder so that we can test it for baselines more easily 2019-02-21 13:21:52 -08:00
Sheetal Nandi
8f18cec80c Dont emit program information in --out scenarios 2019-02-07 13:01:10 -08:00
Sheetal Nandi
23b5b14565 Fix incremental build changes declaration dir 2019-02-07 12:10:15 -08:00