docs: use canonical uinteger32 JSDoc tag in number/float32/base#12916
Draft
Planeshifter wants to merge 2 commits into
Draft
docs: use canonical uinteger32 JSDoc tag in number/float32/base#12916Planeshifter wants to merge 2 commits into
uinteger32 JSDoc tag in number/float32/base#12916Planeshifter wants to merge 2 commits into
Conversation
Renames the `@returns` type from `{unsigned32}` to `{uinteger32}` in
`lib/main.js` and `lib/native.js`. `uinteger32` is the canonical stdlib
JSDoc alias for a 32-bit unsigned integer in the JS `number` value space
(used by 94% of stdlib occurrences and registered in the
`jsdoc-typedef-typos` eslint allowlist); `unsigned32` is an older alias
that is absent from the allowlist. Within `number/float32/base`,
sibling packages `from-word`, `significand`, `to-uint32`, and
`from-word/native` already use `{uinteger32}` for the same concept (4/4
intra-namespace conformance on this feature).
No runtime behavior change.
Renames the `@param` type on the private `monotoneKey` helper from
`{unsigned32}` to `{uinteger32}`. `uinteger32` is the canonical stdlib
JSDoc alias for a 32-bit unsigned integer (94% of stdlib occurrences and
registered in the `jsdoc-typedef-typos` eslint allowlist); `unsigned32`
is an older alias absent from the allowlist. Sibling packages within
`number/float32/base` use `{uinteger32}` for the same concept (4/4
intra-namespace conformance).
No runtime behavior change.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
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
Replaces the non-canonical
{unsigned32}JSDoc type tag with{uinteger32}at three sites innumber/float32/base.uinteger32is the stdlib-wide alias for a 32-bit unsigned integer in the JSnumbervalue space (94% of stdlib occurrences) and is registered in_tools/eslint/rules/jsdoc-typedef-typos/lib/defaults.json;unsigned32is an older alias absent from that allowlist. JSDoc-only; no runtime behavior change.Namespace summary
number/float32/basedirect children withpackage.json).assert/namespace re-export was excluded from semantic analysis as inapplicable).package.jsontop-level/scripts/stdlib keys,manifest.jsontop-level keys, README sections (set and order), test/benchmark/example filenames, public signature, return kind, validation prologue, error construction, JSDoc shape,require()dependencies.{uinteger32}; 3 sites use{unsigned32}. Fixed here.## See AlsoREADME section — present in 14/17 leafs. Excluded: the section is auto-populated by the package-generator (<!-- Section for related stdlib packages. Do not manually edit this section, as it is automatically populated. -->).lib/native.jspresence — 12/17 leafs (70.6%); below the 75% threshold and the absences (from-binary-string,to-binary-string,to-int32,to-uint32,ulp-difference) are semantically intentional (string parsing, simple bitwise ops).## C APIsREADME section — 12/17 leafs (70.6%); trackslib/native.js.@examplecount,@param/@returnstypes — heterogeneous by function shape; no convergent majority and no candidate outlier.number/float32/base/to-wordlib/main.jsandlib/native.jsboth document@returns {unsigned32}. Sibling packages document the identical concept as{uinteger32}(seefrom-word@param,significand@returns,to-uint32@returns), andunsigned32is not in the stdlib JSDoc typedef allowlist. Renamed at both sites; no other changes.number/float32/base/ulp-differencelib/main.jsdocuments@param {unsigned32} wordon the privatemonotoneKeyhelper, whose argument is theuint32produced byto-word. Renamed to match the canonical alias. The exportedulpdiffJSDoc is unchanged.Related Issues
None.
Questions
None.
Other
Validation
lib/node_modules/@stdlib/number/float32/base/(file tree excluding sub-package recursion,package.json/manifest.jsonkey sets, README section list,test//benchmark//examples/filenames, JSDoc shape, validation prologue, error construction, dependency set).unsigned32anduinteger32denote the same JSDoc concept; sibling packages in the namespace already useuinteger32for the identical return/parameter type.to-word/test/test.js,ulp-difference/test/test.js) assert runtime values only and do not depend on the JSDoc tag.examples/index.jsand thelib/index.js@moduledocstrings do not reference either token. No README innumber/float32/basereferencesunsigned32.uinteger32is registered in_tools/eslint/rules/jsdoc-typedef-typos/lib/defaults.jsonand_tools/eslint/rules/jsdoc-doctest-decimal-point/lib/integer_types.json;unsigned32is absent from both. Production usage measured at 64 occurrences foruinteger32vs 4 forunsigned32(3 of the 4 are the sites fixed here; the remaining one is a test fixture inside_tools/).## See Alsoheading drift insignificand,to-float16,ulp-difference— generator-owned section (scaffold present, content auto-populated by the package generator).assert/outlier on file-tree features (missinglib/main.js,docs/repl.txt,benchmark/) —assert/is a namespace re-export package, not a leaf, and these files are inapplicable.lib/native.jsand## C APIsabsences — below the 75% conformance threshold and absences track a real semantic distinction (string-valued / bitwise-trivial packages legitimately lack a C addon).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 routine that scans a randomly chosen stdlib namespace for cross-package API drift via majority vote. Structural and semantic features were extracted across all members of
number/float32/base; the only feature with a clear majority that surfaced advance-able outliers was the JSDoc unsigned-32-bit-integer type tag. Three independent validation passes (semantic, cross-reference, structural) confirmed the rename is mechanical and matches the stdlib eslint typedef allowlist. A human maintainer should verify before promoting this PR out of draft.@stdlib-js/reviewers
Generated by Claude Code