Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into release-2.8 #22442

Merged
merged 115 commits into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
8bd66a0
JS Object literal assignments are declarations
sandersn Nov 29, 2017
c6a7751
Test:js object literal assignment as declaration
sandersn Nov 29, 2017
f6f4652
Fix the error callback of the present directory watcher
sheetalkamat Nov 20, 2017
ed5673c
Simplify and correct the fsWatchFile callback handling with the stats…
sheetalkamat Nov 21, 2017
ca52f08
Rearrange the code to have functions after executing code
sheetalkamat Nov 21, 2017
63a3a65
Use toLowercase as utility function
sheetalkamat Nov 21, 2017
7f32f9a
Rename and restructure non polling watch file
sheetalkamat Nov 21, 2017
c8e2b9c
Simplify check output errors
sheetalkamat Dec 14, 2017
cabb211
Create polling interval as non optional parameter
sheetalkamat Dec 16, 2017
aa5e49a
Update watchFile to take priority (which is currently polling interva…
sheetalkamat Dec 18, 2017
976f330
Watch based on dynamic polling priority frequency queue
sheetalkamat Dec 19, 2017
c3b9904
Add test to verify timeout queues
sheetalkamat Dec 23, 2017
09caaa3
Fix the api test failures
sheetalkamat Jan 16, 2018
fa8d4cb
Move the polling settings to sys instead of watch utilities
sheetalkamat Jan 16, 2018
bcfa02f
Add option to watch using fs.watch instead of watching through polling
sheetalkamat Jan 16, 2018
787c995
Allow recursive directory watching on non supported file system
sheetalkamat Jan 17, 2018
0c04fb1
Add support to test when watching directories through watchFile
sheetalkamat Nov 21, 2017
c3db9fa
Add tests for #19989, #20023
sheetalkamat Jan 17, 2018
ab17600
Improve test to verify the count of callbacks for the watched directo…
sheetalkamat Nov 30, 2017
f4954d0
Test case for watching using fs.watch recursively
sheetalkamat Nov 30, 2017
56d754c
Add watchDirectory to be using dynamic polling
sheetalkamat Jan 17, 2018
a74e54e
Merge branch 'master' into watchOptions
sheetalkamat Jan 22, 2018
4eba27b
Merge branch 'master' into watchOptions
sheetalkamat Jan 22, 2018
93c13ce
Merge branch 'master' into watchOptions
sheetalkamat Jan 25, 2018
95b2630
Add watchFile option to use fsEvents on parent directory
sheetalkamat Jan 25, 2018
ca4af4f
Merge branch 'master' into watchOptions
sheetalkamat Feb 5, 2018
b7f6910
Make the PollingInterval, PollingChunkSize, PollingUnchangedThreshold…
sheetalkamat Feb 5, 2018
c5b21d4
Fix the lint error
sheetalkamat Feb 6, 2018
4f07f58
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Feb 7, 2018
9e8d59c
Support `var x = x || {}` declarations in JS
sandersn Feb 7, 2018
a51bce0
Test:basic `var x = x || {}` support in JS
sandersn Feb 7, 2018
2f8c237
Support `o.x = o.x || {}` assignments in JS
sandersn Feb 7, 2018
7e3fdc2
Test:`o.x = o.x || {}` assignments in JS
sandersn Feb 7, 2018
e0596ad
Improve contextual type skip in checkObjectLiteral
sandersn Feb 7, 2018
d3b02be
Update baselines
sandersn Feb 7, 2018
4998b99
getSpecialPropertyAssignmentKind uses type guards
sandersn Feb 8, 2018
d0b08a2
Refactor JS static property assignment binding
sandersn Feb 8, 2018
b0aebb4
Recursive object-literal-assignment declarations
sandersn Feb 8, 2018
a09c239
4-nested object-literal assignment works in JS
sandersn Feb 9, 2018
8ac94f5
Support function/class in JS nested decls
sandersn Feb 9, 2018
33c084f
Return baselines to original state
sandersn Feb 9, 2018
61ea026
Allow window. prefix in default-assignment JS decl
sandersn Feb 9, 2018
15554d7
Fix bogus jsdoc error
sandersn Feb 10, 2018
03d155f
Update tests and baselines
sandersn Feb 10, 2018
fc08e20
Correctly merge JS decls
sandersn Feb 13, 2018
88c67fa
Refactor binder and update baselines.
sandersn Feb 13, 2018
76a9ac4
Restrict declaration initializers too
sandersn Feb 13, 2018
bad155f
Clean up bindPropertyAssignment
sandersn Feb 14, 2018
0cadfcf
Clean up js decl code in checker+utilities
sandersn Feb 14, 2018
4fdef85
Naming and duplication cleanup
sandersn Feb 15, 2018
d2b933e
Cleanup in binder: rename and move
sandersn Feb 15, 2018
0191b70
Further cleanup
sandersn Feb 15, 2018
8f98c77
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Feb 15, 2018
8bfcf33
Add symbols for just-added test
sandersn Feb 15, 2018
d180117
Move skipParentheses to utilities
sandersn Feb 15, 2018
54a89ac
Simplify bindPropertyAssignment inner loop
sandersn Feb 15, 2018
518f651
Remove assert hit by chrome devtools+update baselines
sandersn Feb 20, 2018
ad43240
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Feb 20, 2018
5af91a9
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Feb 20, 2018
116a8a8
Support nested prototype declarations
sandersn Feb 20, 2018
8e424f9
Cleanup new code in binder
sandersn Feb 20, 2018
01f2ee3
Set up structure of prototype assignments
sandersn Feb 21, 2018
9a160f2
Merge branch 'master' into watchOptions
sheetalkamat Feb 21, 2018
b14cf4e
First draft of prototype assignment
sandersn Feb 22, 2018
41fba6f
Incremental prototype+prototype assignment work
sandersn Feb 22, 2018
d55aa22
Code cleanup
sandersn Feb 22, 2018
aa88f71
Fix js-prototype-assignment on declarations
sandersn Feb 22, 2018
dd25236
Fix nested js-containers+proto assignment in types space
sandersn Feb 23, 2018
5d32a31
Merge branch 'js-prototype-assignment' into js-object-literal-assignm…
sandersn Feb 23, 2018
aa6b76f
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Feb 23, 2018
4099d48
Update chrome-devtools baseline
sandersn Feb 23, 2018
f1c879d
Merge branch 'master' into watchOptions
sheetalkamat Feb 23, 2018
c3143d2
Support js nested namespace decls on exports
sandersn Feb 27, 2018
c318089
Remove assert for undeclared js-nested-exports
sandersn Feb 27, 2018
125a317
Fix lint
sandersn Feb 27, 2018
ae8637c
Merge branch 'master' into watchOptions
sheetalkamat Mar 3, 2018
a138985
isValidMethodAccess: Instantiate signature this type if necessary (#2…
Mar 6, 2018
6f6c401
Add test for undefined action returned
sheetalkamat Mar 6, 2018
7094442
Create the action only if the text change creation is successful. …
sheetalkamat Mar 6, 2018
2fb7e64
Simplify suppressLeadingAndTrailingTrivia (#22356)
Mar 6, 2018
b2dd610
Fix ignore message indentation (#22340)
mhegazy Mar 6, 2018
36b45e3
Merge pull request #22343 from Microsoft/codeFixActionNotUndefined
sheetalkamat Mar 6, 2018
1e06637
Set circle timeout to 5 minutes (#22363)
weswigham Mar 6, 2018
c0ac687
Mark SymbolTracker as deprecated publicly (#22384)
Mar 7, 2018
0be9ee2
Increase size of span for unused declaration (#22388)
Mar 7, 2018
e5804ae
inferFromUsage: use ChangeTracker and typeToTypeNode (#22379)
Mar 7, 2018
963acb3
Port generated lib files (#22381)
mhegazy Mar 7, 2018
1f7a509
When every import is unused, error on the entire import declaration (…
Mar 7, 2018
d86440f
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Mar 7, 2018
239f214
Address PR comments
sandersn Mar 8, 2018
a826c78
Accept user baseline changes
mhegazy Mar 8, 2018
45eaf42
Use single replacer for string escaping (#22335)
weswigham Mar 8, 2018
88ba1ef
Platform independent wildcard file include ordering (#22393)
weswigham Mar 8, 2018
2676786
Add 'isNamedDeclaration' helper to reduce casts (#22089)
Mar 8, 2018
0605424
fixJSDocTypes: Use ChangeTracker (#22391)
Mar 8, 2018
55bffba
Use getTextOfNode over getTextOfNodeFromSourceText(getSourceFileOfNod…
Mar 8, 2018
9586288
Filter symbol property names out of index signature assignability che…
weswigham Mar 8, 2018
04ceb3d
Disallow JS/non-JS merge without crashing
sandersn Mar 8, 2018
35730f2
Improve error span:duplicate symbols cross-js/ts
sandersn Mar 8, 2018
f8134d0
Merge branch 'master' into js-object-literal-assignments-as-declarations
sandersn Mar 8, 2018
99d866d
Merge pull request #21974 from Microsoft/js-object-literal-assignment…
sandersn Mar 8, 2018
e4610e3
Import types in JS with `var x = require('./mod')` (#22161)
sandersn Mar 8, 2018
a49e83f
annotateWithTypeFromJSDoc: Use changes.insertTypeAnnotation instead o…
Mar 8, 2018
8378f69
Directly assign values for watchFile and watchDirectory in node System
sheetalkamat Mar 8, 2018
a81f264
Call process.stdout._handle.setBlocking(true) (#22389)
sandersn Mar 8, 2018
17b10dc
Merge pull request #21243 from Microsoft/watchOptions
sheetalkamat Mar 8, 2018
87d88e2
Handle resolving and unknown symbols in getLiteralTypeFromPropertyNam…
weswigham Mar 8, 2018
28e8c4f
Factor out a getYieldedTypeOfYieldExpression helper (#22416)
Mar 8, 2018
e48bcd6
Treat 'yield;' as 'yield undefined;' (#22297)
Mar 8, 2018
2170f6e
FunctionLike = SignatureDeclaration (#22365)
Mar 9, 2018
0f47c8a
annotateWithTypeFromJSDoc: Do less special-casing for arrow functions…
Mar 9, 2018
1fc3aeb
Port changes from #22172, provide a callback to fs.close (#22405)
mhegazy Mar 9, 2018
c335c38
Fix #22133: Expose getOutliningSpans on the server protocol (#22400)
mhegazy Mar 9, 2018
3480bf2
Port generated lib files (#22437)
mhegazy Mar 9, 2018
260194c
Merge branch 'master' into release-2.8
mhegazy Mar 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ workflows:
base: &base
environment:
- workerCount: 4
- timeout: 400000
steps:
- checkout
- run: |
Expand Down
193 changes: 119 additions & 74 deletions src/compiler/binder.ts

Large diffs are not rendered by default.

377 changes: 237 additions & 140 deletions src/compiler/checker.ts

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ namespace ts {
export function getFileNamesFromConfigSpecs(spec: ConfigFileSpecs, basePath: string, options: CompilerOptions, host: ParseConfigHost, extraFileExtensions: ReadonlyArray<JsFileExtensionInfo> = []): ExpandResult {
basePath = normalizePath(basePath);

const keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
const keyMapper = host.useCaseSensitiveFileNames ? identity : toLowerCase;

// Literal file names (provided via the "files" array in tsconfig.json) are stored in a
// file map with a possibly case insensitive key. We use this map later when when including
Expand Down Expand Up @@ -2233,24 +2233,6 @@ namespace ts {
}
}

/**
* Gets a case sensitive key.
*
* @param key The original key.
*/
function caseSensitiveKeyMapper(key: string) {
return key;
}

/**
* Gets a case insensitive key.
*
* @param key The original key.
*/
function caseInsensitiveKeyMapper(key: string) {
return key.toLowerCase();
}

/**
* Produces a cleaned version of compiler options with personally identifiying info (aka, paths) removed.
* Also converts enum values back to strings.
Expand Down
41 changes: 38 additions & 3 deletions src/compiler/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ namespace ts {
/* @internal */
namespace ts {
export const emptyArray: never[] = [] as never[];
export function closeFileWatcher(watcher: FileWatcher) {
watcher.close();
}

/** Create a MapLike with good performance. */
function createDictionaryObject<T>(): MapLike<T> {
const map = Object.create(/*prototype*/ null); // tslint:disable-line:no-null-keyword
Expand Down Expand Up @@ -2539,7 +2543,6 @@ namespace ts {
path = normalizePath(path);
currentDirectory = normalizePath(currentDirectory);

const comparer = useCaseSensitiveFileNames ? compareStringsCaseSensitive : compareStringsCaseInsensitive;
const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);

const regexFlag = useCaseSensitiveFileNames ? "" : "i";
Expand All @@ -2560,7 +2563,7 @@ namespace ts {
function visitDirectory(path: string, absolutePath: string, depth: number | undefined) {
const { files, directories } = getFileSystemEntries(path);

for (const current of sort(files, comparer)) {
for (const current of sort(files, compareStringsCaseSensitive)) {
const name = combinePaths(path, current);
const absoluteName = combinePaths(absolutePath, current);
if (extensions && !fileExtensionIsOneOf(name, extensions)) continue;
Expand All @@ -2583,7 +2586,7 @@ namespace ts {
}
}

for (const current of sort(directories, comparer)) {
for (const current of sort(directories, compareStringsCaseSensitive)) {
const name = combinePaths(path, current);
const absoluteName = combinePaths(absolutePath, current);
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
Expand Down Expand Up @@ -3143,4 +3146,36 @@ namespace ts {
export function singleElementArray<T>(t: T | undefined): T[] | undefined {
return t === undefined ? undefined : [t];
}

export function enumerateInsertsAndDeletes<T, U>(newItems: ReadonlyArray<T>, oldItems: ReadonlyArray<U>, comparer: (a: T, b: U) => Comparison, inserted: (newItem: T) => void, deleted: (oldItem: U) => void, unchanged?: (oldItem: U, newItem: T) => void) {
unchanged = unchanged || noop;
let newIndex = 0;
let oldIndex = 0;
const newLen = newItems.length;
const oldLen = oldItems.length;
while (newIndex < newLen && oldIndex < oldLen) {
const newItem = newItems[newIndex];
const oldItem = oldItems[oldIndex];
const compareResult = comparer(newItem, oldItem);
if (compareResult === Comparison.LessThan) {
inserted(newItem);
newIndex++;
}
else if (compareResult === Comparison.GreaterThan) {
deleted(oldItem);
oldIndex++;
}
else {
unchanged(oldItem, newItem);
newIndex++;
oldIndex++;
}
}
while (newIndex < newLen) {
inserted(newItems[newIndex++]);
}
while (oldIndex < oldLen) {
deleted(oldItems[oldIndex++]);
}
}
}
8 changes: 8 additions & 0 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3480,6 +3480,10 @@
"category": "Message",
"code": 6191
},
"All imports in import declaration are unused.": {
"category": "Error",
"code": 6192
},
"Variable '{0}' implicitly has an '{1}' type.": {
"category": "Error",
"code": 7005
Expand Down Expand Up @@ -3851,6 +3855,10 @@
"category": "Message",
"code": 90004
},
"Remove import from '{0}'": {
"category": "Message",
"code": 90005
},
"Implement interface '{0}'": {
"category": "Message",
"code": 90006
Expand Down
10 changes: 0 additions & 10 deletions src/compiler/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4266,16 +4266,6 @@ namespace ts {
return node;
}

export function skipParentheses(node: Expression): Expression;
export function skipParentheses(node: Node): Node;
export function skipParentheses(node: Node): Node {
while (node.kind === SyntaxKind.ParenthesizedExpression) {
node = (<ParenthesizedExpression>node).expression;
}

return node;
}

export function skipAssertions(node: Expression): Expression;
export function skipAssertions(node: Node): Node;
export function skipAssertions(node: Node): Node {
Expand Down
Loading