533 Commits

Author SHA1 Message Date
Sheetal Nandi
09747e5c35 Add test for current --incremental behaviour 2019-03-20 13:59:12 -07:00
Sheetal Nandi
e94b7d8b37 Check extended tsconfig time with oldest output time to report not upto date 2019-03-19 17:19:15 -07:00
Sheetal Nandi
8cef0c592a Merge branch 'master' into tsconfigChangeDetection 2019-03-19 16:54:25 -07:00
Sheetal Nandi
52641c531a Passing --force option to build, builds project from start 2019-03-15 16:04:10 -07:00
Sheetal Nandi
cabf72b514 Revert "Passing --force option to build, builds project from start"
This reverts commit 434fa94bdca63be629304bfde231ffa25d6754ed.
2019-03-15 16:03:36 -07:00
Sheetal Nandi
434fa94bdc Passing --force option to build, builds project from start 2019-03-15 16:02:00 -07:00
Sheetal Nandi
ce490e1c77 Check oldest output time with tsconfig time to see if its out of date
Fixes #26503
2019-03-15 15:45:51 -07:00
Sheetal Nandi
e78f52d246 Add more information when getValidSourceFile cant find the file in question.
Log for #30180
2019-03-15 15:03:45 -07:00
Sheetal Nandi
b7c8e0951d Merge branch 'master' into resolveJsonModule 2019-03-14 15:13:39 -07:00
Sheetal Nandi
34ea77f674 Pass time to the vfs of resolveJsonModule 2019-03-14 14:02:53 -07:00
Sheetal Nandi
bd229b5ed1 Exclude Json files from Project reference redirects from files to be emitted list
Fixes #30382
2019-03-14 11:22:26 -07:00
Sheetal Nandi
a6f7ec3464 Handle outDir and declrationDir correctly to generate output file names for the tsbuild 2019-03-14 10:00:55 -07:00
Sheetal Nandi
e42f37fccd
Merge pull request #30374 from Microsoft/jsonSourceFile
Correct the generation of output file names for tsc --b
2019-03-13 15:00:59 -07:00
Sheetal Nandi
b6d520a7a5 Handle recursive symlinks when matching file names
Fixes #28842
2019-03-13 12:30:47 -07:00
Sheetal Nandi
812ff98f61 Correct the generation of output file names for tsc --b
Fixes #30356
2019-03-13 11:23:14 -07:00
Sheetal Nandi
b762d6205e
Merge pull request #30344 from Microsoft/uptoDate
Set oldestOutputFileName in uptodate status when updating just timestamps of output
2019-03-13 10:54:59 -07:00
Sheetal Nandi
8800cc2d15
Merge pull request #30288 from Microsoft/nonModuleNonPrepend
Add output declaration files from referenced project into program if module: none
2019-03-13 10:54:35 -07:00
Sheetal Nandi
2477159782 Do not schedule updating bundle if the buildInfo file wont be generated for the project
Fixes #30346
2019-03-12 16:08:01 -07:00
Sheetal Nandi
ffeb38456f Set oldestOutputFileName in uptodate status when updating just timestamps of output
Fixes #29875
2019-03-12 13:30:17 -07:00
Sheetal Nandi
927c10ae31 Add output declaration files from referenced project into program if module: none 2019-03-08 17:48:14 -08:00
Sheetal Nandi
0b202b2095 Fix tests after rebase 2019-03-08 16:33:53 -08:00
Sheetal Nandi
6c0b4568a0 Enable incremental program updates through tsbuildinfo in tsc --watch mode 2019-03-08 15:56:09 -08:00
Sheetal Nandi
68e28da141 Build project if existing project was built with different compiler version 2019-03-08 15:14:34 -08:00
Sheetal Nandi
ecb2ce429d Add tests that will verify that all rebuilding with new compiler version builds again 2019-03-08 14:19:41 -08:00
Sheetal Nandi
990b199ebd Merge branch 'master' into incrementalBuildInfo 2019-03-08 11:42:19 -08:00
Wesley Wigham
a887c6ba40
Remove unused (and sometimes broken) targets and scripts (#30054)
* Remove unused (and sometimes broken) targets and scripts

* Remove browser-specific harness code
2019-03-08 10:34:35 -08:00
Sheetal Nandi
ec2ee9ff3a Ignore anything starting with ".git"
Fixes #29782
2019-03-06 15:00:26 -08:00
Sheetal Nandi
79a1f29727 In recursive directory watching ignore folders and files in node_modules starting with "."
Fixes #30004
2019-03-06 14:46:14 -08:00
Gabriela Britto
d2364f555f
Merge pull request #30089 from Microsoft/convert-to-named-parameters
Convert to named parameters
2019-03-06 09:33:01 -08:00
Sheetal Nandi
d62c8a403c
Merge pull request #30107 from Microsoft/applyChangesToOpenFiles
Add UpdateOpen to request
2019-03-05 15:54:34 -08:00
Sheetal Nandi
e55fbffed6 Rename the request as updateOpen 2019-03-05 14:34:08 -08:00
Sheetal Nandi
ac55310c48 Fix prologue emitting in case of modules with --out scenario 2019-03-05 11:48:09 -08:00
Sheetal Nandi
b879b435ef Add tests to verify output of --out with modules as output 2019-03-05 11:08:44 -08:00
Sheetal Nandi
21ea0178c5 Refactor the tests 2019-03-01 13:25:16 -08:00
Sheetal Nandi
8e7db4d4b3 Because .tsbuildinfo is flag now, use .tsbuildinfo just like any other output to determine if project needs rebuild 2019-03-01 13:12:19 -08:00
Sheetal Nandi
026c1dd69c Fix the build error 2019-03-01 11:45:47 -08:00
Sheetal Nandi
cd195c91c6 Add options tsBuildInfoFile to provide name for the buildinfo file 2019-03-01 10:28:57 -08:00
Sheetal Nandi
df9da15abb Incremental false with composite not allowed 2019-03-01 09:39:58 -08:00
Sheetal Nandi
d53efdf380 Changes to generation of .tsbuildinfo:
- If composite or incremental then only the .tsbuildinfo will be generated
- if --out or --outFile the file is outputFile.tsbuildinfo
- if rootDir and outDir then outdir/relativePathOfConfigFromRootDir/configname.tsbuildinfo
- if just outDir then outDir/configname.tsbuild
- otherwise config.tsbuildinfo next to configFile
2019-02-28 13:46:26 -08:00
Sheetal Nandi
ed35741b5f Merge branch 'master' into incrementalBuildInfo 2019-02-27 15:45:59 -08:00
Nathan Shively-Sanders
be2db9db12
Add globalThis (#29332)
* Restore original code from bind-toplevel-this

With one or two additional comments

* Working in JS, but the symbol is not right.

Still need to

1. Make it work in Typescript.
2. Add test (and make them work) for the other uses of GlobalThis:
window, globalThis, etc.

* Check in TS also; update some tests

Lots of tests still fail, but all but 1 change so far has been correct.

* Update baselines

A couple of tests still fail and need to be fixed.

* Handle type references to globalThis

The type reference must be `typeof globalThis`. Just `globalThis` will
be treated as a value reference in type position -- an error.

* Restore former behaviour of implicitThis errors

I left the noImplicitThis rule for captured use of global this in an
arrow function, even though technically it isn't `any` any more --
it's typeof globalThis.  However, you should still use some other method
to access globals inside an arrow, because captured-global-this is super
confusing there.

* Test values with type globalThis

I ran into a problem with intersecting `Window & typeof globalThis`:

1. This adds a new index signature to Window, which is probably not
desired. In fact, with noImplicitAny, it's not desired on globalThis
either I think.
2. Adding this type requires editing TSJS-lib-generator, not this repo.

So I added the test cases and will probably update them later, when
those two problems are fixed.

* Add esnext declaration for globalThis

* Switch to symbol-based approach

I decided I didn't like the import-type-based approach.

Update baselines to reflect the difference.

* Do not suggest globals for completions at toplevel

* Add tests of element and property access

* Look up globalThis using normal resolution

globalThis is no longer constructed lazily. Its synthetic Identifier
node is also now more realistic.

* Update fourslash tests

* Add missed fourslash test update

* Remove esnext.globalthis.d.ts too

* Add chained globalThis self-lookup test

* Attempt at making globalThis readonly

In progress, had to interrupt for other work.

* Add/update tests

* Addres PR comments:

1. Add parameter to tryGetThisTypeAt to exclude globalThis.
2. Use combined Module flag instead combining them in-place.
3. SymbolDisplay doesn't print 'module globalThis' for this expressions
anymore.
2019-02-27 14:14:34 -08:00
Sheetal Nandi
03377f70b7 Apply changes in reverse order even in new API to match behaviour with internal api 2019-02-27 14:07:15 -08:00
Sheetal Nandi
fd10c12116 Revert "Use execFileSync in typing installer"
This reverts commit bc386c11fd3f026ca84ec556b1b8fb4a2eee0038.
2019-02-26 14:01:42 -08:00
Sheetal Nandi
e6068f405b Make applyChangesToOpenFiles efficient to handle batch file opens, close and changes before updating projects
Fixes #29667
2019-02-26 11:54:29 -08:00
Sheetal Nandi
2258bb2fb7 Add request applyChangesToOpenFiles 2019-02-26 10:21:01 -08:00
Sheetal Nandi
6fd7011870 Add test that batches all the open files to update program only once 2019-02-26 10:21:01 -08:00
Gabriela Araujo Britto
e3a465ffa3 change startPosition and endPosition to leadingTriviaOption and trailingTriviaOption 2019-02-26 09:43:35 -08:00
Sheetal Nandi
415a5db166 Add test when declarationMap and sourcemap are disabled in the referenced project 2019-02-22 14:07:13 -08:00
Sheetal Nandi
2b10b68d1c Test that shows stripInternal of enum member prints multiple blank lines for the enum members 2019-02-22 13:28:24 -08:00
Sheetal Nandi
23cd45bdef Test when internal and text region dont mix well together 2019-02-22 12:49:45 -08:00