Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.2.6 to 0.3.0

CHANGELOG.md

11

lib/build.js

@@ -10,3 +10,9 @@

function build(gyp, argv, callback) {
var node_gyp_command = argv.length && argv[0] == 'rebuild' ? argv[0] : 'build';
var node_gyp_args = [];
if (argv.length && argv[0] == 'rebuild') {
node_gyp_args.push('rebuild');
} else {
node_gyp_args.push('configure');
node_gyp_args.push('build');
}
var package_json = JSON.parse(fs.readFileSync('./package.json'));

@@ -17,6 +23,5 @@ // options look different depending on whether node-pre-gyp is called directly

command_line_opts = command_line_opts.filter(function(opt) { return opt.length > 2 && opt.slice(0,2) == '--'});
var node_gyp_args = [node_gyp_command].concat(command_line_opts);
compile.run_gyp(node_gyp_args,gyp.opts,function(err,opts) {
compile.run_gyp(node_gyp_args.concat(command_line_opts),gyp.opts,function(err,opts) {
return callback(err);
});
}
module.exports = exports = clean
exports.usage = 'Removes any generated build files and the "out" dir'
exports.usage = 'Removes the generated .node module'
var rm = require('rimraf')
var log = require('npmlog')
var fs = require('fs')
, rm = require('rimraf')
, path = require('path')
, log = require('npmlog')
, versioning = require('./util/versioning.js')
function clean (gyp, argv, callback) {
// Remove the 'build' dir
var buildDir = 'build'
log.verbose('clean', 'removing "%s" directory', buildDir)
rm(buildDir, callback)
var package_json = JSON.parse(fs.readFileSync('./package.json'));
versioning.evaluate(package_json, gyp.opts, function(err,opts) {
if (err) return callback(err);
var to = package_json.binary.module_path;
var binary_module = path.join(to,opts.module_name + '.node');
console.log('Removing "%s"', binary_module)
rm(binary_module, callback);
});
}

@@ -27,2 +27,3 @@

'publish',
'testpackage'
]

@@ -29,0 +30,0 @@ , aliases = {

@@ -29,4 +29,4 @@

var filter_func = function (entry) {
return ((entry.type == 'Directory' && entry.basename == basedir) ||
path.extname(entry.basename) == '.node');
console.log('packing ' + entry.path);
return true;
}

@@ -33,0 +33,0 @@ mkdirp(path.dirname(tarball),function(err) {

{
"name": "node-pre-gyp",
"description": "Node.js native addon binary install tool",
"version": "0.2.6",
"version": "0.3.0",
"keywords": [

@@ -6,0 +6,0 @@ "native",

var path = require('path');
var pkg = require('./package.json');
var assert = require('assert');
var binding = './' + path.join(pkg.binary.module_path,pkg.binary.module_name + '.node');
var app = require(binding);
var module_path = path.join(
path.relative(__dirname,pkg.binary.module_path),
pkg.binary.module_name + '.node');
var app = require('./'+module_path);
assert.ok(app);

@@ -13,3 +13,3 @@ {

"module_name": "app1",
"module_path": "./build/Release",
"module_path": "./lib/binding/",
"remote_uri": "http://node-pre-gyp-tests.s3-us-west-1.amazonaws.com",

@@ -16,0 +16,0 @@ "template": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz"

var path = require('path');
var pkg = require('./package.json');
var assert = require('assert');
var binding = './' + path.join(pkg.binary.module_path,pkg.binary.module_name + '.node');
var app = require(binding);
var module_path = path.join(
path.relative(__dirname,pkg.binary.module_path),
pkg.binary.module_name + '.node');
var app = require('./'+module_path);
assert.ok(app);

@@ -13,3 +13,3 @@ {

"module_name": "app2",
"module_path": "./lib",
"module_path": "./lib/binding/",
"remote_uri": "http://node-pre-gyp-tests.s3-us-west-1.amazonaws.com",

@@ -16,0 +16,0 @@ "template": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz"

var path = require('path');
var pkg = require('./package.json');
var assert = require('assert');
var binding = './' + path.join(pkg.binary.module_path,pkg.binary.module_name + '.node');
var app = require(binding);
var module_path = path.join(
path.relative(__dirname,pkg.binary.module_path),
pkg.binary.module_name + '.node');
var app = require('./'+module_path);
assert.ok(app);
assert.equal(app.hello(),"hello");

@@ -13,3 +13,3 @@ {

"module_name": "app3",
"module_path": "./lib",
"module_path": "./lib/binding/",
"remote_uri": "http://node-pre-gyp-tests.s3-us-west-1.amazonaws.com",

@@ -16,0 +16,0 @@ "template": "{module_name}-v{major}.{minor}.{patch}-{prerelease}-{node_abi}-{platform}-{arch}.tar.gz"

var path = require('path');
var pkg = require('./package.json');
var assert = require('assert');
var binding = './' + path.join(pkg.binary.module_path,pkg.binary.module_name + '.node');
var app = require(binding);
var module_path = path.join(
path.relative(__dirname,pkg.binary.module_path),
pkg.binary.module_name + '.node');
var app = require('./'+module_path);
assert.ok(app);
assert.equal(app.hello(),"hello");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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