napi-build-utils
Advanced tools
Sorry, the diff of this file is not supported yet
+18
-11
@@ -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 |
+1
-1
| { | ||
| "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", |
-11
| language: node_js | ||
| os: | ||
| - linux | ||
| - osx | ||
| node_js: | ||
| - 10 | ||
| - 9 | ||
| - 8 | ||
| - 6 |
| { | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Mocha Tests", | ||
| "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
| "args": [ | ||
| "-u", | ||
| "tdd", | ||
| "--timeout", | ||
| "999999", | ||
| "--colors", | ||
| "${workspaceFolder}/test" | ||
| ], | ||
| "internalConsoleOptions": "openOnSessionStart" | ||
| }, | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Launch Program", | ||
| "program": "${workspaceFolder}/index.js" | ||
| } | ||
| ] | ||
| } |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
41857
161.67%6
-25%201
-9.87%