Socket
Socket
Sign inDemoInstall

acorn-class-fields

Package Overview
Dependencies
Maintainers
1
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.2.0 to 0.2.1

4

.eslintrc.json

@@ -225,3 +225,3 @@ {

"no-void": "error",
"no-warning-comments": "error",
"no-warning-comments": "warn",
"no-whitespace-before-property": "error",

@@ -249,3 +249,3 @@ "no-with": "error",

"prefer-reflect": "off",
"prefer-rest-params": "error",
"prefer-rest-params": "off",
"prefer-spread": "error",

@@ -252,0 +252,0 @@ "prefer-template": "error",

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

## 0.2.1 (2018-11-06)
* Adapt to changes in acorn 6.0.3
## 0.2.0 (2018-09-14)

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

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

// Parse private fields
parseClassElement() {
parseClassElement(_constructorAllowsSuper) {
if (this.eat(tt.semi)) return null

@@ -83,3 +83,3 @@ const node = this.startNode()

}
return super.parseClassElement()
return super.parseClassElement.apply(this, arguments)
}

@@ -99,5 +99,5 @@ node.key = parsePrivateName.call(this)

// Parse public fields
parseClassMethod(method, isGenerator, isAsync) {
parseClassMethod(method, isGenerator, isAsync, _allowsDirectSuper) {
if (isGenerator || isAsync || method.kind != "method" || method.static || this.options.ecmaVersion < 8 || this.type == tt.parenL) {
return super.parseClassMethod(method, isGenerator, isAsync)
return super.parseClassMethod.apply(this, arguments)
}

@@ -156,2 +156,3 @@ maybeParseFieldValue.call(this, method)

// Prohibit super in class field initializers
// FIXME: This is not necessary in acorn >= 6.0.3
parseExprAtom(refDestructuringErrors) {

@@ -158,0 +159,0 @@ const atom = super.parseExprAtom(refDestructuringErrors)

@@ -24,11 +24,11 @@ {

},
"version": "0.2.0",
"version": "0.2.1",
"devDependencies": {
"acorn": "^6.0.0",
"acorn": "^6.0.4",
"eslint": "^5.5.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-node": "^8.0.0",
"mocha": "^5.2.0",
"test262": "git+https://github.com/tc39/test262.git#e286bfa00086226f781a3ed4e0a6295634b8ed11",
"test262": "git+https://github.com/tc39/test262.git#c0ffc8f6da0f2a7ec87afb87ec5f2664b1ba57ec",
"test262-parser-runner": "^0.4.0"
}
}

@@ -11,2 +11,3 @@ "use strict"

"BigInt",
"class-methods-private",
"class-static-fields-public",

@@ -13,0 +14,0 @@ "class-static-fields-private",

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

testFail("class A { a = () => arguments }", "A class field initializer may not contain arguments (1:20)")
testFail("class A { a = () => super() }", "A class field initializer may not contain super (1:20)")
testFail("class A { a = () => super() }", "'super' keyword outside a method (1:20)")
testFail("class A { # a }", "Unexpected token (1:12)")

@@ -343,2 +343,3 @@ testFail("class A { #a; a() { this.# a } }", "Unexpected token (1:27)")

testFail("class C { \\u0061sync m(){} };", "Unexpected token (1:21)")
test("class A extends B { constructor() { super() } }")
})
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