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 3.0.1 to 3.1.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## v3.1.0 (2019-02-28)
#### :rocket: Enhancement
* [#97](https://github.com/ember-cli/ember-cli-version-checker/pull/97) Perf fix: cache the resolutions identically to how require does. ([@stefanpenner](https://github.com/stefanpenner))
#### Committers: 1
- Stefan Penner ([@stefanpenner](https://github.com/stefanpenner))
## v3.0.1 (2019-01-09)

@@ -2,0 +10,0 @@

11

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

@@ -25,6 +25,7 @@ "homepage": "https://github.com/rwjblue/ember-cli-version-checker",

"test": "mocha tests",
"test:debug": "mocha debug tests",
"changelog": "lerna-changelog"
},
"dependencies": {
"resolve": "^1.9.0",
"resolve-package-path": "^1.0.6",
"semver": "^5.6.0"

@@ -35,8 +36,8 @@ },

"co": "^4.6.0",
"eslint-config-prettier": "^3.1.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"lerna-changelog": "^0.8.2",
"mocha": "^5.2.0",
"mocha": "^6.0.2",
"mocha-eslint": "^5.0.0",
"prettier": "^1.7.4"
"prettier": "^1.16.4"
},

@@ -43,0 +44,0 @@ "engines": {

'use strict';
const resolve = require('resolve');
const DependencyVersionChecker = require('./dependency-version-checker');
const getProject = require('./get-project');
const resolvePackage = require('resolve-package-path');
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 {
module.exports = class NPMDependencyVersionChecker extends DependencyVersionChecker {
constructor(parent, name) {

@@ -30,28 +12,6 @@ super(parent, name);

let addon = this._parent._addon;
let target = this.name + '/package.json';
let basedir = addon.root || getProject(addon).root;
let jsonPath;
try {
// 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 (ALLOWED_ERROR_CODES.includes(e.code)) {
jsonPath = null;
} else {
throw e;
}
}
this._jsonPath = jsonPath;
this._jsonPath = resolvePackage(this.name, basedir);
this._type = 'npm';
}
}
module.exports = NPMDependencyVersionChecker;
};
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