Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0.0 to 5.1.0

8

CHANGELOG.md
# acorn5-object-spread changelog
## 5.1.0
* Make plugin compatible with acorn 5.3.x
## 5.0.0
* Require acorn 5.2.x
## 4.0.0

@@ -4,0 +12,0 @@

11

inject.js

@@ -51,8 +51,11 @@ 'use strict';

instance.extend("checkLVal", getCheckLVal)
instance.extend("toAssignable", nextMethod => function(node, isBinding) {
// This backports toAssignable from 5.3.0 to 5.2.x
instance.extend("toAssignable", nextMethod => function(node, isBinding, refDestructuringErrors) {
if (this.options.ecmaVersion >= 6 && node) {
if (node.type == "ObjectExpression") {
node.type = "ObjectPattern"
if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)
for (let prop of node.properties)
this.toAssignable(prop, isBinding)
this.toAssignable(prop, isBinding, refDestructuringErrors)
return node

@@ -62,6 +65,6 @@ } else if (node.type === "Property") {

if (node.kind !== "init") this.raise(node.key.start, "Object pattern can't contain getter or setter")
return this.toAssignable(node.value, isBinding)
return this.toAssignable(node.value, isBinding, refDestructuringErrors)
} else if (node.type === "SpreadElement") {
node.type = "RestElement"
return this.toAssignable(node.argument, isBinding)
return this.toAssignable(node.argument, isBinding, refDestructuringErrors)
}

@@ -68,0 +71,0 @@ }

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

},
"version": "5.0.0"
"version": "5.1.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