Socket
Socket
Sign inDemoInstall

node-gyp

Package Overview
Dependencies
90
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.0 to 9.1.0

test/fixtures/certs.js

2

docs/README.md

@@ -1,2 +0,2 @@

## Versions of `node-gyp` that are earlier than v8.x.x
## Versions of `node-gyp` that are earlier than v9.x.x

@@ -3,0 +3,0 @@ Please look thru your error log for the string `gyp info using node-gyp@` and if that version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using [these instructions](https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md) and then try your command again.

@@ -7,3 +7,3 @@ # Updating the npm-bundled version of node-gyp

[Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are
[Many issues](https://github.com/nodejs/node-gyp/issues?q=label%3A"ERR!+node-gyp+-v+<%3D+v9.x.x") are opened by users who are
not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).

@@ -10,0 +10,0 @@

@@ -188,2 +188,9 @@ 'use strict'

if (!win) {
// Add build-time dependency symlinks (such as Python) to PATH
const buildBinsDir = path.resolve('build', 'node_gyp_bins')
process.env.PATH = `${buildBinsDir}:${process.env.PATH}`
log.verbose('bin symlinks', `adding symlinks (such as Python), at "${buildBinsDir}", to PATH`)
}
var proc = gyp.spawn(command, argv)

@@ -190,0 +197,0 @@ proc.on('exit', onExit)

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

var buildDir = path.resolve('build')
var buildBinsDir = path.join(buildDir, 'node_gyp_bins')
var configNames = ['config.gypi', 'common.gypi']

@@ -77,3 +78,5 @@ var configs = []

log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
fs.mkdir(buildDir, { recursive: true }, function (err, isNew) {
const deepestBuildDirSubdirectory = win ? buildDir : buildBinsDir
fs.mkdir(deepestBuildDirSubdirectory, { recursive: true }, function (err, isNew) {
if (err) {

@@ -89,2 +92,3 @@ return callback(err)

} else {
createPythonSymlink()
createConfigFile()

@@ -95,2 +99,21 @@ }

function createPythonSymlink () {
const symlinkDestination = path.join(buildBinsDir, 'python3')
log.verbose('python symlink', `creating symlink to "${python}" at "${symlinkDestination}"`)
fs.unlink(symlinkDestination, function (err) {
if (err && err.code !== 'ENOENT') {
log.verbose('python symlink', 'error when attempting to remove existing symlink')
log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
}
fs.symlink(python, symlinkDestination, function (err) {
if (err) {
log.verbose('python symlink', 'error when attempting to create Python symlink')
log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
}
})
})
}
function createConfigFile (err, vsInfo) {

@@ -97,0 +120,0 @@ if (err) {

@@ -317,6 +317,7 @@ 'use strict'

const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'
const win11SDKPrefix = 'Microsoft.VisualStudio.Component.Windows11SDK.'
var Win10SDKVer = 0
var Win10or11SDKVer = 0
info.packages.forEach((pkg) => {
if (!pkg.startsWith(win10SDKPrefix)) {
if (!pkg.startsWith(win10SDKPrefix) && !pkg.startsWith(win11SDKPrefix)) {
return

@@ -326,3 +327,3 @@ }

if (parts.length > 5 && parts[5] !== 'Desktop') {
this.log.silly('- ignoring non-Desktop Win10SDK:', pkg)
this.log.silly('- ignoring non-Desktop Win10/11SDK:', pkg)
return

@@ -333,11 +334,11 @@ }

// Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb
this.log.silly('- failed to parse Win10SDK number:', pkg)
this.log.silly('- failed to parse Win10/11SDK number:', pkg)
return
}
this.log.silly('- found Win10SDK:', foundSdkVer)
Win10SDKVer = Math.max(Win10SDKVer, foundSdkVer)
this.log.silly('- found Win10/11SDK:', foundSdkVer)
Win10or11SDKVer = Math.max(Win10or11SDKVer, foundSdkVer)
})
if (Win10SDKVer !== 0) {
return `10.0.${Win10SDKVer}.0`
if (Win10or11SDKVer !== 0) {
return `10.0.${Win10or11SDKVer}.0`
} else if (info.packages.indexOf(win8SDK) !== -1) {

@@ -344,0 +345,0 @@ this.log.silly('- found Win8SDK')

@@ -40,3 +40,3 @@ # Installation notes for macOS Catalina (v10.15)

```
curl -sL https://github.com/nodejs/node-gyp/raw/master/macOS_Catalina_acid_test.sh | bash
curl -sL https://github.com/nodejs/node-gyp/raw/main/macOS_Catalina_acid_test.sh | bash
```

@@ -43,0 +43,0 @@

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

],
"version": "9.0.0",
"version": "9.1.0",
"installVersion": 9,

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

"lint": "standard */*.js test/**/*.js",
"test": "npm run lint && tap --timeout=120 test/test-*"
"test": "npm run lint && tap --timeout=600 test/test-*"
}
}

@@ -40,3 +40,3 @@ # `node-gyp` - Node.js native addon build tool

**ATTENTION**: If your Mac has been _upgraded_ to macOS Catalina (10.15), please read [macOS_Catalina.md](macOS_Catalina.md).
**ATTENTION**: If your Mac has been _upgraded_ to macOS Catalina (10.15) or higher, please read [macOS_Catalina.md](macOS_Catalina.md).

@@ -93,3 +93,3 @@ * Python v3.7, v3.8, v3.9, or v3.10

When building modules for thid party Node.js runtimes like Electron, which have
When building modules for third party Node.js runtimes like Electron, which have
different build configurations from the official Node.js distribution, you

@@ -96,0 +96,0 @@ should use `--dist-url` or `--nodedir` flags to specify the headers of the

@@ -17,3 +17,5 @@ 'use strict'

writeFile: function (file, data) { return Promise.resolve(null) }
}
},
unlink: function (path, cb) { cb() },
symlink: function (target, path, cb) { cb() }
}

@@ -20,0 +22,0 @@ })

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

const log = require('npmlog')
const certs = require('./fixtures/certs')

@@ -44,8 +45,8 @@ log.level = 'warn'

const cafile = path.join(__dirname, '/fixtures/ca.crt')
const [cert, key, ca] = await Promise.all([
fs.promises.readFile(path.join(__dirname, 'fixtures/server.crt'), 'utf8'),
fs.promises.readFile(path.join(__dirname, 'fixtures/server.key'), 'utf8'),
install.test.readCAFile(cafile)
])
const cafile = path.join(__dirname, 'fixtures/ca.crt')
const cacontents = certs['ca.crt']
const cert = certs['server.crt']
const key = certs['server.key']
await fs.promises.writeFile(cafile, cacontents, 'utf8')
const ca = await install.test.readCAFile(cafile)

@@ -60,3 +61,6 @@ t.strictEqual(ca.length, 1)

t.tearDown(() => new Promise((resolve) => server.close(resolve)))
t.tearDown(async () => {
await new Promise((resolve) => server.close(resolve))
await fs.promises.unlink(cafile)
})

@@ -156,2 +160,8 @@ server.on('clientError', (err) => { throw err })

test('check certificate splitting', async (t) => {
const cafile = path.join(__dirname, 'fixtures/ca-bundle.crt')
const cacontents = certs['ca-bundle.crt']
await fs.promises.writeFile(cafile, cacontents, 'utf8')
t.tearDown(async () => {
await fs.promises.unlink(cafile)
})
const cas = await install.test.readCAFile(path.join(__dirname, 'fixtures/ca-bundle.crt'))

@@ -158,0 +168,0 @@ t.plan(2)

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

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc