diff --git a/lib/executor.js b/lib/executor.js index 8a238dd..d04e833 100644 --- a/lib/executor.js +++ b/lib/executor.js @@ -156,8 +156,7 @@ function defineModels(app, instructions) { var code = require(data.sourceFile); if (typeof code === 'function') { debug('Customizing model %s', name); - // NOTE model.super_ is set by Node's util.inherits - code(model, model.super_); + code(model); } else { debug('Skipping model file %s - `module.exports` is not a function', data.sourceFile); diff --git a/package.json b/package.json index 7a9002c..8fbb725 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-boot", - "version": "2.0.0-beta3", + "version": "2.0.0", "description": "Convention-based bootstrapper for LoopBack applications", "keywords": [ "StrongLoop", @@ -24,7 +24,7 @@ }, "dependencies": { "commondir": "0.0.1", - "debug": "^0.8.1", + "debug": "^1.0.4", "lodash.clonedeep": "^2.4.1", "semver": "^2.3.0", "toposort": "^0.2.10", @@ -33,9 +33,9 @@ "devDependencies": { "loopback": "^1.5.0", "mocha": "^1.19.0", - "must": "^0.11.0", + "must": "^0.12.0", "supertest": "^0.13.0", - "fs-extra": "^0.9.1", + "fs-extra": "^0.10.0", "browserify": "^4.1.8" } } diff --git a/test/executor.test.js b/test/executor.test.js index 08cddec..8c53715 100644 --- a/test/executor.test.js +++ b/test/executor.test.js @@ -56,9 +56,9 @@ describe('executor', function() { it('defines and customizes models', function() { appdir.writeFileSync('models/Customer.js', 'module.exports = ' + - function(Customer, Base) { + function(Customer) { Customer.settings._customized = 'Customer'; - Base.settings._customized = 'Base'; + Customer.base.settings._customized = 'Base'; }.toString()); boot.execute(app, someInstructions({ diff --git a/test/fixtures/browser-app/models/customer.js b/test/fixtures/browser-app/models/customer.js index dfb143e..79a512d 100644 --- a/test/fixtures/browser-app/models/customer.js +++ b/test/fixtures/browser-app/models/customer.js @@ -1,4 +1,4 @@ -module.exports = function(Customer, Base) { +module.exports = function(Customer) { Customer.settings._customized = 'Customer'; - Base.settings._customized = 'Base'; + Customer.base.settings._customized = 'Base'; };