Socket
Socket
Sign inDemoInstall

node-gyp-build

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gyp-build - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

20

index.js

@@ -39,9 +39,8 @@ var fs = require('fs')

// Find most specific flavor first
var prebuilds = path.join(dir, 'prebuilds', platform + '-' + arch)
var parsed = readdirSync(prebuilds).map(parseTags)
var candidates = parsed.filter(matchTags(runtime, abi))
var winner = candidates.sort(compareTags(runtime))[0]
if (winner) return path.join(prebuilds, winner.file)
var prebuild = resolve(dir)
if (prebuild) return prebuild
var nearby = resolve(path.dirname(process.execPath))
if (nearby) return nearby
var target = [

@@ -58,2 +57,11 @@ 'platform=' + platform,

throw new Error('No native build was found for ' + target)
function resolve (dir) {
// Find most specific flavor first
var prebuilds = path.join(dir, 'prebuilds', platform + '-' + arch)
var parsed = readdirSync(prebuilds).map(parseTags)
var candidates = parsed.filter(matchTags(runtime, abi))
var winner = candidates.sort(compareTags(runtime))[0]
if (winner) return path.join(prebuilds, winner.file)
}
}

@@ -60,0 +68,0 @@

{
"name": "node-gyp-build",
"version": "4.1.1",
"version": "4.2.0",
"description": "Build tool and bindings loader for node-gyp that supports prebuilds",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,2 +43,4 @@ # node-gyp-build

Prebuilds will be attempted loaded from `MODULE_PATH/prebuilds/...` and then next `EXEC_PATH/prebuilds/...` (the latter allowing use with `zeit/pkg`)
## Supported prebuild names

@@ -45,0 +47,0 @@

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