Commit graph

949 commits

Author SHA1 Message Date
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
Ron Buckton 891b15f60a Update gulpfile to support project references 2018-06-18 22:45:13 -07:00
Wesley Wigham 640af3f75e
Introduce related spans into tsserver protocol (#24548)
* Introduce related spans into tsserver protocol

* Incorporate pretty output, implement esModuleInterop related span
2018-06-15 10:54:36 -07:00
Wesley Wigham 2a1503610b
Stop generating sectional sourcemaps (#24917)
* Generate normal 1-part sourcemaps (at increased processing cost), since tools dislike sectional ones

* Add semicolon

* Accept sad baselines]

* Forward along sourcesContent if available

* Supress lint since the API actually calls for null here

* Fix concatenated sourcemap paths

* Accept bad baselines :(

* Add overloads

* Accept api update

* Fix lint
2018-06-13 18:52:23 -07:00
Ron Buckton 756e46bfe3 Reuse resolvedProjectReferences 2018-06-11 17:59:32 -07:00
Ryan Cavanaugh 5804905ca6 Jakefile rewrite WIP 2018-06-10 13:23:16 -07:00
Ryan Cavanaugh 856fc79ae7 Lint 2018-06-05 16:28:42 -07:00
Ryan Cavanaugh 5111f4d541 Move proj ref logic to the right place 2018-06-05 16:20:07 -07:00
Ryan Cavanaugh cf87bd446d Merge branch 'master' into tsbuild 2018-06-05 14:55:51 -07:00
Wesley Wigham d9b93903c0
Use more nodelike paths for import types when possible (#24610)
* Use more nodelike paths for import types when possible

* move functionality from services into compiler, fix with propert file/directory conflict handling

* mark suspect cast
2018-06-05 12:54:36 -07:00
Ryan Cavanaugh 45842a0c34 Merge remote-tracking branch 'weswigham/sourcemap-concatenation-station' into tsbuild 2018-06-05 12:31:32 -07:00
Ron Buckton fbeb58a147
Merge pull request #23893 from Microsoft/libReference
Adds 'lib' reference directives
2018-06-04 16:14:52 -07:00
Ron Buckton 666841264c Merge branch 'master' into libReference 2018-06-04 14:38:56 -07:00
Wesley Wigham 7eaa78846e
Visit the children of an import type/require call/dynamic import when looking for those (#24663) 2018-06-04 14:31:56 -07:00
Ryan Cavanaugh 9b0dc37f42 Merge branch 'fixMissingScriptInfo' into tsbuild 2018-06-04 10:59:42 -07:00
David Sherret 7e0ed5ec4d Fix createProgram js docs. 2018-06-01 23:29:05 -04:00
Ryan Cavanaugh 7e9e29ce64 Store + use the resolved path of sourceFiles in proj. ref. scenarios 2018-06-01 13:20:57 -07:00
Sheetal Nandi b0f039c9e2 Make suggestion diagnostics to wire cancellationToken
This especially needed if its a js file without the ts-check, the file wont be typechecked in getSemanticDiagnostics
Fixes part of #19458
2018-05-31 10:47:17 -07:00
Ron Buckton 7de55fbb7e PR Feedback 2018-05-31 09:50:51 -07:00
Wesley Wigham 8adbf85e0e
Candidate sectional sourcemap emit implementation 2018-05-30 17:53:26 -07:00
Ron Buckton ec0af20f5a Merge branch 'master' into libReference 2018-05-29 14:13:00 -07:00
Ryan Cavanaugh fe191fec6d Merge branch 'master' into tsbuild 2018-05-29 13:14:12 -07:00
Ryan Cavanaugh 19ab8abbb9 Fix strictNullChecks breaks 2018-05-24 13:42:12 -07:00
Sheetal Nandi 51058b56e5 Do not trigger invalidation if emitted file is in declarationDir 2018-05-24 13:36:52 -07:00
Ryan Cavanaugh 8936b030cd Merge branch 'master' into tsbuild 2018-05-24 13:01:58 -07:00
Andy e53e56cf82
Enable '--strictNullChecks' (#22088)
* Enable '--strictNullChecks'

* Fix API baselines

* Make sys.getEnvironmentVariable non-nullable

* make properties optional instead of using `| undefined` in thier type

* reportDiagnostics should be required

* Declare firstAccessor as non-nullable

* Make `some` a type guard

* Fix `getEnvironmentVariable` definition in tests

* Pretend transformFlags are always defined

* Fix one more use of sys.getEnvironmentVariable

* `requiredResponse` accepts undefined, remove assertions

* Mark optional properties as optional instead of using `| undefined`

* Mark optional properties as optional instead of using ` | undefined`

* Remove unnecessary null assertions

* Put the bang on the declaration instead of every use

* Make `createMapFromTemplate` require a parameter

* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional

* Plumb through undefined in emitLsit and EmitExpressionList

* `ElementAccessExpression.argumentExpression` can not be `undefined`

* Add overloads for `writeTokenText`

* Make `shouldWriteSeparatingLineTerminator` argument non-nullable

* Make `synthesizedNodeStartsOnNewLine` argument required

* `PropertyAssignment.initializer` cannot be undefined

* Use one `!` at declaration site instead of on every use site

* Capture host in a constant and avoid null assertions

* Remove few more unused assertions

* Update baselines

* Use parameter defaults

* Update baselines

* Fix lint

* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions

* Make Node#symbol and Type#symbol non-optional to reduce assertions

* Make `flags` non-nullable to reduce assertions

* Convert some asserts to type guards

* Make `isNonLocalAlias` a type guard

* Add overload for `getSymbolOfNode` for `Declaration`

* Some more `getSymbolOfNode` changes

* Push undefined suppression into `typeToTypeNodeHelper`

* `NodeBuilderContext.tracker` is never `undefined`

* use `Debug.assertDefined`

* Remove unnecessary tag

* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
2018-05-22 14:46:57 -07:00
Andy 7106a587cc
Add type for diagnostics where location is defined (#23686)
* Add type for diagnostics where location is defined

* getSemanticDiagnostics may return global diagnostics

* Reduce array creation
2018-05-22 11:01:18 -07:00
Ryan Cavanaugh 7e0825a3e7 Clean, etc 2018-05-21 17:47:58 -07:00
Ron Buckton 698f229bb4 Merge branch 'master' into libReference 2018-05-09 11:41:13 -07:00
Alex Ryan 01351d43e4
Fix comment typo in program.ts 2018-05-08 14:36:32 -07:00
Wesley Wigham 8ab5be9a86
Add hook for adding transforms into the declaration emit pipeline after the main one (#23946)
* Add hook for adding transforms into the declaration emit pipeline after the main one

* Fix lint
2018-05-08 11:20:48 -07:00