Skip to content

Commit 706167b

Browse files
mysticateanot-an-aardvark
authored andcommitted
Upgrade: acorn 5.5.0 (#369)
1 parent e0540c1 commit 706167b

File tree

58 files changed

+1373
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1373
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"license": "BSD-2-Clause",
2020
"dependencies": {
21-
"acorn": "^5.4.0",
21+
"acorn": "^5.5.0",
2222
"acorn-jsx": "^3.0.0"
2323
},
2424
"devDependencies": {
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
1-
function uFlagSupported() {
2-
try {
3-
RegExp("", "u"); // eslint-disable-line no-invalid-regexp
4-
return true;
5-
} catch (err) {
6-
return false;
7-
}
8-
}
9-
10-
// Acorn's parsing error is different depending on whether the environment supports the regex u flag.
11-
if (uFlagSupported()) {
12-
module.exports = {
13-
"index": 9,
14-
"lineNumber": 1,
15-
"column": 10,
16-
"message": "Error parsing regular expression: Invalid regular expression: /\\u{110000}/: Invalid unicode escape"
17-
};
18-
} else {
19-
module.exports = {
20-
"index": 12,
21-
"lineNumber": 1,
22-
"column": 13,
23-
"message": "Code point out of bounds"
24-
};
25-
}
1+
module.exports = {
2+
"index": 9,
3+
"lineNumber": 1,
4+
"column": 10,
5+
"message": "Invalid regular expression: /\\u{110000}/: Invalid unicode escape"
6+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
"index": 1,
3+
"lineNumber": 1,
4+
"column": 2,
5+
"message": "Invalid regular expression: /(?<)/: Invalid capture group name"
6+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/(?<)/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
"index": 1,
3+
"lineNumber": 1,
4+
"column": 2,
5+
"message": "Invalid regular expression: /(?<=a/: Unterminated group"
6+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/(?<=a/
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
module.exports = {
2+
"type": "Program",
3+
"loc": {
4+
"start": {
5+
"line": 1,
6+
"column": 0
7+
},
8+
"end": {
9+
"line": 1,
10+
"column": 8
11+
}
12+
},
13+
"range": [
14+
0,
15+
8
16+
],
17+
"body": [
18+
{
19+
"type": "ExpressionStatement",
20+
"loc": {
21+
"start": {
22+
"line": 1,
23+
"column": 0
24+
},
25+
"end": {
26+
"line": 1,
27+
"column": 8
28+
}
29+
},
30+
"range": [
31+
0,
32+
8
33+
],
34+
"expression": {
35+
"type": "Literal",
36+
"loc": {
37+
"start": {
38+
"line": 1,
39+
"column": 0
40+
},
41+
"end": {
42+
"line": 1,
43+
"column": 8
44+
}
45+
},
46+
"range": [
47+
0,
48+
8
49+
],
50+
"value": null,
51+
"raw": "/(?<!a)/",
52+
"regex": {
53+
"pattern": "(?<!a)",
54+
"flags": ""
55+
}
56+
}
57+
}
58+
],
59+
"sourceType": "script",
60+
"tokens": [
61+
{
62+
"type": "RegularExpression",
63+
"value": "/(?<!a)/",
64+
"loc": {
65+
"start": {
66+
"line": 1,
67+
"column": 0
68+
},
69+
"end": {
70+
"line": 1,
71+
"column": 8
72+
}
73+
},
74+
"range": [
75+
0,
76+
8
77+
],
78+
"regex": {
79+
"flags": "",
80+
"pattern": "(?<!a)"
81+
}
82+
}
83+
]
84+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/(?<!a)/
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
module.exports = {
2+
"type": "Program",
3+
"loc": {
4+
"start": {
5+
"line": 1,
6+
"column": 0
7+
},
8+
"end": {
9+
"line": 1,
10+
"column": 9
11+
}
12+
},
13+
"range": [
14+
0,
15+
9
16+
],
17+
"body": [
18+
{
19+
"type": "ExpressionStatement",
20+
"loc": {
21+
"start": {
22+
"line": 1,
23+
"column": 0
24+
},
25+
"end": {
26+
"line": 1,
27+
"column": 9
28+
}
29+
},
30+
"range": [
31+
0,
32+
9
33+
],
34+
"expression": {
35+
"type": "Literal",
36+
"loc": {
37+
"start": {
38+
"line": 1,
39+
"column": 0
40+
},
41+
"end": {
42+
"line": 1,
43+
"column": 9
44+
}
45+
},
46+
"range": [
47+
0,
48+
9
49+
],
50+
"value": null,
51+
"raw": "/(?<!a)/u",
52+
"regex": {
53+
"pattern": "(?<!a)",
54+
"flags": "u"
55+
}
56+
}
57+
}
58+
],
59+
"sourceType": "script",
60+
"tokens": [
61+
{
62+
"type": "RegularExpression",
63+
"value": "/(?<!a)/u",
64+
"loc": {
65+
"start": {
66+
"line": 1,
67+
"column": 0
68+
},
69+
"end": {
70+
"line": 1,
71+
"column": 9
72+
}
73+
},
74+
"range": [
75+
0,
76+
9
77+
],
78+
"regex": {
79+
"flags": "u",
80+
"pattern": "(?<!a)"
81+
}
82+
}
83+
]
84+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/(?<!a)/u

0 commit comments

Comments
 (0)