Hans 601f9b38f8 feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
2017-02-01 18:19:50 -08:00

36 lines
925 B
JavaScript

'use strict';
var semver = require('semver');
var debug = require('debug')('ember-cli:platform-checker:');
var LOWER_RANGE = '0.12.0';
var UPPER_RANGE = '6.0.0';
module.exports = PlatformChecker;
function PlatformChecker(version) {
this.version = version;
this.isValid = this.checkIsValid();
this.isUntested = this.checkIsUntested();
this.isDeprecated = this.checkIsDeprecated();
debug('%o', {
version: this.version,
isValid: this.isValid,
isUntested: this.isUntested,
isDeprecated: this.isDeprecated
});
}
PlatformChecker.prototype.checkIsValid = function() {
return semver.satisfies(this.version, '>=' + LOWER_RANGE + ' <' + UPPER_RANGE);
};
PlatformChecker.prototype.checkIsDeprecated = function() {
return semver.satisfies(this.version, '<' + LOWER_RANGE);
};
PlatformChecker.prototype.checkIsUntested = function() {
return semver.satisfies(this.version, '>=' + UPPER_RANGE);
};