Socket
Socket
Sign inDemoInstall

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.2 to 2.2.0

CHANGELOG.md

6

package.json
{
"name": "ember-cli-version-checker",
"version": "2.1.2",
"version": "2.2.0",
"description": "Determine if your addon is being used by a minimum version of Ember CLI.",
"main": "index.js",
"scripts": {
"test": "mocha tests"
"test": "mocha tests",
"changelog": "lerna-changelog"
},

@@ -16,2 +17,3 @@ "author": "Robert Jackson <me@rwjblue.com>",

"eslint-plugin-prettier": "^2.3.1",
"lerna-changelog": "^0.8.2",
"mocha": "^3.3.0",

@@ -18,0 +20,0 @@ "mocha-eslint": "^4.1.0",

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

const ALLOWED_ERROR_CODES = [
// resolve package error codes
'MODULE_NOT_FOUND',
// Yarn PnP Error Codes
'UNDECLARED_DEPENDENCY',
'MISSING_PEER_DEPENDENCY',
'MISSING_DEPENDENCY',
];
let pnp;
try {
pnp = require('pnpapi');
} catch (error) {
// not in Yarn PnP; not a problem
}
class NPMDependencyVersionChecker extends DependencyVersionChecker {

@@ -13,9 +31,16 @@ constructor(parent, name) {

let target = this.name + '/package.json';
let basedir = addon.root;
let jsonPath;
try {
jsonPath = resolve.sync(this.name + '/package.json', {
basedir: addon.root,
});
// the custom `pnp` code here can be removed when yarn 1.13 is the
// current release this is due to Yarn 1.13 and resolve interoperating
// together seemlessly
jsonPath = pnp
? pnp.resolveToUnqualified(target, basedir)
: resolve.sync(target, { basedir });
} catch (e) {
if (e.code === 'MODULE_NOT_FOUND') {
if (ALLOWED_ERROR_CODES.indexOf(e.code) > -1) {
jsonPath = null;

@@ -22,0 +47,0 @@ } else {

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