Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 change-notes/1.23/extractor-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extraction:
- include: "**/bower_components"
```

* Additional [Flow](https://flow.org/) syntax is now supported.
* Recognition of CommonJS modules has improved. As a result, some files that were previously extracted as
global scripts are now extracted as modules.
* Top-level `await` is now supported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,11 @@ private void flowParseObjectType(boolean allowStatic, boolean allowExact, boolea
if (isStatic && this.type == TokenType.colon) {
this.parseIdent(false);
} else if (allowSpread && this.eat(TokenType.ellipsis)) {
flowParseType();
boolean hasType =
this.type != endDelim && this.type != TokenType.comma && this.type != TokenType.semi;
if (hasType) {
flowParseType();
}
flowObjectTypeSemicolon();
continue;
} else {
Expand Down
2 changes: 1 addition & 1 deletion javascript/extractor/src/com/semmle/js/extractor/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class Main {
* A version identifier that should be updated every time the extractor changes in such a way that
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
*/
public static final String EXTRACTOR_VERSION = "2019-11-17";
public static final String EXTRACTOR_VERSION = "2019-11-26";

public static final Pattern NEWLINE = Pattern.compile("\n");

Expand Down
4 changes: 3 additions & 1 deletion javascript/extractor/tests/flow/input/objectTypeSpread.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
type A = { x: int };
type B = { ...A, y: string };
type B = { ...A, y: string };
type C<T> = {c: null | T, ...} | ((r: null | T) => mixed);
type D = { d: D, ..., };
Loading