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

acorn-6to5

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-6to5 - npm Package Compare versions

Comparing version 0.9.1-13 to 0.9.1-14

2

package.json

@@ -5,3 +5,3 @@ {

"main": "acorn.js",
"version": "0.9.1-13",
"version": "0.9.1-14",
"maintainers": [

@@ -8,0 +8,0 @@ {

@@ -118,3 +118,2 @@ if (typeof exports != "undefined") {

generator: false,
async: false,
body: {

@@ -182,3 +181,2 @@ type: "BlockStatement",

generator: false,
async: false,
body: {

@@ -204,90 +202,2 @@ type: "BlockStatement",

//- Make sure conditionals still work
test("y ? 1 : 2", {
type: "Program",
body: [
{
type: "ExpressionStatement",
expression: {
type: "ConditionalExpression",
test: {
type: "Identifier",
name: "y",
loc: {
start: {
line: 1,
column: 0
},
end: {
line: 1,
column: 1
}
}
},
consequent: {
type: "Literal",
value: 1,
loc: {
start: {
line: 1,
column: 4
},
end: {
line: 1,
column: 5
}
}
},
alternate: {
type: "Literal",
value: 2,
loc: {
start: {
line: 1,
column: 8
},
end: {
line: 1,
column: 9
}
}
},
loc: {
start: {
line: 1,
column: 0
},
end: {
line: 1,
column: 9
}
}
},
loc: {
start: {
line: 1,
column: 0
},
end: {
line: 1,
column: 9
}
}
}
],
loc: {
start: {
line: 1,
column: 0
},
end: {
line: 1,
column: 9
}
}
}, {
playground: true
});
testFail("obj ?= 2;", "You can only use member expressions in memoization assignment (1:0)");

@@ -341,3 +251,3 @@

test("var fn = obj:method", {
test("var fn = obj#method", {
type: "Program",

@@ -385,3 +295,3 @@ start: 0,

test("var fn = obj:method('foo', 5)", {
test("var fn = obj#method('foo', 5)", {
type: "Program",

@@ -444,3 +354,3 @@ start: 0,

test("var fn = obj[foob]:method('foo', 5)", {
test("var fn = obj[foob]#method('foo', 5)", {
type: "Program",

@@ -515,3 +425,3 @@ start: 0,

test("var fn = obj[foob].test:method('foo', 5)", {
test("var fn = obj[foob].test#method('foo', 5)", {
type: "Program",

@@ -601,3 +511,3 @@ start: 0,

test("arr.map(:toUpperCase)", {
test("arr.map(#toUpperCase)", {
type: "Program",

@@ -650,3 +560,3 @@ start: 0,

test("arr.map(:toFixed(2))", {
test("arr.map(#toFixed(2))", {
type: "Program",

@@ -653,0 +563,0 @@ start: 0,

@@ -1250,2 +1250,656 @@ if (typeof exports != "undefined") {

test('f(a, async(1, 2), b)', {
type: "Program",
body: [{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "f",
"range": [
0,
1
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 1
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "a",
"range": [
2,
3
],
"loc": {
"start": {
"line": 1,
"column": 2
},
"end": {
"line": 1,
"column": 3
}
}
},
{
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "async",
"range": [
5,
10
],
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 10
}
}
},
"arguments": [
{
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
11,
12
],
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
}
},
{
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
14,
15
],
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
}
}
}
],
"range": [
5,
16
],
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 16
}
}
},
{
"type": "Identifier",
"name": "b",
"range": [
18,
19
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 19
}
}
}
],
"range": [
0,
20
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 20
}
}
},
"range": [
0,
20
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 20
}
}
}]
}, {
ecmaVersion: 7,
locations: true,
ranges: true
});
test('var ok = async(x)', {
type: "Program",
body: [{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "ok",
"range": [
4,
6
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "async",
"range": [
9,
14
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 14
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "x",
"range": [
15,
16
],
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
}
}
],
"range": [
9,
17
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
}
},
"range": [
4,
17
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 17
}
}
}
],
"kind": "var",
"range": [
0,
17
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 17
}
}
}]
}, {
ecmaVersion: 7,
locations: true,
ranges: true
});
test('(function() { var async; async = 10 })', {
type: "Program",
body: [{
"type": "ExpressionStatement",
"expression": {
"type": "FunctionExpression",
"id": null,
"params": [],
"defaults": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "async",
"range": [
18,
23
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
}
},
"init": null,
"range": [
18,
23
],
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
}
}
],
"kind": "var",
"range": [
14,
24
],
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 24
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "async",
"range": [
25,
30
],
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 30
}
}
},
"right": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
33,
35
],
"loc": {
"start": {
"line": 1,
"column": 33
},
"end": {
"line": 1,
"column": 35
}
}
},
"range": [
25,
35
],
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 35
}
}
},
"range": [
25,
35
],
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 35
}
}
}
],
"range": [
12,
37
],
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 37
}
}
},
"rest": null,
"generator": false,
"expression": false,
"range": [
1,
37
],
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 37
}
}
},
"range": [
0,
38
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 38
}
}
}]
}, {
ecmaVersion: 7,
locations: true,
ranges: true
});
test('class Test { async() {} }', {
type: "Program",
start: 0,
end: 25,
body: [{
type: "ClassDeclaration",
start: 0,
end: 25,
id: {
type: "Identifier",
start: 6,
end: 10,
name: "Test"
},
superClass: null,
body: {
type: "ClassBody",
start: 11,
end: 25,
body: [{
type: "MethodDefinition",
start: 13,
end: 23,
static: false,
key: {
type: "Identifier",
start: 13,
end: 18,
name: "async"
},
kind: "",
value: {
type: "FunctionExpression",
start: 18,
end: 23,
id: null,
params: [],
defaults: [],
rest: null,
generator: false,
async: false,
body: {
type: "BlockStatement",
start: 21,
end: 23,
body: []
},
expression: false
}
}]
}
}]
}, {
ecmaVersion: 7
});
test('var obj = { async: "test" };', {
type: "Program",
start: 0,
end: 28,
body: [{
type: "VariableDeclaration",
start: 0,
end: 28,
declarations: [{
type: "VariableDeclarator",
start: 4,
end: 27,
id: {
type: "Identifier",
start: 4,
end: 7,
name: "obj"
},
init: {
type: "ObjectExpression",
start: 10,
end: 27,
properties: [{
type: "Property",
start: 12,
end: 25,
method: false,
shorthand: false,
key: {
type: "Identifier",
start: 12,
end: 17,
name: "async"
},
value: {
type: "Literal",
start: 19,
end: 25,
value: "test",
raw: "\"test\""
},
kind: "init"
}]
}
}],
kind: "var"
}]
}, {
ecmaVersion: 7
});
test('var obj = { async() {} };', {
type: "Program",
start: 0,
end: 25,
body: [{
type: "VariableDeclaration",
start: 0,
end: 25,
declarations: [{
type: "VariableDeclarator",
start: 4,
end: 24,
id: {
type: "Identifier",
start: 4,
end: 7,
name: "obj"
},
init: {
type: "ObjectExpression",
start: 10,
end: 24,
properties: [{
type: "Property",
start: 12,
end: 22,
method: true,
shorthand: false,
key: {
type: "Identifier",
start: 12,
end: 17,
name: "async"
},
kind: "init",
value: {
type: "FunctionExpression",
start: 17,
end: 22,
id: null,
params: [],
defaults: [],
rest: null,
generator: false,
body: {
type: "BlockStatement",
start: 20,
end: 22,
body: []
},
expression: false
}
}]
}
}],
kind: "var"
}]
}, {
ecmaVersion: 7
});
// ES7: Abstract references

@@ -1438,1 +2092,129 @@

});
test("private A;", {
type: "Program",
start: 0,
end: 10,
body: [{
type: "PrivateDeclaration",
start: 0,
end: 10,
declarations: [{
type: "Identifier",
start: 8,
end: 9,
name: "A"
}]
}]
}, {
ecmaVersion: 7
});
test("private A, B;", {
type: "Program",
start: 0,
end: 13,
body: [{
type: "PrivateDeclaration",
start: 0,
end: 13,
declarations: [
{
type: "Identifier",
start: 8,
end: 9,
name: "A"
},
{
type: "Identifier",
start: 11,
end: 12,
name: "B"
}
]
}]
}, {
ecmaVersion: 7
});
test("class A { private A; }", {
type: "Program",
start: 0,
end: 22,
body: [{
type: "ClassDeclaration",
start: 0,
end: 22,
id: {
type: "Identifier",
start: 6,
end: 7,
name: "A"
},
superClass: null,
body: {
type: "ClassBody",
start: 8,
end: 22,
body: [{
type: "PrivateDeclaration",
start: 10,
end: 20,
declarations: [
{
type: "Identifier",
start: 18,
end: 19,
name: "A"
}
]
}]
}
}]
}, {
ecmaVersion: 7
});
test("class A { private A, B; }", {
type: "Program",
start: 0,
end: 25,
body: [{
type: "ClassDeclaration",
start: 0,
end: 25,
id: {
type: "Identifier",
start: 6,
end: 7,
name: "A"
},
superClass: null,
body: {
type: "ClassBody",
start: 8,
end: 25,
body: [{
type: "PrivateDeclaration",
start: 10,
end: 23,
declarations: [
{
type: "Identifier",
start: 18,
end: 19,
name: "A"
},
{
type: "Identifier",
start: 21,
end: 22,
name: "B"
}
]
}]
}
}]
}, {
ecmaVersion: 7
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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