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-7 to 0.9.1-8

test/tests-6to5-playground.js

2

package.json

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

"main": "acorn.js",
"version": "0.9.1-7",
"version": "0.9.1-8",
"maintainers": [

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

# acorn-6to5
**acorn-6to5** is not supported outside of 6to5 usage. Do not expect support if
you use this in your own applications.
Deviates from [acorn](https://github.com/marijnh/acorn) in the following ways:

@@ -10,1 +13,2 @@

* [ES7 Object rest/spread](https://github.com/sebmarkbage/ecmascript-rest-spread)
* [6to5 Playground features](https://6to5.github.io/playground.html)

@@ -63,3 +63,3 @@ (function(exports) {

} else {
callback("error", test.code, e.message || e.toString());
callback("error", test.code, e.stack || e.toString());
}

@@ -66,0 +66,0 @@ }

@@ -10,2 +10,3 @@ (function() {

require("./tests-6to5.js");
require("./tests-6to5-playground.js");
} else {

@@ -12,0 +13,0 @@ driver = window;

@@ -483,2 +483,6 @@ if (typeof exports != "undefined") {

testFail("function foo(promise) { await promise; }", "Unexpected token (1:30)", {ecmaVersion: 7});
testFail("async function* foo(promise) { await promise; }", "Unexpected token (1:14)", {ecmaVersion: 7});
test('async function foo(promise) { await promise; }', {

@@ -1247,232 +1251,2 @@ type: "Program",

test("f(a, async(1, 2), b);", {
type: "Program",
body: [{
type: "ExpressionStatement",
expression: {
type: "CallExpression",
callee: {
type: "Identifier",
name: "f",
loc: {
start: {line: 1, column: 0},
end: {line: 1, column: 1}
}
},
arguments: [
{
type: "Identifier",
name: "a",
loc: {
start: {line: 1, column: 2},
end: {line: 1, column: 3}
}
},
{
type: "CallExpression",
callee: {
type: "Identifier",
name: "async",
loc: {
start: {line: 1, column: 5},
end: {line: 1, column: 10}
}
},
arguments: [
{
type: "Literal",
value: 1,
loc: {
start: {line: 1,column: 11},
end: {line: 1,column: 12}
}
},
{
type: "Literal",
value: 2,
loc: {
start: {line: 1,column: 14},
end: {line: 1,column: 15}
}
}
],
loc: {
start: {line: 1,column: 5},
end: {line: 1,column: 16}
}
},
{
type: "Identifier",
name: "b",
loc: {
start: {line: 1,column: 18},
end: {line: 1,column: 19}
}
}
],
loc: {
start: {line: 1,column: 0},
end: {line: 1,column: 20}
}
},
loc: {
start: {line: 1,column: 0},
end: {line: 1,column: 20}
}
}]
}, {
ecmaVersion: 7,
locations: true
});
test("var ok = async(x);", {
type: "Program",
body: [{
type: "VariableDeclaration",
declarations: [
{
type: "VariableDeclarator",
id: {
type: "Identifier",
name: "ok",
loc: {
start: {line: 1,column: 4},
end: {line: 1,column: 6}
}
},
init: {
type: "CallExpression",
callee: {
type: "Identifier",
name: "async",
loc: {
start: {line: 1,column: 9},
end: {line: 1,column: 14}
}
},
arguments: [
{
type: "Identifier",
name: "x",
loc: {
start: {line: 1,column: 15},
end: {line: 1,column: 16}
}
}
],
loc: {
start: {line: 1,column: 9},
end: {line: 1,column: 17}
}
},
loc: {
start: {line: 1,column: 4},
end: {line: 1,column: 17}
}
}
],
kind: "var",
loc: {
start: {line: 1,column: 0},
end: {line: 1,column: 17}
}
}]
}, {
ecmaVersion: 7,
locations: true
});
test("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",
loc: {
start: {line: 1,column: 18},
end: {line: 1,column: 23}
}
},
init: null,
loc: {
start: {line: 1,column: 18},
end: {line: 1,column: 23}
}
}
],
kind: "var",
loc: {
start: {line: 1,column: 14},
end: {line: 1,column: 24}
}
},
{
type: "ExpressionStatement",
expression: {
type: "AssignmentExpression",
operator: "=",
left: {
type: "Identifier",
name: "async",
loc: {
start: {line: 1,column: 25},
end: {line: 1,column: 30}
}
},
right: {
type: "Literal",
value: 10,
loc: {
start: {line: 1,column: 33},
end: {line: 1,column: 35}
}
},
loc: {
start: {line: 1,column: 25},
end: {line: 1,column: 35}
}
},
loc: {
start: {line: 1,column: 25},
end: {line: 1,column: 36}
}
}
],
loc: {
start: {line: 1,column: 12},
end: {line: 1,column: 37}
}
},
rest: null,
generator: false,
expression: false,
loc: {
start: {line: 1,column: 1},
end: {line: 1,column: 37}
}
},
loc: {
start: {line: 1,column: 0},
end: {line: 1,column: 38}
}
}]
}, {
ecmaVersion: 7,
locations: true
});
// ES7: Abstract references

@@ -1665,6 +1439,1 @@

});
testFail("function foo(promise) { await promise; }", "Unexpected token (1:30)", {ecmaVersion: 7});
testFail("async function* foo(promise) { await promise; }", "Unexpected token (1:14)", {ecmaVersion: 7});

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