Skip to content

Feature/code cleanup#34

Merged
magmacomputing merged 8 commits into
mainfrom
feature/code-cleanup
May 26, 2026
Merged

Feature/code cleanup#34
magmacomputing merged 8 commits into
mainfrom
feature/code-cleanup

Conversation

@magmacomputing
Copy link
Copy Markdown
Owner

@magmacomputing magmacomputing commented May 25, 2026

Documentation corrections / updates

Summary by CodeRabbit

  • New Features

    • Added an ISO-8601 UTC getter on Tempo instances and improved relative-time formatting to accept nested intl options.
  • Documentation

    • Expanded duration examples (deterministic since/until guidance, balancing downwards) and updated license/registry URLs; changelog updated for v2.11.1.
  • Bug Fixes

    • Corrected type-path resolution to avoid incorrect rewrites and improved serializable-registration collision messaging.
  • Tests

    • Ensured Tempo is initialized before many plugin/ticker tests.
  • Chores

    • Bumped package versions to 2.11.1; adjusted bundle externals.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@magmacomputing, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5921292-c2e9-487c-bccd-88bb34e1b4ac

📥 Commits

Reviewing files that changed from the base of the PR and between 575669f and 8d53bb3.

📒 Files selected for processing (1)
  • packages/tempo/test/plugins/ticker.options.test.ts
📝 Walkthrough

Walkthrough

Bumps monorepo and package versions to 2.11.1; updates Tempo docs for duration APIs; prefer structured opts.intl.relativeTime in relative-time resolution; precompute now in #resolve() and add Tempo.iso; tighten resolve-types path check; update rollup/vitest/test wiring; export additional library types; adjust serializable registry collision handling.

Changes

Tempo 2.11.1 Release

Layer / File(s) Summary
Duration docs and examples
packages/tempo/doc/tempo.duration.md
Rewrote .since() to use an anchor Tempo and Intl.RelativeTimeFormat, replaced .until() example target with a Tempo instance, moved return-type guidance into Intelligent Balancing, updated EDO example, and added balancing-downwards examples.
Relative-time formatting option resolution
packages/tempo/src/module/module.duration.ts
.since() now prefers opts['intl']?.relativeTime before falling back to opts['relativeTime'].
Tempo resolve behavior, iso getter, and runtime registry updates
packages/tempo/src/tempo.class.ts, packages/tempo/src/support/support.runtime.ts
Precompute a UTC now ZonedDateTime for #resolve() fallbacks; added get iso() returning a UTC ISO-8601 string; addTerm/addPlugin now replace existing entries by key/name.
Test wiring and vitest aliases
packages/tempo/test/*, packages/tempo/vitest.config.ts
Added beforeEach hooks calling Tempo.init() across multiple test suites and added test alias mappings for #tempo/license and @magmacomputing/tempo/* for non-dist resolution.
Rollup externalization for license bundle
packages/tempo/rollup.config.js
Expanded external rules to leave @magmacomputing/tempo, @magmacomputing/library, and internal #library/#tempo imports untouched during the premium license bundle build.
resolve-types path detection fix
packages/tempo/bin/resolve-types.ts
Require lib/ directory boundary when detecting dist/lib/ paths to avoid incorrect alias rewrites.
Package manifest, changelog, and license docs
package.json, packages/tempo/package.json, packages/tempo/CHANGELOG.md, packages/tempo/doc/tempo.license.md
Bumped root and Tempo package versions to 2.11.1, updated Tempo devDependency @magmacomputing/library to 2.11.1, added v2.11.1 changelog entry, and updated license acquisition/revocation URLs to the registry hostname.

Library 2.11.1 Release

Layer / File(s) Summary
Package version bump and type exports
packages/library/package.json, packages/tempo/src/library.index.ts
Bumped packages/library to 2.11.1 and added type-only re-exports (OwnOf, KeyOf, ValueOf, EntryOf) surfaced via Tempo's library.index.ts.
Serializable registry collision handling
packages/library/src/common/serialize.library.ts
Make registerSerializable idempotent for identical constructors and improve collision error messaging by referencing the already-registered constructor name.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through docs and code tonight,

changed clocks to steady UTC light,
options nested, aliases set,
two packages bumped without a fret,
a tidy release — hop, delight.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Feature/code cleanup' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes (version bump, documentation updates, test initialization, API additions, and configuration changes). Use a more specific title that reflects the primary change, such as 'Bump to v2.11.1 with documentation updates and test infrastructure improvements' or focus on the main feature/fix being delivered.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/code-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/library/package.json`:
- Line 3: Update the pinned dependency for `@magmacomputing/library` in
packages/tempo/package.json to match the bumped version "2.12.0"; locate the
dependency entry that currently references "2.11.0" (the `@magmacomputing/library`
key in packages/tempo/package.json) and change its version string to "2.12.0" so
the tempo package and library package versions are consistent before release.

In `@packages/tempo/doc/tempo.duration.md`:
- Line 31: Update the non-deterministic example outputs: replace the hard-coded
numeric results for expressions like now.until(Tempo.now(), 'hours') (and the
examples on lines 52-53 that use "now" values) with deterministic output text
(e.g., "→ 0 (example output)" or "→ ~0 (example output)") or use a
fixed/deterministic anchor time in the example; ensure you update the
occurrences of now.until(Tempo.now(), 'hours') and any other examples
referencing now so they no longer show drifting numeric constants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f471301-899c-479b-a173-11d8eb4790d6

📥 Commits

Reviewing files that changed from the base of the PR and between 330a12a and 9c8655b.

📒 Files selected for processing (4)
  • packages/library/package.json
  • packages/tempo/doc/tempo.duration.md
  • packages/tempo/package.json
  • packages/tempo/src/module/module.duration.ts

Comment thread packages/library/package.json Outdated
Comment thread packages/tempo/doc/tempo.duration.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/tempo/test/plugins/ticker.options.test.ts (1)

5-7: 💤 Low value

Inconsistent indentation.

Line 5 has extra leading whitespace before beforeEach compared to the other test files in this PR.

🎨 Normalize indentation
-	    beforeEach(() => {
+	beforeEach(() => {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/tempo/test/plugins/ticker.options.test.ts` around lines 5 - 7, The
indentation for the test setup is inconsistent: fix the leading whitespace
before the beforeEach block so it matches the project's test file style; locate
the beforeEach that calls Tempo.init() (the beforeEach(() => { Tempo.init();
});) and remove the extra leading spaces so its indentation aligns with
surrounding tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/tempo/test/plugins/ticker.options.test.ts`:
- Around line 5-7: The indentation for the test setup is inconsistent: fix the
leading whitespace before the beforeEach block so it matches the project's test
file style; locate the beforeEach that calls Tempo.init() (the beforeEach(() =>
{ Tempo.init(); });) and remove the extra leading spaces so its indentation
aligns with surrounding tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1a8559e7-ae22-419a-a19c-2cfb93e45d19

📥 Commits

Reviewing files that changed from the base of the PR and between 1eaaed9 and 575669f.

📒 Files selected for processing (13)
  • packages/library/src/common/serialize.library.ts
  • packages/tempo/rollup.config.js
  • packages/tempo/src/support/support.runtime.ts
  • packages/tempo/test/core/static.test.ts
  • packages/tempo/test/plugins/term-dispatch.core.test.ts
  • packages/tempo/test/plugins/term-shorthand.test.ts
  • packages/tempo/test/plugins/term.test.ts
  • packages/tempo/test/plugins/ticker.active.test.ts
  • packages/tempo/test/plugins/ticker.hang.test.ts
  • packages/tempo/test/plugins/ticker.options.test.ts
  • packages/tempo/test/plugins/ticker.pulse.test.ts
  • packages/tempo/test/plugins/ticker.stop.test.ts
  • packages/tempo/vitest.config.ts
✅ Files skipped from review due to trivial changes (3)
  • packages/tempo/test/plugins/ticker.stop.test.ts
  • packages/tempo/test/core/static.test.ts
  • packages/tempo/test/plugins/term-shorthand.test.ts

@magmacomputing magmacomputing merged commit 593afa6 into main May 26, 2026
2 checks passed
@magmacomputing magmacomputing deleted the feature/code-cleanup branch May 26, 2026 08:35
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.

1 participant