Skip to content

Commit

Permalink
Upgrade: acorn 5.5.0 (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea authored and not-an-aardvark committed Mar 1, 2018
1 parent e0540c1 commit 706167b
Show file tree
Hide file tree
Showing 58 changed files with 1,373 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^5.4.0",
"acorn": "^5.5.0",
"acorn-jsx": "^3.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
function uFlagSupported() {
try {
RegExp("", "u"); // eslint-disable-line no-invalid-regexp
return true;
} catch (err) {
return false;
}
}

// Acorn's parsing error is different depending on whether the environment supports the regex u flag.
if (uFlagSupported()) {
module.exports = {
"index": 9,
"lineNumber": 1,
"column": 10,
"message": "Error parsing regular expression: Invalid regular expression: /\\u{110000}/: Invalid unicode escape"
};
} else {
module.exports = {
"index": 12,
"lineNumber": 1,
"column": 13,
"message": "Code point out of bounds"
};
}
module.exports = {
"index": 9,
"lineNumber": 1,
"column": 10,
"message": "Invalid regular expression: /\\u{110000}/: Invalid unicode escape"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
"index": 1,
"lineNumber": 1,
"column": 2,
"message": "Invalid regular expression: /(?<)/: Invalid capture group name"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/(?<)/
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
"index": 1,
"lineNumber": 1,
"column": 2,
"message": "Invalid regular expression: /(?<=a/: Unterminated group"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/(?<=a/
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"body": [
{
"type": "ExpressionStatement",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"expression": {
"type": "Literal",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"value": null,
"raw": "/(?<!a)/",
"regex": {
"pattern": "(?<!a)",
"flags": ""
}
}
}
],
"sourceType": "script",
"tokens": [
{
"type": "RegularExpression",
"value": "/(?<!a)/",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"regex": {
"flags": "",
"pattern": "(?<!a)"
}
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/(?<!a)/
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
0,
9
],
"body": [
{
"type": "ExpressionStatement",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
0,
9
],
"expression": {
"type": "Literal",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
0,
9
],
"value": null,
"raw": "/(?<!a)/u",
"regex": {
"pattern": "(?<!a)",
"flags": "u"
}
}
}
],
"sourceType": "script",
"tokens": [
{
"type": "RegularExpression",
"value": "/(?<!a)/u",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
0,
9
],
"regex": {
"flags": "u",
"pattern": "(?<!a)"
}
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/(?<!a)/u
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"body": [
{
"type": "ExpressionStatement",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"expression": {
"type": "Literal",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"value": null,
"raw": "/(?<=a)/",
"regex": {
"pattern": "(?<=a)",
"flags": ""
}
}
}
],
"sourceType": "script",
"tokens": [
{
"type": "RegularExpression",
"value": "/(?<=a)/",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 8
}
},
"range": [
0,
8
],
"regex": {
"flags": "",
"pattern": "(?<=a)"
}
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/(?<=a)/
Loading

0 comments on commit 706167b

Please sign in to comment.