Skip to content

Commit

Permalink
Update ember-cli-version-checker use to avoid deprecated APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed May 9, 2017
1 parent 0a51e5f commit 1b27f67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ember-addon-main.js
@@ -1,7 +1,7 @@
'use strict';

var path = require('path');
var checker = require('ember-cli-version-checker');
var VersionChecker = require('ember-cli-version-checker');
var utils = require('./utils');
var hashForDep = require('hash-for-dep');

Expand All @@ -10,13 +10,16 @@ module.exports = {

init: function() {
if (this._super.init) { this._super.init.apply(this, arguments); }
checker.assertAbove(this, '0.1.2');

let checker = new VersionChecker(this);
let dep = this.emberCLIDep = checker.for('ember-cli', 'npm');
dep.assertAbove(this, '0.1.2');
},

parentRegistry: null,

shouldSetupRegistryInIncluded: function() {
return !checker.isAbove(this, '0.2.0');
return !this.emberCLIDep.isAbove(this, '0.2.0');
},

setupPreprocessorRegistry: function(type, registry) {
Expand Down

0 comments on commit 1b27f67

Please sign in to comment.