514 Commits

Author SHA1 Message Date
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
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
Sheetal Nandi
22804c10ca Allow away to only test baselines excluding all other file read checks that are not going to change per scenario 2019-02-22 12:24:59 -08:00
Sheetal Nandi
494bd92f1b Report error if overwriting buildInfo of another project reference 2019-02-21 19:34:20 -08:00
Sheetal Nandi
89c4c4f684 Update the message to not just mean javascript since we might need to regenerate .d.ts as well 2019-02-21 17:52:15 -08:00
Sheetal Nandi
1e24cd19a8 Allow empty own source files 2019-02-21 17:36:20 -08:00
Sheetal Nandi
29862cecdf Refactoring for outFile tests 2019-02-21 15:18:01 -08:00
Sheetal Nandi
e9fb843e56 Add test to verify incremental build is same as if its built clean 2019-02-21 12:46:04 -08:00
Sheetal Nandi
4bef3ac6a1 Because we already have texts for fixing the emits, write them only if changed 2019-02-20 15:45:12 -08:00
Sheetal Nandi
224f3ca975 Enable other stripinternal test cases 2019-02-20 15:01:48 -08:00
Gabriela Araujo Britto
6b53489a4a Merge branch 'master' into convert-to-named-parameters 2019-02-20 13:24:09 -08:00
Sheetal Nandi
0cd7074e1b Handle emit when using prepends and the referencing project has --stripInternal true 2019-02-20 10:41:28 -08:00
Sheetal Nandi
a0f3420001 Add sections to the prepend (to be later used for stripInternal) 2019-02-20 10:41:26 -08:00
Sheetal Nandi
53704227d0 Add test for multi level prepend 2019-02-20 10:41:24 -08:00
Sheetal Nandi
aa773e0705 Tests for strip internal 2019-02-20 10:41:21 -08:00
Sheetal Nandi
a881391dc9 Merge branch 'master' into incrementalBuildInfo 2019-02-20 10:37:44 -08:00
Wesley Wigham
ee17915801
Fix build breaks (#29977)
* Some callbacks in watchUtilities werent being strictly checked due to the structural fallback

* Add direct dependeny on ms since mocha removed its impl

* Manually init stats collection on base runner like mocha.run now does
2019-02-19 14:30:58 -08:00
Gabriela Araujo Britto
eef3da5b6b create new ConfigurableStart and ConfigurableEnd options and rename them 2019-02-15 15:38:10 -08:00
Sheetal Nandi
b2b360a64f
Merge pull request #29816 from Microsoft/ti
Use execFileSync in typing installer
2019-02-15 10:47:04 -08:00
Sheetal Nandi
b958f1c8b5 Merge branch 'master' into incrementalBuildInfo 2019-02-14 12:19:10 -08:00
Sheetal Nandi
499bc70056 Make printer option to be writing bunfle file info and use the result instead 2019-02-11 13:47:24 -08:00