From 67f9bd78b53afe94e97f2ade949195ea348d2074 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 13:42:08 +0000 Subject: [PATCH 1/3] chore: fix JavaScript lint errors in `_tools/github` and `repl` Propagates fix from f22d513b ("chore: fix JavaScript lint errors") to sibling packages declaring a nested function which references no binding local to its immediate enclosing function, tripping `stdlib/no-unnecessary-nested-functions`. Each declaration is dedented one scope level, as in the source commit. The JSDoc block travels with the declaration and each body is unchanged apart from one tab of indentation. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SzTKV4KFPDZcVJF3NqTL9E --- .../@stdlib/_tools/github/get/lib/factory.js | 30 ++++---- .../github/rank-followers/lib/factory.js | 31 ++++---- .../_tools/github/rank-users/lib/factory.js | 31 ++++---- .../_tools/github/user-details/lib/factory.js | 31 ++++---- .../@stdlib/repl/lib/commands/load.js | 72 +++++++++---------- .../lib/commands/first_fragment.js | 16 ++--- .../presentation/lib/commands/next_slide.js | 16 ++--- .../repl/presentation/lib/commands/prev.js | 16 ++--- .../presentation/lib/commands/prev_slide.js | 16 ++--- .../repl/presentation/lib/commands/redraw.js | 16 ++--- .../lib/commands/reload_presentation.js | 68 +++++++++--------- .../presentation/lib/commands/run_slide.js | 16 ++--- 12 files changed, 181 insertions(+), 178 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js index 9832176dd6e1..c00801f9ec51 100644 --- a/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js @@ -114,22 +114,22 @@ function factory( options, clbk ) { */ function get() { resolve( opts, done ); + } - /** - * Callback invoked after resolving resources. - * - * @private - * @param {(Error|null)} error - error object - * @param {(ObjectArray|null)} data - query data - * @param {(Object|null)} info - response info - * @returns {void} - */ - function done( error, data, info ) { - error = error || null; - data = data || null; - info = info || null; - clbk( error, data, info ); - } + /** + * Callback invoked after resolving resources. + * + * @private + * @param {(Error|null)} error - error object + * @param {(ObjectArray|null)} data - query data + * @param {(Object|null)} info - response info + * @returns {void} + */ + function done( error, data, info ) { + error = error || null; + data = data || null; + info = info || null; + clbk( error, data, info ); } } diff --git a/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js index d51a9b641db8..c894ede21798 100644 --- a/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js @@ -70,21 +70,22 @@ function factory( options, clbk ) { */ function rank() { pipeline( opts, done ); - /** - * Callback invoked after running rank analysis. - * - * @private - * @param {(Error|null)} error - error object - * @param {ObjectArray} data - query data - * @param {Object} info - response info - * @returns {void} - */ - function done( error, data, info ) { - error = error || null; - data = data || null; - info = info || null; - clbk( error, data, info ); - } + } + + /** + * Callback invoked after running rank analysis. + * + * @private + * @param {(Error|null)} error - error object + * @param {ObjectArray} data - query data + * @param {Object} info - response info + * @returns {void} + */ + function done( error, data, info ) { + error = error || null; + data = data || null; + info = info || null; + clbk( error, data, info ); } } diff --git a/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js index 64d22e5f4d2e..3d4adb24b947 100644 --- a/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js @@ -63,21 +63,22 @@ function factory( options, clbk ) { */ function rank( data ) { analyze( data, opts, done ); - /** - * Callback invoked after completing analysis. - * - * @private - * @param {(Error|null)} error - error object - * @param {Object} results - analysis results - * @param {Object} info - rate limit info - * @returns {void} - */ - function done( error, results, info ) { - error = error || null; - results = results || null; - info = info || null; - clbk( error, results, info ); - } + } + + /** + * Callback invoked after completing analysis. + * + * @private + * @param {(Error|null)} error - error object + * @param {Object} results - analysis results + * @param {Object} info - rate limit info + * @returns {void} + */ + function done( error, results, info ) { + error = error || null; + results = results || null; + info = info || null; + clbk( error, results, info ); } } diff --git a/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js index a4b05e23a228..cbcc8c5ba36e 100644 --- a/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js @@ -62,21 +62,22 @@ function factory( options, clbk ) { */ function userinfo() { get( opts, done ); - /** - * Callback invoked after query completion. - * - * @private - * @param {(Error|null)} error - error object - * @param {Object} results - query results - * @param {Object} info - response info - * @returns {void} - */ - function done( error, results, info ) { - error = error || null; - results = results || null; - info = info || null; - clbk( error, results, info ); - } + } + + /** + * Callback invoked after query completion. + * + * @private + * @param {(Error|null)} error - error object + * @param {Object} results - query results + * @param {Object} info - response info + * @returns {void} + */ + function done( error, results, info ) { + error = error || null; + results = results || null; + info = info || null; + clbk( error, results, info ); } } diff --git a/lib/node_modules/@stdlib/repl/lib/commands/load.js b/lib/node_modules/@stdlib/repl/lib/commands/load.js index 3a3353ad83e2..b4569d155828 100644 --- a/lib/node_modules/@stdlib/repl/lib/commands/load.js +++ b/lib/node_modules/@stdlib/repl/lib/commands/load.js @@ -70,44 +70,44 @@ function command( repl ) { debug( 'Loading a file...' ); repl.load( fpath, clbk ); } + } - /** - * Callback invoked upon loading a file. - * - * @private - * @param {Error} [error] - error object - */ - function clbk( error ) { - var pos; - if ( error ) { - // NOTE: we can assume that the error pertains to actually reading the file (e.g., loading from disk) and NOT the line-by-line evaluation, where error handling should be handled separately... - debug( 'Error: %s', error.message ); - - // Infer the current cursor column position based on the length of the command prompt string: - pos = repl._prompt().length; // FIXME: how to address multi-column characters? - - // FIXME: handle non-TTY output streams! - - /* - * Print the error message on the previous line and generate the expected display prompt and cursor position. - * - * [ANSI escape sequences][1]: - * - * - `\u001b`: ESC, the escape character - * - `[1A`: move cursor up one line - * - `[nD`: move cursor back (to the left) `n` columns (cells) - * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen - * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code - */ - repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); - - // Show a new display prompt: - repl._displayPrompt(); - return; - } - debug( 'Successfully loaded file.' ); + /** + * Callback invoked upon loading a file. + * + * @private + * @param {Error} [error] - error object + */ + function clbk( error ) { + var pos; + if ( error ) { + // NOTE: we can assume that the error pertains to actually reading the file (e.g., loading from disk) and NOT the line-by-line evaluation, where error handling should be handled separately... + debug( 'Error: %s', error.message ); + + // Infer the current cursor column position based on the length of the command prompt string: + pos = repl._prompt().length; // FIXME: how to address multi-column characters? + + // FIXME: handle non-TTY output streams! + + /* + * Print the error message on the previous line and generate the expected display prompt and cursor position. + * + * [ANSI escape sequences][1]: + * + * - `\u001b`: ESC, the escape character + * - `[1A`: move cursor up one line + * - `[nD`: move cursor back (to the left) `n` columns (cells) + * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen + * + * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code + */ + repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); + + // Show a new display prompt: + repl._displayPrompt(); + return; } + debug( 'Successfully loaded file.' ); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js index ceaba2c4c17e..fc39060e1d6b 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.firstFragment().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.firstFragment().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js index 77a75bbb6772..4cca8ac30e61 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.nextSlide().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.nextSlide().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js index 3fb86e9a1578..8f4499a97c21 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.prev().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.prev().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js index f6406ae5b692..49cc49893db0 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.prevSlide().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.prevSlide().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js index 9b79d6945422..2915ee938cdb 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js index 79421e466aa3..ea5866207973 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js @@ -49,41 +49,41 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - var pos; - try { - pres.reload().show(); - } catch ( error ) { - debug( 'Error: %s', error.message ); - - // Infer the current cursor column position based on the length of the command prompt string: - pos = pres._repl._prompt().length; // FIXME: how to address multi-column characters? - - // FIXME: handle non-TTY output streams! - - /* - * Print the error message on the previous line and generate the expected display prompt and cursor position. - * - * [ANSI escape sequences][1]: - * - * - `\u001b`: ESC, the escape character - * - `[1A`: move cursor up one line - * - `[nD`: move cursor back (to the left) `n` columns (cells) - * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen - * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code - */ - pres._repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); - - // Show a new display prompt: - pres._repl._displayPrompt(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + var pos; + try { + pres.reload().show(); + } catch ( error ) { + debug( 'Error: %s', error.message ); + + // Infer the current cursor column position based on the length of the command prompt string: + pos = pres._repl._prompt().length; // FIXME: how to address multi-column characters? + + // FIXME: handle non-TTY output streams! + + /* + * Print the error message on the previous line and generate the expected display prompt and cursor position. + * + * [ANSI escape sequences][1]: + * + * - `\u001b`: ESC, the escape character + * - `[1A`: move cursor up one line + * - `[nD`: move cursor back (to the left) `n` columns (cells) + * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen + * + * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code + */ + pres._repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); + + // Show a new display prompt: + pres._repl._displayPrompt(); } } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js index abe0ab3f77c0..a304a8214487 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js @@ -42,15 +42,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.run( noop ); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.run( noop ); } } From b419426e547d96917c129b429804516317ef1e54 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 13:53:40 +0000 Subject: [PATCH 2/3] chore: drop propagation sites blocked by pre-existing test failures Reverts the dedent in `_tools/github/rank-followers` and `_tools/github/rank-users`, leaving both files as on `develop`. `test/test.cli.js` in each package fails identically on `develop` (2 and 4 assertions respectively): `bin/cli` keeps `format` and `delimiter` in locals used only by the `csv`/`json` writers and never assigns them onto `opts`, while `test/fixtures/cli_format.js.txt` and `cli_delimiter.js.txt` assert on `opts.format` and `opts.delimiter`, which are therefore always `undefined`. `cli_format.js.txt` additionally passes `--format=json` where the test expects `csv`. Touching either package makes those tests "affected", so the propagation blocks on a defect it does not introduce and cannot fix without widening into an unrelated test correction. Both sites remain valid and are logged for a follow-up run once the CLI tests are corrected. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SzTKV4KFPDZcVJF3NqTL9E --- .../github/rank-followers/lib/factory.js | 31 +++++++++---------- .../_tools/github/rank-users/lib/factory.js | 31 +++++++++---------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js index c894ede21798..d51a9b641db8 100644 --- a/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/rank-followers/lib/factory.js @@ -70,22 +70,21 @@ function factory( options, clbk ) { */ function rank() { pipeline( opts, done ); - } - - /** - * Callback invoked after running rank analysis. - * - * @private - * @param {(Error|null)} error - error object - * @param {ObjectArray} data - query data - * @param {Object} info - response info - * @returns {void} - */ - function done( error, data, info ) { - error = error || null; - data = data || null; - info = info || null; - clbk( error, data, info ); + /** + * Callback invoked after running rank analysis. + * + * @private + * @param {(Error|null)} error - error object + * @param {ObjectArray} data - query data + * @param {Object} info - response info + * @returns {void} + */ + function done( error, data, info ) { + error = error || null; + data = data || null; + info = info || null; + clbk( error, data, info ); + } } } diff --git a/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js index 3d4adb24b947..64d22e5f4d2e 100644 --- a/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/rank-users/lib/factory.js @@ -63,22 +63,21 @@ function factory( options, clbk ) { */ function rank( data ) { analyze( data, opts, done ); - } - - /** - * Callback invoked after completing analysis. - * - * @private - * @param {(Error|null)} error - error object - * @param {Object} results - analysis results - * @param {Object} info - rate limit info - * @returns {void} - */ - function done( error, results, info ) { - error = error || null; - results = results || null; - info = info || null; - clbk( error, results, info ); + /** + * Callback invoked after completing analysis. + * + * @private + * @param {(Error|null)} error - error object + * @param {Object} results - analysis results + * @param {Object} info - rate limit info + * @returns {void} + */ + function done( error, results, info ) { + error = error || null; + results = results || null; + info = info || null; + clbk( error, results, info ); + } } } From 10ebcf94799a699a0f868d3a7c29da52734e3863 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Sep 2026 14:00:16 +0000 Subject: [PATCH 3/3] chore: drop `_tools/github/user-details` propagation site Reverts the dedent in `_tools/github/user-details`, leaving the file as on `develop`. `.github/workflows/scripts/run_affected_tests/run` expands the changed-package set with every package that `require()`s one of them, and `_tools/github/rank-followers` requires `@stdlib/_tools/github/user-details`. Touching `user-details` therefore runs `rank-followers`'s test suite, which fails on `develop`: 2 assertions in `test/test.cli.js` and 22 in `test/test.pipeline.js`. Dropping this site removes `rank-followers` from the affected set. Reproducing the workflow's scoping locally now yields 13 packages and 77 test files, all passing. The site remains valid and is logged for a follow-up run once `rank-followers`'s tests are corrected. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SzTKV4KFPDZcVJF3NqTL9E --- .../_tools/github/user-details/lib/factory.js | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js index cbcc8c5ba36e..a4b05e23a228 100644 --- a/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/user-details/lib/factory.js @@ -62,22 +62,21 @@ function factory( options, clbk ) { */ function userinfo() { get( opts, done ); - } - - /** - * Callback invoked after query completion. - * - * @private - * @param {(Error|null)} error - error object - * @param {Object} results - query results - * @param {Object} info - response info - * @returns {void} - */ - function done( error, results, info ) { - error = error || null; - results = results || null; - info = info || null; - clbk( error, results, info ); + /** + * Callback invoked after query completion. + * + * @private + * @param {(Error|null)} error - error object + * @param {Object} results - query results + * @param {Object} info - response info + * @returns {void} + */ + function done( error, results, info ) { + error = error || null; + results = results || null; + info = info || null; + clbk( error, results, info ); + } } }