Socket
Socket
Sign inDemoInstall

acorn5-object-spread

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn5-object-spread - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

4

CHANGELOG.md
# acorn5-object-spread changelog
## 5.1.1
* Backport check for default values from acorn 5.3.0
## 5.1.0

@@ -4,0 +8,0 @@

@@ -67,3 +67,6 @@ 'use strict';

node.type = "RestElement"
return this.toAssignable(node.argument, isBinding, refDestructuringErrors)
this.toAssignable(node.argument, isBinding, refDestructuringErrors)
if (node.argument.type === "AssignmentPattern")
this.raise(node.argument.start, "Rest elements cannot have a default value")
return
}

@@ -73,2 +76,12 @@ }

})
instance.extend("toAssignableList", nextMethod => function (exprList, isBinding) {
const result = nextMethod.call(this, exprList, isBinding)
if (exprList.length && exprList[exprList.length - 1] && exprList[exprList.length - 1].type === "RestElement") {
// Backport check from 5.3.0
if (exprList[exprList.length - 1].argument.type === "AssignmentPattern")
this.raise(exprList[exprList.length - 1].argument.start, "Rest elements cannot have a default value")
}
return result
})
instance.extend("checkPatternExport", nextMethod => function(exports, pat) {

@@ -75,0 +88,0 @@ if (pat.type == "ObjectPattern") {

2

package.json

@@ -20,3 +20,3 @@ {

},
"version": "5.1.0"
"version": "5.1.1"
}
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