From 650112fd07e2bcc79113f497b5cebd5577226dee Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 19 Apr 2026 12:21:50 -0400 Subject: [PATCH 1/2] bench: refactor to use string interpolation in `@stdlib/regexp` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/regexp/basename/benchmark/benchmark.js | 5 +++-- .../@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js | 5 +++-- .../@stdlib/regexp/dirname/benchmark/benchmark.js | 5 +++-- .../@stdlib/regexp/extname/benchmark/benchmark.js | 5 +++-- .../@stdlib/regexp/filename/benchmark/benchmark.js | 5 +++-- .../@stdlib/regexp/reviver/benchmark/benchmark.js | 5 +++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/regexp/basename/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/basename/benchmark/benchmark.js index 8900817c72ea..b879bfe3e5a0 100644 --- a/lib/node_modules/@stdlib/regexp/basename/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/basename/benchmark/benchmark.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var IS_WINDOWS = require( '@stdlib/assert/is-windows' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var fromCodePoint = require( '@stdlib/string/from-code-point' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reBasename = require( './../lib' ); @@ -64,7 +65,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+':posix', function benchmark( b ) { +bench( format( '%s:posix', pkg ), function benchmark( b ) { var out; var str; var i; @@ -86,7 +87,7 @@ bench( pkg+':posix', function benchmark( b ) { b.end(); }); -bench( pkg+':win32', function benchmark( b ) { +bench( format( '%s:win32', pkg ), function benchmark( b ) { var out; var str; var i; diff --git a/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js index a59cc1b02650..7c10b8c119ad 100644 --- a/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; var fromCodePoint = require( '@stdlib/string/from-code-point' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reColorHexadecimal = require( './../lib' ); @@ -50,7 +51,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'shorthand', function benchmark( b ) { +bench( format( '%sshorthand', pkg ), function benchmark( b ) { var bool; var str; var i; @@ -71,7 +72,7 @@ bench( pkg+'shorthand', function benchmark( b ) { b.end(); }); -bench( pkg+':either', function benchmark( b ) { +bench( format( '%s:either', pkg ), function benchmark( b ) { var bool; var str; var i; diff --git a/lib/node_modules/@stdlib/regexp/dirname/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/dirname/benchmark/benchmark.js index 17aa1dd1093b..cd7755b19b2b 100644 --- a/lib/node_modules/@stdlib/regexp/dirname/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/dirname/benchmark/benchmark.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var IS_WINDOWS = require( '@stdlib/assert/is-windows' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var fromCodePoint = require( '@stdlib/string/from-code-point' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reDirname = require( './../lib' ); @@ -63,7 +64,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+':posix', function benchmark( b ) { +bench( format( '%s:posix', pkg ), function benchmark( b ) { var out; var str; var i; @@ -84,7 +85,7 @@ bench( pkg+':posix', function benchmark( b ) { b.end(); }); -bench( pkg+':win32', function benchmark( b ) { +bench( format( '%s:win32', pkg ), function benchmark( b ) { var out; var str; var i; diff --git a/lib/node_modules/@stdlib/regexp/extname/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/extname/benchmark/benchmark.js index 34976c9765b5..5fe33ab08861 100644 --- a/lib/node_modules/@stdlib/regexp/extname/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/extname/benchmark/benchmark.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var IS_WINDOWS = require( '@stdlib/assert/is-windows' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var fromCodePoint = require( '@stdlib/string/from-code-point' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reExtname = require( './../lib' ); @@ -63,7 +64,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+':posix', function benchmark( b ) { +bench( format( '%s:posix', pkg ), function benchmark( b ) { var out; var str; var i; @@ -84,7 +85,7 @@ bench( pkg+':posix', function benchmark( b ) { b.end(); }); -bench( pkg+':win32', function benchmark( b ) { +bench( format( '%s:win32', pkg ), function benchmark( b ) { var out; var str; var i; diff --git a/lib/node_modules/@stdlib/regexp/filename/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/filename/benchmark/benchmark.js index d13a0a477f91..a0640c964bd0 100644 --- a/lib/node_modules/@stdlib/regexp/filename/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/filename/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var IS_WINDOWS = require( '@stdlib/assert/is-windows' ); var fromCodePoint = require( '@stdlib/string/from-code-point' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reFilename = require( './../lib' ); @@ -62,7 +63,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+':posix', function benchmark( b ) { +bench( format( '%s:posix', pkg ), function benchmark( b ) { var out; var str; var i; @@ -83,7 +84,7 @@ bench( pkg+':posix', function benchmark( b ) { b.end(); }); -bench( pkg+':win32', function benchmark( b ) { +bench( format( '%s:win32', pkg ), function benchmark( b ) { var out; var str; var i; diff --git a/lib/node_modules/@stdlib/regexp/reviver/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/reviver/benchmark/benchmark.js index 4efb4314e3f1..e4911d58f0f9 100644 --- a/lib/node_modules/@stdlib/regexp/reviver/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/reviver/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var parseJSON = require( '@stdlib/utils/parse-json' ); var regexp2json = require( '@stdlib/regexp/to-json' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var reviver = require( './../lib' ); @@ -39,7 +40,7 @@ var VALUES = [ // MAIN // -bench( pkg+'::parse', function benchmark( b ) { +bench( format( '%s::parse', pkg ), function benchmark( b ) { var o; var i; @@ -58,7 +59,7 @@ bench( pkg+'::parse', function benchmark( b ) { b.end(); }); -bench( pkg+'::parse,no_reviver', function benchmark( b ) { +bench( format( '%s::parse,no_reviver', pkg ), function benchmark( b ) { var o; var i; From 111bac820ca96fde429c1846317a2d63f778c299 Mon Sep 17 00:00:00 2001 From: Athan Date: Sun, 19 Apr 2026 17:20:18 -0700 Subject: [PATCH 2/2] bench: fix description Signed-off-by: Athan --- .../@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js b/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js index 7c10b8c119ad..267beb7fb400 100644 --- a/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/regexp/color-hexadecimal/benchmark/benchmark.js @@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( format( '%sshorthand', pkg ), function benchmark( b ) { +bench( format( '%s:shorthand', pkg ), function benchmark( b ) { var bool; var str; var i;