From 9c631052cc458ffb1178c001f52403882152c60b Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 16:25:19 +0530 Subject: [PATCH 1/7] chore: fix JavaScript lint errors (issue #9812) --- .../special/besselj1-by/test/test.main.js | 6 +- .../examples/addon-napi-polymorphic/index.js | 95 ++++++++++--------- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js index 8607bbb9c32f..33fc3f324a41 100644 --- a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js @@ -74,7 +74,8 @@ tape( 'the function computes the Bessel function of the first kind of order one besselj1By( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 5; // sparse array y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -82,7 +83,8 @@ tape( 'the function computes the Bessel function of the first kind of order one besselj1By( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 5; // sparse array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index ff6a86a85ddb..f0709d4402f3 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -1,66 +1,73 @@ /** -* @license Apache-2.0 -* -* Copyright (c) 2020 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 obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* 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. -*/ + * @license Apache-2.0 + * + * Copyright (c) 2020 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 obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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'; +"use strict"; -var join = require( 'path' ).join; -var tryRequire = require( '@stdlib/utils/try-require' ); -var Float64Array = require( '@stdlib/array/float64' ); -var Float32Array = require( '@stdlib/array/float32' ); +var Float64Array = require("@stdlib/array/float64"); +var Float32Array = require("@stdlib/array/float32"); +var add; // Try loading the add-on: -var add = tryRequire( join( __dirname, 'addon.node' ) ); - +try { + add = require("./addon.node"); +} catch (err) { + add = err; +} /** -* Main execution sequence. -* -* @private -*/ + * Main execution sequence. + * + * @private + */ function main() { var x; var y; var z; - x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] ); - y = new Float64Array( [ 5.0, 6.0, 7.0, 8.0, 9.0 ] ); - z = new Float64Array( x.length ); + x = new Float64Array([0.0, 1.0, 2.0, 3.0, 4.0]); + y = new Float64Array([5.0, 6.0, 7.0, 8.0, 9.0]); + z = new Float64Array(x.length); - add( 5, x, 1, y, 1, z, 1 ); + add(5, x, 1, y, 1, z, 1); - console.log( '' ); - console.log( 'Float64:' ); - console.log( z ); - console.log( '' ); + console.log(""); + console.log("Float64:"); + console.log(z); + console.log(""); - x = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] ); - y = new Float32Array( [ 5.0, 6.0, 7.0, 8.0, 9.0 ] ); - z = new Float32Array( x.length ); + x = new Float32Array([0.0, 1.0, 2.0, 3.0, 4.0]); + y = new Float32Array([5.0, 6.0, 7.0, 8.0, 9.0]); + z = new Float32Array(x.length); - add( 5, x, 1, y, 1, z, 1 ); + add(5, x, 1, y, 1, z, 1); - console.log( 'Float32:' ); - console.log( z ); - console.log( '' ); + console.log("Float32:"); + console.log(z); + console.log(""); } -if ( add instanceof Error ) { +if (add instanceof Error) { // Example compile command: /path/to/stdlib/node_modules/.bin/node-gyp rebuild - console.error( 'Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n', __dirname, '/path/to/node-gyp rebuild', add.message ); + console.error( + "Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n", + __dirname, + "/path/to/node-gyp rebuild", + add.message, + ); } else { main(); } From bdf8f38925c311cab2d3f575e1b2e58254384e1e Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 16:50:39 +0530 Subject: [PATCH 2/7] fix: remove invalid trailing comma in addon example --- .../strided/common/examples/addon-napi-polymorphic/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index f0709d4402f3..f41b177123e3 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -66,7 +66,7 @@ if (add instanceof Error) { "Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n", __dirname, "/path/to/node-gyp rebuild", - add.message, + add.message ); } else { main(); From 798023a17d98ccbdda746023f34bab742caeecaa Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 17:01:53 +0530 Subject: [PATCH 3/7] chore: fix addon example lint and license issues --- .../common/examples/addon-napi-polymorphic/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index f41b177123e3..ffa9ef80cb78 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -16,15 +16,16 @@ * limitations under the License. */ -"use strict"; +'use strict'; -var Float64Array = require("@stdlib/array/float64"); -var Float32Array = require("@stdlib/array/float32"); +var Float64Array = require( '@stdlib/array/float64' ); +var Float32Array = require( '@stdlib/array/float32' ); var add; + // Try loading the add-on: try { - add = require("./addon.node"); + add = require( './addon.node' ); } catch (err) { add = err; } From 8aad6876a31c57aa72bfd096ce0c0b584c675cfd Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 17:05:34 +0530 Subject: [PATCH 4/7] chore: fix addon example lint and license issues --- .../examples/addon-napi-polymorphic/index.js | 92 +++++++++---------- 1 file changed, 42 insertions(+), 50 deletions(-) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index ffa9ef80cb78..8472166a1ec3 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -1,74 +1,66 @@ /** - * @license Apache-2.0 - * - * Copyright (c) 2020 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 obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ +* @license Apache-2.0 +* +* Copyright (c) 2020 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 obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* 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'; +var join = require( 'path' ).join; +var tryRequire = require( '@stdlib/utils/try-require' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); -var add; - // Try loading the add-on: -try { - add = require( './addon.node' ); -} catch (err) { - add = err; -} +var add = tryRequire( join( __dirname, 'addon.node' ) ); + /** - * Main execution sequence. - * - * @private - */ +* Main execution sequence. +* +* @private +*/ function main() { var x; var y; var z; - x = new Float64Array([0.0, 1.0, 2.0, 3.0, 4.0]); - y = new Float64Array([5.0, 6.0, 7.0, 8.0, 9.0]); - z = new Float64Array(x.length); + x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] ); + y = new Float64Array( [ 5.0, 6.0, 7.0, 8.0, 9.0 ] ); + z = new Float64Array( x.length ); - add(5, x, 1, y, 1, z, 1); + add( 5, x, 1, y, 1, z, 1 ); - console.log(""); - console.log("Float64:"); - console.log(z); - console.log(""); + console.log( '' ); + console.log( 'Float64:' ); + console.log( z ); + console.log( '' ); - x = new Float32Array([0.0, 1.0, 2.0, 3.0, 4.0]); - y = new Float32Array([5.0, 6.0, 7.0, 8.0, 9.0]); - z = new Float32Array(x.length); + x = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] ); + y = new Float32Array( [ 5.0, 6.0, 7.0, 8.0, 9.0 ] ); + z = new Float32Array( x.length ); - add(5, x, 1, y, 1, z, 1); + add( 5, x, 1, y, 1, z, 1 ); - console.log("Float32:"); - console.log(z); - console.log(""); + console.log( 'Float32:' ); + console.log( z ); + console.log( '' ); } -if (add instanceof Error) { +if ( add instanceof Error ) { // Example compile command: /path/to/stdlib/node_modules/.bin/node-gyp rebuild - console.error( - "Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n", - __dirname, - "/path/to/node-gyp rebuild", - add.message - ); + console.error( 'Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n', __dirname, '/path/to/node-gyp rebuild', add.message ); } else { main(); -} +} \ No newline at end of file From 76965109e835e2ee6f6373faea11ab63b8283ca0 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 17:09:05 +0530 Subject: [PATCH 5/7] chore: fix addon example lint and license issues --- .../strided/common/examples/addon-napi-polymorphic/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index 8472166a1ec3..ff6a86a85ddb 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -63,4 +63,4 @@ if ( add instanceof Error ) { console.error( 'Error: please make sure you have compiled the add-on before attempting to run this file. To compile the add-on, resolve the location of the `node-gyp` executable (e.g., `$PWD/.bin/node-gyp` from the root stdlib project directory), navigate to `%s`, and run `%s`.\n\nError: %s\n', __dirname, '/path/to/node-gyp rebuild', add.message ); } else { main(); -} \ No newline at end of file +} From 3d1609bf879c7a5d6d394484b6998e235c302636 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 17:37:39 +0530 Subject: [PATCH 6/7] chore: fix addon example lint and license issues --- .../common/examples/addon-napi-polymorphic/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index ff6a86a85ddb..6ab152f923a7 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -18,13 +18,16 @@ 'use strict'; -var join = require( 'path' ).join; -var tryRequire = require( '@stdlib/utils/try-require' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); +var add; // Try loading the add-on: -var add = tryRequire( join( __dirname, 'addon.node' ) ); +try { + add = require( './addon.node' ); +} catch ( err ) { + add = err; +} /** * Main execution sequence. From 24c9b7c4e72ff7a5f8afb1adeb82499157e47ee0 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Sun, 18 Jan 2026 17:41:44 +0530 Subject: [PATCH 7/7] chore: fix empty-line-before-comment lint error --- .../strided/common/examples/addon-napi-polymorphic/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index 6ab152f923a7..ab25eebc9955 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -22,6 +22,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); var add; + // Try loading the add-on: try { add = require( './addon.node' );