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
5
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 2.1.1 to 2.1.2

src/get-project.js

2

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

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

@@ -5,2 +5,3 @@ 'use strict';

const DependencyVersionChecker = require('./dependency-version-checker');
const getProject = require('./get-project');

@@ -11,20 +12,10 @@ class BowerDependencyVersionChecker extends DependencyVersionChecker {

let addon = this._parent._addon;
let project = getProject(this._parent._addon);
let root, bowerDirectory;
let bowerDependencyPath = path.join(
project.root,
project.bowerDirectory,
this.name
);
if (addon.project) {
root = addon.project.root;
bowerDirectory = addon.project.bowerDirectory;
} else if (addon.root && addon.bowerDirectory) {
root = addon.root;
bowerDirectory = addon.bowerDirectory;
} else {
throw new Error(
'You must provide an Addon, EmberApp/EmberAddon, or Project to check bower dependencies against'
);
}
let bowerDependencyPath = path.join(root, bowerDirectory, this.name);
this._jsonPath = path.join(bowerDependencyPath, '.bower.json');

@@ -31,0 +22,0 @@ this._fallbackJsonPath = path.join(bowerDependencyPath, 'bower.json');

@@ -7,2 +7,3 @@ 'use strict';

const NPMDependencyVersionChecker = require('./npm-dependency-version-checker');
const getProject = require('./get-project');

@@ -23,3 +24,5 @@ class VersionChecker {

forEmber() {
let emberVersionChecker = this.for('ember-source', 'npm');
let project = getProject(this._addon);
let checker = project === this._addon ? this : new VersionChecker(project);
let emberVersionChecker = checker.for('ember-source', 'npm');

@@ -30,3 +33,3 @@ if (emberVersionChecker.version) {

return this.for('ember', 'bower');
return checker.for('ember', 'bower');
}

@@ -33,0 +36,0 @@ }

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