Socket
Socket
Sign inDemoInstall

codependency

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codependency - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

23

index.js

@@ -279,9 +279,11 @@ 'use strict';

*
* @param {Module} baseModule The module that hosts the dependencies.
* @param {Object} [options] Options object
* @param {string[]} [options.index] Which dependencies to evaluate.
* Default value: ["optionalPeerDependencies"]
* @param {string} [options.name] A unique name to use for this middleware.
* Default value is the "name" field from package.json.
* @returns {function} The generated require function.
* @param {Module} baseModule The module that hosts the dependencies.
* @param {Object} [options] Options object
* @param {string[]} [options.index] Which dependencies to evaluate.
* Default value: ["optionalPeerDependencies"]
* @param {string} [options.name] A unique name to use for this middleware.
* Default value is the "name" field from package.json.
* @param {boolean} [options.strictCheck] Check for `package.json` in base module only
Default value: true
* @returns {function} The generated require function.
*/

@@ -294,3 +296,3 @@

var pkg = exports.findPackage(baseModule, true);
var pkg = exports.findPackage(baseModule, options.strictCheck !== false);

@@ -306,6 +308,3 @@ // decide on a name for this middleware

if (middlewares.hasOwnProperty(middlewareName)) {
throw new Error(
'A middleware with name "' + middlewareName + '" has already ' +
'been registered.'
);
return middlewares[ middlewareName ];
}

@@ -312,0 +311,0 @@

@@ -11,3 +11,3 @@ {

],
"version": "2.0.1",
"version": "2.1.0",
"description": "Optional peer dependencies",

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

@@ -86,2 +86,5 @@ # Optional Peer Dependencies for Node.js middleware

If the `module` argument is not the root module you may set the `options.strictCheck` property to `false`
to search for `package.json` in a parent directory.
This function returns a `require` function, which has the following signature:

@@ -88,0 +91,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