Socket
Socket
Sign inDemoInstall

acorn-class-fields

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-class-fields - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.3.4 (2020-05-21)
* Allow keyword field names
## 0.3.3 (2020-05-20)

@@ -2,0 +6,0 @@

2

index.js

@@ -22,3 +22,3 @@ "use strict"

parseClassElement(_constructorAllowsSuper) {
if (this.options.ecmaVersion >= 8 && (this.type == tt.name || this.type == this.privateNameToken || this.type == tt.bracketL || this.type == tt.string || this.type == tt.num)) {
if (this.options.ecmaVersion >= 8 && (this.type == tt.name || this.type.keyword || this.type == this.privateNameToken || this.type == tt.bracketL || this.type == tt.string || this.type == tt.num)) {
const branch = this._branch()

@@ -25,0 +25,0 @@ if (branch.type == tt.bracketL) {

@@ -24,3 +24,3 @@ {

},
"version": "0.3.3",
"version": "0.3.4",
"devDependencies": {

@@ -27,0 +27,0 @@ "acorn": "^6.0.0 || ^7.0.0",

@@ -74,2 +74,5 @@ "use strict"

test("class A { 5 = 5; #5 = 5 }")
test("class A { delete = 5; #delete = 5 }")
testFail("class A { #a; f() { delete this.#a } }", "Private elements may not be deleted (1:20)")

@@ -76,0 +79,0 @@ testFail("class A { #a; #a }", "Duplicate private element (1:14)")

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