Comparing version 0.5.1 to 0.5.2
##CHANGE LOG | ||
- 0.5.2 | ||
- status: Alpha | ||
- Fixed issue with `@properties` annotation to not override value when subject is an object and it has a property already defined with the same name. See #18. | ||
- 0.5.1 | ||
- status: Alpha | ||
- Added 'module' as parameter in `@as` pseudo-annotation to export module as single object | ||
- 0.5.0 | ||
@@ -4,0 +12,0 @@ - status: Alpha |
@@ -42,6 +42,7 @@ /* | ||
_createPropertyFor: function(subject, name, value){ | ||
_createPropertyFor: function(subject, name, value, doNotOverride){ | ||
//is it better to use __defineGetter__ here??? | ||
subject[name] = value; | ||
if (typeof subject[name] === 'undefined' || doNotOverride !== true) { | ||
subject[name] = value; | ||
} | ||
subject[this._getterName(name, value)] = function(){ | ||
@@ -57,2 +58,3 @@ return this[name]; | ||
var properties = this.getParameter(), | ||
isObject = !(subject.prototype), | ||
key; | ||
@@ -62,5 +64,4 @@ | ||
if(properties.hasOwnProperty(key)){ | ||
this._createPropertyFor(subject.prototype || subject, key, properties[key]); | ||
this._createPropertyFor(subject.prototype || subject, key, properties[key], isObject); | ||
} | ||
} | ||
@@ -67,0 +68,0 @@ } |
{ | ||
"name": "cocktail", | ||
"description": "CocktailJS is a small library to explore traits, talents, inheritance and annotations concepts in nodejs - Shake your objects and classes with Cocktail!", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"homepage": "http://cocktailjs.github.io", | ||
@@ -32,5 +32,4 @@ "author": { | ||
"grunt-simple-mocha": "~0.4", | ||
"chai": "1.9.1", | ||
"mocha": "1.18.2", | ||
"grunt-mocha": "0.4.10", | ||
"chai": "~1.9", | ||
"mocha": "~1.19", | ||
"grunt-contrib-jshint": "~0.10", | ||
@@ -40,4 +39,5 @@ "grunt-contrib-watch": "~0.6", | ||
"sinon-chai": "~2.5", | ||
"sinon": "~1.9", | ||
"grunt-cli": "~0.1.13" | ||
"sinon": "~1.10", | ||
"grunt-cli": "~0.1.13", | ||
"grunt-mocha-test": "~0.10.2" | ||
}, | ||
@@ -44,0 +44,0 @@ "keywords": [ |
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
32500
746