install-files
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "install-files", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "bin": "bin/install-files.js", |
@@ -114,4 +114,5 @@ # install-files | ||
* 1.1.0 Support npm 3 (#5 - [@GoGoCarl](https://github.com/GoGoCarl)) | ||
* 1.1.1 Fix unnecessary guard that disabled module ([#6](https://github.com/mixmaxhq/install-files/pull/6)) | ||
* 1.1.0 Support npm 3 ([#5](https://github.com/mixmaxhq/install-files/pull/5) - [@GoGoCarl](https://github.com/GoGoCarl)) | ||
* 1.0.1 Properly determine the host package's directory even if its Node modules are cached elsewhere | ||
* 1.0.0 Initial release. |
@@ -40,2 +40,3 @@ var hostPackageDir = require('./hostPackageDir'); | ||
console.log("[install-files]: WARNING: NPMv1 is not officially supported; unexpected results could occur. Consider upgrading to v2 or later"); | ||
/* falls through */ | ||
case '2': | ||
@@ -46,13 +47,10 @@ source = sourceDir; | ||
case null: | ||
console.log("[install-files]: WARNING: Could not determine NPM version"); //Fall back to default | ||
console.log("[install-files]: WARNING: Could not determine NPM version"); | ||
/* falls through */ | ||
default: | ||
source = path.join(fileInstallingPackagePath, 'node_modules', process.env.npm_package_name, sourceDir); | ||
target = fileInstallingPackagePath | ||
target = fileInstallingPackagePath; | ||
} | ||
if (fileInstallingPackagePath.match(".+" + process.env.npm_package_name + "$")) { | ||
console.log("[install-files]: Target = self, skipping install") | ||
process.nextTick(() => done()); | ||
return; | ||
} else if (!target) { | ||
if (!target) { | ||
var error2 = new Error('Could not determine the install destination directory.'); | ||
@@ -59,0 +57,0 @@ process.nextTick(() => done(error2)); |
@@ -7,8 +7,8 @@ /* | ||
function getVersion() { | ||
var version = undefined; | ||
var version; | ||
if (process.env.npm_config_user_agent && process.env.npm_config_user_agent.match(/.*npm\/.+/)) { | ||
var agent = process.env.npm_config_user_agent.split(' ') | ||
var agent = process.env.npm_config_user_agent.split(' '); | ||
for (var token of agent) { | ||
if (token.indexOf('npm/') == 0) { | ||
version = token.split('/')[1] | ||
if (token.indexOf('npm/') === 0) { | ||
version = token.split('/')[1]; | ||
break; | ||
@@ -29,2 +29,2 @@ } | ||
majorVersion: getMajorVersion | ||
} | ||
}; |
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
118
12
16255
243