Socket
Socket
Sign inDemoInstall

node-gyp

Package Overview
Dependencies
Maintainers
6
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gyp - npm Package Compare versions

Comparing version 3.3.1 to 3.4.0

src/win_delay_load_hook.cc

24

CHANGELOG.md

@@ -0,1 +1,25 @@

v3.4.0 2016-06-28
* [[`ce5fd04e94`](https://github.com/nodejs/node-gyp/commit/ce5fd04e94)] - **deps**: update minimatch version (delphiactual) [#961](https://github.com/nodejs/node-gyp/pull/961)
* [[`77383ddd85`](https://github.com/nodejs/node-gyp/commit/77383ddd85)] - Replace fs.accessSync call to fs.statSync (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
* [[`0dba4bda57`](https://github.com/nodejs/node-gyp/commit/0dba4bda57)] - **test**: add simple addon test (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
* [[`c4344b3889`](https://github.com/nodejs/node-gyp/commit/c4344b3889)] - **doc**: add --target option to README (Gibson Fahnestock) [#958](https://github.com/nodejs/node-gyp/pull/958)
* [[`cc778e9215`](https://github.com/nodejs/node-gyp/commit/cc778e9215)] - Override BUILDING_UV_SHARED, BUILDING_V8_SHARED. (Ben Noordhuis) [#915](https://github.com/nodejs/node-gyp/pull/915)
* [[`af35b2ad32`](https://github.com/nodejs/node-gyp/commit/af35b2ad32)] - Move VC++ Build Tools to Build Tools landing page. (Andrew Pardoe) [#953](https://github.com/nodejs/node-gyp/pull/953)
* [[`f31482e226`](https://github.com/nodejs/node-gyp/commit/f31482e226)] - **win**: work around __pfnDliNotifyHook2 type change (Alexis Campailla) [#952](https://github.com/nodejs/node-gyp/pull/952)
* [[`3df8222fa5`](https://github.com/nodejs/node-gyp/commit/3df8222fa5)] - Allow for npmlog@3.x (Rebecca Turner) [#950](https://github.com/nodejs/node-gyp/pull/950)
* [[`a4fa07b390`](https://github.com/nodejs/node-gyp/commit/a4fa07b390)] - More verbose error on locating msbuild.exe failure. (Mateusz Jaworski) [#930](https://github.com/nodejs/node-gyp/pull/930)
* [[`4ee31329e0`](https://github.com/nodejs/node-gyp/commit/4ee31329e0)] - **doc**: add command options to README.md (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
* [[`c8c7ca86b9`](https://github.com/nodejs/node-gyp/commit/c8c7ca86b9)] - Add --silent option for zero output. (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
* [[`ac29d23a7c`](https://github.com/nodejs/node-gyp/commit/ac29d23a7c)] - Upgrade to glob@7.0.3. (Ben Noordhuis) [#943](https://github.com/nodejs/node-gyp/pull/943)
* [[`15fd56be3d`](https://github.com/nodejs/node-gyp/commit/15fd56be3d)] - Enable V8 deprecation warnings for native modules (Matt Loring) [#920](https://github.com/nodejs/node-gyp/pull/920)
* [[`7f1c1b960c`](https://github.com/nodejs/node-gyp/commit/7f1c1b960c)] - **gyp**: improvements for android generator (Robert Chiras) [#935](https://github.com/nodejs/node-gyp/pull/935)
* [[`088082766c`](https://github.com/nodejs/node-gyp/commit/088082766c)] - Update Windows install instructions (Sara Itani) [#867](https://github.com/nodejs/node-gyp/pull/867)
* [[`625c1515f9`](https://github.com/nodejs/node-gyp/commit/625c1515f9)] - **gyp**: inherit CC/CXX for CC/CXX.host (Johan Bergström) [#908](https://github.com/nodejs/node-gyp/pull/908)
* [[`3bcb1720e4`](https://github.com/nodejs/node-gyp/commit/3bcb1720e4)] - Add support for the Python launcher on Windows (Patrick Westerhoff) [#894](https://github.com/nodejs/node-gyp/pull/894
v3.3.1 2016-03-04
* [[`a981ef847a`](https://github.com/nodejs/node-gyp/commit/a981ef847a)] - **gyp**: fix android generator (Robert Chiras) [#889](https://github.com/nodejs/node-gyp/pull/889)
v3.3.0 2016-02-16

@@ -2,0 +26,0 @@

12

lib/build.js

@@ -128,3 +128,3 @@

log.verbose('could not find "msbuild.exe" in PATH - finding location in registry')
var notfoundErr = new Error('Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?')
var notfoundErr = 'Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?'
var cmd = 'reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s'

@@ -134,2 +134,5 @@ if (process.arch !== 'ia32')

exec(cmd, function (err, stdout, stderr) {
if (err) {
return callback(new Error(err.message + '\n' + notfoundErr))
}
var reVers = /ToolsVersions\\([^\\]+)$/i

@@ -140,5 +143,2 @@ , rePath = /\r\n[ \t]+MSBuildToolsPath[ \t]+REG_SZ[ \t]+([^\r]+)/i

, msbuildPath
if (err) {
return callback(notfoundErr)
}
stdout.split('\r\n\r\n').forEach(function(l) {

@@ -163,3 +163,3 @@ if (!l) return

;(function verifyMsbuild () {
if (!msbuilds.length) return callback(notfoundErr)
if (!msbuilds.length) return callback(new Error(notfoundErr))
msbuildPath = path.resolve(msbuilds.pop().path, 'msbuild.exe')

@@ -172,3 +172,3 @@ fs.stat(msbuildPath, function (err, stat) {

} else {
callback(notfoundErr)
callback(new Error(notfoundErr))
}

@@ -175,0 +175,0 @@ } else {

module.exports = exports = configure
module.exports.test = { findPython: findPython }
module.exports.test = { findAccessibleSync: findAccessibleSync,
findPython: findPython }

@@ -10,3 +11,2 @@ /**

, path = require('path')
, glob = require('glob')
, log = require('npmlog')

@@ -25,2 +25,3 @@ , osenv = require('osenv')

, findNodeDirectory = require('./find-node-directory')
, msgFormat = require('util').format

@@ -232,3 +233,3 @@ exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'

// - the root directory
var node_exp_file = ''
var node_exp_file = undefined
if (process.platform === 'aix') {

@@ -240,11 +241,10 @@ var node_root_dir = findNodeDirectory()

'node.exp']
for (var next = 0; next < candidates.length; next++) {
node_exp_file = path.resolve(node_root_dir, candidates[next])
try {
fs.accessSync(node_exp_file, fs.R_OK)
// exp file found, stop looking
break
} catch (exception) {
// this candidate was not found or not readable, do nothing
}
var logprefix = 'find exports file'
node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates)
if (node_exp_file !== undefined) {
log.verbose(logprefix, 'Found exports file: %s', node_exp_file)
} else {
var msg = msgFormat('Could not find node.exp file in %s', node_root_dir)
log.error(logprefix, 'Could not find exports file')
return callback(new Error(msg))
}

@@ -318,2 +318,25 @@ }

/**
* Returns the first file or directory from an array of candidates that is
* readable by the current user, or undefined if none of the candidates are
* readable.
*/
function findAccessibleSync (logprefix, dir, candidates) {
for (var next = 0; next < candidates.length; next++) {
var candidate = path.resolve(dir, candidates[next])
try {
var fd = fs.openSync(candidate, 'r')
} catch (e) {
// this candidate was not found or not readable, do nothing
log.silly(logprefix, 'Could not open %s: %s', candidate, e.message)
continue
}
fs.closeSync(fd)
log.silly(logprefix, 'Found readable %s', candidate)
return candidate
}
return undefined
}
function findPython (python, callback) {

@@ -333,3 +356,3 @@ checkPython()

if (win) {
guessPython()
checkPythonLauncher()
} else {

@@ -349,2 +372,27 @@ failNoPython()

// Distributions of Python on Windows by default install with the "py.exe"
// Python launcher which is more likely to exist than the Python executable
// being in the $PATH.
// Because the Python launcher supports all versions of Python, we have to
// explicitly request a Python 2 version. This is done by supplying "-2" as
// the first command line argument. Since "py.exe -2" would be an invalid
// executable for "execFile", we have to use the launcher to figure out
// where the actual "python.exe" executable is located.
function checkPythonLauncher () {
log.verbose('could not find "' + python + '". checking python launcher')
var env = extend({}, process.env)
env.TERM = 'dumb'
var launcherArgs = ['-2', '-c', 'import sys; print sys.executable']
execFile('py.exe', launcherArgs, { env: env }, function (err, stdout) {
if (err) {
guessPython()
return
}
python = stdout.trim()
log.verbose('check python launcher', 'python executable found: %j', python)
checkPythonVersion()
})
}
// Called on Windows when "python" isn't available in the current $PATH.

@@ -351,0 +399,0 @@ // We're gonna check if "%SystemDrive%\python27\python.exe" exists.

@@ -115,2 +115,3 @@

, verbose: '--loglevel=verbose'
, silent: '--loglevel=silent'
}

@@ -117,0 +118,0 @@

@@ -14,3 +14,3 @@ {

],
"version": "3.3.1",
"version": "3.4.0",
"installVersion": 9,

@@ -27,8 +27,8 @@ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",

"fstream": "^1.0.0",
"glob": "3 || 4",
"glob": "^7.0.3",
"graceful-fs": "^4.1.2",
"minimatch": "1",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.0",
"nopt": "2 || 3",
"npmlog": "0 || 1 || 2",
"npmlog": "0 || 1 || 2 || 3",
"osenv": "0",

@@ -46,3 +46,6 @@ "path-array": "^1.0.0",

"devDependencies": {
"tape": "~4.2.0"
"tape": "~4.2.0",
"bindings": "~1.2.1",
"nan": "^2.0.0",
"require-inject": "~1.3.0"
},

@@ -49,0 +52,0 @@ "scripts": {

@@ -13,5 +13,5 @@ node-gyp

Multiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`,
Multiple target versions of node are supported (i.e. `0.8`, ..., `4`, `5`, `6`,
etc.), regardless of what version of node is actually installed on your system
(`node-gyp` downloads the necessary development files for the target version).
(`node-gyp` downloads the necessary development files or headers for the target version).

@@ -46,27 +46,14 @@ #### Features:

* On Windows:
* Python ([`v2.7.10`][python-v2.7.10] recommended, `v3.x.x` is __*not*__ supported)
* Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder
* Windows XP/Vista/7:
* Microsoft Visual Studio C++ 2013 ([Express][msvc2013] version works well)
* If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first
* If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]
* Windows 7/8:
* Microsoft Visual Studio C++ 2013 for Windows Desktop ([Express][msvc2013] version works well)
* Windows 10:
* Install the latest version of npm (3.3.6 at the time of writing)
* Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path
* Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation)
* Set the environment variable GYP_MSVS_VERSION=2015
* Run the command prompt as Administrator
* $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env
* If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough
* All Windows Versions
* For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]
* You may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK:
* Visual C++ Build Environment:
* Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
```
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64
```
* Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
* Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
* Launch cmd, `npm config set msvs_version 2015`
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
If you have multiple Python versions installed, you can identify which Python

@@ -162,2 +149,3 @@ version `node-gyp` uses by setting the '--python' variable:

|:--------------|:---------------------------------------------------------------
| `help` | Shows the help dialog
| `build` | Invokes `make`/`msbuild.exe` and builds the native addon

@@ -167,7 +155,36 @@ | `clean` | Removes the `build` directory if it exists

| `rebuild` | Runs `clean`, `configure` and `build` all in a row
| `install` | Installs node development header files for the given version
| `list` | Lists the currently installed node development file versions
| `remove` | Removes the node development header files for the given version
| `install` | Installs node header files for the given version
| `list` | Lists the currently installed node header versions
| `remove` | Removes the node header files for the given version
Command Options
--------
`node-gyp` accepts the following command options:
| **Command** | **Description**
|:----------------------------------|:------------------------------------------
| `-j n`, `--jobs n` | Run make in parallel
| `--target=v6.2.1` | Node version to build for (default=process.version)
| `--silly`, `--loglevel=silly` | Log all progress to console
| `--verbose`, `--loglevel=verbose` | Log most progress to console
| `--silent`, `--loglevel=silent` | Don't log anything to console
| `debug`, `--debug` | Make Debug build (default=Release)
| `--release`, `--no-debug` | Make Release build
| `-C $dir`, `--directory=$dir` | Run command in different directory
| `--make=$make` | Override make command (e.g. gmake)
| `--thin=yes` | Enable thin static libraries
| `--arch=$arch` | Set target architecture (e.g. ia32)
| `--tarball=$path` | Get headers from a local tarball
| `--ensure` | Don't reinstall headers if already present
| `--dist-url=$url` | Download header tarball from custom URL
| `--proxy=$url` | Set HTTP proxy for downloading header tarball
| `--cafile=$cafile` | Override default CA chain (to download tarball)
| `--nodedir=$path` | Set the path to the node binary
| `--python=$path` | Set path to the python (2) binary
| `--msvs_version=$version` | Set Visual Studio version (win)
| `--solution=$solution` | Set Visual Studio Solution version (win)
License

@@ -174,0 +191,0 @@ -------

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