Commit Graph

812 Commits

Author SHA1 Message Date
Andy df57cdc2d6 Have CompletionEntryDetails source use a relative path (#19917) (#20022)
* Have CompletionEntryDetails source use a relative path

* Use getCanonicalFileName from services Instead of creating a new one
2017-11-15 07:06:13 -08:00
Sheetal Nandi 4e56347d58 Set the files found during node_modules search correctly when reusing existing program structure
This marks files reused correctly as from external library resulting in not using them for files to be emitted and computed for output structure
Fixes #19327
2017-10-24 10:40:33 -07:00
Bill Ticehurst 51d4fa0e64 Set the scriptKind from the host configuration if present 2017-10-17 16:19:02 -07:00
Sheetal Nandi bce77fdfd9 Merge pull request #18960 from Microsoft/builderHandlesChangeInResolution
Builder handles changes in resolution/references when file's contents dont change
2017-10-11 12:11:44 -07:00
Sheetal Nandi 03441fe120 Merge branch 'master' into projectRootAsCurrentDirectoryInEmit 2017-10-04 18:48:16 -07:00
Sheetal Nandi bf4ca30bc3 Let builder find out from imports/typereference directives if file references have changed.
This is needed to ensure that the ambient module addition takes effect
Fixes #15632
2017-10-04 18:09:09 -07:00
Mohamed Hegazy ae3f29ade6 Accept baselines (#18903) 2017-10-02 19:08:13 -07:00
Sheetal Nandi 7f969e8138 Making APIs as internal so that we can enable them after we have figured out final details 2017-10-02 16:27:26 -07:00
Sheetal Nandi 835153ba50 PR feedback 2017-10-02 12:22:05 -07:00
Sheetal Nandi 9e08caebf5 Merge branch 'master' into watchImprovements 2017-09-29 10:43:05 -07:00
Daniel Rosenwasser 0ea7c61eb5 Merge pull request #18810 from Microsoft/unusedErrorArgs
Remove unused arguments for diagnostics
2017-09-28 12:51:57 -07:00
Daniel Rosenwasser 76d92a5dd6 Remove unused arguments in program.ts. 2017-09-27 22:04:52 -07:00
Sheetal Nandi fad71d3dc6 Use project root as the current directory whenever possible to create the project 2017-09-27 17:19:54 -07:00
Alex Eagle 9753d3950b --pretty output: move context after the file/error
Fixes #16583
2017-09-27 13:55:30 -07:00
Sheetal Nandi 68d360585a PR feedback 2017-09-26 16:21:15 -07:00
Sheetal Nandi 23acff5bc8 Merge branch 'master' into watchImprovements 2017-09-25 16:18:26 -07:00
Andy 25ad0b5581 Apply "array-type" lint rule (#18699) 2017-09-22 16:14:41 -07:00
Anders Hejlsberg 8f4a2c184c Merge pull request #18457 from Microsoft/tsIgnoreInTSFiles
Suppress errors in .ts files using '// @ts-ignore' comments
2017-09-20 00:56:56 +01:00
Andy 0ae42ea3de Allow relative imports of '.js' files when --noImplicitAny is disabled (#18489)
* Allow relative imports of '.js' files when `--noImplicitAny` is disabled

* Update baselines, and don't ignore a diagnostic about missing JSX
2017-09-19 12:42:29 -07:00
Armando Aguirre b03fbaf313 Merge branch 'master' into FixRenameInDefaultLibrary 2017-09-14 12:01:31 -07:00
Anders Hejlsberg f28d80d7d4 Support '// @ts-ignore' comments in .ts files 2017-09-13 15:40:10 -07:00
Sheetal Nandi b536f9dade Should not remove the reused resolutions in the file when file contents have not changed. 2017-09-12 12:09:06 -07:00
Sheetal Nandi fdb104b242 Merge branch 'master' into watchImprovements 2017-09-11 13:49:36 -07:00
Sheetal Nandi de28d02626 Add test case to verify correct resolution file is picked when current resolution file is not removed but higher precedence file is created 2017-09-08 15:45:47 -07:00
Andy 2e02778960 When loading a module from node_modules, get packageId even in the loadModuleFromFile case (#18185)
* When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case

* Support packageId for <reference types> too
2017-09-07 14:31:20 -07:00
Daniel Rosenwasser 448d75c08f Merge pull request #17675 from HerringtonDarkholme/master
fix #16567: better coloring on light theme terminal
2017-09-07 12:33:12 -07:00
Wesley Wigham 6695255d86 Allow trailing newline to have fake position (#18298)
* Actually support baselining pretty in the harness

* Test case from 18216

* Use host newline in formatDiagnosticsWithColorAndContext

* Merge statements
2017-09-07 12:26:23 -07:00
Sheetal Nandi 16cf7c40a8 Watch for the automatic types that included as part of type resolution 2017-08-31 09:13:59 -07:00
Sheetal Nandi 4c79033894 Refactoring to watches and caching of system such that we minimize function expressions
Also unified watcher info logging
2017-08-31 09:13:59 -07:00
Andy 4d05bfdf4a moduleAugmentations may contain an Identifier (#18009)
* `moduleAugmentations` may contain an `Identifier`

* Add comment

* Rename function
2017-08-25 15:14:51 -07:00
Andy e2141ad469 Mark some arrays as readonly (#17725)
* Mark some arrays as readonly

* Avoid unnecessary allocations and style changes

* Fix lint
2017-08-24 09:55:01 -07:00
Sheetal Nandi 8deef58fd6 Remove the unused function from the Project since builder has this logic now. 2017-08-18 12:15:03 -07:00
Armando Aguirre 9dd574b1a9 Added host.useCaseSens..., memoized getDefaultLibFileName. 2017-08-15 18:44:28 -07:00
Armando Aguirre 88262dbeb0 Changed check for default library by first checking hasNoDefaultLib, second library path and third name of file. 2017-08-14 18:19:43 -07:00
Armando Aguirre 5b86055786 Excluded the default library from rename service. 2017-08-14 17:58:04 -07:00
Sheetal Nandi 136b091a4a Update based on feedback 2017-08-14 16:34:30 -07:00
Sheetal Nandi 989508245b Updating according to feedback from PR 2017-08-14 12:52:29 -07:00
Sheetal Nandi 59d07dc488 Simplified mutate map options 2017-08-14 11:27:02 -07:00
Sheetal Nandi d0a23bb876 Merge branch 'watchImprovements' into builder 2017-08-12 15:35:30 -07:00
Andy 37b20ee670 For duplicate source files of the same package, make one redirect to the other (#16274)
* For duplicate source files of the same package, make one redirect to the other

* Add reuseProgramStructure tests

* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure

* Use fallthrough instead of early exit from loop

* Use a set to efficiently detect duplicate package names

* Move map setting outside of createRedirectSourceFile

* Correctly handle seenPackageNames set

* sourceFileToPackageId -> sourceFileToPackageName

* Renames

* Respond to PR comments

* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect

* Clean up redirectInfo

* Respond to PR comments
2017-08-09 14:39:06 -07:00
Herrington Darkholme 0255adc407 fix #16567: better coloring on light theme terminal 2017-08-08 10:12:11 +08:00
Sheetal Nandi 7474ba762c Implementation for invalidating source file containing possibly changed module resolution 2017-08-07 11:31:13 -07:00
Sheetal Nandi 46e3d1c1d9 Refactoring so that instead of just using from tsc --watch the new api is accessible all the time 2017-08-07 11:31:12 -07:00
Sheetal Nandi c814d8e847 Add tests for the tsc --watch 2017-08-07 11:24:07 -07:00
Sheetal Nandi 6237b221da Move the builder to compiler directory 2017-08-07 11:19:52 -07:00
Sheetal Nandi ef5935b52c Initial refactoring so that watch from tsc follows the tsserver projects 2017-08-07 11:19:52 -07:00
Sheetal Nandi 94a589b3bb Program cannot be reused if the missing file is now present
Also dont update filesByName array just to update missing file paths
2017-08-07 11:04:33 -07:00
Sheetal Nandi 273569f6fe Make the host cache store the fileName instead of undefined for the missing host files 2017-08-07 11:04:33 -07:00
Andy f945b26b54 Forbid type assertions in '.js' files (#17503) 2017-07-29 05:41:08 -07:00
Andy eadd084c82 Add 'name' property to Identifier (#17329)
* Add 'name' property to Identifier

* Rename to unescapedText

* Rename 'id.text' to 'id.escapedText'

* Rename 'id.unescapedText' to 'id.text'

* Make escapeIdentifier and unescapeIdentifier do nothing
2017-07-25 13:16:34 -07:00