From 80fb312b8e09bba90dfe4f422dd3c611e31b9e26 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 12:23:16 +0000 Subject: [PATCH 1/2] docs: rename TypeScript interface to `ReRegExp` in `@stdlib/regexp/regexp` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renamed `interface ReNativeFunction` to `interface ReRegExp` in `docs/types/index.d.ts` (and the corresponding `declare var` type annotation). The previous name was a copy-paste leftover from `@stdlib/regexp/native-function`; the JSDoc immediately above the interface correctly describes parsing a regular expression string. Conformance with the namespace-wide `Re` interface-naming convention: 26 of 27 sibling packages (96%); `regexp/regexp` was the lone outlier. The change is local to the declaration file — `docs/types/test.ts` does not reference the name and no other file in the repository imports the interface, so the rename has no runtime effect. --- lib/node_modules/@stdlib/regexp/regexp/docs/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/regexp/regexp/docs/types/index.d.ts b/lib/node_modules/@stdlib/regexp/regexp/docs/types/index.d.ts index b8bba9c2d22f..5752b961f5d8 100644 --- a/lib/node_modules/@stdlib/regexp/regexp/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/regexp/regexp/docs/types/index.d.ts @@ -21,7 +21,7 @@ /** * Interface for a regular expression to parse a regular expression string. */ -interface ReNativeFunction { +interface ReRegExp { /** * Returns a regular expression to parse a regular expression string. * @@ -66,7 +66,7 @@ interface ReNativeFunction { * var bool = reRegExp.REGEXP.test( '/^beep$/' ); * // returns true */ -declare var reRegExp: ReNativeFunction; +declare var reRegExp: ReRegExp; // EXPORTS // From dc6216f7cde884aa613c8c104f41eff17668c167 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 12:23:24 +0000 Subject: [PATCH 2/2] fix: remove extra space in `@stdlib/regexp/dirname` error message Removed the double space after `argument.` in the `format` template string at `lib/main.js:53` (`'invalid argument. Must be one of the following: "%s". Value: \`%s\`.'`). The three sibling platform-dispatch packages (`basename`, `extname`, `filename`) all use a single space in the equivalent line, and a stdlib-wide grep for `"invalid argument. Must"` returns this file as the sole occurrence. Conformance with the single-space convention: 100% of stdlib `.js` sources outside this file. No tests or docs assert the exact error message text, so the one-character fix has no test impact. --- lib/node_modules/@stdlib/regexp/dirname/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/regexp/dirname/lib/main.js b/lib/node_modules/@stdlib/regexp/dirname/lib/main.js index c6f62e9a260e..851e1cbb459e 100644 --- a/lib/node_modules/@stdlib/regexp/dirname/lib/main.js +++ b/lib/node_modules/@stdlib/regexp/dirname/lib/main.js @@ -50,7 +50,7 @@ var isPlatform = contains( PLATFORMS ); function reDirname( platform ) { if ( arguments.length > 0 ) { if ( !isPlatform( platform ) ) { - throw new Error( format( 'invalid argument. Must be one of the following: "%s". Value: `%s`.', PLATFORMS.join( '", "' ), platform ) ); + throw new Error( format( 'invalid argument. Must be one of the following: "%s". Value: `%s`.', PLATFORMS.join( '", "' ), platform ) ); } } if ( platform === 'win32' || IS_WINDOWS ) {