chore: fix typo in interface name and error message in two regexp/* packages#12445
Open
Planeshifter wants to merge 2 commits into
Open
chore: fix typo in interface name and error message in two regexp/* packages#12445Planeshifter wants to merge 2 commits into
regexp/* packages#12445Planeshifter wants to merge 2 commits into
Conversation
…gexp` 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<PascalCasedPackageName>` 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.
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.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
regexp/* outliersregexp/* packages
regexp/* packagesregexp/* packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request corrects two unintentional drifts in
@stdlib/regexp/*flagged by a cross-package drift audit over the 27 non-autogenerated members of the namespace: a copy-paste interface name inregexp/regexp's TypeScript declaration, and a double-space typo inregexp/dirname's error-message format string. Both fixes are purely textual; neither changes observable runtime behavior beyond the literalerror.messagetext indirname.Namespace summary
lib/node_modules/@stdlib/regexp/.package.jsonshape,directorieskeys, README##section set, error-construction style, validation prologues, JSDoc shape, and TypeScript interface naming.lib/regexp.js/test/test.regexp.jspresence (20/27 = 74%, just under threshold),## NotesREADME section (11/27 = 41%).package.jsontop-level key set, identicaldirectoriesmap, andformat-based error construction. No package constructs errors via concatenation or plain strings.regexp/regexpRename the TypeScript interface in
docs/types/index.d.tsfromReNativeFunction(a copy-paste leftover fromregexp/native-function) toReRegExp, conforming to the namespace-wideRe<PascalCasedPackageName>convention followed by 26 of 27 sibling packages (96%). The change is confined todocs/types/index.d.ts;docs/types/test.tsdoes not reference the interface by name, no other file in the repository imports it, and TypeScript interface names carry no runtime effect.regexp/dirnameCollapsed a double space in the
formattemplate atlib/main.js:53so the error message reads'invalid argument. Must be one of the following...'. Brings the package in line with its siblingsbasename,extname, andfilename, which were already single-spaced; grep confirmsregexp/dirnamewas the sole occurrence of"invalid argument. Must"across the entire stdlib.jscorpus (100% of siblings conform). No test or doc churn — nothing pins the exact message text.Validation
package.jsonkeys/scripts/directories, README##headings, error-construction style.basename,dirname,extname,filename) and the three options-taking packages (decimal-number,eol,whitespace).confirmed-driftfor both outliers; no outlier was markedintentional-deviation,needs-human, orinsufficient-evidence.Deliberately excluded:
## See AlsoREADME drift in five packages (color-hexadecimal,decimal-number,duration-string,eol,extended-length-path) — gated as auto-populated by the package-generator.test/test.main.jsinreviverandto-json— flagged in a prior audit as an intentional architectural deviation (those packages'lib/index.jsare pure pass-throughs with no platform dispatch, so a separatetest.main.jswould only duplicatetest.js).lib/regexp.js/test/test.regexp.jsextraction pattern (20/27, just under the 75% threshold) — leaf packages without a separate file inline their regex intomain.js, which is a deliberate organizational choice rather than drift.Related Issues
This pull request has no related issues.
Questions
No.
Other
Drift candidates produced by an automated cross-package audit; corrections were applied only after all three reviewer agents (semantic, cross-reference, structural) returned
confirmed-drift. The materiality, auto-populated-section, ecosystem-wide-absence, and open-PR-collision gates were checked before validation. A previous drift PR on this namespace (#12363, merged 2026-05-30) addressed a separateREADME.mdtypo inregexp/dirnameand is not duplicated here.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated cross-package drift detection routine over
@stdlib/regexp/*. Three independent reviewer agents (semantic, cross-reference, structural) confirmed both candidates before the fixes were applied. A maintainer should promote out of draft after review.@stdlib-js/reviewers
Generated by Claude Code