check-peer-dependencies
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,11 @@ | ||
## 1.0.3 (2019-10-26) | ||
[Compare `check-peer-dependencies` versions 1.0.2 and 1.0.3](https://github.com/christopherthielen/check-peer-dependencies/compare/1.0.2...1.0.3) | ||
### Features | ||
* **findPossibleResolutions:** Log error message if there is a problem parsing npm view output ([a46c673](https://github.com/christopherthielen/check-peer-dependencies/commit/a46c673)) | ||
## 1.0.2 (2019-10-15) | ||
@@ -2,0 +12,0 @@ [Compare `check-peer-dependencies` versions 1.0.1 and 1.0.2](https://github.com/christopherthielen/check-peer-dependencies/compare/1.0.1...1.0.2) |
@@ -28,5 +28,16 @@ "use strict"; | ||
var requiredPeerVersions = allPeerDeps.filter(function (dep) { return dep.name === packageName; }); | ||
var rawVersionsInfo = shelljs_1.exec("npm view " + packageName + " versions", { silent: true }).stdout; | ||
var availableVersions = JSON.parse(rawVersionsInfo.replace(/'/g, '"')).sort(semverReverseSort); | ||
return availableVersions.find(function (ver) { return requiredPeerVersions.every(function (peerVer) { return semver.satisfies(ver, peerVer.version); }); }); | ||
var command = "npm view " + packageName + " versions"; | ||
var rawVersionsInfo; | ||
try { | ||
rawVersionsInfo = shelljs_1.exec(command, { silent: true }).stdout; | ||
var availableVersions = JSON.parse(rawVersionsInfo.replace(/'/g, '"')).sort(semverReverseSort); | ||
return availableVersions.find(function (ver) { return requiredPeerVersions.every(function (peerVer) { return semver.satisfies(ver, peerVer.version); }); }); | ||
} | ||
catch (err) { | ||
console.error("Error while running command: '" + command + "'"); | ||
console.error(err); | ||
console.error(); | ||
console.error('npm output:'); | ||
console.error(rawVersionsInfo); | ||
} | ||
} |
{ | ||
"name": "check-peer-dependencies", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Checks peer dependencies of the current package. Offers solutions for any that are unmet.", | ||
@@ -5,0 +5,0 @@ "main": "dist/check_peer_dependencies.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
376
33925