Socket
Socket
Sign inDemoInstall

node-gyp

Package Overview
Dependencies
Maintainers
4
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 5.0.7 to 5.1.0

.github/workflows/Python_tests.yml

18

CHANGELOG.md

@@ -0,1 +1,19 @@

v5.1.0 2020-02-05
=================
* [[`f37a8b40d0`](https://github.com/nodejs/node-gyp/commit/f37a8b40d0)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
* [[`cb3f6aae5e`](https://github.com/nodejs/node-gyp/commit/cb3f6aae5e)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
* [[`0607596a4c`](https://github.com/nodejs/node-gyp/commit/0607596a4c)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
* [[`0d5a415a14`](https://github.com/nodejs/node-gyp/commit/0d5a415a14)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
* [[`103740cd95`](https://github.com/nodejs/node-gyp/commit/103740cd95)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
* [[`278dcddbdd`](https://github.com/nodejs/node-gyp/commit/278dcddbdd)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018)
* [[`1694907bbf`](https://github.com/nodejs/node-gyp/commit/1694907bbf)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
* [[`a3f1143514`](https://github.com/nodejs/node-gyp/commit/a3f1143514)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
* [[`52365819c7`](https://github.com/nodejs/node-gyp/commit/52365819c7)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
* [[`bc509c511d`](https://github.com/nodejs/node-gyp/commit/bc509c511d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
* [[`91ee26dd48`](https://github.com/nodejs/node-gyp/commit/91ee26dd48)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
* [[`0923f344c9`](https://github.com/nodejs/node-gyp/commit/0923f344c9)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
* [[`32c8744b34`](https://github.com/nodejs/node-gyp/commit/32c8744b34)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
* [[`fd4b1351e4`](https://github.com/nodejs/node-gyp/commit/fd4b1351e4)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
v5.0.7 2019-12-16

@@ -2,0 +20,0 @@ =================

2

lib/find-python.js

@@ -229,3 +229,3 @@ 'use strict'

const range = semver.Range(this.semverRange)
const range = new semver.Range(this.semverRange)
var valid = false

@@ -232,0 +232,0 @@ try {

@@ -14,2 +14,3 @@ 'use strict'

const win = process.platform === 'win32'
const getProxyFromURI = require('./proxy')

@@ -414,6 +415,3 @@ function install (fs, gyp, argv, callback) {

// basic support for a proxy server
var proxyUrl = gyp.opts.proxy ||
env.http_proxy ||
env.HTTP_PROXY ||
env.npm_config_proxy
var proxyUrl = getProxyFromURI(gyp, env, url)
if (proxyUrl) {

@@ -420,0 +418,0 @@ if (/^https?:\/\//i.test(proxyUrl)) {

@@ -70,2 +70,3 @@ 'use strict'

proxy: String, // 'install'
noproxy: String, // 'install'
devdir: String, // everywhere

@@ -72,0 +73,0 @@ nodedir: String, // 'configure'

# Installation notes for macOS Catalina (v10.15)
_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or updated to deal with challenges involved in upgrades to the next version of macOS._
_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._
Lessons learned from:
* https://github.com/nodejs/node-gyp/issues/1779
* https://github.com/nodejs/node-gyp/issues/1861
* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
**Upgrading to macOS Catalina may cause normal `node-gyp` installations to fail.**
Installing `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
However, upgrading to macOS Catalina changes some settings that may cause normal `node-gyp` installations to fail.
### Is my Mac running macOS Catalina?
Let's make first make sure that your Mac is currently running Catalina:
% `sw_vers`
Let's first make sure that your Mac is running Catalina:
```
% sw_vers
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A602
```
If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
If `ProductVersion` is less then `10.15` then this document is not really for you.
### The acid test
Next, lets see if `Xcode Command Line Tools` are installed:
To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run:
1. `/usr/sbin/pkgutil --packages | grep CL`
* If nothing is listed, then [skip to the next section](#Two-roads).
* If `com.apple.pkg.CLTools_Executables` is listed then try:
* `com.apple.pkg.CLTools_Executables` should be listed. If it isn't, this test failed.
2. `/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables`
* If `version: 11.0.0` or later is listed then _you are done_! Your Mac should be ready to install `node-gyp`. Doing `clang -v` should show `Apple clang version 11.0.0` or later.
* `version: 11.0.0` (or later) should be listed. If it isn't, this test failed.
If both tests succeeded, _you are done_! You should be ready to install `node-gyp`.
As you go through the remainder of this document, at anytime you can try these `acid test` commands. If they pass then your Mac should be ready to install `node-gyp`.
If either test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
### Two roads
There are two main ways to install `node-gyp` on macOS:
### Solutions
There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable.
1. With the full Xcode (~7.6 GB download) from the `App Store` app.
2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`
3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.**

@@ -55,3 +53,3 @@ ### Installing `node-gyp` using the full Xcode

### Installing `node-gyp` using the Xcode Command Line Tools
### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install`
1. If the _acid test_ has not succeeded, then try `xcode-select --install`

@@ -68,2 +66,7 @@ 2. Wait until the install process is _complete_.

### Installing `node-gyp` using the Xcode Command Line Tools via manual download
1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from developer.apple.com/download. As of MacOS 10.15.2, that's Command_Line_Tools_for_Xcode_11.3.dmg
2. Install the package.
3. Run the _acid test_.
### I did all that and the acid test still does not pass :-(

@@ -77,1 +80,7 @@ 1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal.

7. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve.
Lessons learned from:
* https://github.com/nodejs/node-gyp/issues/1779
* https://github.com/nodejs/node-gyp/issues/1861
* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
* Thanks to @rrrix for discovering Solution 3

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

],
"version": "5.0.7",
"version": "5.1.0",
"installVersion": 9,

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

# `node-gyp` - Node.js native addon build tool
[![Travis CI](https://travis-ci.com/nodejs/node-gyp.svg?branch=master)](https://travis-ci.com/nodejs/node-gyp)
[![Build Status](https://github.com/nodejs/node-gyp/workflows/Python_tests/badge.svg)](https://github.com/nodejs/node-gyp/actions?workflow=Python_tests)
`node-gyp` is a cross-platform command-line tool written in Node.js for

@@ -17,3 +20,3 @@ compiling native addon modules for Node.js. It contains a fork of the

* The same build commands work on any of the supported platforms
* Supports the targetting of different versions of Node.js
* Supports the targeting of different versions of Node.js

@@ -195,3 +198,4 @@ ## Installation

| `--dist-url=$url` | Download header tarball from custom URL
| `--proxy=$url` | Set HTTP proxy for downloading header tarball
| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball
| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball
| `--cafile=$cafile` | Override default CA chain (to download tarball)

@@ -198,0 +202,0 @@ | `--nodedir=$path` | Set the path to the node source code

@@ -93,2 +93,97 @@ 'use strict'

test('download over http with proxy', function (t) {
t.plan(2)
var server = http.createServer(function (req, res) {
t.strictEqual(req.headers['user-agent'],
'node-gyp v42 (node ' + process.version + ')')
res.end('ok')
pserver.close(function () {
server.close()
})
})
var pserver = http.createServer(function (req, res) {
t.strictEqual(req.headers['user-agent'],
'node-gyp v42 (node ' + process.version + ')')
res.end('proxy ok')
server.close(function () {
pserver.close()
})
})
var host = 'localhost'
server.listen(0, host, function () {
var port = this.address().port
pserver.listen(port + 1, host, function () {
var gyp = {
opts: {
proxy: 'http://' + host + ':' + (port + 1)
},
version: '42'
}
var url = 'http://' + host + ':' + port
var req = install.test.download(gyp, {}, url)
req.on('response', function (res) {
var body = ''
res.setEncoding('utf8')
res.on('data', function (data) {
body += data
})
res.on('end', function () {
t.strictEqual(body, 'proxy ok')
})
})
})
})
})
test('download over http with noproxy', function (t) {
t.plan(2)
var server = http.createServer(function (req, res) {
t.strictEqual(req.headers['user-agent'],
'node-gyp v42 (node ' + process.version + ')')
res.end('ok')
pserver.close(function () {
server.close()
})
})
var pserver = http.createServer(function (req, res) {
t.strictEqual(req.headers['user-agent'],
'node-gyp v42 (node ' + process.version + ')')
res.end('proxy ok')
server.close(function () {
pserver.close()
})
})
var host = 'localhost'
server.listen(0, host, function () {
var port = this.address().port
pserver.listen(port + 1, host, function () {
var gyp = {
opts: {
proxy: 'http://' + host + ':' + (port + 1),
noproxy: 'localhost'
},
version: '42'
}
var url = 'http://' + host + ':' + port
var req = install.test.download(gyp, {}, url)
req.on('response', function (res) {
var body = ''
res.setEncoding('utf8')
res.on('data', function (data) {
body += data
})
res.on('end', function () {
t.strictEqual(body, 'ok')
})
})
})
})
})
test('download with missing cafile', function (t) {

@@ -120,3 +215,3 @@ t.plan(1)

semver.satisfies(process.version, '<10')) {
return t.skip('Skipping acutal download of headers due to test environment configuration')
return t.skip('Skipping actual download of headers due to test environment configuration')
}

@@ -123,0 +218,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