napi-build-utils
Advanced tools
Comparing version 1.0.0 to 1.0.1
29
index.js
@@ -116,12 +116,17 @@ 'use strict' | ||
exports.logMissingNapiVersions = function (target, prebuild, log) { | ||
var targets = [].concat(target) | ||
targets.forEach(function (napiVersion) { | ||
if (!prebuildExists(prebuild, napiVersion)) { | ||
if (exports.packageSupportsVersion(parseInt(napiVersion, 10))) { | ||
log.warn('This Node instance does not support N-API version ' + napiVersion) | ||
} else { | ||
log.warn('This package does not support N-API version ' + napiVersion) | ||
if (exports.getNapiBuildVersions()) { | ||
var targets = [].concat(target) | ||
targets.forEach(function (napiVersion) { | ||
if (!prebuildExists(prebuild, napiVersion)) { | ||
if (exports.packageSupportsVersion(parseInt(napiVersion, 10))) { | ||
log.warn('This Node instance does not support N-API version ' + napiVersion) | ||
} else { | ||
log.warn('This package does not support N-API version ' + napiVersion) | ||
} | ||
} | ||
} | ||
}) | ||
}) | ||
} else { | ||
log.error('Builds with runtime \'napi\' require a binary.napi_versions ' + | ||
'property on the package.json file') | ||
} | ||
} | ||
@@ -142,4 +147,6 @@ | ||
var prebuildExists = function (prebuild, napiVersion) { | ||
for (var i = 0; i < prebuild.length; i++) { | ||
if (prebuild[i].target === napiVersion) return true | ||
if (prebuild) { | ||
for (var i = 0; i < prebuild.length; i++) { | ||
if (prebuild[i].target === napiVersion) return true | ||
} | ||
} | ||
@@ -146,0 +153,0 @@ return false |
{ | ||
"name": "napi-build-utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A set of utilities to assist developers of tools that build N-API native add-ons", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
41857
6
201