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

check-peer-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-peer-dependencies - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## 2.0.6 (2020-09-20)
[Compare `check-peer-dependencies` versions 2.0.5 and 2.0.6](https://github.com/christopherthielen/check-peer-dependencies/compare/2.0.5...2.0.6)
### Bug Fixes
* Ignore missing optionalDependencies ([25a89a7](https://github.com/christopherthielen/check-peer-dependencies/commit/25a89a7))
## 2.0.5 (2020-09-19)

@@ -2,0 +12,0 @@ [Compare `check-peer-dependencies` versions 2.0.3 and 2.0.5](https://github.com/christopherthielen/check-peer-dependencies/compare/2.0.3...2.0.5)

22

dist/packageUtils.js

@@ -52,12 +52,19 @@ "use strict";

var dependencyPath = resolvePackageDir(packagePath, dependency.name);
if (dependencyPath) {
walkPackageDependencyTree(dependencyPath, visitor, visitedPaths, options);
if (!dependencyPath) {
if (packageDependencies.optionalDependencies.some(function (x) { return x.name === dependency.name; })) {
// don't fail if the missing dependency is in optionalDependencies
if (options.debug) {
console.log("Ignoring missing optional dependency " + dependency.name + " from " + packagePath);
}
return;
}
else {
throw new Error("WARN: Unable to resolve package " + dependency.name + " from " + packagePath);
}
}
else {
console.log("WARN: Unable to resolve package " + dependency.name + " from " + packagePath);
}
walkPackageDependencyTree(dependencyPath, visitor, visitedPaths, options);
}
if (isRootPackage)
packageDependencies.devDependencies.forEach(walkDependency);
if ((isRootPackage) || (!options.runOnlyOnRootDependencies))
if (isRootPackage || !options.runOnlyOnRootDependencies)
packageDependencies.dependencies.forEach(walkDependency);

@@ -76,3 +83,3 @@ }

function getPackageDependencies(packagePath, packageJson) {
var name = packageJson.name, _a = packageJson.dependencies, dependencies = _a === void 0 ? {} : _a, _b = packageJson.devDependencies, devDependencies = _b === void 0 ? {} : _b, _c = packageJson.peerDependencies, peerDependencies = _c === void 0 ? {} : _c, _d = packageJson.peerDevDependencies, peerDevDependencies = _d === void 0 ? [] : _d;
var name = packageJson.name, _a = packageJson.dependencies, dependencies = _a === void 0 ? {} : _a, _b = packageJson.devDependencies, devDependencies = _b === void 0 ? {} : _b, _c = packageJson.optionalDependencies, optionalDependencies = _c === void 0 ? {} : _c, _d = packageJson.peerDependencies, peerDependencies = _d === void 0 ? {} : _d, _e = packageJson.peerDevDependencies, peerDevDependencies = _e === void 0 ? [] : _e;
var applyPeerDevDependencies = function (dep) {

@@ -85,2 +92,3 @@ return (__assign(__assign({}, dep), { isPeerDevDependency: peerDevDependencies.includes && peerDevDependencies.includes(dep.name) }));

devDependencies: buildDependencyArray(packagePath, packageJson, devDependencies),
optionalDependencies: buildDependencyArray(packagePath, packageJson, optionalDependencies),
peerDependencies: buildDependencyArray(packagePath, packageJson, peerDependencies).map(applyPeerDevDependencies),

@@ -87,0 +95,0 @@ peerDevDependencies: peerDevDependencies

{
"name": "check-peer-dependencies",
"version": "2.0.5",
"version": "2.0.6",
"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

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