Merged
Conversation
- Added missing `@example` block to `lib/main.js` JSDoc (present in 26/27 siblings, 96%), adapted from the README usage examples. https://claude.ai/code/session_0151TCuqxNJXJZfy4XEWqKhM
- Added missing `test/test.main.js` (present in 25/27 siblings, 93%), mirroring `test/test.js` but requiring `./../lib/main.js` directly so that regressions in `lib/index.js` do not mask bugs in the main implementation file. https://claude.ai/code/session_0151TCuqxNJXJZfy4XEWqKhM
- Added missing `test/test.main.js` (present in 25/27 siblings, 93%), mirroring `test/test.js` but requiring `./../lib/main.js` directly so that regressions in `lib/index.js` do not mask bugs in the main implementation file. https://claude.ai/code/session_0151TCuqxNJXJZfy4XEWqKhM
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Update the `Copyright (c)` year in the two newly created `test/test.main.js` files to the current year so the `Lint Copyright Years` CI check passes. The files were mirrored verbatim from the existing `test/test.js` siblings (which carry their original 2022 copyright), so the copied header needs bumping for new files. https://claude.ai/code/session_0151TCuqxNJXJZfy4XEWqKhM
Earlier commits in this PR added `test/test.main.js` in these two
packages to align with the 25/27 namespace majority. The added
files were content-for-content copies of the existing `test.js`
with only the require path swapped (`./../lib` → `./../lib/main.js`),
which meant every test case ran twice with no added coverage.
The 25/27 sibling packages that legitimately carry `test.main.js`
(e.g. `regexp/basename-posix`, `basename-windows`, `dirname-posix`)
all attach extra properties to their index export (e.g. a `REGEXP`
property), so `test.js` can cover the re-export surface and
`test.main.js` can exercise the main function in isolation. For
`reviver` and `to-json`, `lib/index.js` is a plain
`module.exports = main` — there is nothing for a thin `test.js`
to assert beyond `typeof === 'function'`, which is already the
first case inside the proposed `test.main.js`. A minimal wrapper
would be pure redundancy.
Other plain re-export packages in the codebase
(`assert/is-plain-object`, `utils/noop`, `math/base/special/abs`)
follow this same pattern: a single `test.js` and no `test.main.js`.
Classifying these two outliers as drift was a false positive — the
routine's 75% threshold flagged a structural pattern that only
applies when the index exposes extra surface. Revert the two
additions; the `regexp/extended-length-path` `@example` fix
earlier in the PR is unaffected.
---
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: na
- 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
---
regexp namespace with majority conventions
kgryte
approved these changes
Apr 23, 2026
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
Aligning outliers in
@stdlib/regexpwith namespace majority patterns (random namespace pick, seed20260422).Per-package corrections
regexp/extended-length-pathregexp/extended-length-path(lib/main.js) was missing an@exampleJSDoc block, contrary to 26 of 27 siblings (96%) in@stdlib/regexp. Added an@exampleblock adapted directly from the package README; no behavior change. Maintainers can verify conformance by diffing against adjacent packages in the namespace.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running the cross-package drift-detection routine on a random namespace pick (seed
20260422, targetregexp). The routine enumerates the namespace, computes majority patterns across structural and semantic features at a 75% threshold, and applies only mechanical corrections validated by three independent review agents. All code changes are mirrors/adaptations of existing majority-pattern code in sibling packages; no novel logic was generated. Keeping this PR in draft for a maintainer to audit before promotion.@stdlib-js/reviewers
Generated by Claude Code