Skip to content

chore: clean-up - #13832

Merged
kgryte merged 3 commits into
developfrom
philipp/drift-time-2026-08-01
Aug 1, 2026
Merged

kgryte merged 3 commits into
developfrom
philipp/drift-time-2026-08-01

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request normalizes three source-file convention deviations in the @stdlib/time namespace 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/time has 19 direct members; the base namespace-aggregator package was excluded, leaving 18 leaf function packages voted at a 75% majority threshold (≥14/18). Structural features (file tree, package.json shape, 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.json key set, and core file layout. Features excluded for lacking a clear majority: benchmark/benchmark.js presence (2/18) and per-function @example count. The namespace is unusually consistent — the only corrections below are convention drift in three outliers.

@stdlib/time/minutes-in-month

The lib/index.js re-export bound require( './main.js' ) to a package-named variable (minutesInMonth) rather than main. 16 of 18 namespace members (89%) use main for this binding. Renamed the binding and its module.exports assignment to main. Internal only; the required public API is untouched.

@stdlib/time/minutes-in-year

Same deviation as minutes-in-month: lib/index.js bound require( './main.js' ) to minutesInYear instead of main (89% conformance to main across the namespace). Renamed the binding and its module.exports assignment. Internal only.

@stdlib/time/ms2duration

The four floor() calls in lib/main.js omitted the interior parenthesis spacing required by the space-in-parens lint rule (floor(ms/…) rather than floor( ms/… )). All 17 other floor() call sites in the namespace already conform. Added the spacing. Whitespace-only.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

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/toc lacking CLI scaffolding (bin/cli, etc/cli_opts.json, test.cli.js) — intentional, since neither is a standalone CLI primitive; missing ## See Also sections 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

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution.

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/time package, 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

claude added 3 commits August 1, 2026 12:25
…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
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
time/minutes-in-month $\\color{green}162/162$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}162/162$
$\\color{green}+100.00\\%$
time/minutes-in-year $\\color{green}126/126$
$\\color{green}+100.00\\%$
$\\color{green}12/12$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}126/126$
$\\color{green}+100.00\\%$
time/ms2duration $\\color{green}122/122$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}122/122$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte
kgryte marked this pull request as ready for review August 1, 2026 21:21
@kgryte
kgryte requested a review from a team August 1, 2026 21:21
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 1, 2026
@kgryte kgryte changed the title refactor: normalize re-export bindings and parenthesis spacing in @stdlib/time chore: clean-up Aug 1, 2026
@kgryte
kgryte merged commit 5c2e184 into develop Aug 1, 2026
35 checks passed
@kgryte
kgryte deleted the philipp/drift-time-2026-08-01 branch August 1, 2026 21:21
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants