Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "es6-class", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"homepage": "https://github.com/square/es6-class", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -5,3 +5,3 @@ /* jshint node:true, undef:true, unused:true */ | ||
var through = require('through'); | ||
var esprima = require('esprima'); | ||
var esprima = require('esprima-fb'); | ||
var recast = require('recast'); | ||
@@ -26,4 +26,4 @@ var types = recast.types; | ||
* @private | ||
* @param {ast-types.Node} fn | ||
* @return {ast-types.Node} | ||
* @param {Node} fn | ||
* @return {Node} | ||
*/ | ||
@@ -63,4 +63,4 @@ function copyFunctionExpression(fn) { | ||
* @private | ||
* @param {ast-types.NodePath} path | ||
* @this {ast-types.PathVisitor} | ||
* @param {NodePath} path | ||
* @this {PathVisitor} | ||
*/ | ||
@@ -100,4 +100,4 @@ visitClassDeclaration: function(path) { | ||
* @private | ||
* @param {ast-types.NodePath} path | ||
* @this {ast-types.PathVisitor} | ||
* @param {NodePath} path | ||
* @this {PathVisitor} | ||
*/ | ||
@@ -190,5 +190,5 @@ visitClassExpression: function(path) { | ||
* @private | ||
* @param {ast-types.ClassDeclaration|ast-types.ClassExpression} node | ||
* @return {ast-types.Expression} | ||
* @this {ast-types.NodePath} | ||
* @param {ClassDeclaration|ClassExpression} node | ||
* @return {Expression} | ||
* @this {NodePath} | ||
*/ | ||
@@ -395,2 +395,4 @@ function generateClassDefinitionExpression(node) { | ||
function addDefinePropertyDescriptorCalls(object, descriptors) { | ||
var descriptorProperties = []; | ||
descriptors.forEach(function(propertyDescriptor) { | ||
@@ -403,12 +405,19 @@ var descriptorObjectProperties = []; | ||
definitionStatements.push(b.expressionStatement(util.callSharedMethod( | ||
globalScope, | ||
'Object.defineProperty', | ||
[ | ||
object, | ||
b.literal(propertyDescriptor.name), | ||
descriptorProperties.push( | ||
b.property( | ||
'init', | ||
b.identifier(propertyDescriptor.name), | ||
b.objectExpression(descriptorObjectProperties) | ||
] | ||
))); | ||
) | ||
); | ||
}); | ||
definitionStatements.push(b.expressionStatement(util.callSharedMethod( | ||
globalScope, | ||
'Object.defineProperties', | ||
[ | ||
object, | ||
b.objectExpression(descriptorProperties) | ||
] | ||
))); | ||
} | ||
@@ -441,6 +450,6 @@ | ||
* @private | ||
* @param {ast-types.Node} node | ||
* @param {ast-types.NodePath} path | ||
* @param {ast-types.Type} type | ||
* @return {?ast-types.Node} | ||
* @param {Node} node | ||
* @param {NodePath} path | ||
* @param {Type} type | ||
* @return {?Node} | ||
*/ | ||
@@ -465,4 +474,4 @@ function getEnclosingNodeOfType(node, path, type) { | ||
* @private | ||
* @param {ast-types.NodePath} path | ||
* @this {ast-types.PathVisitor} | ||
* @param {NodePath} path | ||
* @this {PathVisitor} | ||
*/ | ||
@@ -538,2 +547,3 @@ function visitSuperCall(path) { | ||
* @private | ||
* @param {NodePath} path | ||
*/ | ||
@@ -540,0 +550,0 @@ function visitSuperCallMemberExpression(path) { |
{ | ||
"name": "es6-class", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "ES6 classes compiled to ES5.", | ||
@@ -15,7 +15,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"esprima": "git://github.com/ariya/esprima.git#harmony", | ||
"ast-types": "^0.4.2", | ||
"ast-util": "^0.3.1", | ||
"esprima-fb": "^6001.1001.0-dev-harmony-fb", | ||
"recast": "^0.6.2", | ||
"ast-types": "^0.4.2", | ||
"through": "~2.3.4", | ||
"ast-util": "^0.3.1" | ||
"through": "~2.3.4" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -9,3 +9,3 @@ /** | ||
var esprima = require('esprima'); | ||
var esprima = require('esprima-fb'); | ||
var recast = require('recast'); | ||
@@ -12,0 +12,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
64664
891
0
+ Addedesprima-fb@6001.1001.0-dev-harmony-fb(transitive)