Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Upgrade: Upgrade esutils to v2.0.2 (fixes #170) (#171)
Browse files Browse the repository at this point in the history
Update esutils to v2.0.2. Convert isIdentifierStart calls to  isIdentifierStartES5 and isIdentifierPart calls to isIdentifierPartES5.
  • Loading branch information
Emeegeemee authored and nzakas committed Aug 15, 2016
1 parent fedfef2 commit 8d9b3c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/doctrine.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@

function scanIdentifier(last) {
var identifier;
if (!esutils.code.isIdentifierStart(source.charCodeAt(index))) {
if (!esutils.code.isIdentifierStartES5(source.charCodeAt(index))) {
return null;
}
identifier = advance();
while (index < last && esutils.code.isIdentifierPart(source.charCodeAt(index))) {
while (index < last && esutils.code.isIdentifierPartES5(source.charCodeAt(index))) {
identifier += advance();
}
return identifier;
Expand Down Expand Up @@ -295,7 +295,7 @@
name = advance();
}

if (!esutils.code.isIdentifierStart(source.charCodeAt(index))) {
if (!esutils.code.isIdentifierStartES5(source.charCodeAt(index))) {
return null;
}

Expand Down
6 changes: 3 additions & 3 deletions lib/typed.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStart(ch)) {
if (esutils.code.isIdentifierStartES5(ch)) {
utility.throwError('unexpected token');
}
}
Expand All @@ -253,7 +253,7 @@

if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStart(ch) || esutils.code.isDecimalDigit(ch)) {
if (esutils.code.isIdentifierStartES5(ch) || esutils.code.isDecimalDigit(ch)) {
utility.throwError('unexpected token');
}
}
Expand Down Expand Up @@ -311,7 +311,7 @@

if (index < length) {
ch = source.charCodeAt(index);
if (esutils.code.isIdentifierStart(ch)) {
if (esutils.code.isIdentifierStartES5(ch)) {
utility.throwError('unexpected token');
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"betarelease": "eslint-prerelease beta"
},
"dependencies": {
"esutils": "^1.1.6",
"esutils": "^2.0.2",
"isarray": "^1.0.0"
}
}

0 comments on commit 8d9b3c7

Please sign in to comment.