Repository navigation
chore: clean-up - #13832
Merged
Merged
chore: clean-up#13832
Conversation
…nth` Rename the `require( './main.js' )` binding and its `module.exports` assignment from `minutesInMonth` to `main`, matching the re-export convention used by 16 of 18 sibling packages (89%) in `@stdlib/time`. Internal-only; no change to behavior or public API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yDjoVfndcioeuohxziAw3
Rename the `require( './main.js' )` binding and its `module.exports` assignment from `minutesInYear` to `main`, matching the re-export convention used by 16 of 18 sibling packages (89%) in `@stdlib/time`. Internal-only; no change to behavior or public API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yDjoVfndcioeuohxziAw3
Add the interior parenthesis spacing required by the `space-in-parens` lint rule to the four `floor()` calls in `lib/main.js`. Every other `floor()` call site in `@stdlib/time` (17/17) already uses this spacing. Whitespace-only; no change to behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yDjoVfndcioeuohxziAw3
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
August 1, 2026 21:21
kgryte
approved these changes
Aug 1, 2026
@stdlib/time
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 normalizes three source-file convention deviations in the
@stdlib/timenamespace to the pattern used by the overwhelming majority of sibling packages. All changes are internal and behavior-neutral; no public API, signature, or test expectation is affected.Namespace summary.
@stdlib/timehas 19 direct members; thebasenamespace-aggregator package was excluded, leaving 18 leaf function packages voted at a 75% majority threshold (≥14/18). Structural features (file tree,package.jsonshape, README section structure, test/benchmark/example file naming) and semantic features (public signatures, return kind, validation prologue, error construction, JSDoc shape, dependencies) were extracted per package. Features with a clear majority: error construction (uniform@stdlib/string/format), validation prologues (consistent within signature families), JSDoc tag shape,package.jsonkey set, and core file layout. Features excluded for lacking a clear majority:benchmark/benchmark.jspresence (2/18) and per-function@examplecount. The namespace is unusually consistent — the only corrections below are convention drift in three outliers.@stdlib/time/minutes-in-monthThe
lib/index.jsre-export boundrequire( './main.js' )to a package-named variable (minutesInMonth) rather thanmain. 16 of 18 namespace members (89%) usemainfor this binding. Renamed the binding and itsmodule.exportsassignment tomain. Internal only; therequired public API is untouched.@stdlib/time/minutes-in-yearSame deviation as
minutes-in-month:lib/index.jsboundrequire( './main.js' )tominutesInYearinstead ofmain(89% conformance tomainacross the namespace). Renamed the binding and itsmodule.exportsassignment. Internal only.@stdlib/time/ms2durationThe four
floor()calls inlib/main.jsomitted the interior parenthesis spacing required by thespace-in-parenslint rule (floor(ms/…)rather thanfloor( ms/… )). All 17 otherfloor()call sites in the namespace already conform. Added the spacing. Whitespace-only.Related Issues
No.
Questions
No.
Other
Validation. Structural features were extracted from the filesystem; semantic features were extracted per package from
lib/main.js/lib/index.js; candidate drift was cross-checked by three independent reviewers (structural, semantic, and fresh-eyes). Deliberately excluded from this PR:tic/toclacking CLI scaffolding (bin/cli,etc/cli_opts.json,test.cli.js) — intentional, since neither is a standalone CLI primitive; missing## See Alsosections in four READMEs — generator-owned; benchmark-directory absence — below the majority threshold and not a mechanical fix. Each change here was verified to preserve behavior via direct invocation (e.g.minutesInMonth( 2, 2017 ) === 40320,ms2duration( 1030 ) === '1s30ms').Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was generated by an automated cross-package drift-detection routine run via Claude Code: it extracted structural and semantic features from every
@stdlib/timepackage, identified the majority convention per feature, flagged the three outliers above, and applied the mechanical corrections. Each correction was validated by independent review passes and verified behavior-neutral before commit.@stdlib-js/reviewers
Generated by Claude Code