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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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 = "2025-03-20";
public static final String EXTRACTOR_VERSION = "2025-04-10";

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ private JSONArray readArray(int startoff, Position start) throws ParseError {
char c = peek();
switch (c) {
case ']':
if (!needsComma) {
raise("Omitted elements are not allowed in JSON.");
}
next();
break out;
case ',':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"array": [
"foo",
"bar",
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#10000=@"/array-trailing-comma.json;sourcefile"
files(#10000,"/array-trailing-comma.json")
#10001=@"/;folder"
folders(#10001,"/")
containerparent(#10001,#10000)
#10002=@"loc,{#10000},0,0,0,0"
locations_default(#10002,#10000,0,0,0,0)
hasLocation(#10000,#10002)
#20000=*
json(#20000,5,#10000,0,"{\n "" ... ]\n}")
#20001=@"loc,{#10000},1,1,6,1"
locations_default(#20001,#10000,1,1,6,1)
json_locations(#20000,#20001)
#20002=*
json(#20002,4,#20000,0,"[\n ... ,\n ]")
#20003=@"loc,{#10000},2,14,5,5"
locations_default(#20003,#10000,2,14,5,5)
json_locations(#20002,#20003)
#20004=*
json(#20004,3,#20002,0,"""foo""")
#20005=@"loc,{#10000},3,9,3,13"
locations_default(#20005,#10000,3,9,3,13)
json_locations(#20004,#20005)
json_literals("foo","""foo""",#20004)
#20006=*
json(#20006,3,#20002,1,"""bar""")
#20007=@"loc,{#10000},4,9,4,13"
locations_default(#20007,#10000,4,9,4,13)
json_locations(#20006,#20007)
json_literals("bar","""bar""",#20006)
json_properties(#20000,"array",#20002)
numlines(#10000,6,0,0)
filetype(#10000,"json")
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: fix
---
* Fixed a bug that would prevent extraction of `tsconfig.json` files when it contained an array literal with a trailing comma.