From cfa53ee2b19ea0c4b3e97774e5a4e47fd1ed844e Mon Sep 17 00:00:00 2001 From: Sid <138317706+Sid-V5@users.noreply.github.com> Date: Mon, 16 Feb 2026 01:50:19 +0530 Subject: [PATCH 1/4] chore: fix JavaScript lint errors (issue #10000) Replace undefined `proc` references with `process` in module-scoped callback functions. The `proc` variable is only declared inside the `plugin()` function scope, but the callbacks `onError`, `onFinish`, `stdout`, and `stderr` are defined at module scope and need to access the Node.js global `process` object for exitCode and stdio streams. --- .../makie/plugins/makie-install-node-addons/lib/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js index 3f03cdd66510..dc5a7b431078 100644 --- a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js @@ -32,7 +32,7 @@ var spawn = require( 'child_process' ).spawn; * @param {Error} error - error object */ function onError( error ) { - proc.exitCode = 1; + process.exitCode = 1; console.error( 'Error: %s', error.message ); // eslint-disable-line no-console } @@ -45,7 +45,7 @@ function onError( error ) { */ function onFinish( code ) { if ( code !== 0 ) { - proc.exitCode = code; + process.exitCode = code; return console.error( 'Child process exited with code `'+code + '`.' ); // eslint-disable-line no-console } } @@ -57,7 +57,7 @@ function onFinish( code ) { * @param {Buffer} data - standard output */ function stdout( data ) { - proc.stdout.write( data ); + process.stdout.write( data ); } /** @@ -67,7 +67,7 @@ function stdout( data ) { * @param {Buffer} data - standard error */ function stderr( data ) { - proc.stderr.write( data ); + process.stderr.write( data ); } From 5c14181dd34a217790109cd4be0c697e9bdf7aef Mon Sep 17 00:00:00 2001 From: Sid <138317706+Sid-V5@users.noreply.github.com> Date: Tue, 17 Feb 2026 00:15:15 +0530 Subject: [PATCH 2/4] fix: usage of `require( 'process' )` instead of global `process` Reverts changes to use global `process` and instead imports `process` as `proc` to maintain consistency with other makie plugins. Also renames local `proc` variable in `plugin` function to `child` to avoid shadowing the module-level `proc` variable. --- .../makie-install-node-addons/lib/main.js | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js index dc5a7b431078..7c000bc693df 100644 --- a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js @@ -4,7 +4,7 @@ * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. +* you may not use this file except in compliance with the License.\ * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 @@ -14,12 +14,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ +*/\ 'use strict'; // MODULES // +var proc = require( 'process' ); var spawn = require( 'child_process' ).spawn; @@ -32,7 +33,7 @@ var spawn = require( 'child_process' ).spawn; * @param {Error} error - error object */ function onError( error ) { - process.exitCode = 1; + proc.exitCode = 1; console.error( 'Error: %s', error.message ); // eslint-disable-line no-console } @@ -45,7 +46,7 @@ function onError( error ) { */ function onFinish( code ) { if ( code !== 0 ) { - process.exitCode = code; + proc.exitCode = code; return console.error( 'Child process exited with code `'+code + '`.' ); // eslint-disable-line no-console } } @@ -57,17 +58,17 @@ function onFinish( code ) { * @param {Buffer} data - standard output */ function stdout( data ) { - process.stdout.write( data ); + proc.stdout.write( data ); } /** -* Callback invoked upon receiving data from `stderr`. +* Callback invoked upon receiving data from `stderr`.\ * * @private * @param {Buffer} data - standard error */ function stderr( data ) { - process.stderr.write( data ); + proc.stderr.write( data ); } @@ -83,7 +84,7 @@ function stderr( data ) { function plugin( dir, cwd, subpath ) { var opts; var args; - var proc; + var child; opts = {}; opts.cwd = dir; @@ -98,11 +99,11 @@ function plugin( dir, cwd, subpath ) { // Target: args.push( 'install-node-addons' ); - proc = spawn( 'make', args, opts ); - proc.on( 'error', onError ); - proc.stdout.on( 'data', stdout ); - proc.stderr.on( 'data', stderr ); - proc.on( 'close', onFinish ); + child = spawn( 'make', args, opts ); + child.on( 'error', onError ); + child.stdout.on( 'data', stdout ); + child.stderr.on( 'data', stderr ); + child.on( 'close', onFinish ); } From 36b195b7709e0958b564ed396e56b094b2faa99c Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 16 Feb 2026 12:52:39 -0600 Subject: [PATCH 3/4] chore: remove extra backslashes Signed-off-by: Philipp Burckhardt --- .../makie/plugins/makie-install-node-addons/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js index 7c000bc693df..1e8e8b5b4a96 100644 --- a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js @@ -4,7 +4,7 @@ * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License.\ +* you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 @@ -14,7 +14,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/\ +*/ 'use strict'; From c26aab0036ca705fa56edd981ab2c8a43b79191d Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Mon, 16 Feb 2026 12:54:38 -0600 Subject: [PATCH 4/4] chore: minor clean-up Signed-off-by: Philipp Burckhardt --- .../makie/plugins/makie-install-node-addons/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js index 1e8e8b5b4a96..394c96d0036b 100644 --- a/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/makie/plugins/makie-install-node-addons/lib/main.js @@ -62,7 +62,7 @@ function stdout( data ) { } /** -* Callback invoked upon receiving data from `stderr`.\ +* Callback invoked upon receiving data from `stderr`. * * @private * @param {Buffer} data - standard error @@ -82,9 +82,9 @@ function stderr( data ) { * @param {string} subpath - subdirectory path */ function plugin( dir, cwd, subpath ) { + var child; var opts; var args; - var child; opts = {}; opts.cwd = dir;