Socket
Socket
Sign inDemoInstall

node-pre-gyp

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pre-gyp - npm Package Compare versions

Comparing version 0.5.26 to 0.5.27

6

CHANGELOG.md
# 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 @@

4

lib/testbinary.js

@@ -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

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