node-pre-gyp
Advanced tools
Comparing version 0.5.26 to 0.5.27
# node-pre-gyp changelog | ||
## 0.5.27 | ||
- Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo | ||
- Fixed support for installing when path contains a `'` - @halfdan | ||
- Ported tests to mocha | ||
## 0.5.26 | ||
@@ -4,0 +10,0 @@ |
@@ -20,3 +20,3 @@ module.exports = exports = testbinary | ||
var binary_module = opts.module.replace(/\\/g, '/'); | ||
var nw = (opts.runtime && opts.runtime === 'node-webkit'); | ||
var nw = (opts.runtime && opts.runtime === 'node-webkit'); | ||
if (nw) { | ||
@@ -64,3 +64,3 @@ options.timeout = 5000; | ||
args.push('--eval'); | ||
args.push("require('" + binary_module +"')"); | ||
args.push("require('" + binary_module.replace(/\'/g, '\\\'') +"')"); | ||
log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); | ||
@@ -67,0 +67,0 @@ cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) { |
@@ -74,5 +74,5 @@ | ||
}); | ||
cmd.on('close', function (err, stdout, stderr) { | ||
if (err) { | ||
return callback(new Error("Failed to execute '" + shell_cmd + ' ' + args.join(' ') + "' (" + err + ")")); | ||
cmd.on('close', function (code, signal) { | ||
if (code && code !== 0) { | ||
return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ")")); | ||
} | ||
@@ -79,0 +79,0 @@ callback(null,opts); |
@@ -6,11 +6,20 @@ | ||
var URI_REGEX="^(.*)\.(s3(?:-.*)?)\.amazonaws\.com$"; | ||
module.exports.detect = function(to,config) { | ||
var uri = url.parse(to); | ||
var url_paths = uri.hostname.split('.'); | ||
var hostname_matches = uri.hostname.match(URI_REGEX); | ||
config.prefix = (!uri.pathname || uri.pathname == '/') ? '' : uri.pathname.replace('/',''); | ||
if (!config.bucket && url_paths && url_paths[0]) { | ||
config.bucket = url_paths[0]; | ||
if(!hostname_matches) { | ||
return; | ||
} | ||
if (!config.region && url_paths && url_paths[1]) { | ||
var s3_domain = url_paths[1]; | ||
if (!config.bucket) { | ||
config.bucket = hostname_matches[1]; | ||
} | ||
if (!config.region) { | ||
var s3_domain = hostname_matches[2]; | ||
if (s3_domain.slice(0,3) == 's3-' && | ||
@@ -17,0 +26,0 @@ s3_domain.length >= 3) { |
{ | ||
"name": "node-pre-gyp", | ||
"description": "Node.js native addon binary install tool", | ||
"version" : "0.5.26", | ||
"version" : "0.5.27", | ||
"keywords": [ | ||
@@ -44,3 +44,4 @@ "native", | ||
"devDependencies": { | ||
"aws-sdk":"*" | ||
"aws-sdk":"*", | ||
"mocha": "1.x" | ||
}, | ||
@@ -53,4 +54,4 @@ "engineStrict": true, | ||
"update-crosswalk":"node scripts/abi_crosswalk.js > lib/util/abi_crosswalk.json", | ||
"test":"./test.sh" | ||
"test":"mocha -R spec --timeout 100000" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
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
3105914
57857
2
201