Socket
Socket
Sign inDemoInstall

es6-class

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-class - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

2

bower.json
{
"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

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