Commit graph

857 commits

Author SHA1 Message Date
Alexander 536f59cd7d fix formatting 2019-08-08 21:49:10 +03:00
Alexander ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander 455f8b5511 fix eslint errors. remove tslint:* comments 2019-08-07 21:35:05 +03:00
Alexander 481d70d50d Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-07 21:23:10 +03:00
Ben Lichtman 9971e8b560
Merge pull request #32688 from uniqueiniquity/skipCOSForDTS
Avoid compile on save when there is no emit impact
2019-08-07 10:44:54 -07:00
Alexander 5c2e000561 remove useless TODO comment 2019-08-07 20:33:13 +03:00
Ron Buckton d75740280f
Resolve module specifier relative to moduleFile.originalFileName (#32722)
* Resolve module specifier relative to moduleFile.originalFileName

* Use baseline testing for outputs

* Added skipLibCheck to test

* Switch to using vfs.formatPatch for output
2019-08-06 13:48:58 -07:00
Ben Lichtman c0f187a4e8 Allow compile on save with decorator emit 2019-08-06 13:39:18 -07:00
Ron Buckton cc3db8f448 Merge branch 'Saulzi-master' 2019-08-06 10:48:47 -07:00
Ron Buckton 3ff0a249d2 Update based on PR feedback 2019-08-06 10:46:17 -07:00
Alexander T 034ba9fd25 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-06 09:07:48 +03:00
Ron Buckton e3f4979736
Fix emit for object rest on a module export (#32699)
* Fix emit for object rest on a module export

* Add tests for exports of empty object/array binding patterns

* Add delay for exec to ensure diff tool has enough time to start
2019-08-05 16:53:21 -07:00
sisisin 33a6509751 Fixes export destructured variables reference (#32007)
* Add basic test for current behavior

* Fixes getting destructured variables references(#31922)

* Add test case that renames destructured property

* Fixes missing nested object destrucuturing variable references
2019-08-05 12:00:06 -07:00
Ron Buckton 5710f7d5ff Merge branch 'master' of https://github.com/Saulzi/TypeScript into Saulzi-master 2019-08-05 11:17:32 -07:00
Alexander T 012bacc415 Define interface for TSConfig. Change compilerOnSave to compileOnSave (#32481) 2019-08-05 09:24:09 -07:00
Alexander 4d23429d98 fix eslint errors 2019-08-04 16:00:57 +03:00
Alexander a292ae1789 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-04 15:35:41 +03:00
Alexander a37d34a5b6 lint src/, scripts/ folders separately 2019-08-04 15:33:01 +03:00
Ben Lichtman 0cab79fc56 Add test 2019-08-02 15:56:01 -07:00
Sheetal Nandi b84f13d7cf Use single stats watcher per filename
Fixes #28690
2019-07-29 15:33:34 -07:00
Sheetal Nandi 2db8a13d81 Remove project status, watches etc when project is no longer part of build order 2019-07-29 15:33:34 -07:00
Sheetal Nandi 4efcfb7120 Some refactoring 2019-07-29 15:33:33 -07:00
Sheetal Nandi 1ac980ec96 File move 2019-07-29 15:33:33 -07:00
Alexander b6c3c7a486 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-29 22:25:02 +03:00
Wesley Wigham b963e1a2a7
Update LKG (#32578)
* Update LKG

* Add @types/node version bump

* Small paatches/casts to be compatible with latest node

* Accept API baseline update

* Make internal NodeBuffer compatable with latest Buffer

* Why do we even have an internal buffer type

* Sync up internal buffer type better

* Fix lint

* Readd mroe missing Buffer methods
2019-07-29 10:33:43 -07:00
Alexander T e1a138312f fix eslint errors 2019-07-29 18:42:01 +03:00
Alexander T 1b4dfbc7d6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-29 18:39:29 +03:00
Alexander T 11ec6118fb @typescript-eslint/array-type 2019-07-29 18:39:11 +03:00
Sheetal Nandi 2fe3c1b3b7
Merge pull request #32561 from microsoft/retainFreshlyCreatedProject
Retain the configured project opened during opening client file even if opened file isnt included in that project
2019-07-26 12:18:26 -07:00
Jesse Trinity 599e36a068
Decrement line ends if they end with a carriage return. (#31220)
* Decrement line ends if they end with a carriage return.

* Changed handling of newlines and inlined regex operation.

* fixed misname of hintSpan

* added tests

* revert inline of regex match and use getLineEndOfPosition

* fixed lint error and changed a silly thing in tests
2019-07-25 21:29:12 -07:00
Sheetal Nandi 666c4be844 Merge branch 'master' into referencesPrototypeSourceFile 2019-07-25 14:03:48 -07:00
Sheetal Nandi 10ee85c98c Retain the configured project opened during opening client file even if opened file isnt included in that project
This helps not create and remove project on every open if tsconfig file isnt referenced by any open file
2019-07-25 12:38:26 -07:00
Sheetal Nandi ee623c1ae6 Add test case before change where config project is created just to remove it 2019-07-25 12:04:13 -07:00
Salisbury, Tom 395d1515ee #32458 stop ES5 __values with no Symbol.iterator getting stuck in loop 2019-07-25 12:17:22 +01:00
Alexander 0059763d8f move eslint rules from eslint-plugin-microsoft-typescript to scripts/eslint 2019-07-24 13:31:17 +03:00
Wesley Wigham 40fd4efdf6
Strip more kinds of timestamps and versions from dockerfile output (#32519)
* Strip more kinds of timestamps and versions from dockerfile output, rewrite office-ui-fabric dockerfile to use new lerna build system

* Add another filter for just output

* Update user baselines (#23)

* Update user baselines (#24)

* Strip only maybe-present timestamps

* More lenient timestamp filter

* Update user baselines (#25)

* Simplify and enhance vscode dockerfile to use nightly ts in ts extension, too

* Update user baselines (#26)

* Update user baselines (#27)
2019-07-23 17:14:50 -07:00
Alexander T a79f598269 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-23 13:10:04 +03:00
Ron Buckton d982014d73
Update __awaiter to be more spec compliant (#32462)
* Update __awaiter to be more spec compliant

* Add awaiter evaluation test
2019-07-22 17:23:35 -07:00
Ron Buckton 47e3fedb5d
Fix object spread runtime semantics (#32514) 2019-07-22 16:46:09 -07:00
Alexander T 40f2f77358 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-22 13:50:43 +03:00
Sheetal Nandi aab3069e64 Fix the assert of reporting file infos still attached to the project for circular json reference 2019-07-19 15:55:46 -07:00
Alexander T 949770a4fe @typescript-eslint/triple-slash-reference 2019-07-19 10:30:40 +03:00
Alexander T 2c32308f35 no-null/no-null 2019-07-18 10:50:38 +03:00
Alexander T a8ee8fbe87 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-18 10:00:16 +03:00
Sheetal Nandi b589020bb3
Merge pull request #32425 from microsoft/scopedPackageAquisition
Handle scoped package names in typing installer
2019-07-16 16:48:35 -07:00
Sheetal Nandi 607c9c5e26 Fix missing tokenToString for the backtick
Fixes #32073
2019-07-16 13:30:38 -07:00
Sheetal Nandi 49ba408e4f Handle scoped package names in typing installer
Fixes #32075
2019-07-16 11:13:03 -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 103fe5fbc5 Merge branch 'master' into referencesPrototypeSourceFile
Uptodate to 3.6.0-dev.20190711
2019-07-11 12:05:36 -07:00
Sheetal Nandi b631850978 Add option disableSourceOfProjectReferenceRedirect to disable using sources of project reference redirect from editor 2019-07-10 15:49:53 -07:00
Alexander T 9d01ef0f8e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-10 14:36:10 +03:00
Sheetal Nandi 824c22c460 Source of project reference behave as if those files cannot be emitted. 2019-07-09 14:52:27 -07:00
Sheetal Nandi b1fa2ebff5 Errors using DiagnosticsSync commands 2019-07-05 12:40:27 -07:00
Sheetal Nandi 9be475bdaa Refactoring 2019-07-05 10:17:42 -07:00
Alexander T 4defd1d635 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-04 12:49:33 +03:00
Ron Buckton e8bf9584aa
Improve type checking and inference for Generators and Async Generators (#30790)
* Improve typing for Generators and Async Generators

* Add TReturn and TNext to Iterator, IterableIterator, etc.

* Update ts internal Iterator to be assignable from global Iterator

* Make 'done' optional in IteratorYieldResult

* Revert Iterable and IterableIterator to simpler versions plus other fixes

* Add additional inference tests

* Added additional tests

* PR cleanup and minor async iteration type fix

* Updated diagnostics message and added non-strict tests

* Fix expected arity of Iterator/AsyncIterator
2019-07-03 21:55:59 -07:00
Sheetal Nandi 15b68a9396 Skip typechecking of source of project reference redirect 2019-07-03 15:39:29 -07:00
Sheetal Nandi b5737fc535 Refactor tests so its easy to edit and reason about them 2019-07-03 12:15:24 -07:00
Nathan Shively-Sanders 6f0baa3ae1
Merge pull request #29717 from petersandor/jsdoc-tag-author-email-support
Support email in author JSDoc tag
2019-07-03 10:42:02 -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
Wesley Wigham 3e6856137a
Add support for sharding tests across multiple workers (#32173)
* Add support for sharding tests across multiple workers

* Disable unittests when runners are expressly provided (unless they contain the unittest runner)
2019-07-01 14:56:57 -07:00
Wesley Wigham ff81d5261e
Elide the exact node version rush complains about from the docker output (#32204) 2019-07-01 13:13:44 -07:00
Sheetal Nandi 4d13f53df8 Merge branch 'master' into referencesPrototypeSourceFile 2019-07-01 11:50:11 -07:00
Sheetal Nandi f72af3be60 Verify the scenarios when d.ts directory of dependency doesnt exist 2019-07-01 11:34:57 -07:00
Sheetal Nandi af20e791fd
Merge pull request #32167 from microsoft/tryReuseProgram
When checking sourceFile is from external library, use sourceFile.resolvedPath since thats how the source files are queried and thats the real path
2019-07-01 11:16:17 -07:00
Sheetal Nandi f6d7261288
Merge pull request #32147 from microsoft/noDtsWhenNotUsingProjectReferences
Watch generated file if it doesnt exist when trying to translate it to to source generated position
2019-07-01 10:22:16 -07:00
Austin Cummings c30054de63 Fix esModuleInterop affectsEmit change test 2019-06-30 11:06:00 -07:00
Austin Cummings 5b694f8302 Add tests for module and esModuleInterop affectsEmit change 2019-06-28 18:34:59 -07:00
Wesley Wigham 6760a03cec
Add vscode docker test (#32152)
* Add vscode docker test

* Remove PID-log line

* Update user baselines (#18)
2019-06-28 13:22:25 -07:00
Sheetal Nandi 96a8c86c65 Merge branch 'master' into referencesPrototypeSourceFile 2019-06-28 12:42:22 -07:00
Sheetal Nandi 4f802e7205 When checking sourceFile is from external library, use sourceFile.resolvedPath since thats how the source files are queried and thats the real path
Fixes #32086
2019-06-28 10:14:33 -07:00
Wesley Wigham 2af8ac73ff
Add xterm test to docker suite (#32149) 2019-06-27 15:29:22 -07:00
Sheetal Nandi b32afb55d1
Merge pull request #31985 from microsoft/buildInfoData
Make paths in tsbuildinfo file to be relative to the file
2019-06-27 12:49:52 -07:00
Sheetal Nandi 75bd3cd9be Fix more tests 2019-06-27 12:16:32 -07:00
Sheetal Nandi da9260c013 Create original project when location is in source of project reference redirect 2019-06-27 10:38:52 -07:00
Alexander T 769bb0b475 remove tslint configuration 2019-06-27 13:49:35 +03:00
Alexander T 810303542d Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-06-27 11:51:20 +03:00
Alexander T f6a50067d3 @typescript-eslint/indent 2019-06-27 11:30:03 +03:00
Sheetal Nandi 2f30add809 More tests 2019-06-26 15:29:35 -07:00
Sheetal Nandi 012ecdacde Add sourceOf project reference redirect to filesByName list for redirect path so that module symbol is correctly resolved 2019-06-26 14:56:21 -07:00
Nathan Shively-Sanders 261952247a
Merge pull request #31945 from microsoft/skip-costly-tests
Skip costly tests
2019-06-25 15:47:49 -07:00
Sheetal Nandi f4728682b7 Watch generated file if it doesnt exist when trying to translate it to to source generated position 2019-06-25 15:16:11 -07:00
Sheetal Nandi 3e49556a88 Watch generated file if it doesnt exist when trying to translate it to to source generated position 2019-06-25 15:11:44 -07:00
Wesley Wigham a150d55592
Explicitly error when an exclude is provided by a test as it will be unused (#32014) 2019-06-24 15:29:02 -07:00
Alexander 4b5017d551 fix eslint errors after merge 2019-06-23 18:58:07 +03:00
Alexander 7389200ce2 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-06-23 18:49:35 +03:00
Sheetal Nandi 181028821b Fix tests 2019-06-21 14:54:38 -07:00
Wesley Wigham 9d23ce3d06
Sanitize rush progress numbers in docker test output (#32029) 2019-06-21 14:49:43 -07:00
Sheetal Nandi 179e0a606a
Merge pull request #32027 from microsoft/containerReference
Container only ref needs to be ignored from uptodate status
2019-06-21 11:28:45 -07:00
Sheetal Nandi d0282b75a1 Add test to verify when source changes 2019-06-21 09:07:14 -07:00
Wesley Wigham 37b20f6afd
Eliminate references to defunct LSHost in comments (#32018) 2019-06-20 19:11:46 -07:00
Sheetal Nandi 0e5d95feef Container only ref needs to be ignored from uptodate status
Fixes #31288
2019-06-20 16:09:35 -07:00
Wesley Wigham c39a877a92
Add dockerfile based tests for azure-sdk-for-js and office-ui-fabric-react (#31948)
* Add dockerfile based tests

* Update tests/cases/docker/README.md

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Combine sanitize functions

* Add some debugging instructions to README

* Fix listed command order
2019-06-20 12:47:57 -07:00
Sheetal Nandi 36df28d800
Merge pull request #31986 from microsoft/buildLocale
Support --locale with --build
2019-06-20 12:25:37 -07:00
Alexander T 9fcaa19ab0 microsoft-typescript/no-in-operator 2019-06-20 14:13:46 +03:00
Sheetal Nandi 06d188a255 Support --locale with --build
Fixes #31960
2019-06-19 15:38:05 -07:00
Sheetal Nandi b9fc44ece7 Bundle info paths as relative to tsbuildinfo file 2019-06-19 14:49:13 -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 33eeceec9e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-06-19 18:48:52 +03:00
Alexander T 62119ec9cc @typescript-eslint/no-unnecessary-type-assertion 2019-06-19 18:45:02 +03:00
Nathan Shively-Sanders fce7f9f87b Move .test-cost.json
Also include parameter name in test output so that people will know what
to do to change the percent chance of failure.
2019-06-19 08:40:06 -07:00
Alexander T 5ce8c831b4 prefer-const 2019-06-19 17:58:49 +03:00
Alexander T 504b932f7b @typescript-eslint/camelcase 2019-06-19 17:30:28 +03:00
Alexander T 5902b327db no-unused-expressions 2019-06-19 17:01:53 +03:00
Alexander T fdfff3593e no-template-curly-in-string 2019-06-19 16:42:05 +03:00
Suhas Deshpande f8004a33dd semi-colon 2019-06-18 23:17:58 -07:00
Suhas Deshpande 8a11f15569 Add unit test 2019-06-18 22:50:48 -07:00
Sheetal Nandi 7ed3896a0a
Merge pull request #31587 from microsoft/definitionSpan
Include declarationSpan as relevant declaration span when defintion or other places are declaration name
2019-06-18 14:07:15 -07:00
Nathan Shively-Sanders b4b5bf04a1 Fix lint 2019-06-14 16:07:41 -07:00
Nathan Shively-Sanders 3ef953a819 Allow passing skipPercent
Currently, the default is 5%.

0 gives you 0% time savings
2.5 gives you 29%
5 gives you 38%
10 gives you 50%
20 gives you 65%
2019-06-14 15:59:39 -07:00
Nathan Shively-Sanders a852f2feea Skip costly tests
1. Add a script to generate a sorted list of most costly tests. A tests'
cost is roughly `runtime% / number of edits`. A slow test that's only
been updated once is much less valuable than a slow test that has
been updated 20 times: the latter test is catching more changes in the
type system.

2. Check in the results of running this script. I want to make the
skipping behaviour deterministic and the same for everybody, even though
you may get slightly better performance by examining only *your* test
changes.

3. Add code to skip tests until it reaches a 5% chance of missing an
edit. Right now this provides a 38% speedup.

Still not done:
4. Make this value configurable.
5. Make the CI configuration specify a 0% chance of missing an edit.
2019-06-14 13:35:41 -07:00
Alexander T a18aeee1eb @typescript-eslint/no-unnecessary-qualifier 2019-06-14 12:34:28 +03:00
Alexander T bea1bcb466 brace-style 2019-06-14 10:51:09 +03:00
Alexander T 123ca0d639 no-empty 2019-06-14 10:21:51 +03:00
Alexander T d8796d5eaf @typescript-eslint/no-this-alias 2019-06-14 10:16:19 +03:00
Alexander T f96fb53e4c no-restricted-globals 2019-06-14 10:12:06 +03:00
Sheetal Nandi 73bf2684ac Rename to use contextSpan 2019-06-13 12:41:21 -07:00
Sheetal Nandi da2aa9781e Revert to using spread instead of mutating value later 2019-06-12 15:25:16 -07:00
Sheetal Nandi a0d164f142
Merge pull request #31820 from microsoft/nodeModules
When resolving from typings cache, handle node code modules
2019-06-12 10:55:26 -07:00
Sheetal Nandi 520f7e8067
Merge pull request #31818 from microsoft/sharepointIssue
Do not watch tsconfig files from folders that we canot watch (because they are at roots we want to ignore)
2019-06-12 10:47:17 -07:00
Daniel Rosenwasser a7a0c3300d
Improve ts6307 error (#31706)
Improve ts6307 error
2019-06-10 15:17:49 -07:00
Sheetal Nandi 2fd80b3142 When resolving from typings cache, handle node code modules
Fixes #29865
2019-06-07 16:21:39 -07:00
Sheetal Nandi 6ed8aae683 Test when node typings dont get added on subsequent update graph because of invalid typing
Test for #29865
2019-06-07 16:19:56 -07:00
Sheetal Nandi a6c72a0cf3 Do not watch tsconfig files from folders that we canot watch
Fixes #30818
2019-06-07 12:10:21 -07:00
Sheetal Nandi a84ed93f72 Merge branch 'master' into definitionSpan 2019-06-06 14:13:09 -07:00
Sheetal Nandi a67b375d0e Handle module specifiers 2019-06-06 13:39:04 -07:00
Sheetal Nandi 5c21fad12f
Merge pull request #31432 from microsoft/builderAPI
Api for tsc --build and --incremental
2019-06-05 12:31:00 -07:00
Paul van Brenk c5578a2b43 Update error message as requested by @danielrosenwasser 2019-06-04 19:08:34 -04:00
Paul van Brenk a658f728a9 Include the project filepath in the error message for files not being
listed in the 'include' pattern. TS6307
2019-06-02 11:54:48 -04:00
Benjamin Lichtman eb81feaf04
Merge pull request #31685 from uniqueiniquity/stopInvalidatingOnOpenFileSave
Stop invalidating module resolution cache when saving an open file
2019-05-31 20:36:33 -04:00
Benjamin Lichtman d3b6ba557a Change test instead of behavior 2019-05-31 14:46:15 -07:00
Benjamin Lichtman 7ac5fa783b Refactor and add wildcard scenario 2019-05-31 11:24:54 -07:00
Benjamin Lichtman a30cacb562 Add test 2019-05-30 16:56:27 -07:00
Andrew Branch b8dcf27c3e
Merge pull request #31482 from andrewbranch/bug/31338
Organize imports: don’t delete import declarations used for module augmentation
2019-05-30 14:01:55 -07:00
Sheetal Nandi fd86f40d05 Include declarationSpan as relevant declaration span when defintion or other places are declaration name
Fixes #30849
2019-05-24 15:44:32 -07:00
Andrew Branch 60d0bb9b19
Don’t touch imports used for module augmentation in non-declaration files since it could change JS emit 2019-05-22 11:37:35 -07:00
Ron Buckton 3d2af9ff33
Relocate Debug namespace to reduce duplication (#31524) 2019-05-22 11:20:29 -07:00
Sheetal Nandi 1e7a77cf78
Merge pull request #31503 from microsoft/casing
Ignore drive letters when comparing casings of the files with forceConsistentCasingInFileNames
2019-05-22 09:25:34 -07:00
Sheetal Nandi 38f689d19e
Merge pull request #31484 from microsoft/completionsSorting
Add sortText depending scope of symbols
2019-05-21 12:59:01 -07:00
Sheetal Nandi 43c7eb77e1 Switch to using File not found message instead of trace message file does not exit
Fixes #30872
2019-05-21 09:43:40 -07:00
Sheetal Nandi db150517d7 Ignore drive letters when comparing casings of the files with forceConsistentCasingInFileNames
Fixes #31327
2019-05-21 09:32:17 -07:00
Sheetal Nandi 00cea41b65 Add sortText depending scope of symbols
Fixes #15024
2019-05-20 15:53:51 -07:00
Andrew Branch 6faeee449d
Don’t remove imports that are used for module augmentation, just remove their import clauses 2019-05-20 14:49:28 -07:00
Andrew Branch 0f15bda45f
Add failing test 2019-05-20 13:31:44 -07:00
Sheetal Nandi 138f757709 Fix the test since tsbuildinfo is now always emitted (629bc0c) 2019-05-16 12:50:17 -07:00
Sheetal Nandi ec4ea0e474 Watch only built projects 2019-05-16 11:21:09 -07:00
Andrew Branch 15daf42b2c
Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
Sheetal Nandi 0cb980dd6e Add api to build referenced projects 2019-05-15 15:28:13 -07:00