From a79f703d3f5b76510cd79c5c05df89357f1cda9c Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 2 May 2024 16:12:33 +0200 Subject: [PATCH 1/6] no need to test on 8 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc7c68f..5435d6e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - node: [8, 16, 18, 20] + node: [16, 18, 20] runs-on: ${{ matrix.os }} name: ${{ matrix.os }} / Node ${{ matrix.node }} steps: From 692860ef14f635cd9ab2cf06e879e964ec42deec Mon Sep 17 00:00:00 2001 From: Artem Derevnjuk Date: Thu, 2 May 2024 18:14:59 +0400 Subject: [PATCH 2/6] fix spawn EINVAL error (#69) fixes #68 --- bin.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin.js b/bin.js index 3fbcdf0..7ca3ab5 100755 --- a/bin.js +++ b/bin.js @@ -16,7 +16,8 @@ if (!buildFromSource()) { } function build () { - var args = [os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] + var win32 = os.platform() === 'win32' + var args = [win32 ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] try { var pkg = require('node-gyp/package.json') @@ -27,7 +28,7 @@ function build () { ] } catch (_) {} - proc.spawn(args[0], args.slice(1), { stdio: 'inherit' }).on('exit', function (code) { + proc.spawn(args[0], args.slice(1), { stdio: 'inherit', shell: win32, windowsHide: true }).on('exit', function (code) { if (code || !process.argv[3]) process.exit(code) exec(process.argv[3]).on('exit', function (code) { process.exit(code) @@ -45,15 +46,18 @@ function preinstall () { function exec (cmd) { if (process.platform !== 'win32') { - var shell = os.platform() === 'android' ? 'sh' : '/bin/sh' - return proc.spawn(shell, ['-c', '--', cmd], { + var shell = os.platform() === 'android' ? 'sh' : true + return proc.spawn(cmd, [], { + shell, stdio: 'inherit' }) } - return proc.spawn(process.env.comspec || 'cmd.exe', ['/s', '/c', '"' + cmd + '"'], { + return proc.spawn(cmd, [], { windowsVerbatimArguments: true, - stdio: 'inherit' + stdio: 'inherit', + shell: true, + windowsHide: true }) } From 86e2e0e440632eb259ea4eec23cc00b364cc001c Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 2 May 2024 16:17:27 +0200 Subject: [PATCH 3/6] 4.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86319f3..ab2df7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-gyp-build", - "version": "4.8.0", + "version": "4.8.1", "description": "Build tool and bindings loader for node-gyp that supports prebuilds", "main": "index.js", "devDependencies": { From 464e3881600de2107f35fd1c55afff232a768123 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 14 Jun 2024 09:52:50 +0200 Subject: [PATCH 4/6] Create SECURITY.md --- SECURITY.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..da9c516 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. From a428be4b7e02b6880fee6d3c8fd84033bbc82796 Mon Sep 17 00:00:00 2001 From: Chris Barber Date: Wed, 28 Aug 2024 08:06:45 -0500 Subject: [PATCH 5/6] fix windows spawn shell (#72) fixes #71 --- bin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin.js b/bin.js index 7ca3ab5..c778e0a 100755 --- a/bin.js +++ b/bin.js @@ -17,6 +17,7 @@ if (!buildFromSource()) { function build () { var win32 = os.platform() === 'win32' + var shell = win32 var args = [win32 ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] try { @@ -26,9 +27,10 @@ function build () { path.join(require.resolve('node-gyp/package.json'), '..', typeof pkg.bin === 'string' ? pkg.bin : pkg.bin['node-gyp']), 'rebuild' ] + shell = false } catch (_) {} - proc.spawn(args[0], args.slice(1), { stdio: 'inherit', shell: win32, windowsHide: true }).on('exit', function (code) { + proc.spawn(args[0], args.slice(1), { stdio: 'inherit', shell, windowsHide: true }).on('exit', function (code) { if (code || !process.argv[3]) process.exit(code) exec(process.argv[3]).on('exit', function (code) { process.exit(code) From 2c8bd26db01a6397a68ba29201b165042c51e1c0 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Wed, 28 Aug 2024 15:07:23 +0200 Subject: [PATCH 6/6] 4.8.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ab2df7b..b8c4442 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-gyp-build", - "version": "4.8.1", + "version": "4.8.2", "description": "Build tool and bindings loader for node-gyp that supports prebuilds", "main": "index.js", "devDependencies": {