Commit graph

12169 commits

Author SHA1 Message Date
Ron Buckton
edf999fcbd Change symbol meaning for __extends resolution to be consistent with other helpers 2016-06-14 16:25:33 -07:00
Ron Buckton
76b34939d0 Resolve external helpers module and report errors for missing module/exports 2016-06-14 16:24:01 -07:00
Ron Buckton
6ad04375c4 PR feedback 2016-06-14 13:35:52 -07:00
Ron Buckton
147addb4e9 Merge branch 'transforms' into transforms-importHelpers 2016-06-14 13:21:24 -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
Ron Buckton
569f057635 Formatting. 2016-06-11 00:28:12 -07:00
Ron Buckton
f6f1a0dca1 Adds support for importing external helpers. 2016-06-11 00:12:04 -07:00
Vladimir Matveev
d147eed1e4 Merge pull request #9055 from Microsoft/shrink_flags
reduce max used values for flags to prevent smi overflows on 32 bit versions of node
2016-06-09 11:22:42 -07:00
Vladimir Matveev
5fe6bd4366 reduce max used values for flags to prevent smi overflows 2016-06-09 10:12:06 -07:00
Ron Buckton
ede7692620 Merge pull request #9006 from Microsoft/transforms-removeLegacyEmitter
[Transforms] Replace legacy emitter with tree transforming emitter.
2016-06-07 16:28:27 -07:00
Ron Buckton
cfa4388822 Replace legacy emitter with tree transforming emitter. 2016-06-07 10:32:03 -07:00
Ron Buckton
877e3c4815 Merge pull request #8929 from Microsoft/transforms-extractFromPrinter
[Transforms] Extract transformFiles call from printFile
2016-06-03 11:52:52 -07:00
Ron Buckton
ef436a189f PR Feedback 2016-06-03 11:50:35 -07:00
Yui
f619282af1 [Transforms] Update transforms with recent master (#8960)
* 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

* Actually merge from master

* Run fixupParentReferences when parsing isolated jsDocComment

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

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Add tests

* Remove unused variable

* Add null check and CR feedback

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

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

* reuse the fixupParentReferences function

* Fix up error from merging with master
2016-06-03 11:02:35 -07:00
Ron Buckton
47ae027d47 Merge branch 'transforms' into transforms-extractFromPrinter 2016-06-02 14:06:40 -07:00
Ron Buckton
e9dadd7707 Merge pull request #8927 from Microsoft/transforms-removeExcludeFlags
[Transforms] Removes the excludeTransformFlags property from Node
2016-06-02 14:06:03 -07:00
Ron Buckton
d4ed1ba4b2 Merge branch 'transforms' into transforms-removeExcludeFlags 2016-06-02 13:05:24 -07:00
Ron Buckton
849bea99c0 Merge branch 'transforms' into transforms-extractFromPrinter 2016-06-02 12:36:45 -07:00
Yui
e35dd79c04 [Transforms] Update baselines from merging with master round 2 (#8926)
* update baselines from merging with master

* Correctly fix#8786

* Fix up linting errors

* Fix spelling error in comment

* Remove usage of null

* Revert "Remove usage of null"

This reverts commit d9102d1e3f.

* Disable using null in unittest as we use null to signal to not generate baselines

* Remove setting disable comment as we already done so in createCommentWriter

* Address linting

* Fix travis failure

* Fix travis failure
2016-06-02 10:57:28 -07:00
Ron Buckton
e1eb24d1f0 Merge branch 'transforms' into transforms-extractFromPrinter 2016-06-01 21:31:23 -07:00
Ron Buckton
7be0db184e Removes the excludeTransformFlags property from Node 2016-06-01 19:03:13 -07:00
Ron Buckton
0af375ef17 Merge pull request #8906 from Microsoft/transforms-commentsPerf
[Transforms] Performance improvements in the comment emitter.
2016-06-01 15:15:52 -07:00
Ron Buckton
bf9d2c4beb Updated comments for iterateCommentRanges 2016-06-01 15:10:00 -07:00
Yui
5853aad4ae [Transforms] Update baselines from merging with master (#8898)
* Update baselines from merging with master

* Update sourcemap baselines

Update sourcemap baselines

* Update error baselines

* Update baselines as the test-cases already include --module flag with amd

* Fix baselines

* Update baselines from merging with master. This is a fix in master (issue #8507) and the baselines was udpated in transforms before losing in merging master
2016-06-01 14:15:24 -07:00
Ron Buckton
ff331efd5e Merge branch 'transforms-commentsPerf' into transforms-extractFromPrinter 2016-06-01 11:44:10 -07:00
Ron Buckton
b896aaecee Merge branch 'transforms' into transforms-commentsPerf 2016-06-01 11:43:40 -07:00
Ron Buckton
c9ec4e22e7 Fix merge issues 2016-06-01 11:43:23 -07:00
Ron Buckton
826f103ab5 Merge branch 'transforms-commentsPerf' into transforms-extractFromPrinter 2016-06-01 10:39:01 -07:00
Ron Buckton
66514a2810 Merge branch 'transforms' into transforms-commentsPerf 2016-05-31 18:44:16 -07:00
Ron Buckton
a07965aad8 Merge branch 'master' into transforms 2016-05-31 18:43:51 -07:00
Zhengbo Li
166f399d17 Merge pull request #8103 from zhengbli/typedefForJsdoc
[Salsa] Support @typedef for jsdoc
2016-05-31 16:24:44 -07:00
Ron Buckton
e9115cad19 Simplify disabling comments recursively, cleanup unused flags. 2016-05-31 16:24:20 -07:00
zhengbli
eb0f035c78 Remove unused parameter 2016-05-31 16:08:12 -07:00
Ron Buckton
e063bb09b6 Merge branch 'transforms' into transforms-commentsPerf 2016-05-31 15:49:57 -07:00
Ron Buckton
0f8341f5ac Merge pull request #8899 from Microsoft/transforms-binderPerf
[Transforms] Performance improvements in the binder.
2016-05-31 15:49:28 -07:00
Ron Buckton
b5d55c50f2 Merge branch 'transforms' into transforms-binderPerf 2016-05-31 15:32:48 -07:00
zhengbli
630517b8ad Merge branch 'master' of https://github.com/Microsoft/TypeScript into typedefForJsdoc 2016-05-31 15:30:42 -07:00
Yui
f3dd0b0e4f Correct emit never-type (#8903) 2016-05-31 15:11:00 -07:00
Anders Hejlsberg
4095602ce5 Merge pull request #8849 from Microsoft/outerControlFlows
Improve control flow analysis in function expressions
2016-05-31 14:51:39 -07:00
Zhengbo Li
5c095a8975 Merge pull request #8901 from zhengbli/formatOnTypeCurrentLine1
Not let the "Format on enter" feature delete the indentation of the current line
2016-05-31 14:35:22 -07:00
Anders Hejlsberg
41446fe4c2 Address CR feedback 2016-05-31 14:33:00 -07:00
zhengbli
58fdd011df avoid eating all preceding empty lines 2016-05-31 14:11:39 -07:00
zhengbli
241920c960 Merge branch 'outerControlFlows' of https://github.com/Microsoft/TypeScript into typedefForJsdoc
# Conflicts:
#	src/compiler/binder.ts
2016-05-31 14:02:45 -07:00
Ron Buckton
b59e1dafc8 Pulls transformation out of printFile to reduce number of closures. Also some additional cleanup. 2016-05-31 13:31:38 -07:00
zhengbli
3433a7800a Fix formatOnEnter for double newlines 2016-05-31 12:35:12 -07:00
Ron Buckton
736f09d7b0 Added profiler event for triggering heap snapshots when using ts-perf 2016-05-31 12:06:51 -07:00
Yui
35b8b42b55 Only check if the extensions match (#8870) 2016-05-31 11:16:56 -07:00
Ron Buckton
3129c10bdb Merge branch 'transforms' into transforms-binderPerf 2016-05-31 11:16:27 -07:00
Ron Buckton
1b7a67e5a1 Merge pull request #8873 from Microsoft/transforms-visitEachChildPerf
[Transforms] Optimize frequent paths in `visitEachChild`.
2016-05-31 11:06:04 -07:00
Zhengbo Li
e93f9df955 Fix broken test 2016-05-31 10:48:25 -07:00