115 Commits

Author SHA1 Message Date
Ron Buckton
9d5cd280ef Merge branch 'master' into migrateMapsAndSets
# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/commandLineParser.ts
#	src/compiler/core.ts
#	src/compiler/moduleNameResolver.ts
#	src/compiler/transformers/declarations.ts
#	src/compiler/tsbuildPublic.ts
#	src/compiler/types.ts
#	src/compiler/utilities.ts
#	src/harness/client.ts
#	src/server/editorServices.ts
#	src/server/typingsCache.ts
#	src/server/utilities.ts
#	src/services/codefixes/convertToAsyncFunction.ts
#	src/services/documentRegistry.ts
#	src/services/importTracker.ts
#	src/services/refactorProvider.ts
#	src/services/refactors/extractSymbol.ts
#	src/testRunner/unittests/programApi.ts
#	src/typingsInstallerCore/typingsInstaller.ts
#	tests/baselines/reference/api/tsserverlibrary.d.ts
#	tests/baselines/reference/api/typescript.d.ts
2020-07-07 13:53:46 -07:00
Ron Buckton
7b942b4fa8
Revert the type change to ts.Map (#39366) 2020-07-01 17:00:26 -07:00
Ron Buckton
611b77f2e6 Migrate more places to use Map/Set 2020-06-26 10:15:53 -07:00
Ron Buckton
eb2f4e2337
Switch to ES Map/Set internally (#33771)
* Add full implemention of Map and Set to shims

* Update default Map interface

* Remove WeakMap/WeakSet

* Add tests for set shim

* Update most usages of Map<K, true> to Set

* PR Feedback

* Fix lint issues

* Change key in fsWatchCallback

* Simpler shim, more tests

* Fix typo in collection shim
2020-06-26 10:12:47 -07:00
Sheetal Nandi
0dc338281a
Deprecate reloadFs so the tests are more clear in what they are achieving and its easier to track changed behaviour (#38954) 2020-06-05 13:43:34 -07:00
Sheetal Nandi
e60bbac84f
Fix declaration emit when the packages are included through symlinks (#37438)
* Convert symlink scenarios to virtual FS where its symlinks are correctly maintained
Adds test for #36866

* Fix the casing issue when redirects differ in casing of the file

* Make ModuleSpecifierResolutionHost internal

* Refactoring for ModuleSpecifierResolutionHost

* If any of the file path option is from node_modules folder, consider only paths in node_modules folder

* Update src/services/utilities.ts

Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2020-03-17 13:21:40 -07:00
Sheetal Nandi
1f710167de
Ensure that we have seenAffectedFiles map when files are added to pending emit because they were present in the old state (#37302)
* Make the systems for baselining default to pretty

* Ensure that we have seenAffectedFiles map when files are added to pending emit because they were present in the old state
This happens in build scenarios since semantic diagnostics are queried before emit and hence files are added to seenAffectedFiles pending emit
Fixes #37269
2020-03-12 10:54:30 -07:00
Sheetal Nandi
80ad0de87e
Fixes to handle file names in module resolution watching and createGetCanonicalFileName (#36106)
* Add test case to verify directory casing preservation when watching

* Fix unicode file name handling when watching failed lookup locations

* Add special file name lower conversion routine and use that instead of toLowerCase
Fixes #31819 and #35559

* Remove unicode from code

* Replace toLocaleLowerCase on filenames with ts.toFileNameLowerCase

* Make the intent of using toFileNameLowerCase more clear and why we make the restriction on turkish I with dot on top of it

* Update baselines for newly added tests in master
2020-01-31 10:40:57 -08:00
Sheetal Nandi
76ee0214f9
Use watch invoked with node_modules/.staging as watch for refreshing complete node_modules, so that npm install is reflected correctly (#36039)
* Add test that demonstrates npm install watch behaviour some times

* Use watch invoked with `node_modules/.staging` as watch for refreshing complete node_modules, so that npm install is reflected correctly
Fixes #35966
2020-01-10 14:58:01 -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
f90cde4706
Fix completions when the ts installation and project are on two different windows drive (#35733)
* Fix completions when the ts installation and project are on two different windows drive
Fixes #35512

* Fix typo
2019-12-17 14:19:52 -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
Ron Buckton
01b3d41124
Add external mapShim/debug modules (#33712)
* Add external mapShim/debug modules

* rename test file
2019-10-07 13:31:07 -07:00
Sheetal Nandi
b26ca160f4 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-11 12:27:58 -07:00
Sheetal Nandi
4c4ddf833d Merge branch 'master' into referencesPrototypeSourceFile 2019-08-21 15:42:36 -07:00
Alexander T
0d941d6943 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-21 10:02:57 +03:00
Sheetal Nandi
5ac450510a
Handle network style paths for watching (#32888)
* Refactoring

* take windows style root as test server host parameter

* Handle network style paths for watching
Fixes #32796
2019-08-20 10:52:56 -07:00
Alexander T
f20a2828f2 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-15 10:32:45 +03:00
Sheetal Nandi
d9ad559042 Verify demo build 2019-08-09 13:38:24 -07:00
Alexander
ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03: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
666c4be844 Merge branch 'master' into referencesPrototypeSourceFile 2019-07-25 14:03:48 -07:00
Sheetal Nandi
dc38aceb02 Fix the export on TestServerHostCreationParameters to fix build break after LKG
Its not detected currently is because LKG doesnt have #32156
2019-07-16 11:38:09 -07: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
b5737fc535 Refactor tests so its easy to edit and reason about them 2019-07-03 12:15:24 -07:00
Sheetal Nandi
b6d520a7a5 Handle recursive symlinks when matching file names
Fixes #28842
2019-03-13 12:30:47 -07:00
Andy
12f3d0d54c
Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Sheetal Nandi
4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Sheetal Nandi
dcdda87258
Merge pull request #28243 from Microsoft/containerOnlyRef
Report error requiring references to have composite only if the program is not container only
2018-10-30 21:20:52 -07:00
Sheetal Nandi
4606a4b700
Merge pull request #28209 from Microsoft/ignorePathsStartingWithDotInNodeModules
Ignore any changes to file or folder that are in node_modules and start with "."
2018-10-30 18:06:00 -07:00
Sheetal Nandi
60801a261c Report error requiring references to have composite only if the program is not container only 2018-10-30 15:22:00 -07:00
Sheetal Nandi
c9fadf1f46 Ignore wild card directory watchers with node_modules file or folder starting with . 2018-10-30 11:06:13 -07:00
Andy
acc34bd95d
Miscellaneous code cleanup relating to module resolution (#28092)
* Miscellaneous code cleanup relating to module resolution

* Revert if condition
2018-10-30 10:15:01 -07:00
Anders Hejlsberg
5510e0755e Merge branch 'master' into typedBindCallApply
# Conflicts:
#	tests/baselines/reference/tsxTypeArgumentPartialDefinitionStillErrors.errors.txt
#	tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt
2018-09-24 16:38:39 -07:00
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
Anders Hejlsberg
b687d906d8 Add CallableFunction/NewableFunction to virtual file system 2018-09-10 15:47:00 -07:00
Sheetal Nandi
17ee9231b7 Write first test with --build and --watch 2018-08-21 13:41:30 -07:00
Sheetal Nandi
4ee3f2b3ea Watch subdirectories in project root instead of watching project root so as to avoid watching excluded directories that are not part of config file
Fixes #25629 and Microsoft/vscode#51139
2018-07-19 17:21:50 -07:00
Sheetal Nandi
821ebcb529 Merge branch 'master' into cacheRecursiveDirectoryWatchers 2018-07-10 15:08:14 -07:00
Sheetal Nandi
9c6c333b67 Caches the recursive directory watchers so we do not have to traverse and recreate more children watches
Helps with #25018
2018-07-05 16:06:17 -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
Sheetal Nandi
b155a71e70 Retain the version information of script infos when they are deleted
This helps in having to not restart the versioning,
which could potentially have same version but different contents and project could confuse with it
2018-06-26 15:03:35 -07:00
Sheetal Nandi
f506b28e95 Mark the declarations visible correctly when emit is disabled but asked to emit declarations for watch mode
Fixes #25068
2018-06-20 12:28:50 -07:00
Ryan Cavanaugh
336c37662d Projzilla phase 1 2018-06-09 16:48:08 -07:00
Sheetal Nandi
c7091ab01b Add test that verifies watched directories and files when resolution of module references sibling folder to root with symlLink 2018-05-29 13:45:20 -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