Comparing version 0.1.2 to 0.1.3
@@ -197,3 +197,3 @@ (function() { | ||
} | ||
step.afterConstruct(that, options); | ||
step.afterConstruct(that); | ||
} | ||
@@ -200,0 +200,0 @@ }); |
{ | ||
"name": "moog", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Moog provides powerful module subclassing.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -157,2 +157,4 @@ # moog | ||
0.1.3: never pass `options` to `afterConstruct`. We formerly were correctly leaving it off in the async case, but passing it in the sync case. | ||
0.1.2: Updated some documentation. | ||
@@ -159,0 +161,0 @@ |
@@ -700,2 +700,29 @@ var assert = require('assert'); | ||
it('should invoke afterConstruct with sync only', function() { | ||
var moog = require('../index.js')({}); | ||
moog.define('baseClass', { | ||
construct: function(self, options) { | ||
self.monkeys = 3; | ||
}, | ||
afterConstruct: function(self) { | ||
self.monkeys = 5; | ||
} | ||
}); | ||
moog.define('subClass', { | ||
extend: 'baseClass', | ||
construct: function(self, options) { | ||
self.monkeys = 4; | ||
}, | ||
afterConstruct: function(self) { | ||
self.monkeys = 7; | ||
} | ||
}); | ||
var item = moog.create('subClass', {}); | ||
assert(item); | ||
assert(item.monkeys === 7); | ||
}); | ||
it('should handle a sync error in `construct`', function(done) { | ||
@@ -702,0 +729,0 @@ var moog = require('../index.js')({}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
43374
1034
164
0