Nathan Shively-Sanders
ff6f94791f
Use regex+getTokenAtPosition to find dynamic import ( #28104 )
...
Instead of walking the entire tree. This stack overflows for large
trees.
Still need to adapt a test.
2018-10-24 11:27:39 -07:00
Klaus Meinhardt
3b058a4de4
fix compile errors, accept baselines
2018-10-22 21:12:12 +02:00
Andy
72244c5b03
Support 'isSourceFileFromExternalLibrary' for source files from '/// <reference types="" />'' ( #28004 )
...
* Support 'isSourceFileFromExternalLibrary' for source files from '/// <reference types="" />''
* Calculate `isExternalLibraryImport` at the end
* Calculate isExternalLibraryImport with symlink path
2018-10-19 18:00:45 -07:00
Sheetal Nandi
b69622a114
Merge branch 'master' into transitiveReferences
2018-10-16 10:41:17 -07:00
Andy
0f4a615bcb
Fix isSourceFileFromExternalLibrary for file with redirect ( #27917 )
...
* Fix isSourceFileFromExternalLibrary for file with redirect
* Alternate fix
* Use currentNodeModulesDepth > 0
2018-10-16 09:01:25 -07:00
Sheetal Nandi
92f3f1cde0
Allow files to be included by *.json
pattern in include of tsconfig
...
Fixes #25636
2018-10-11 14:45:27 -07:00
Sheetal Nandi
3e67cf43b0
Verify errors on transitively referenced files
2018-10-04 15:04:12 -07:00
Sheetal Nandi
94df5167b0
Handle resolution caching when referenced tsconfig changes
2018-10-04 15:04:12 -07:00
Sheetal Nandi
4d413a6a55
Fix the fileByName cache when program is used completely which breaks the getSourceFile not return redirected file by its name
2018-10-04 15:04:11 -07:00
Sheetal Nandi
0e4b10d726
Use resolution options of project reference if the file is from the project reference
2018-10-04 15:04:10 -07:00
Sheetal Nandi
0ac96580d5
Resolve project references transitively
2018-10-04 15:04:10 -07:00
Ryan Cavanaugh
70e26fc701
Merge pull request #27447 from mattmccutchen/issue-27117
...
Don't complain about `modules` and `outFile` options when `emitDeclarationOnly` is set.
2018-10-01 15:50:08 -07:00
Sheetal Nandi
1c2f2555ec
Add resolvedPath and originalFileName to redirected file
...
Fixes #27207
2018-10-01 11:51:45 -07:00
Matt McCutchen
32e75e7ae7
Don't complain about modules
and outFile
options when
...
`emitDeclarationOnly` is set.
Fixes #27117 .
2018-09-28 21:07:48 -04:00
Sheetal Nandi
3c6c32bdfc
Merge branch 'master' into projectReferenceInputDetection
2018-09-18 14:34:24 -07:00
Sheetal Nandi
865b3e7862
Merge pull request #27172 from Microsoft/moduleResolutionWithOutDir
...
Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
2018-09-18 14:33:33 -07:00
Sheetal Nandi
4c047254e6
Ensure all the usages of compilerOptions.declaration take into account compilerOptions.composite if needed.
2018-09-18 13:53:16 -07:00
Sheetal Nandi
0d5aeeef22
Detect the input file of referenced project with fileNames from parsed command
...
Fixes #25864 and #26054
2018-09-18 11:44:16 -07:00
Sheetal Nandi
7852cf7ed3
Merge pull request #27175 from a-tarasyuk/bug/error-using-declaration-dir-with-composite
...
#26862 : allow using declarationDir with composite option
2018-09-18 10:53:38 -07:00
Alexander T
5b5af23b41
use getEmitDeclarations helper
2018-09-18 14:46:42 +03:00
Alexander T
d11117829d
allow using declarationDir with composite option
2018-09-18 14:38:48 +03:00
Alexander T
c510df1a53
deny using allowJs option with composite
2018-09-18 12:41:30 +03:00
Sheetal Nandi
d51b8d940c
Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
...
This also ensures that originalFileName, resolvedPath are set correctly even when we are reusing program structure
Fixes #26036
2018-09-17 19:00:30 -07:00
Ryan Cavanaugh
8ca01dfc9f
Merge pull request #26851 from ajafff/assert-compilerhost-readdirectory
...
Assert CompilerHost.readDiretory for projectReferences with include
2018-09-17 16:13:08 -07:00
Sheetal Nandi
a5fd3e9176
Handle out and outFile options correctly in tsbuild
2018-09-17 12:46:10 -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
Sheetal Nandi
e4718564e5
Merge pull request #27082 from Microsoft/watchAPIAndProjectReferences
...
Fix tsc watch and watch API for a project that has project references
2018-09-14 17:58:42 -07:00
Sheetal Nandi
d6ffdde059
Revert the API change to resolveProjectReferencePath introduced in #27062
2018-09-14 13:32:23 -07:00
Sheetal Nandi
20f671ede2
PR feedback
2018-09-14 11:07:22 -07:00
Sheetal Nandi
40d33c809a
Merge branch 'master' into watchAPIAndProjectReferences
2018-09-14 10:54:07 -07:00
Sheetal Nandi
47f311ac03
Merge pull request #27062 from Microsoft/tsbuildWatchImprovements
...
Multiple improvements to watching with --build option
2018-09-14 09:54:17 -07:00
Sheetal Nandi
ea67e3ac56
Fix watch of project with project references
2018-09-13 15:41:07 -07:00
Nathan Shively-Sanders
64d0e0d448
Shorten more internal names to JS or TS ( #27080 )
2018-09-13 15:05:57 -07:00
Nathan Shively-Sanders
6bd1da20c9
Rename JS-specific concepts ( #26795 )
...
* Rename JS concepts
1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.
Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.
* Remove TODO
* Rename Javascript->JS
Note that this introduces a variable name collision in a couple of
places, which I resolved like this:
```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Sheetal Nandi
a172751bf9
Always resolve the config file to ResolvedConfigFile if its json, otherwise combine tsconfig.json
2018-09-11 13:02:50 -07:00
Daniel Imms
745f5be2cb
Invert gutter instead of setting colors
...
Fixes #26850
2018-09-08 13:26:14 -07:00
Sheetal Nandi
88d5b04c70
Lowercase type reference directives when determining to reuse program structure (just like when we create new program)
2018-09-06 13:26:44 -07:00
Sheetal Nandi
ddba6d8a70
Merge pull request #26825 from Microsoft/resolveJsonModuleEmit
...
Support json module emit when module emit is commonjs, amd, es2015 or esnext
2018-09-06 09:57:47 -07:00
Ryan Cavanaugh
f79e64561f
Merge pull request #26870 from ajafff/composite-files-check
...
better condition for file include exhaustiveness check
2018-09-05 12:32:56 -07:00
Ryan Cavanaugh
d265fbf7f7
Merge pull request #26192 from ajafff/createprogram-nochecker
...
createProgram: don't use TypeChecker
2018-09-05 11:49:57 -07:00
Klaus Meinhardt
239a7b9a4f
better condition for file include exhaustiveness check
...
As `files` always contains declaration files of external libraries, lib files and declaration files from typeRoots, the previous condition evaluated to false for probably all projects out there.
This changes the condition to compare array length after filtering out all declaration files.
That avoids unnecessary work of path normalization in the common case where everything is ok.
2018-09-04 13:35:57 +02:00
Klaus Meinhardt
3806ee7406
Assert CompilerHost.readDiretory for projectReferences with include
...
Fixes : #26785
2018-09-02 21:42:38 +02:00
Sheetal Nandi
e41dbcdccd
Support json module emit when module emit is commonjs, amd, es2015 or esnext
...
Fixes #25755 and #26020
2018-08-31 14:05:14 -07:00
Klaus Meinhardt
b2850ee467
remove useless condition
2018-08-30 22:13:39 +02:00
Sheetal Nandi
530a530ac0
Merge pull request #26590 from Microsoft/buildRefactoring
...
Refactor ts build and report watch status when doing --build --watch
2018-08-28 11:43:35 -07:00
Andy
7223945666
Use array helper in computeCommonSourceDirectory and remove two unnecessary tests ( #26416 )
2018-08-27 17:03:30 -07:00
Sheetal Nandi
cec1b0a717
Report error summary from the queue.
2018-08-21 17:30:51 -07:00
Sheetal Nandi
4193846108
Do not expose change in createCompilerHost
2018-08-21 14:46:00 -07:00