From c4d5f1dcea9de10c1fae4cab709220e4905faa49 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 08:37:17 +0000 Subject: [PATCH 1/2] fix: use `format` when constructing error message in `array/bool#map` The `map` method passed a `%s` template string and the offending value directly to the `TypeError` constructor, which resulted in an error message containing a literal `%s` placeholder. This commit wraps the message in `format`, in line with every other value-interpolating error message in the package (14 of 14 sibling throws) and the majority of `@stdlib/array` packages. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XfJGbrwW1ETRRzyKehDvvX --- lib/node_modules/@stdlib/array/bool/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/array/bool/lib/main.js b/lib/node_modules/@stdlib/array/bool/lib/main.js index 15660a9da1b7..850f4ed05477 100644 --- a/lib/node_modules/@stdlib/array/bool/lib/main.js +++ b/lib/node_modules/@stdlib/array/bool/lib/main.js @@ -1502,7 +1502,7 @@ setReadOnly( BooleanArray.prototype, 'map', function map( fcn, thisArg ) { throw new TypeError( 'invalid invocation. `this` is not a boolean array.' ); } if ( !isFunction( fcn ) ) { - throw new TypeError( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ); + throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) ); } buf = this._buffer; out = new this.constructor( this._length ); From 747b59686ee786476f93117039a42e586cf3ca51 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 08:37:18 +0000 Subject: [PATCH 2/2] fix: use `format` when constructing error message in `array/float16#map` The `map` method of the `Float16Array` polyfill passed a `%s` template string and the offending value directly to the `TypeError` constructor, which resulted in an error message containing a literal `%s` placeholder. This commit wraps the message in `format`, in line with every other value-interpolating error message in the polyfill (12 of 12 sibling throws) and the majority of `@stdlib/array` packages. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XfJGbrwW1ETRRzyKehDvvX --- lib/node_modules/@stdlib/array/float16/lib/polyfill/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/array/float16/lib/polyfill/index.js b/lib/node_modules/@stdlib/array/float16/lib/polyfill/index.js index 6c4ec43cabae..dfdc361027e7 100644 --- a/lib/node_modules/@stdlib/array/float16/lib/polyfill/index.js +++ b/lib/node_modules/@stdlib/array/float16/lib/polyfill/index.js @@ -1446,7 +1446,7 @@ setReadOnly( Float16Array.prototype, 'map', function map( fcn, thisArg ) { throw new TypeError( 'invalid invocation. `this` is not a floating-point number array.' ); } if ( !isFunction( fcn ) ) { - throw new TypeError( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ); + throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) ); } buf = this._buffer; out = new this.constructor( this._length );