Socket
Socket
Sign inDemoInstall

espree

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

espree - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

v6.1.0 - August 18, 2019
* [`9870c55`](https://github.com/eslint/espree/commit/9870c553efd3eb1bd22b4b3bb5220896c5cb6933) Update: improve error messaging when validating ecmaVersion (#421) (Kai Cataldo)
* [`3f49224`](https://github.com/eslint/espree/commit/3f49224eb05f6b8cb1b996ce424a99c40978b389) Fix: tokenize the latest right curly brace (fixes #403) (#419) (finico)
* [`f5e58cc`](https://github.com/eslint/espree/commit/f5e58cc5e9030793baca3426366b8d7286ef5b89) Update: support bigint and dynamic import (#415) (Toru Nagashima)
v6.0.0 - June 21, 2019

@@ -2,0 +8,0 @@

2

espree.js

@@ -157,3 +157,3 @@ /**

for (name in astNodeTypes) {
if (astNodeTypes.hasOwnProperty(name)) {
if (Object.hasOwnProperty.call(astNodeTypes, name)) {
types[name] = astNodeTypes[name];

@@ -160,0 +160,0 @@ }

@@ -21,23 +21,26 @@ "use strict";

function normalizeEcmaVersion(ecmaVersion = DEFAULT_ECMA_VERSION) {
if (typeof ecmaVersion === "number") {
let version = ecmaVersion;
if (typeof ecmaVersion !== "number") {
throw new Error(`ecmaVersion must be a number. Received value of type ${typeof ecmaVersion} instead.`);
}
// Calculate ECMAScript edition number from official year version starting with
// ES2015, which corresponds with ES6 (or a difference of 2009).
if (version >= 2015) {
version -= 2009;
}
let version = ecmaVersion;
switch (version) {
case 3:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
return version;
// Calculate ECMAScript edition number from official year version starting with
// ES2015, which corresponds with ES6 (or a difference of 2009).
if (version >= 2015) {
version -= 2009;
}
// no default
}
switch (version) {
case 3:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
return version;
// no default
}

@@ -178,2 +181,5 @@

// Consume the final eof token
this.next();
const extra = this[STATE];

@@ -180,0 +186,0 @@ const tokens = extra.tokens;

@@ -7,3 +7,3 @@ {

"main": "espree.js",
"version": "6.0.0",
"version": "6.1.0",
"files": [

@@ -22,5 +22,5 @@ "lib",

"dependencies": {
"acorn": "^6.0.7",
"acorn": "^7.0.0",
"acorn-jsx": "^5.0.0",
"eslint-visitor-keys": "^1.0.0"
"eslint-visitor-keys": "^1.1.0"
},

@@ -30,3 +30,3 @@ "devDependencies": {

"chai": "^1.10.0",
"eslint": "^5.7.0",
"eslint": "^6.0.1",
"eslint-config-eslint": "^5.0.1",

@@ -33,0 +33,0 @@ "eslint-plugin-node": "^8.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc