Commit graph

979 commits

Author SHA1 Message Date
Sheetal Nandi b6129b452f Fix the project reference verification to include json source file version check 2018-09-17 12:18:59 -07:00
Sheetal Nandi aac961e60d Builder to use project reference redirects to output in the dependencies instead of source files 2018-09-17 12:18:59 -07:00
Andy a57467a317
Fix bugs: Replace SourceFile if '--noUnusedLabels' changed (#27060)
* Fix bugs: Replace SourceFile if '--noUnusedLabels' changed

* Use properties on CommandLineOptionBase

* Handle "alwaysStrict" and better categorize options

* Properly handle "strict"

* Code review

* fix test
2018-09-17 10:53:48 -07:00
Sheetal Nandi e4718564e5
Merge pull request #27082 from Microsoft/watchAPIAndProjectReferences
Fix tsc watch and watch API for a project that has project references
2018-09-14 17:58:42 -07:00
Sheetal Nandi d6ffdde059 Revert the API change to resolveProjectReferencePath introduced in #27062 2018-09-14 13:32:23 -07:00
Sheetal Nandi 20f671ede2 PR feedback 2018-09-14 11:07:22 -07:00
Sheetal Nandi 40d33c809a Merge branch 'master' into watchAPIAndProjectReferences 2018-09-14 10:54:07 -07:00
Sheetal Nandi 47f311ac03
Merge pull request #27062 from Microsoft/tsbuildWatchImprovements
Multiple improvements to watching with --build option
2018-09-14 09:54:17 -07:00
Sheetal Nandi ea67e3ac56 Fix watch of project with project references 2018-09-13 15:41:07 -07:00
Nathan Shively-Sanders 64d0e0d448
Shorten more internal names to JS or TS (#27080) 2018-09-13 15:05:57 -07:00
Nathan Shively-Sanders 6bd1da20c9
Rename JS-specific concepts (#26795)
* Rename JS concepts

1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.

Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.

* Remove TODO

* Rename Javascript->JS

Note that this introduces a variable name collision in a couple of
places, which I resolved like this:

```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Sheetal Nandi a172751bf9 Always resolve the config file to ResolvedConfigFile if its json, otherwise combine tsconfig.json 2018-09-11 13:02:50 -07:00
Daniel Imms 745f5be2cb Invert gutter instead of setting colors
Fixes #26850
2018-09-08 13:26:14 -07:00
Sheetal Nandi 88d5b04c70 Lowercase type reference directives when determining to reuse program structure (just like when we create new program) 2018-09-06 13:26:44 -07:00
Sheetal Nandi ddba6d8a70
Merge pull request #26825 from Microsoft/resolveJsonModuleEmit
Support json module emit when module emit is commonjs, amd, es2015 or esnext
2018-09-06 09:57:47 -07:00
Ryan Cavanaugh f79e64561f
Merge pull request #26870 from ajafff/composite-files-check
better condition for file include exhaustiveness check
2018-09-05 12:32:56 -07:00
Ryan Cavanaugh d265fbf7f7
Merge pull request #26192 from ajafff/createprogram-nochecker
createProgram: don't use TypeChecker
2018-09-05 11:49:57 -07:00
Klaus Meinhardt 239a7b9a4f better condition for file include exhaustiveness check
As `files` always contains declaration files of external libraries, lib files and declaration files from typeRoots, the previous condition evaluated to false for probably all projects out there.
This changes the condition to compare array length after filtering out all declaration files.
That avoids unnecessary work of path normalization in the common case where everything is ok.
2018-09-04 13:35:57 +02:00
Sheetal Nandi e41dbcdccd Support json module emit when module emit is commonjs, amd, es2015 or esnext
Fixes #25755 and #26020
2018-08-31 14:05:14 -07:00
Klaus Meinhardt b2850ee467 remove useless condition 2018-08-30 22:13:39 +02:00
Sheetal Nandi 530a530ac0
Merge pull request #26590 from Microsoft/buildRefactoring
Refactor ts build and report watch status when doing --build --watch
2018-08-28 11:43:35 -07:00
Andy 7223945666
Use array helper in computeCommonSourceDirectory and remove two unnecessary tests (#26416) 2018-08-27 17:03:30 -07:00
Sheetal Nandi cec1b0a717 Report error summary from the queue. 2018-08-21 17:30:51 -07:00
Sheetal Nandi 4193846108 Do not expose change in createCompilerHost 2018-08-21 14:46:00 -07:00
Sheetal Nandi 0c4003e735 Use SolutionBuilderHost instead of using compilerhost for solution builder 2018-08-21 13:41:31 -07:00
Sheetal Nandi 17ee9231b7 Write first test with --build and --watch 2018-08-21 13:41:30 -07:00
Ron Buckton 1de8cd3f62 Emit lib reference directives in declaration output 2018-08-20 16:54:51 -07:00
Sheetal Nandi af71d55a49 Do not include json file unless --resolveJsonModule is specified
Fixes #26402
2018-08-14 16:23:13 -07:00
Andrew Casey daccc978a8 Don't compute suggestion diagnostics for lib files
The check applied to semantic diagnostics (and `checkSourceFile`) should
also apply to suggestion diagnostics.  Fixes assert.
2018-08-07 17:58:35 -07:00
Klaus Meinhardt 6df61272f3 createProgram: don't use TypeChecker
Avoids using the TypeChecker when trying to reuse the Program structure.
This allows SourceFiles contained in the old Program to be updated using ts.updateSourceFile

Fixes: #26166
2018-08-03 17:54:15 +02:00
Sheetal Nandi 46d223dc1b Fixes to ensure getDefinitionAndBoundSpan works correctly when using composite projects
Project references need to be detached from the project when closing project
In SourceMapDecoder handle when the redirected file to project reference is set as the output of the project
Keep configured project alive if project it references has open ref
Fixes #26164
2018-08-02 16:36:50 -07:00
Andy 9c9f3e3cf9
importFixes: When one file redirects to another, consider both for global import specifiers (#25834)
* importFixes: When one file redirects to another, consider both for global import specifiers

* Add test for #26044

* Avoid a symlinked package globally importing itself (fixes another case of #26044)

* Compare to node_modules with getCanonicalFileName
2018-07-31 17:28:56 -07:00
Sheetal Nandi 9196b7db33
Merge pull request #25851 from Microsoft/configFileDiag
Report compiler options errors as well as part of configFileDiag event
2018-07-30 11:07:07 -07:00
Wesley Wigham f6d3ac9b5d
Fix #25820 - handle redirected files when comparing paths (#25902)
* Fix #25820 - handle redirected files when comparing paths

* Update test to do case check
2018-07-24 15:24:52 -07:00
Sheetal Nandi a9d497a008 Report compiler options errors as well as part of configFileDiag event
Fixes #25741
2018-07-20 18:04:08 -07:00
Alexander T 8ae163a1cc Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/25667-getmodifiedtime-has-wrong-return-type 2018-07-20 10:18:22 +03:00
Alexander T 37add88b18 Update tests baselines 2018-07-20 10:17:27 +03:00
Klaus Meinhardt 7031c43978 correctly detect if strictNullChecks is enabled
Fixes: #25808
2018-07-20 00:16:59 +02:00
Alexander T bf567b8a40 Change getModifiedTime type 2018-07-16 11:10:09 +03:00
Sheetal Nandi 49ac60f286 Support resolveJsonModule option when files contain the json file
Fixes #25636
2018-07-13 12:21:51 -07:00
Sheetal Nandi 4dc3cd3773 Use getEmitModuleKind to check module generation kind 2018-07-10 15:28:21 -07:00
Sheetal Nandi 3866a5048b Report errors for module generation other than "commonjs" with --resolveJsonModule
Fixes #25517
2018-07-10 15:00:46 -07:00
Ryan Cavanaugh d7ce0eae3a
Merge pull request #25524 from RyanCavanaugh/useGetEmitDeclarations
Use getEmitDeclarations instead of .declarations
2018-07-10 10:59:06 -07:00
Ryan Cavanaugh 72f0789908 Don't crash when an implicit rootDir constraint is violated under composite:true
Fixes #25527
2018-07-09 15:41:15 -07:00
Ryan Cavanaugh 1b1ffe952b Use getEmitDeclarations instead of .declarations 2018-07-09 14:51:40 -07:00
Andy 64555aa6a9
navigateTo: Collect results from all referenced projects. (#25283)
* navigateTo: Collect results from all referenced projects.

* Don't use project references, just source maps

* Move more code to session

* Test when implementation file is deleted

* Use tsserver tests instead of fourslash tests to ensure session is used

* Support find-all-references

* Restore fourslash tests

* Update emit baselines (added missing newline)

* Support rename

* @weswigham code review

* Don't open/close files

* Avoid growing `toDo` too eagerly

* @sheetalkamat code review

* Also get symlinked projects for originalLocation

* Update API (#24966)

* More @sheetalkamat code review

* Remove unnecessary test

* Update API (#24966)
2018-07-05 15:39:03 -07:00
Wesley Wigham 7084e6cf47
Adds related spans and error grouping for duplicate identifier errors (#25328)
* Adds related spans and error grouping for duplicate identifier errors

* Trim trailing whitespace

* Record related info in error baselines

* Make error more whimsical
2018-07-02 10:47:52 -07:00
Wesley Wigham 30db30055f
Fix module specifier case handling for declaration emit (#25110) 2018-06-29 11:02:43 -07:00
Wesley Wigham bd97e12f76
Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host (#25107)
* Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host

* make cache undefinable and handle correctly

* Remove unneeded cast

* Readd assert

* More useful failure messager
2018-06-22 14:05:36 -07:00
Ron Buckton 5bc8f957f1 Address lint warnings 2018-06-19 02:31:03 -07:00