Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-version-checker

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-version-checker - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

11

index.js

@@ -57,6 +57,2 @@ 'use strict';

DependencyVersionChecker.prototype.satisfies = function satisfies(comparison) {
return semver.satisfies(this.version, comparison);
};
DependencyVersionChecker.prototype.isAbove = function isAbove(compareVersion) {

@@ -66,2 +62,9 @@ return semver.satisfies(this.version, '>' + compareVersion);

var semverMethods = ['gt', 'lt', 'satisfies'];
semverMethods.forEach(function(method) {
DependencyVersionChecker.prototype[method] = function(range) {
return semver[method](this.version, range);
};
});
DependencyVersionChecker.prototype.assertAbove = function assertAbove(compareVersion, _message) {

@@ -68,0 +71,0 @@ var message = _message;

{
"name": "ember-cli-version-checker",
"version": "1.1.1",
"version": "1.1.2",
"description": "Determine if your addon is being used by a minimum version of Ember CLI.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -80,7 +80,7 @@ var assert = require('assert');

describe('isAbove', function() {
describe('gt', function() {
it('returns true if version is above the specified range', function() {
var thing = checker.for('ember', 'npm');
assert.equal(thing.isAbove('0.0.1'), true);
assert.equal(thing.gt('0.0.1'), true);
});

@@ -91,6 +91,20 @@

assert.equal(thing.isAbove('99.0.0'), false);
assert.equal(thing.gt('99.0.0'), false);
});
});
describe('lt', function() {
it('returns false if version is above the specified range', function() {
var thing = checker.for('ember', 'npm');
assert.equal(thing.lt('0.0.1'), false);
});
it('returns true if version is below the specified range', function() {
var thing = checker.for('ember', 'npm');
assert.equal(thing.lt('99.0.0'), true);
});
});
describe('assertAbove', function() {

@@ -97,0 +111,0 @@ it('throws an error with a default message if a matching version was not found', function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc