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

acorn-static-class-features

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-static-class-features - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

.eslintrc.json

@@ -133,3 +133,3 @@ {

"no-await-in-loop": "error",
"no-bitwise": "error",
"no-bitwise": "off",
"no-buffer-constructor": "error",

@@ -136,0 +136,0 @@ "no-caller": "error",

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

## 0.2.4 (2020-08-13)
* Mark as compatible with acorn@8
* Allow super in field initializer
* Support keywords as field name
## 0.2.3 (2020-06-11)

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

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

branch.next()
if ([tt.name, tt.bracketL, tt.string, tt.num, this.privateNameToken].indexOf(branch.type) == -1) {
if ([tt.name, tt.bracketL, tt.string, tt.num, this.privateNameToken].indexOf(branch.type) == -1 && !branch.type.keyword) {
return super.parseClassElement.apply(this, arguments)

@@ -60,3 +60,5 @@ }

this.enterScope(64 | 2 | 1) // See acorn's scopeflags.js
this._maybeParseFieldValue(node)
this.exitScope()
this.finishNode(node, "FieldDefinition")

@@ -63,0 +65,0 @@ this.semicolon()

@@ -22,16 +22,16 @@ {

"peerDependencies": {
"acorn": "^6.1.0 || ^7.0.0"
"acorn": "^6.1.0 || ^7 || ^8"
},
"version": "0.2.3",
"version": "0.2.4",
"devDependencies": {
"acorn": "^7.0.0",
"acorn": "^8",
"eslint": "^7",
"eslint-plugin-node": "^11",
"mocha": "^8",
"test262": "git+https://github.com/tc39/test262.git#adf2cf4204a748463cacb68f07d0d006b00c3821",
"test262": "git+https://github.com/tc39/test262.git#e0758bbeacac7776dae2a69f88eb4742f0930d7c",
"test262-parser-runner": "^0.5.0"
},
"dependencies": {
"acorn-private-class-elements": "^0.2.6"
"acorn-private-class-elements": "^0.2.7"
}
}
"use strict"
const fs = require("fs")
const path = require("path")

@@ -5,0 +4,0 @@ const run = require("test262-parser-runner")

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

testFail("class A { static a = () => arguments }", "A static class field initializer may not contain arguments (1:27)")
testFail("class A { static a = () => super() }", "'super' keyword outside a method (1:27)")
testFail("class A { static a = () => super() }", "super() call outside constructor of a subclass (1:27)")
testFail("class A { static # a }", "Unexpected token (1:19)")

@@ -423,2 +423,6 @@ testFail("class A { static #a; a() { A.# a } }", "Unexpected token (1:31)")

}`)
test("class X{static delete}")
test(`class Foo extends Bar {
static field = super.field + 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