refactor: rename internal variables#12955
Merged
Merged
Conversation
Aligns `lib/index.js` with the namespace-wide convention of binding the require result to `main`. 11/14 sibling packages already use this form; identical normalization landed previously for `stats/base/dists/lognormal/mean`.
Aligns `lib/index.js` with the namespace-wide convention of binding the require result to `main`. 11/14 sibling packages already use this form; identical normalization landed previously for `stats/base/dists/lognormal/median`.
Aligns `lib/index.js` with the namespace-wide convention of binding the require result to `main`. 11/14 sibling packages already use this form; identical normalization landed previously for `stats/base/dists/lognormal/mode`.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Jun 18, 2026
stats/base/dists/t/{mean,median,mode}
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:
require('./main.js')binding inlib/index.jsfrom the function name tomainfor@stdlib/stats/base/dists/t/mean,@stdlib/stats/base/dists/t/median, and@stdlib/stats/base/dists/t/mode, and updates the correspondingmodule.exportsidentifier. The exported function value is unchanged.Namespace summary
@stdlib/stats/base/dists/tpackage.jsonshape, README section list,manifest.jsonshape, test/benchmark/example file naming,lib/index.jsinternal-binding convention,lib/main.jsJSDoc parameter types,module.exportsidentifierlib/index.jslocal-variable name (mainat 11/14 = 78.6%)gypfileinpackage.json(10/14 = 71.4%),## C APIsREADME section (10/14 = 71.4%),@param {…} vJSDoc type (8/13PositiveNumbervs 5/13NonNegativeNumber— semantic, reflecting each moment's true domain of definition)Per outlier package
@stdlib/stats/base/dists/t/meanRename the local
require('./main.js')binding inlib/index.jsfrommeantomainand updatemodule.exportsaccordingly. Aligns with 11/14 sibling packages understats/base/dists/t/*and 80.6% ofstats/base/dists/*, matching the normalization applied in #12925 (stats/base/dists/lognormal/mean). Exported function is unchanged.@stdlib/stats/base/dists/t/medianRename the local
require('./main.js')binding frommediantomaininlib/index.jsand update themodule.exportsidentifier accordingly. Aligns with the prevailing convention acrossstats/base/dists/t/*(11/14) andstats/base/dists/*(80.6%), matching the normalization applied in #12925 forstats/base/dists/lognormal/median. Exported function is unchanged.@stdlib/stats/base/dists/t/modeRename the local
require('./main.js')binding frommodetomaininlib/index.jsand update the correspondingmodule.exportsidentifier. Aligns with 11/14 sibling packages understats/base/dists/t/*and 80.6% ofstats/base/dists/*, matching the normalization landed instats/base/dists/lognormal/mode(#12925). Exported function is unchanged.Related Issues
No.
Questions
No.
Other
Validation
package.jsonkeys, README sections,manifest.jsonkeys, test/benchmark/example file lists.lib/main.jsandlib/index.js: public signatures, validation prologues, error-construction patterns, JSDoc shape, internal binding names.confirmed-driftfor all three outliers. No tests, examples, benchmarks, REPL fixtures, TypeScript declarations, or the namespace aggregator depend on the local binding name; the change is purely cosmetic and propagates no behavior.cdf,ctor,logcdf,quantile(10/14 = 71.4%, below the 75% threshold).ctor(13/14 = 92.9%, threshold met) —ctoris the Distribution constructor and is structurally distinct from the moment/density packages, so the deviation is intentional.@param {…} vJSDoc type inconsistency — reflects each moment's true mathematical domain of definition; not drift.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 API drift detection routine. The drift was identified by structural and semantic feature extraction across the 14-member namespace, validated by a three-agent panel (semantic / cross-reference / structural), and applied as a mechanical rename. Findings, conformance percentages, and excluded candidates were reviewed before commit.
@stdlib-js/reviewers
Generated by Claude Code