Skip to content

Commit a01f670

Browse files
committed
Update esutils version
1 parent 4842752 commit a01f670

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

escodegen.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@
469469
} else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) {
470470
result += escapeDisallowedCharacter(code);
471471
continue;
472-
} else if (!esutils.code.isIdentifierPart(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) {
472+
} else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) {
473473
result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
474474
continue;
475475
}
@@ -561,7 +561,7 @@
561561
rightCharCode = rightSource.charCodeAt(0);
562562

563563
if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode ||
564-
esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode) ||
564+
esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) ||
565565
leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i`
566566
return [left, noEmptySpace(), right];
567567
} else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) ||
@@ -1825,7 +1825,7 @@
18251825

18261826
leftSource = fragment.toString();
18271827

1828-
if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPart(expr.operator.charCodeAt(0))) {
1828+
if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
18291829
result = [fragment, noEmptySpace(), expr.operator];
18301830
} else {
18311831
result = join(fragment, expr.operator);
@@ -1949,7 +1949,7 @@
19491949
rightCharCode = fragment.toString().charCodeAt(0);
19501950

19511951
if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) ||
1952-
(esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode))) {
1952+
(esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) {
19531953
result.push(noEmptySpace());
19541954
result.push(fragment);
19551955
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"dependencies": {
3434
"estraverse": "^1.9.1",
35-
"esutils": "^1.1.6",
35+
"esutils": "^2.0.2",
3636
"esprima": "^1.2.2",
3737
"optionator": "^0.5.0"
3838
},

0 commit comments

Comments
 (0)