Commit graph

767 commits

Author SHA1 Message Date
Vladimir Matveev c0f4fdd489 merge with origin/master 2016-07-21 10:38:15 -07:00
Ron Buckton 248953ec59 Explicit handling for more nodes in reduceEachChild/visitEachChild 2016-07-20 12:12:07 -07:00
Wesley Wigham 2a26beb9d8 Add performance framework from transforms branch (#9536)
* Port performance tools from transforms branch

* Use friendlier names, add compiler option to print all recorded measures

* Always print total time

* + -> .getTime
2016-07-19 15:10:29 -07:00
Vladimir Matveev 69789928b3 Merge remote-tracking branch 'origin/master' into tsserverVS-WIP 2016-07-18 16:43:08 -07:00
Yui 1c9df8446a [Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects

* Add watch task

* Working non-inline sourcemaps for runtests

* browser tests now also loads sourcemaps from disk

* Lazypipes and better services stream management

* export interface used by other exported functions

* Make goto-definition work for `this` parameter

* Add new error for rest parameters

* Add error message for rest parameter properties

* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor

* Fix rwc-runner from breaking change in compiler (#9284)

* Signatures use JSDoc to determine optionality

* Changed implementation to use closure

* Updated tests

* Fixed linting error

* Adding Code of Conduct notice

* Don't crash when JS class property is self-referential.

Fixes #9293

* Remove stale baselines

* For optionality, check question token before JSDoc

* Accept rest parameter properties error baselines

* Change binding pattern parameter property error

* Accept binding pattern properties error baselines

* Lint

* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0

* Do copyright without gulp-if and lazypipe

* Change test comment and accept baseline

* Remove tsd scripts task from gulpfile

* Make use of module compiler option explicit, add strip internal to tsconfigs

* Remove Signature#thisType and use Signature#thisParameter everywhere

* Add Gulpfile lint to jake, fix lints

* Change reference tests to verify actual ranges referenced and not just their count

* Respond to PR comments

* Add new lint rule

* Fix object whitespace lints

* Fix case of gulpfile dependencies

* 1. pass subshell args 2. fix build order in services

1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.

* Fix single-quote lint

* Check for exactly one space

* Fix excess whitespace issues

* Add matchFiles test to Gulpfile

This was merged while the gulpfile was still in-progress

* Fix LKG useDebug task and newLine flag

* Update LKG

* Clean before LKG in Gulpfile

* Fix lint

* Correct the api string name

* Allow space in exec cmds

* Fix typo

* Add new APIs to protocol

* Fix bug where `exports.` was prepended to namespace export accesses

* Remove unnecessary parameter

* extract expression into function

* Add fourslash tests & address CR comments

* Fix 8549: Using variable as Jsx tagname (#9337)

* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly

* wip - just resolve to any type for now

* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx

* Add tests and update baselines

* Remove unneccessary comment

* wip-address PR

* Address PR

* Add tets and update baselines

* Fix linting error

* Unused identifiers compiler code (#9200)

* Code changes to update references of the Identifiers

* Added code for handling function, method and coonstructor level local variables and parameters

* Rebased with origin master

* Code changes to handle unused private variables, private methods and typed parameters

* Code changes to handle namespace level elements

* Code changes to handle unimplemented interfaces

* Code to optimize the d.ts check

* Correct Code change to handle the parameters for methods inside interfaces

* Fix for lint error

* Remove Trailing whitespace

* Code changes to handle interface implementations

* Changes to display the error position correctly

* Compiler Test Cases

* Adding condition to ignore constructor parameters

* Removing unnecessary tests

* Additional changes for compiler code

* Additional changes to handle constructor scenario

* Fixing the consolidated case

* Changed logic to search for private instead of public

* Response to PR Comments

* Changed the error code in test cases as result  of merge with master

* Adding the missing file

* Adding the missing file II

* Response to PR comments

* Code changes for checking unused imports

* Test Cases for Unused Imports

* Response to PR comments

* Code change specific to position of Import Declaration

* Code change for handling the position for unused import

* New scenarios for handling parameters in lambda function, type parameters in methods, etc.

* Additional scenarios based on PR comments

* Removing a redundant check

* Added ambient check to imports and typeparatmeter reporting

* Added one more scenario to handle type parameters

* Added new scenario for TypeParameter on Interface

* Refactoring the code

* Added scenario to handle private class elements declared in constructor.

* Minor change to erro reporting

* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)

* Instead of returning undefined for unknownSymbol return itself

* Add Transpile unittest

* Wip - Add project tests

* Add project tests and baselines

* Update existed tests

* Add tests for emitting metadata with module targetting system

* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)

* Fix incorrect emit for accessing static property in static propertyDeclaration

* Update tests and baselines

* Update function name

* Fix when accessing static property inside arrow function

* Add tests and baselines

* do not format comma/closeparen in jsxelement

* format jsx expression

* Remove extra baselines

* Fixed bugs and linting

* Added project tests for node_modules JavaScript searches

* Removed old TODO comment

* make rules optional

* Fixed the regexp for removing full paths

* Fix type of the disableSizeLimit option

* Update version to 2.0.0

* Remove upper boilerplate from issue template

Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented

* Remove unused compiler option (#9381)

* Update LKG

* Added emitHost method to return source from node modules

* Marked new method internal

* Update issue_template.md

* new options should be optional for compatibility

* Add getCurrentDirectory to ServerHost

* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location

* VarDate interface and relevant Date.prototype members

* Port 9396 to release 2.0

* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)

* Fix emit incorrect destructuring mapping in var declaration

* Add tests and baselines

* Add additional tests and baselines

* Fix crash in async functions when targetting ES5.

When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.

* Add This type to lib

* Merge master into release-2.0 (#9400)

* do not format comma/closeparen in jsxelement

* format jsx expression

* make rules optional

* Remove upper boilerplate from issue template

Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented

* Update issue_template.md

* new options should be optional for compatibility

* Add getCurrentDirectory to ServerHost

* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location

* VarDate interface and relevant Date.prototype members

* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)

* Fix emit incorrect destructuring mapping in var declaration

* Add tests and baselines

* Add additional tests and baselines

* Fix #9402: Do not report unused identifier errors for catch variables

* getVarDate should be on the Date interface

* Defere checking unsed identifier checks

* Do not scan nodes preceding formatted region, just skip over them

* Don't emit source files found under node_modules

* Destructuring assignment removes undefined from type when default value is given

* Add nullcheck when calculating indentations for implort clause

* Use a deferred list to check for unused identifiers

* push checks to checkUnusedIdentifiersDeferred

* use isParameterPropertyDeclaration to test for paramter propoerties

* runtests-parallel skips empty buckets

Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.

This was very obvious on machines with lots of cores.

* Report unused identifiers in for statements

* Do not check ambients, and overloads

* Add tests

* Consolidate type reference marking in getTypeFromTypeReference

* Handel type aliases

* Add tests

* Add test

* Dont load JavaScript if types packages are present

* Renamed API

* Use checkExpression, not checkExpressionCached

* Do not report unused errors for module augmentations

* Consolidate refernce marking in resolveName to allow marking aliases correctelly

* add tests

* Code review comments

* Only mark symbols found in a local symbol table

* Show "<unknown>" if the name of a declaration is unavailable

* Parse `export default async function` as a declaration

* Respond to PR comments

* Better name for test

* handel private properties correctelly

* Port 9426 to release 2.0

* Handel Swtich statements
check for locals on for statments
only mark private properties

* Removed one error to avoid full path issues

* Don't emit source files found under node_modules

(cherry picked from commit 5f8cf1af3e)

* Dont load JavaScript if types packages are present

(cherry picked from commit 5a45c44eb7)

* Renamed API

(cherry picked from commit d8047b607f)

* Removed one error to avoid full path issues

(cherry picked from commit 5e4f13f342)

* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt

* Fix #9458: exclude parameters starting with underscore from unusedParamter checks

* change variable name for strict mode

* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)

* Handle relative paths in tsconfig exclude and include globs

* Merge master into release branch 06/30 (#9447)

* do not format comma/closeparen in jsxelement

* format jsx expression

* make rules optional

* Remove upper boilerplate from issue template

Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented

* Update issue_template.md

* new options should be optional for compatibility

* Add getCurrentDirectory to ServerHost

* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location

* VarDate interface and relevant Date.prototype members

* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)

* Fix emit incorrect destructuring mapping in var declaration

* Add tests and baselines

* Add additional tests and baselines

* Fix crash in async functions when targetting ES5.

When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.

* Add This type to lib

* getVarDate should be on the Date interface

* Don't emit source files found under node_modules

* Destructuring assignment removes undefined from type when default value is given

* Add nullcheck when calculating indentations for implort clause

* Add test

* Dont load JavaScript if types packages are present

* Renamed API

* Use checkExpression, not checkExpressionCached

* Show "<unknown>" if the name of a declaration is unavailable

* Parse `export default async function` as a declaration

* Removed one error to avoid full path issues

* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt

* Improve names of whitespace functions

* Handle relative paths in tsconfig exclude and include globs

Port 9475 to release 2.0

* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string

* fix linter

* Fix PromiseLike to be compatible with es6-promise (#9484)

* Fix reading files from IOLog because previous our API captures (#9483)

* Fix reading files from IOLog because previous our API captures

* Refactoring the ioLog

* Exclude FlowSwitchClause from flow graph for case expressions

* Add regression test

* Update LKG

* Update language in comment

* Add .mailmap file

* Add authors script to generate authors from repo

* Update AUTHORS.md for release-2.0

* Update script to pass more than one argument

* Remove the unused text buffer from ScriptInfo

* Fix #9531: account for async as an contextual keyword when parsing export assignments

* Update LKG

* Swap q from a reference to an import

* Fix #9550: exclude 'this' type parameters from unusedParameters checks.

* Update comment to reflect new dependency

* Avoid putting children tags in jsdoccomment

* Parse the result of getDirectories call

* Update harness getDirectories implementation for shims

* Fix multiple Salsa assignment-declarations

Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.

* Test for multiple salsa assignment-declarations

* Add test for parsed @typedef tag node shape

* Provide a symbol for salsa-inferred class types

* Update .mailmap

* Fix module tracking

* Updated test with relative import

* Fixed the node tracking and a harness bug

* fixed lint error

* Fixed implicit any

* Added missing test files

* Removed duplicate logic

* Update conflicting baseline.

PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.

* Fix type of JSXTagName

* Update baselines to use double-quote

* Update baselines when emitting metadata decorator

* Update baselines for async-await function

* Update baselines for comment in capturing down-level for...of and for...in

* Add missing Transpile tests

* Remove old JS transpile baselines

* Passing program as argument in emitWorker

* Port PR#9607 transforms

* Port new JSDOC tests to use baseline

* substitute alias for class expression in statics

* Address new lint warnings

* Change name for substitution function.
2016-07-18 15:38:30 -07:00
Vladimir Matveev af0c548312 Merge pull request #9750 from Microsoft/fixFormatDiagnostics
use sys based host for formatting diagnostics
2016-07-15 12:35:03 -07:00
Vladimir Matveev 2da6846557 use sys based host for formatting diagnostics 2016-07-14 23:02:56 -07:00
Vladimir Matsveyeu 3808e2cdbb Merge remote-tracking branch 'origin/master' into tsserverVS-WIP-deferUpdate 2016-07-13 16:59:55 -07:00
Vladimir Matveev 39c948ad34 merge with origin/master 2016-07-13 16:20:08 -07:00
Alex Eagle 62f49c3b7e use getNewLine from host rather than sys 2016-07-13 15:25:31 -07:00
Alex Eagle 05fbe7cddd use getNewLine from host rather than sys 2016-07-13 15:25:15 -07:00
Alex Eagle e28acd3c1f Add formatDiagnostics utility 2016-07-13 14:22:16 -07:00
Andy 1546974ea6 Merge pull request #9676 from Microsoft/relative_module
Treat "." and ".." as relative module names
2016-07-13 12:18:14 -07:00
Alex Eagle 34e81f2805 Add formatDiagnostics utility 2016-07-13 11:15:09 -07:00
Andy Hanson c90897ccdd Treat "." and ".." as relative module names 2016-07-13 06:51:00 -07:00
Yui 48ab0ce07f Change version to 2.1.0 (#9615) 2016-07-11 20:53:12 -07:00
Nathan Shively-Sanders f19844fbe9 Merge pull request #9580 from Microsoft/compile-with-noImplicitThis
Compile with --noImplicitThis
2016-07-11 15:25:44 -07:00
Nathan Shively-Sanders 6414a5721c Remove another use of this, in program.ts 2016-07-11 13:49:36 -07:00
Yui cfc20a956a [Transforms] Merging Master to Transforms on 06/21 (#9294)
* Initial support for globs in tsconfig.json

* Added caching, more tests

* Added stubs to ChakraHost interface for readDirectoryNames/readFileNames

* Fixed typos in comments

* Changed name of 'reduce' method added to FileSet

* Heavily revised implementation that relies on an updated 'readDirectory' API.

* more tests

* Minor update to shims.ts for forthcoming VS support for globs.

* Detailed comments for regular expressions and renamed some files.

* Comment cleanup

* Fixed new linter warnings

* Add upper limit for the program size, fix readDirectory for the symlink files

* Add comments

* CR feedback / Change upper limit / Add disableSizeLimit compiler option

* online and offline CR feedback

* Don't count current opened client file if it's TS file

* Speed up file searching

* Make language service optional for a project

* Fix failed tests

* Fix project updateing issue after editing config file

* Fixing linter and test errors

* Bringing back excludes error and fixing faulty test

* Fixing lint errors

* Passing regular expressions to native hosts

* Fix merging issues and multiple project scenario

* Refactoring

* add test and spit commandLineParser changes to another PR

* Fix #8523

* check the declaration and use order if both are not in module file

* Type guards using discriminant properties of string literal types

* Fix #9098: report missing function impelementation errors for merged classes and namespaces

* Narrow type in case/default sections in switch on discriminant property

* No implicit returns following exhaustive switch statements

* Narrow non-union types to ensure consistent results

* Add tests

* No Need to store dot token when parsing property access expression

* Added tests.

* Accepted baselines.

* Check tuple types when getting the type node's type.

* Accepted baselines.

* Fix #9173: clear out lib and types before creating a program in transpileModule

* Added tests.

* Accepted baselines.

* Always check type assertion types.

* Clear out unused compiler options when transpiling

* Accepted baselines.

* improve error message for extending interface

* accept baselines

* Use helper functions to simplify range tests

* Remove String, Number, and Boolean from TypeFlags.Falsy

* Add regression test

* Accept new baselines

* Allow property declarations in .js files

* Remove old test

* Do not use Object.assing in test

* Fix comment

* Refactor code to make if statements cheaper

* ignore casing when converting a source file path to relative path

* add tests & add branches for module interface

* Using baselines for transpile unittests (#9195)

* Conver to Transpile unittest to use baselines instead

* Add baselines

* Fix linting error

* use resolveEntityName to find interface

* add new tests for extends interface

* address code style

* Refactor navigation bar

* routine dom update

* Updating readDirectory for tsserverProjectSystem unit tests

* Array#map -> ts.map.

* Responding to PR feedback

* Add conditional index signature for Canvas2DContextAttributes (https://github.com/Microsoft/TypeScript/issues/9244)

* Add libcheck tests

* Add missing worker types

* Accept webworker baselines

* Classify `this` in parameter position as a keyword

* Adding more matchFiles test cases

* Use implicit boolean casts; it doesn't hurt performance

* Use getCanonicalFileName

* export interface used by other exported functions

* Fix from merging with master

* Update tests and baselines from merging with master

* Remove using dotToken as it is no longer needed

* Update baselines from removing dotToken

* Address PR: Add NodeEmitFlags to no indent when emit

* Address PR; and refactor setting NodeEmitFlags for createMemberAccessForPropertyName

* Update baselines
2016-07-11 12:41:12 -07:00
Bill Ticehurst 5f6eb5bb12 Removed duplicate logic
(cherry picked from commit 21bf801c6c)
2016-07-11 09:11:48 -07:00
Bill Ticehurst 5eba2e09fb Fixed the node tracking and a harness bug
(cherry picked from commit 2ab1143f1c)
2016-07-11 09:11:46 -07:00
Bill Ticehurst b360ad5f3c Fix module tracking
(cherry picked from commit ca874bdd17)
2016-07-11 09:11:45 -07:00
Bill Ticehurst 21bf801c6c Removed duplicate logic 2016-07-10 23:07:45 -07:00
Bill Ticehurst 2ab1143f1c Fixed the node tracking and a harness bug 2016-07-10 20:54:07 -07:00
Bill Ticehurst ca874bdd17 Fix module tracking 2016-07-10 16:12:42 -07:00
Nathan Shively-Sanders b543074861 Compile with --noImplicitThis
1. Add to various tsconfig.json
2. Add to Jakefile
3. Add annotations where needed.
4. Add workaround to shims.ts, which uses toplevel `this`.
2016-07-08 15:13:32 -07:00
Richard Knoll f644da7823 Merge branch 'master' into import_completions_pr 2016-07-05 16:26:46 -07:00
Vladimir Matveev f6d672eddf Merge remote-tracking branch 'origin/master' into tsserverVS-WIP-projectsystem 2016-06-30 20:26:00 -07:00
Bill Ticehurst d8047b607f Renamed API 2016-06-29 17:05:55 -07:00
Bill Ticehurst 5a45c44eb7 Dont load JavaScript if types packages are present 2016-06-29 17:04:42 -07:00
Bill Ticehurst 5f8cf1af3e Don't emit source files found under node_modules 2016-06-29 08:44:06 -07:00
Vladimir Matveev cad8049482 merge with origin/master 2016-06-28 21:27:01 -07:00
zhengbli d5cad239e8 Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location 2016-06-28 12:10:26 -07:00
zhengbli 6ff91b84ab Add getCurrentDirectory to ServerHost 2016-06-28 11:53:30 -07:00
Bill Ticehurst 8bf3d54524 Merge pull request #7075 from Microsoft/loadJsFromModules
Load JavaScript modules from Node packages
2016-06-27 18:42:12 -07:00
Bill Ticehurst d8e3bd99e8 Added emitHost method to return source from node modules 2016-06-27 16:32:29 -07:00
Mohamed Hegazy f67f1f7db7 Update version to 2.0.0 2016-06-27 13:43:07 -07:00
Bill Ticehurst 1b43bd8e83 Removed old TODO comment 2016-06-26 23:33:46 -07:00
Bill Ticehurst e9a0c56d3c Fixed bugs and linting 2016-06-26 20:48:22 -07:00
Richard Knoll c06b02ac34 Adding completions for import and reference directives 2016-06-24 14:31:21 -07:00
Bill Ticehurst 8ff2c1ad4f Fixed linting error 2016-06-21 14:00:42 -07:00
Bill Ticehurst 07bfbab6ff Changed implementation to use closure 2016-06-21 13:47:17 -07:00
Bill Ticehurst 4d4f679ec4 Merge branch 'master' into loadJsFromModules 2016-06-21 09:03:38 -07:00
Vladimir Matveev 2ffc36349b Merge remote-tracking branch 'origin/master' into tsserverVS-WIP 2016-06-20 13:18:35 -07:00
Daniel Rosenwasser e9226af3f6 Array#map -> ts.map. 2016-06-17 17:18:16 -07:00
Yui 5f91b3cf40 [Transforms] merging "master" on 06/15/2016 (#9218)
* Add upper limit for the program size, fix readDirectory for the symlink files

* Add comments

* CR feedback / Change upper limit / Add disableSizeLimit compiler option

* online and offline CR feedback

* Don't count current opened client file if it's TS file

* Speed up file searching

* Make language service optional for a project

* Fix failed tests

* Fix project updateing issue after editing config file

* Fix merging issues and multiple project scenario

* Refactoring

* add test and spit commandLineParser changes to another PR

* Fix #8523

* check the declaration and use order if both are not in module file

* Fix #9098: report missing function impelementation errors for merged classes and namespaces

* Added tests.

* Accepted baselines.

* Check tuple types when getting the type node's type.

* Accepted baselines.

* Fix #9173: clear out lib and types before creating a program in transpileModule

* Added tests.

* Accepted baselines.

* Always check type assertion types.

* Accepted baselines.

* Use helper functions to simplify range tests

* Remove String, Number, and Boolean from TypeFlags.Falsy

* Add regression test

* Accept new baselines

* Allow property declarations in .js files

* Remove old test

* Refactor code to make if statements cheaper

* Fix test failure from mergining with master
2016-06-17 16:40:26 -07:00
Vladimir Matveev f34ba2df0b added cleanup message 2016-06-17 16:22:03 -07:00
Andy Hanson dd0411a2f3 Allow property declarations in .js files 2016-06-15 09:42:52 -07:00
Ron Buckton d5f5d927af Merge branch 'transforms' into transforms-importHelpers 2016-06-14 18:23:51 -07:00
Ron Buckton 76b34939d0 Resolve external helpers module and report errors for missing module/exports 2016-06-14 16:24:01 -07:00
Yui 171ab06cf0 [Transforms] Merge master 06/14/2016 (#9169)
* Remove check narrowing only certain types, add test showing issues with this

* string literal case test

* Reconcile fix with CFA work

* Defaultable -> NotNarrowable to align with use

* Missed a defaultable in comments

* Add test for narrowing to unions of string literals

* Rewrite isInStringLiteral to accomodate for unterminated strings

* Refactor signatureHelp to expose helper functions

* Add support for completion in string literals

* Remove unused check

* Use const instead of let

* Fix error

* Formatting changes

* Use shorthand properties

* Add failing test for #8738

* Sort baseline reference identifier by name

* Detects assignment to internal module export clause, fixes #8738

* add SharedArrayBuffer

fix

* Factor out assignment op check

* Add test for composite assignment

* Factor out the behaviour and handles x++ and ++x

* Handles ES3 default as identifier name

* Fix missing else statement

* isNameOfExportedDeclarationInNonES6Module

* Reorder options alphabetically

* Mark diagnostics, and skipDefaultLibCheck as internal

* Allow an import of "foo.js" to be matched by a file "foo.ts"

* Improve loadModuleFromFile code

* Respond to PR comments

* Respond to more PR comments

* Fix test

* Actually merge from master

* Revert to old tryLoad implementation

* Run fixupParentReferences when parsing isolated jsDocComment

* initial revision of unit test support for project system in tsserver

* Allow wildcard ("*") patterns in ambient module declarations

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Allow trailing commas in function parameter and argument lists

* Add tests

* Remove unused variable

* Add null check and CR feedback

* Support shorthand ambient module declarations

* Revert "Merge pull request #7235 from weswigham/narrow-all-types"

This reverts commit ef0f6c8fe4, reversing
changes made to 9f087cb62a.

* reuse the fixupParentReferences function

* Improve typing of && operator with --strictNullChecks

* Add test

* Respond to PR comments

* Respond to PR comments

* Add merging tests

* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`

* Update tests

* Fix mistake

* Include indent in navigation bar protocol

Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.

* Remove unnecessary restrictions in property access narrowing

* Fix fourslash test

* Add regression test

* Consider property declarations to be control flow containers

* Adding regression test

* Remove restriction on --target es5 and --module es6

* change type definition for Object.create

* Fix signature help

* Add "implicit any" warning for shorthand ambient modules

* Remove trailing whitespace

* Support using string values in enums for CompilerOptions in transpile methods

* Remove trailing whitespace in jakefile

* Make `jake runtests-browser` support test regexes with spaces

For example: `jake runtests-browser t="transpile .js files"` now works.

* Add another test

* factor out isJsxOrTsxExtension

* Move to a conformance test

* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""

This reverts commit fc3e040c51.

* Use inclusive flag, as originally done, but include almost everything

* Add additional tests

* Respond to PR comments

* Fix typo

* add tests for tsserver project system

* Fix test

* Allow case comparison to undefined and null in strict null checking mode

* Remove incorrectly added tests

* check if moduleResolution when verifying that program can be reused

* more tests for module resolution change and exclude

* Fix linting issues

* Merge JSDoc of assignments from function expressions

* Allow nested assignments in type guards

* Add tests

* Improve order of parameter's merged jsdoc

* Force LF newlines for LKG builds/non debug builds
Fixes 6630

* Create intersection types in type guards for unrelated types

* Split commentsFunction test into expr/decl

And renumber.

* Remove TODO comments

* Accept new baselines

* Add tests

* Remove comments

* Fix test helper

* Recognize relative path using in outDir property (#9025)

* Recognize relative path using in outDir property

* Add projects tests

* Add project .json files

* Update baselines

* Add comments

* Add test case

The test passes in 1.8 and fails in master.

* Return trace when exception happens

* Remove Long-Done TODO

AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).

* Allow primitive type guards with typeof on right

Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.

* Primitive type guards are now order independent

* Fix comments in tests

* Add handleing for classes

* Add more tests for target=es5 module=es6

* addExportToArgumentListKind

* Accept baseline

* Add more tests

* Adds progress indicators to the runtests-parallel build task.

* Fixed typo

* Fix comment

* Add test for out-of-range error

* Use proper method of not resolving alias

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Update tests

* Contextually type return statement in async function

* Remove stale files

* Undo change

* Improve perf

* Improve tests

* Fix sourcemaps for debugging tests

* Allow --sourceRoot with --inlineSources option
Fixes #8445

* this in parameter initializers resolves to class

Accept baselines now that the test passes.

* Add tests for more kinds of import/export

* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)

* Error when using async modifier in function-expression and arrow-function when target es5

* Add tests and baselines

* Resolve function-this in parameter initialisers when explicitly provided

* Allow null/undefined guard with null/undefined on left

Also add a test with baselines.

* Code review comments

* Update more diagnostic messages ES6->2015

Fix #8996 CC @mhegazy.

* Fixes an issue with runtests-parallel when global mocha is not installed.

* Update LKG

* Add tests

* fix baselines

* Salsa: get members of variables whose initialisers are functions

* Test adding members to JS variables whose initialisers are functions

* Recommend runtests-parallel in CONTRIBUTING

* Allow empty lists on command line

* Remove single-comma empty array form

* Remove trailing whitespace

* Implicit type inclusion changes

* Only inlineSourceMap when debugging through jake-browser (#9080)

* Only inlineSourceMap when debugging through jake-browser

* Address PR: fix typo in opt's property

* minor fix: add missing return clause

* Use camel-case instead of snake-case (#9134)

* Baseline fix, CR comments, lint

* CR changes

* Add test for jsdoc in navigation bar

* Fixes runtests-parallel not reporting failure for failed tests.

* Fix decorator metadata emit for rest arg with no type

* Add isDefinition to ReferenceEntry

Clients can now easily tell if the reference is to a definition or a
usage.

* Test isDefinition

* Add option to bail out of `jake runtests` when one test fails

* Absolute-ify paths in both places

* Refactor

* Add unit test

* lint

* Added tests.

* Accepted baselines.

* Emit 'exports.' if the shorthand is a general export.

* Accepted baselines.

* Emit 'Promise' decorator metadata return type for async methods

* Respond to PR comment

* Unescape identifiers used in code completion

* Make isDefinition required.

For the deprecated getOccurrencesAtPosition, isDefinition is always false.

* Add more isDefinition tests and fix computed property bug

* Fix bug: do unescaping in the right place, so that it only affects escaped javascript identifiers

* Use `isLiteralComputedPropertyDeclarationName`
2016-06-14 15:00:40 -07:00
Yui f235bf7db8 [Transforms] Merge master 06/06/2016 (#8991)
* Remove check narrowing only certain types, add test showing issues with this

* string literal case test

* Reconcile fix with CFA work

* Defaultable -> NotNarrowable to align with use

* Missed a defaultable in comments

* Add test for narrowing to unions of string literals

* Rewrite isInStringLiteral to accomodate for unterminated strings

* Refactor signatureHelp to expose helper functions

* Add support for completion in string literals

* Remove unused check

* Use const instead of let

* Fix error

* Formatting changes

* Use shorthand properties

* Add failing test for #8738

* Sort baseline reference identifier by name

* Detects assignment to internal module export clause, fixes #8738

* add SharedArrayBuffer

fix

* Factor out assignment op check

* Add test for composite assignment

* Factor out the behaviour and handles x++ and ++x

* Handles ES3 default as identifier name

* Fix missing else statement

* isNameOfExportedDeclarationInNonES6Module

* Reorder options alphabetically

* Mark diagnostics, and skipDefaultLibCheck as internal

* Allow an import of "foo.js" to be matched by a file "foo.ts"

* Improve loadModuleFromFile code

* Respond to PR comments

* Respond to more PR comments

* Fix test

* Actually merge from master

* Revert to old tryLoad implementation

* Run fixupParentReferences when parsing isolated jsDocComment

* initial revision of unit test support for project system in tsserver

* Allow wildcard ("*") patterns in ambient module declarations

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Allow trailing commas in function parameter and argument lists

* Add tests

* Remove unused variable

* Add null check and CR feedback

* Support shorthand ambient module declarations

* Revert "Merge pull request #7235 from weswigham/narrow-all-types"

This reverts commit ef0f6c8fe4, reversing
changes made to 9f087cb62a.

* reuse the fixupParentReferences function

* Improve typing of && operator with --strictNullChecks

* Add test

* Respond to PR comments

* Respond to PR comments

* Add merging tests

* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`

* Update tests

* Fix mistake

* Include indent in navigation bar protocol

Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.

* Remove unnecessary restrictions in property access narrowing

* Fix fourslash test

* Add regression test

* Consider property declarations to be control flow containers

* Adding regression test

* Remove restriction on --target es5 and --module es6

* change type definition for Object.create

* Fix signature help

* Add "implicit any" warning for shorthand ambient modules

* Remove trailing whitespace

* Support using string values in enums for CompilerOptions in transpile methods

* Remove trailing whitespace in jakefile

* Make `jake runtests-browser` support test regexes with spaces

For example: `jake runtests-browser t="transpile .js files"` now works.

* Add another test

* factor out isJsxOrTsxExtension

* Move to a conformance test

* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""

This reverts commit fc3e040c51.

* Use inclusive flag, as originally done, but include almost everything

* Add additional tests

* Respond to PR comments

* Fix typo

* add tests for tsserver project system

* Fix test

* Allow case comparison to undefined and null in strict null checking mode

* Remove incorrectly added tests

* check if moduleResolution when verifying that program can be reused

* more tests for module resolution change and exclude

* Fix linting issues

* Merge JSDoc of assignments from function expressions

* Allow nested assignments in type guards

* Add tests

* Improve order of parameter's merged jsdoc

* Force LF newlines for LKG builds/non debug builds
Fixes 6630

* Create intersection types in type guards for unrelated types

* Split commentsFunction test into expr/decl

And renumber.

* Remove TODO comments

* Accept new baselines

* Add tests

* Remove comments

* Fix test helper

* Recognize relative path using in outDir property (#9025)

* Recognize relative path using in outDir property

* Add projects tests

* Add project .json files

* Update baselines

* Add comments

* Add test case

The test passes in 1.8 and fails in master.

* Return trace when exception happens

* Remove Long-Done TODO

AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).

* Allow primitive type guards with typeof on right

Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.

* Primitive type guards are now order independent

* Fix comments in tests

* Add handleing for classes

* Add more tests for target=es5 module=es6

* addExportToArgumentListKind

* Accept baseline

* Add more tests

* wip-fixing transforms

* Adds progress indicators to the runtests-parallel build task.

* Fixed typo

* Fix comment

* Add test for out-of-range error

* Use proper method of not resolving alias

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Port 8739

* Update tests

* Update baselines

* Contextually type return statement in async function

* Remove stale files

* Undo change

* Improve perf

* Improve tests

* Fix sourcemaps for debugging tests

* Allow --sourceRoot with --inlineSources option
Fixes #8445

* this in parameter initializers resolves to class

Accept baselines now that the test passes.

* Add tests for more kinds of import/export

* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)

* Error when using async modifier in function-expression and arrow-function when target es5

* Add tests and baselines

* Resolve function-this in parameter initialisers when explicitly provided

* Allow null/undefined guard with null/undefined on left

Also add a test with baselines.

* Code review comments

* Update more diagnostic messages ES6->2015

Fix #8996 CC @mhegazy.

* Fixes an issue with runtests-parallel when global mocha is not installed.

* Update LKG

* Add tests

* fix baselines

* Recommend runtests-parallel in CONTRIBUTING

* Only inlineSourceMap when debugging through jake-browser (#9080)

* Only inlineSourceMap when debugging through jake-browser

* Address PR: fix typo in opt's property

* Manually port tests from PR 8470

* minor fix: add missing return clause

* Support using string values in enums for CompilerOptions in transpile methods

* Support using string values in enums for CompilerOptions in transpile methods

# Conflicts:
#	tests/cases/unittests/transpile.ts

* Fix test helper

* Add test for out-of-range error

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Use camel-case instead of snake-case (#9134)

* Manually add tests for PR 8988

* Allow wildcard ("*") patterns in ambient module declarations

* Respond to PR comments

* Add another test

* Improve perf

* Improve tests

* Update baseline from merging with master

* Address PR comment

* Update baseline

* Refactor how we retrieve binding-name cache in module transformer

* Temporary accept so we get a clean run-tests result
2016-06-14 11:36:57 -07:00
Ryan Cavanaugh 29f5291453 Refactor 2016-06-13 14:37:07 -07:00
Ryan Cavanaugh b10d93291f Absolute-ify paths in both places 2016-06-13 14:20:31 -07:00
Ryan Cavanaugh 6702e651a3 CR changes 2016-06-13 10:15:29 -07:00
Ryan Cavanaugh e8ac1abbd6 Baseline fix, CR comments, lint 2016-06-13 09:33:49 -07:00
Ryan Cavanaugh 576f09f531 Merge 2016-06-10 15:47:51 -07:00
Ryan Cavanaugh 9827b638b4 Implicit type inclusion changes 2016-06-10 15:44:11 -07:00
Mohamed Hegazy 97d7aa5fb5 Merge pull request #9042 from Microsoft/ES6ModulesES5Target
Fix #6319: Add support for `--t: es5` and  `--m es6`
2016-06-10 10:23:39 -07:00
Andy Hanson d973f4d701 Merge branch 'master' into shorthand_ambient_module 2016-06-10 06:08:16 -07:00
Andy Hanson ff6e025e8a Merge branch 'master' into shorthand_ambient_module 2016-06-10 06:03:54 -07:00
Sheetal Nandi a4991b9e98 Merge pull request #9057 from Microsoft/sourceRootWithInlineSources
Allow --sourceRoot with --inlineSources option
2016-06-09 15:38:21 -07:00
Andy 9ffd00d6ff Merge pull request #8939 from Microsoft/pattern_ambient_modules
Allow wildcard ("*") patterns in ambient module declarations
2016-06-09 13:08:02 -07:00
Sheetal Nandi b521fd55a4 Allow --sourceRoot with --inlineSources option
Fixes #8445
2016-06-09 11:51:53 -07:00
Andy Hanson 75c1d77606 Merge branch 'master' into shorthand_ambient_module 2016-06-09 11:43:18 -07:00
Andy 512c6719ae Merge pull request #8895 from Microsoft/strip_extension
Allow an import of "foo.js" to be matched by a file "foo.ts"
2016-06-09 11:38:26 -07:00
Vladimir Matveev d941177547 check if moduleResolution when verifying that program can be reused 2016-06-07 15:08:46 -07:00
Ron Buckton cfa4388822 Replace legacy emitter with tree transforming emitter. 2016-06-07 10:32:03 -07:00
Andy Hanson a918730df0 factor out isJsxOrTsxExtension 2016-06-06 12:17:11 -07:00
Mohamed Hegazy 18a875807c Remove restriction on --target es5 and --module es6 2016-06-05 15:37:20 -07:00
Andy Hanson 094f97e366 Respond to PR comments 2016-06-03 06:22:34 -07:00
Andy Hanson 7e9cb46a1a Support shorthand ambient module declarations 2016-06-02 12:55:48 -07:00
Andy Hanson 3b19825890 Allow wildcard ("*") patterns in ambient module declarations 2016-06-02 05:44:49 -07:00
Andy Hanson 9575b3c3ca Revert to old tryLoad implementation 2016-06-01 11:44:12 -07:00
Andy Hanson d4b8889984 Respond to more PR comments 2016-05-31 12:58:05 -07:00
Andy Hanson f4d6b67cb0 Respond to PR comments 2016-05-31 11:39:11 -07:00
Andy Hanson a0546a9310 Improve loadModuleFromFile code 2016-05-31 10:41:46 -07:00
Andy Hanson fa16a99514 Allow an import of "foo.js" to be matched by a file "foo.ts" 2016-05-31 09:26:21 -07:00
Ron Buckton 7783cb9790 Merge branch 'transforms' into transforms-merge 2016-05-27 16:38:40 -07:00
Ron Buckton 3c6ceaf85e Simplified performance timers 2016-05-26 18:25:11 -07:00
Ron Buckton ee39c4e8d4 Merge branch 'master' into transforms-merge 2016-05-25 14:14:32 -07:00
Ryan Cavanaugh 7173fa8d02 Merge pull request #8670 from RyanCavanaugh/fix8275
Automatically consume @types/ folders
2016-05-24 15:23:06 -07:00
Ron Buckton 96ba0f2696 Added metrics for printing 2016-05-24 11:41:14 -07:00
Bill Ticehurst 75d84dcf61 Merge remote-tracking branch 'upstream/master' into loadJsFromModules 2016-05-23 17:14:23 -07:00
Bill Ticehurst ac541948c9 Fixed diagnostic message wording 2016-05-23 17:06:48 -07:00
Bill Ticehurst c76dc72b40 Merge remote-tracking branch 'upstream/master' into loadJsFromModules 2016-05-23 17:00:10 -07:00
Ryan Cavanaugh f7cc05482b Don't lose host 'this' 2016-05-23 16:25:25 -07:00
Ryan Cavanaugh 27292e4292 Merge pull request #8678 from RyanCavanaugh/fix8255
Tweak UMD / global semantics
2016-05-23 16:15:56 -07:00
Ryan Cavanaugh 3ee4a2283f Lint 2016-05-23 15:47:04 -07:00
Ryan Cavanaugh 1c253239e6 Refactor 2016-05-23 14:51:39 -07:00
Ryan Cavanaugh 41290db9c6 Tweak UMD semantics 2016-05-18 17:59:43 -07:00
Mohamed Hegazy 167c3fbc64 Fix typo 2016-05-18 17:12:59 -07:00
Mohamed Hegazy d73dd06e4b Respond to code review comments 2016-05-18 16:37:14 -07:00
Ryan Cavanaugh 58b11b631f Baseline accept and reorder program logic so common source dir is right 2016-05-18 11:30:40 -07:00
Ryan Cavanaugh f0e3ebe37d Lint 2016-05-18 11:12:02 -07:00
Ron Buckton abc9fda0e8 Conditionally enable performance metrics 2016-05-17 18:43:13 -07:00
Ron Buckton b8a9efb66c Wrap performance metrics in object to reduce deoptimizations on ts namespace. 2016-05-17 18:37:08 -07:00
Mohamed Hegazy 02f0065c95 Update error message 2016-05-17 17:15:06 -07:00
Mohamed Hegazy 53f6755907 Add error message if module is not specified and a file contains a module indicator 2016-05-17 17:14:51 -07:00
Ryan Cavanaugh f4e10eb738 Automatically consume /types 2016-05-17 15:41:31 -07:00
Vladimir Matveev 5e94c76190 expose code path that will use Path type to avoid redundant string conversions 2016-05-10 23:43:26 -07:00
Lucien Greathouse 71e4d4504f Fix minor comment typo 2016-05-09 23:05:57 -06:00
Vladimir Matveev 2b5bbfee60 use CompilerHost.realpath to resolve actual location for symlinks 2016-05-05 13:38:09 -07:00
Sheetal Nandi 76dd2086a4 Report error if user specified --out and we are defaulting to commonjs emit 2016-04-20 11:22:52 -07:00
Nathan Shively-Sanders f8ab1a5ca6 Merge branch 'master' into transforms 2016-04-18 13:27:33 -07:00
Vladimir Matveev 54862a27e2 fix typo in message 2016-04-13 21:36:36 -07:00
Vladimir Matveev e7a4dd4cf5 added validation of paths option 2016-04-13 21:16:39 -07:00
Vladimir Matveev 376c493e67 include type reference directives in .d.ts. files 2016-04-11 21:36:07 -07:00
Vladimir Matveev 1a85c5f54c fix issue with optionality of CompilerHost 2016-04-10 20:42:22 -07:00
Vladimir Matveev e5e7d47782 merge with origin/master 2016-04-08 14:38:47 -07:00
Paul van Brenk 58efc2ee05 Merge pull request #7883 from Microsoft/listEmittedFiles2
Add option to list the emitted files as part of the compiler output.
2016-04-07 17:50:26 -07:00
Ron Buckton 1aa69921c6 Makes transforms the default 2016-04-07 17:07:12 -07:00
Ron Buckton 3507ed021c Fixes issues that were causing runtests-browser to fail 2016-04-07 16:13:28 -07:00
Paul van Brenk 88a8992ce3 CR Feedback 2016-04-07 15:29:11 -07:00
Yui f0a996e6fb Fix rwc (#7895)
* Fix RWC

* Fix RWC

* Addres PR
2016-04-07 11:17:43 -07:00
Vladimir Matveev 46d28f16cc added supports for 'types' compiler option 2016-04-06 13:49:25 -07:00
Paul van Brenk 5363b2d7ad Add option to list the emitted as part of the compiler output.
This is useful for incremental build scenarios.
2016-04-06 13:25:29 -07:00
Vladimir Matveev e2a23fd598 remove compilationRoot parameter, use typesRoot/config file location as a root when computing primary locations 2016-04-05 16:33:11 -07:00
Vladimir Matveev ecbbe02c53 addressed PR feedback 2016-04-05 11:28:50 -07:00
Vladimir Matveev 25e9226d25 addressed PR feedback 2016-04-04 18:03:36 -07:00
Mohamed Hegazy 523529cc55 Use isWatchSet to test for options.watch 2016-04-04 14:51:16 -07:00
Mohamed Hegazy f1f6317a59 Merge branch 'vilic-master' 2016-04-04 11:23:45 -07:00
Mohamed Hegazy 4b5618bd60 Merge branch 'master' of https://github.com/vilic/TypeScript into vilic-master 2016-04-04 11:23:30 -07:00
Vladimir Matveev a4f30ff2a7 removed unused type assertions in harness 2016-04-01 21:26:39 -07:00
Vladimir Matveev aaaa9c0895 expose type reference resolution for external consumption 2016-04-01 12:41:01 -07:00
Ryan Cavanaugh 75922c4056 Address CR 2016-04-01 12:19:40 -07:00
Ryan Cavanaugh 05444eaabb Support reference library directives 2016-04-01 12:19:16 -07:00
Kanchalai Tanglertsampan b9cd882ae7 Address PR: use getDefaultLibLocation to get directory 2016-03-30 10:26:39 -07:00
Kanchalai Tanglertsampan 7e1470d5d4 Address PR: use getDefaultLibLocation? insteadof getUserDefinedLibFileName 2016-03-28 16:24:16 -07:00
Kanchalai Tanglertsampan 3fef5ba458 Implement --lib flag in the compiler and harness 2016-03-28 14:20:29 -07:00
Blake Embrey 9334e135d8 Normalize tsconfig.json path before searching 2016-03-26 18:02:22 -07:00
Ron Buckton 25998ae865 Fixes emit for module/enum and single-line arrow functions. 2016-03-21 15:50:52 -07:00
Ron Buckton 02ebfa5d11 Added environment variable to force experimental transformations. 2016-03-21 11:54:10 -07:00
Ron Buckton 3c344987de Merge branch 'master' into transforms 2016-03-18 17:13:55 -07:00
Chuck Jazdzewski 8bf9da614f Adding sourceFiles to the Program emit callback
This implements #7438
2016-03-15 13:25:18 -07:00
Anil Anar 8e35cdd52c add missing conditional check 2016-03-12 21:16:43 +01:00
Anil Anar cde06b6585 Fix #7397: Remove error checks for noEmit and out* compiler options combined. 2016-03-12 19:20:18 +01:00
Ron Buckton 99e6ad8b63 Removed ModifiersArray 2016-03-10 11:23:17 -08:00
Ron Buckton 5b8cf96028 Moved modifier related flags to separate enum 2016-03-10 11:12:24 -08:00
Ryan Cavanaugh 7d372bf6dc Merge pull request #7264 from RyanCavanaugh/umd
UMD support
2016-03-10 10:59:45 -08:00
Ryan Cavanaugh 44aa7388ea UMD support 2016-03-09 10:08:24 -08:00
Kanchalai Tanglertsampan 70d267419b Concat declaration error so we report them 2016-03-02 17:13:51 -08:00
Vladimir Matveev e0900434c9 address PR feedback: add comments 2016-02-24 14:30:21 -08:00
Vladimir Matveev 8e77f40ace avoid multiple passes over the program when computing diagnostics for the bundled emit 2016-02-24 14:21:30 -08:00
Asad Saeeduddin f251768f32 Make declarationDir invalid alongside out or outFile 2016-02-23 17:45:45 -05:00
Ron Buckton e5cd8fef21 Added temporary compat flag to control emit output to fix tests 2016-02-23 11:35:26 -08:00
Asad Saeeduddin c8aedbf382 Address PR feedback: expand ternary return into if block, add check to ensure proper options usage 2016-02-22 20:45:04 -05:00
Ron Buckton 6d273366d3 Merged some changes from other branches. 2016-02-22 16:10:32 -08:00
Mohamed Hegazy 353998a6bd Rever change to EmitOutput.diagnostics 2016-02-18 12:06:17 -08:00
Mohamed Hegazy 2b52ae1cb7 Fix lint errors 2016-02-16 22:57:27 -08:00
Mohamed Hegazy eed65a0334 Port #7106 to master 2016-02-16 22:01:28 -08:00
Vladimir Matveev 3820dfa830 Merge pull request #7068 from Microsoft/relativeNamesInClassicResolution
classic resolution: don't perform folder walk if module name is relative
2016-02-16 12:03:09 -08:00
Bill Ticehurst fe60490c2a Fixed wording and updated tests 2016-02-13 08:12:58 -08:00
Bill Ticehurst dfb0dcde0e Load JS from node_modules 2016-02-13 07:48:25 -08:00
Bill Ticehurst ed7abcc1e9 Set experimentalDecorators warning for JavaScript 2016-02-12 19:19:23 -08:00
Bill Ticehurst f601e6dd76 Allow decorators in JavaScript files 2016-02-12 18:52:51 -08:00
Vladimir Matveev 9960064bc3 classic resolution: don't perform folder walk if module name is relative 2016-02-12 16:30:19 -08:00
Bill Ticehurst e03a45a824 Fix fallback to classic resolution 2016-02-12 15:40:47 -08:00
Bill Ticehurst 9d008feba3 Added module: none as an option
(cherry picked from commit 195e69c889)
2016-02-11 14:09:10 -08:00
Bill Ticehurst 6a8ccd0b56 Dont default to CommonJS modules for ES6 target
(cherry picked from commit 4a67dc5e08)
2016-02-11 14:08:26 -08:00
Bill Ticehurst a370103e15 Added back errors for module kind none
(cherry picked from commit 73fa45bd2e)
2016-02-11 14:08:24 -08:00
Bill Ticehurst bb28424b45 Removed errors for missing module specifier
(cherry picked from commit f2e7f9f50f)
2016-02-11 14:07:32 -08:00
Josh Soref 284b26f49f spelling fixes for src/compiler
* after
* aggressive
* appear
* asterisks
* candidate
* conflict
* directory
* dollar
* ellipsis
* exports
* failures
* folder
* followed
* highlight
* inferred
* location
* occurred
* output
* propagated
* push
* rather
* remaining
* search
* stabilized
* substitution
* successful
* even though
* will
* with
2016-02-11 16:56:45 +00:00
vilicvane a481305292 Reorganize related functions 2016-02-11 16:38:21 +08:00
vilicvane acf965a20e Refine implementation 2016-02-10 08:47:52 +08:00
vilicvane 63c690813f Create createHash and getModifiedTime under sys, and refactor implementation into compiler host 2016-02-09 22:23:43 +08:00
Ron Buckton 8bf176ac3d Cleanup and reorganization of node tests 2016-02-04 16:41:58 -08:00
Vladimir Matveev fb99a6697d do not error if typings for external library is empty .d.ts file 2016-02-02 11:36:38 -08:00
Vladimir Matveev 555f35e2cd Merge pull request #6803 from Microsoft/noDirExistsCheckInClassic
don't do 'directoryExists' check in classic resolution scheme
2016-02-01 16:49:51 -08:00
Vladimir Matveev 1f1f4d2442 fix linter issues 2016-02-01 15:34:03 -08:00
Vladimir Matveev 4f2cd6c4a2 don't do 'directoryExists' check in classic resolution scheme 2016-02-01 15:19:13 -08:00
Daniel Rosenwasser bf4b63d3ba Only error on 'export =' declarations. 2016-02-01 14:17:31 -08:00
Vladimir Matveev b0b0712c73 suppress validation of output paths in transpile scenarios 2016-02-01 10:36:47 -08:00
Noj Vek f04f93c414 Fix typo in compiler reactNamespace error string 2016-01-30 11:37:02 -08:00
Vladimir Matveev 3661b66be4 add extra argument to 'isRequireCall' to check if argument is string literal 2016-01-28 14:18:23 -08:00
Vladimir Matveev f23c35f04d Merge pull request #5728 from Microsoft/pathMappingModuleResolution
Path mapping module resolution
2016-01-27 11:38:33 -08:00
Anders Hejlsberg 98603f9f49 Merge pull request #6532 from Microsoft/readonlyMembers
Readonly properties and index signatures
2016-01-27 10:50:26 -08:00
Vladimir Matveev adacad326a addressed PR feedback 2016-01-26 21:38:12 -08:00
Mohamed Hegazy add91052bb Update version 2016-01-25 17:08:15 -08:00
Vladimir Matveev 8a8ed0a871 update implementation based on the results of design meeting 2016-01-25 11:49:26 -08:00
Vladimir Matveev 9d828e3916 Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution 2016-01-20 15:32:19 -08:00
Anders Hejlsberg a499607845 Merge branch 'master' into readonlyMembers
Conflicts:
	src/compiler/parser.ts
	src/compiler/types.ts
2016-01-18 21:03:15 -08:00
Daniel Rosenwasser 26fdf891e9 Fix lint errors. 2016-01-16 14:05:46 -08:00
Vladimir Matveev 3aa92f5611 addressed PR feedback 2016-01-14 10:56:49 -08:00
Anders Hejlsberg b46efc9b55 Allow modifies on type members + introduce "readonly" modifier 2016-01-13 18:34:38 -08:00
vladima 39ad0774ae merge with origin/master 2016-01-11 22:49:19 -08:00
vladima 0e1c6e3c9a fix linter issues 2016-01-11 22:34:38 -08:00
vladima 7cef1efb4e merge with origin/master 2016-01-11 22:12:03 -08:00
Mohamed Hegazy ec70105c9d Add check for reactNamespace value 2016-01-07 15:00:50 -08:00
Vladimir Matveev 3d4e2203b8 merge with origin/master 2016-01-06 14:16:56 -08:00
Vladimir Matveev 36af815bba add optional 'directoryExists' method to hosts to reduce amount of disk probings that are known to fail 2016-01-06 12:37:52 -08:00
Vladimir Matveev 39a50fa8a3 merge with origin/master 2016-01-04 12:07:26 -08:00
Vladimir Matveev 7f2ebf928a use 'declare global' to define augmentations for the global scope 2015-12-28 12:03:54 -08:00
Nathan Shively-Sanders abf9961528 Merge branch 'master' into lint-nested-++ 2015-12-22 16:12:07 -08:00
Nathan Shively-Sanders 401a393519 Fix ++/-- lint 2015-12-22 15:45:00 -08:00
Vladimir Matveev 4a963a26c3 initial revision of external module augmentations 2015-12-22 13:56:22 -08:00
Vladimir Matveev a399208d73 Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution 2015-12-22 11:06:18 -08:00
vladima 39605fe5f8 report pre-emit diagnostics that blocked emit 2015-12-21 21:43:51 -08:00
vladima 6a63c0d52c Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution 2015-12-08 21:41:29 -08:00
yaoyao e95ae4f100 Improve 'Cannot compile modules unless the '--module' flag is provided.' message 2015-12-08 08:56:41 +08:00
Vladimir Matveev 2dbf621e97 merge with origin/master, add trace message with type of 'typings' field is not 'string' 2015-12-07 11:40:35 -08:00
Tim Perry 384ee18c7b Gracefully handle errors where 'typings' is not a string (fixes #4828) 2015-12-07 18:25:25 +01:00
vladima 0130c23028 Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution 2015-12-03 22:49:55 -08:00
Sheetal Nandi 5772dade97 Add test case for reporting file preprocessing error in javascript file 2015-11-30 13:59:03 -08:00
Sheetal Nandi 6b42712eb2 Report bind diagnostics, program diagnostics and file pre processing diagnostics in javascript file
Handles #5785
2015-11-30 13:26:00 -08:00
Vladimir Matveev 4e3cba1f7c Merge remote-tracking branch 'origin/master' into pathMappingModuleResolution 2015-11-25 21:23:45 -08:00
Vladimir Matveev 62370a0d08 addressed PR feedback 2015-11-25 16:41:09 -08:00
Vladimir Matveev 25cc97bb75 addressed PR feedback 2015-11-24 16:41:41 -08:00
Wesley Wigham b11786866b Merge branch 'master' into use-common-directory-for-out 2015-11-20 13:32:12 -08:00
Vladimir Matveev 6844285782 verbose module resolution 2015-11-19 21:33:33 -08:00
Vladimir Matveev 6bed1ba53a merge with master 2015-11-19 21:11:57 -08:00
Vladimir Matveev d2fd6437d7 initial implementation of path mapping based module resolution 2015-11-18 21:46:45 -08:00
Wesley Wigham 08045dfd31 Refactor getCommonSourceDirectory into a closure function 2015-11-18 17:10:22 -08:00
Wesley Wigham c0f185943c remove comment 2015-11-18 14:10:53 -08:00
Wesley Wigham a44ebbbc7e only make common dir on call 2015-11-18 13:19:56 -08:00
Wesley Wigham c7a3bee916 Merge branch 'master' into use-common-directory-for-out 2015-11-18 13:10:23 -08:00
Sheetal Nandi a19307d533 Merge branch 'master' into jsFileCompilation 2015-11-18 11:26:58 -08:00
Sheetal Nandi 5ac6eb2d79 PR feedback 2015-11-18 10:48:03 -08:00
Wesley Wigham a989595044 use getCanonicalFileName on path fragments as in other utility methods 2015-11-17 11:24:17 -08:00
Wesley Wigham 3fd9eb5637 Merge branch 'master' into compute-common-source-dir 2015-11-17 10:11:37 -08:00
Sheetal Nandi 073b69aaf5 Merge branch 'master' into jsFileCompilation 2015-11-16 12:04:42 -08:00
Sheetal Nandi 1ee5022350 Change the api for node name resolver to take compiler options instead of supportedExtensions 2015-11-16 11:49:26 -08:00
Vladimir Matveev 078ed3f485 use normalized absolute file names when doing consistency check 2015-11-16 09:49:58 -08:00
Wesley Wigham 39ebe81b89 Merge branch 'master' into compute-common-source-dir 2015-11-13 17:56:04 -08:00
Wesley Wigham e41bfd1ccc fix many lints 2015-11-13 17:43:53 -08:00
Wesley Wigham 7e69f014f3 Always compute a common source directory for a program 2015-11-13 14:41:09 -08:00
Sheetal Nandi 0482afdc1e Load only typescript files if resolving from node modules 2015-11-13 14:28:40 -08:00
Sheetal Nandi fc07763499 Merge branch 'master' into jsFileCompilation 2015-11-13 13:44:57 -08:00
Wesley Wigham ecd4435986 Go all the way back to the original solution 2015-11-12 16:22:35 -08:00
Wesley Wigham 52fbf9e12b Merge branch 'master' into compute-common-source-dir 2015-11-12 15:59:11 -08:00
Wesley Wigham 5bcf861121 use relative path from current directory 2015-11-12 15:58:11 -08:00
Sheetal Nandi 1ed67f41ba Removed the TODO as created bug for it 2015-11-12 11:50:58 -08:00
Sheetal Nandi d2445b6286 PR feedback 2015-11-11 16:10:23 -08:00
Sheetal Nandi 1659300ddb Fix the --sourceRoot and --mapRoot option handling 2015-11-11 12:59:03 -08:00
Wesley Wigham c3af8bb6cc Merge branch 'master' into compute-common-source-dir 2015-11-11 10:57:36 -08:00
Wesley Wigham a1cf51faac use canonical filename function 2015-11-10 13:25:09 -08:00
Wesley Wigham 6dcf3cf756 Add case sensitivity-check, only error on failure when outDir is specified and resource based paths are found 2015-11-10 12:06:25 -08:00
Ryan Cavanaugh ad61788113 Merge pull request #5266 from Microsoft/javaScriptModules
JavaScript LS scaffolding + JS module inference
2015-11-10 11:59:09 -08:00
Daniel Rosenwasser 92d37c3029 Merge pull request #5511 from Microsoft/skipDefaultLibCheckWithNoDefaultLib
Skip files with no-default-lib when '--skipDefaultLibCheck' and '--noLib' are used
2015-11-09 15:43:26 -08:00
Ryan Cavanaugh 69ca1f2e1d Merge remote-tracking branch 'origin/master' into javaScriptModules
# Conflicts:
#	src/compiler/parser.ts
2015-11-09 14:48:37 -08:00
Daniel Rosenwasser cece4411ca Get rid of the concept of 'isDefaultLib'. 2015-11-09 14:40:57 -08:00
Ryan Cavanaugh e630ce247b Fix merge problems from master 2015-11-09 12:49:36 -08:00
Wesley Wigham cadf54334b Merge branch 'master' into out-module-concat 2015-11-09 12:38:23 -08:00
Ryan Cavanaugh 7dd1bf487d Merge branch 'master' into javaScriptModules
# Conflicts:
#	lib/lib.es6.d.ts
#	lib/tsc.js
#	lib/tsserver.js
#	lib/typescript.d.ts
#	lib/typescript.js
#	lib/typescriptServices.d.ts
#	lib/typescriptServices.js
#	src/compiler/binder.ts
#	src/compiler/checker.ts
#	src/compiler/parser.ts
#	src/compiler/program.ts
#	src/harness/fourslash.ts
2015-11-06 16:49:09 -08:00
Ryan Cavanaugh d880d4f4fb Don't look for .js files when resolving node modules 2015-11-06 14:38:29 -08:00
Sheetal Nandi 4c842591f7 Merge branch 'master' into jsFileCompilation 2015-11-06 12:39:42 -08:00
Sheetal Nandi def7b665bb PR feedback 2015-11-05 20:09:40 -08:00
Wesley Wigham 8a93b48945 fix lint: prefer const 2015-11-04 14:51:36 -08:00
Mohamed Hegazy ec716549a5 Update default configurations 2015-11-04 09:08:33 -08:00
Sheetal Nandi 51caf1a9ee Use of FileMap instead of Map as per PR feedback 2015-10-30 15:54:31 -07:00
Wesley Wigham 70fba0b820 Merge branch 'master' into out-module-concat 2015-10-30 15:47:35 -07:00
Sheetal Nandi 62d4fd6d35 Take pr feedback into account 2015-10-30 15:06:23 -07:00
Wesley Wigham 95a3fc7143 feedback form pr, new baselines 2015-10-30 14:52:45 -07:00
Sheetal Nandi c6d54d6ae6 Simplify verification of emit file paths using utility to iterate over each emit file
This also makes sure we dont emit --out or --outFile if there are no files that can go in that file(non module and non declaration files)
2015-10-30 13:22:23 -07:00
Sheetal Nandi 9f337bc681 Merge branch 'master' into jsFileCompilation 2015-10-30 12:16:50 -07:00
Sheetal Nandi 67bed265b7 Since js extensions are not user specified, no need to check if source map file will overwrite input file 2015-10-30 11:57:20 -07:00
Sheetal Nandi 6ea74ae7f1 Update the error messages as per PR feedback 2015-10-30 11:56:44 -07:00
Sheetal Nandi daba901619 Report error if --allowJs option is used along with --declaration 2015-10-30 11:50:07 -07:00
Sheetal Nandi 94a647b72b Do not emit declarations for javascript files 2015-10-30 11:36:39 -07:00
Wesley Wigham 6c812420ec Merge branch 'master' into out-module-concat 2015-10-30 11:27:34 -07:00
Sheetal Nandi b217b8b620 Merge branch 'master' into jsFileCompilation 2015-10-30 09:34:32 -07:00
Vladimir Matveev 534bb62c59 remove 'path' suffix from FileMap methods 2015-10-29 16:43:12 -07:00
Vladimir Matveev e1b4f01e77 introduce Path as branded string type, switch FileMap to use Path 2015-10-29 16:24:00 -07:00
Vladimir Matveev 93e942a6de FileMap now internally stores absolute normalized file names 2015-10-29 13:52:43 -07:00
Vladimir Matveev 67026f3461 use resolvedFileName as is when calling methods on host 2015-10-29 13:09:46 -07:00
Sheetal Nandi fdb7a3e452 Revert the change to block declaration emit in case of syntax or semantic errors 2015-10-28 16:52:05 -07:00
Sheetal Nandi 2d3a345fd3 Since there arent any user given extensions, have extensions start with "." like before 2015-10-28 16:24:53 -07:00
Sheetal Nandi ba3d34f9df Instead of --jsExtensions support --allowJs with .js and .jsx as supported extensions 2015-10-28 14:02:46 -07:00
Sheetal Nandi ff933be5ff Populate if emit was skipped correctly as part of emit result 2015-10-28 13:07:50 -07:00
Sheetal Nandi 93cc1e530b Check source map files are being overwritten 2015-10-28 13:07:35 -07:00
Sheetal Nandi 3215438ddf Dont emit declaration file if there are errors in the source file 2015-10-28 13:06:52 -07:00
Vladimir Matveev e811fecda6 Merge pull request #5275 from Microsoft/fixCasingAndPathFormat
use absolute path as key to store files, correctly handle scenarios w…
2015-10-27 14:02:35 -07:00
Vladimir Matveev 60d8cf3bdf Merge pull request #5405 from Microsoft/allowAllFilesAsPackages
allow other files except .d.ts as external library packages
2015-10-26 11:43:38 -07:00
Vladimir Matveev 751a8ea148 allow other files except .d.ts as external library packages 2015-10-26 10:43:55 -07:00
Vladimir Matveev abf270a9b4 do not look into nested es6 exports / imports when collecting external modules 2015-10-22 14:12:57 -07:00
Nathan Shively-Sanders 36050cdefd Update diagnostic text to use ES2015, not ES6. 2015-10-22 13:23:12 -07:00
Wesley Wigham 37bc2773a3 feedback form pr 2015-10-21 15:27:33 -07:00
Wesley Wigham a83b85870c Merge branch 'master' into out-module-concat 2015-10-19 17:17:08 -07:00
Ryan Cavanaugh eda6eca3c7 Merge remote-tracking branch 'upstream/master' into javaScriptModules 2015-10-19 13:53:52 -07:00
Sheetal Nandi 0496bfe278 Merge branch 'master' into tscJsFiles 2015-10-19 12:32:51 -07:00
Daniel Rosenwasser 3749fe854d Bumped version to 1.8.0. 2015-10-16 12:28:48 -07:00
Vladimir Matveev b8a3564d28 use absolute path as key to store files, correctly handle scenarios when file names differ only in casing 2015-10-15 14:43:51 -07:00
Sheetal Nandi acf7de7d34 Merge branch 'master' into tscJsFiles 2015-10-15 12:30:55 -07:00
Ryan Cavanaugh 1a36fce4c2 JavaScript LS scaffolding + JS module inference 2015-10-14 17:36:03 -07:00
Mohamed Hegazy 99d448a167 Merge pull request #5231 from Microsoft/removeExperimentalAsyncFunctions
Remove experimental async functions
2015-10-13 14:17:36 -07:00
Mohamed Hegazy 92f1b48cc8 Remove --experimentalAsyncFunctions 2015-10-12 14:27:33 -07:00
Vladimir Matveev 4ccf630f63 merge with master 2015-10-12 13:45:06 -07:00
Sheetal Nandi 286fb3e948 Fix the lint error 2015-10-12 13:10:54 -07:00
Sheetal Nandi 5e14edb4b7 Verify the emit file name is unique and doesnt overwrite input file
Fixes #4424
2015-10-12 12:25:13 -07:00
Sheetal Nandi b580c5588e Merge branch 'master' into tscJsFiles 2015-10-05 16:42:37 -07:00
Wesley Wigham 732ec343fc update comment 2015-10-05 14:25:48 -07:00
Sheetal Nandi ce652dc7fb Fixing few code review comments 2015-10-05 12:27:06 -07:00
Wesley Wigham 03256e7c86 cusotm tests, forbid umd 2015-10-02 17:43:58 -07:00
Wesley Wigham 4c4087c656 Add compiler error for incompatible module formats 2015-10-02 17:03:29 -07:00
Wesley Wigham 122753b50a sourcemap correctness 2015-10-01 19:23:12 -07:00
Wesley Wigham b6a57ea8af Concatenated module emit fixes up all included paths 2015-10-01 12:44:24 -07:00
Wesley Wigham b95e1ff6d8 This is what zero linter errors feels like 2015-09-30 16:10:52 -07:00
Vladimir Matveev b4f326ab04 collect imports and exports in ambient external modules 2015-09-29 15:06:03 -07:00
Vladimir Matveev e53646a0cd harden the implementation of Program.getSourceFile to handle all relative file names correctly 2015-09-27 13:32:13 -07:00
Vladimir Matveev dae5a626da record resolution for relative file name if file was found via absolute name 2015-09-26 21:29:07 -07:00