Socket
Socket
Sign inDemoInstall

acorn

Package Overview
Dependencies
Maintainers
2
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn - npm Package Compare versions

Comparing version 4.0.6 to 4.0.7

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## 4.0.7 (2017-02-02)
### Bug fixes
Accept invalidly rejected code like `(x).y = 2` again.
Don't raise an error when a function _inside_ strict code has a
non-simple parameter list.
## 4.0.6 (2017-02-02)

@@ -2,0 +11,0 @@

2

package.json

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

"jsnext:main": "dist/acorn.es.js",
"version": "4.0.6",
"version": "4.0.7",
"engines": {

@@ -10,0 +10,0 @@ "node": ">=0.4.0"

@@ -107,3 +107,3 @@ // A recursive descent parser operates by defining functions for all

if (this.type.isAssign) {
this.checkPatternErrors(refDestructuringErrors)
if (left.type != "MemberExpression") this.checkPatternErrors(refDestructuringErrors)
if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)

@@ -681,3 +681,3 @@ let node = this.startNodeAt(startPos, startLoc)

pp.parseFunctionBody = function(node, isArrowFunction) {
let isExpression = isArrowFunction && this.type !== tt.braceL, strict = this.strict
let isExpression = isArrowFunction && this.type !== tt.braceL, oldStrict = this.strict, strict = false

@@ -688,10 +688,12 @@ if (isExpression) {

} else {
strict = strict || this.strictDirective(this.end)
strict = !oldStrict && this.strictDirective(this.end)
// Start a new scope with regard to labels and the `inFunction`
// flag (restore them to their old value afterwards).
let oldLabels = this.labels, oldStrict = this.strict
this.labels = []; this.strict = strict
let oldLabels = this.labels
this.labels = []
if (strict) this.strict = strict
node.body = this.parseBlock(true)
node.expression = false
this.labels = oldLabels; this.strict = oldStrict
this.labels = oldLabels
if (strict) this.strict = oldStrict
}

@@ -705,4 +707,3 @@

if (this.strict || strict) {
let oldStrict = this.strict
if (oldStrict || strict) {
this.strict = true

@@ -709,0 +710,0 @@ if (node.id)

@@ -39,3 +39,3 @@ // Acorn is a tiny, fast JavaScript parser written in JavaScript.

export const version = "4.0.6"
export const version = "4.0.7"

@@ -42,0 +42,0 @@ // The main exported interface (under `self.acorn` when in the

@@ -204,3 +204,3 @@ import {types as tt} from "./tokentype"

this.checkLVal(init)
this.checkPatternErrors(refDestructuringErrors)
if (init.type != "MemberExpression") this.checkPatternErrors(refDestructuringErrors)
return this.parseForIn(node, init)

@@ -207,0 +207,0 @@ } else {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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