From 607811ce3e8ec7a91f29d235820474bda320f492 Mon Sep 17 00:00:00 2001 From: Rocky Neurock Date: Fri, 27 Feb 2015 10:08:43 -0800 Subject: [PATCH 1/3] Added a depsDir option to allow for checking nested dependencies --- lib/check-dependencies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/check-dependencies.js b/lib/check-dependencies.js index ce95b12..2e53e98 100644 --- a/lib/check-dependencies.js +++ b/lib/check-dependencies.js @@ -101,7 +101,7 @@ function checkDependenciesHelper(syncOrAsync, config, callback) { pkgManagerPath = findup('node_modules/bower/bin/bower'); } - depsDir = options.packageDir + '/' + depsDirName; + depsDir = (options.depsDir || options.packageDir) + '/' + depsDirName; // Make sure each package from `scopeList` is present and matches the specified version range. // Packages from `optionalScopeList` may not be present but if they are, they are required From a201699c700c5e691fb35b2b58a325d7a56f5407 Mon Sep 17 00:00:00 2001 From: Rocky Neurock Date: Fri, 27 Feb 2015 10:12:48 -0800 Subject: [PATCH 2/3] Added section to README on the checkGitUrls option --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index e427a8a..011e9d7 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,22 @@ Type: `boolean` Default: `false` +### checkGitUrls + +By default, check-dependencies will skip version check for packages whose version contains the full repository path. For example: + +```js + "dependencies": { + "semver": "https://github.com/npm/node-semver.git#0.5.9" + } +``` + +If checkGitUrls is enabled, check-dependencies will parse the version number (after the path to the git repository and the hash) and check it against the version of the installed package. + +Type: `boolean` + +Default: `false` + ### verbose Prints messages to the console. From 17c6dc5b4f48ddce207c3957b1de563946c559db Mon Sep 17 00:00:00 2001 From: Rocky Neurock Date: Fri, 27 Feb 2015 10:16:48 -0800 Subject: [PATCH 3/3] Updated README with a section on the depsDir option --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 011e9d7..6da0690 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ Type: `string` Default: the closest directory containing `package.json` or `bower.json` (depending on `packageManager` specified) when going up the tree, starting from the current one +### depsDir + +Path to the directory containing `node_modules` or `bower_components`. + +Type: `string` + +Default: `undefined`. By default, check-dependencies will use the `packageDir` option. + ### onlySpecified Ensures all installed dependencies are specified in `package.json` or `bower.json`.