Skip to content

chore: Update project metadata and improve documentation - #5

Merged
alexmarqs merged 2 commits into
mainfrom
chore/simplify-api-interface-plus-chores
Jun 10, 2026
Merged

alexmarqs merged 2 commits into
mainfrom
chore/simplify-api-interface-plus-chores

Conversation

@alexmarqs

@alexmarqs alexmarqs commented Jun 10, 2026 •

Copy link
Copy Markdown
Owner
  • Added repository and bugs fields to package.json for better project management.
  • Introduced a new "Tech Stack" section in README to highlight tools used.
  • Revised comments in tsdown.config.ts for clarity.
  • Removed size and operations properties from Rollback type in src/types.ts to simplify the API.
  • Added tests for pending operations and their retry behavior in index.test.ts.

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Removed operations and size getters from rollback API
    • API surface trimmed to add, commit, and rollback methods only
  • Bug Fixes

    • Fixed commit() to no-op when rollback already executed
  • Documentation

    • Updated API documentation to reflect removed properties
  • Chores

    • Added repository and issue tracker metadata to package

- Added repository and bugs fields to package.json for better project management.
- Introduced a new "Tech Stack" section in README to highlight tools used.
- Revised comments in tsdown.config.ts for clarity.
- Removed size and operations properties from Rollback type in src/types.ts to simplify the API.
- Added tests for pending operations and their retry behavior in index.test.ts.
@changeset-bot

changeset-bot Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f389617

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
rollbackit Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 56 minutes and 10 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46af2143-ead7-4f58-bff2-5cbed2504a5c

📥 Commits

Reviewing files that changed from the base of the PR and between 55bfe34 and f389617.

📒 Files selected for processing (1)
  • CLAUDE.md
📝 Walkthrough

Walkthrough

This PR removes the operations and size introspection properties from the Rollback API as a major version bump. The type contract is simplified, the implementation removes the corresponding getters, tests are updated to reflect the change, and documentation and metadata are synchronized.

Changes

Remove Operations and Size Getters

Layer / File(s) Summary
Rollback type contract
src/types.ts
Rollback type removes size: number and operations: readonly RollbackOperation[] properties, exposing only add(), commit(), and rollback() methods.
Implementation: remove getters and guard commit
src/lib/operations.ts
createRollback() removes the operations and size getters from the returned object. commit() gains an early guard that returns immediately when the instance has already been rolled back.
Test updates
tests/index.test.ts
Existing test is reworked to use async undo functions and removes size assertion; new test verifies early rollback stop with retryable pending operations.
Documentation and metadata
README.md, .changeset/trim-operations-getter.md, package.json, tsdown.config.ts
API documentation table removes size and operations references. Changeset entry documents the major bump. Package metadata adds repository and bugs URLs. Build tool comment clarifies Node version requirements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Trim the clutter, clean the API,
Operations hidden, size gone away—
Just add, commit, rollback remain,
Less intrusion, much more sane! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'chore: Update project metadata and improve documentation' is misleading because the primary changes involve removing API surface (size and operations getters from Rollback type), which is a major version bump documented in the changeset, not just metadata updates and documentation. Revise the title to reflect the main change: consider 'feat: Remove size and operations getters from Rollback API' or 'chore: Simplify Rollback API by removing introspection properties' to accurately represent the breaking API changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 chore/simplify-api-interface-plus-chores

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.

The architecture note referenced a non-existent src/lib/core/ directory;
fix it to reflect the actual layout (src/lib/ plus src/types.ts).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/lib/operations.ts (1)

65-68: 💤 Low value

The commit() guard is correct but lacks dedicated test coverage.

The early return when rolledBack is true correctly implements the documented "safe no-op" behavior. Consider adding a test case that explicitly verifies commit() is a no-op after rollback() — similar to the existing test at line 139 that verifies repeated rollback() calls.

🤖 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 `@src/lib/operations.ts` around lines 65 - 68, The commit() method already
guards with an early return when rolledBack is true, but there's no dedicated
test asserting commit() becomes a no-op after rollback(); add a unit test that
calls rollback() on an instance and then calls commit() and verifies no state
change and no errors (mirroring the existing repeated-rollback test pattern),
referencing the Operations class or function under test and its commit() and
rollback() methods to locate where to add the new test.
🤖 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 `@src/lib/operations.ts`:
- Around line 65-68: The commit() method already guards with an early return
when rolledBack is true, but there's no dedicated test asserting commit()
becomes a no-op after rollback(); add a unit test that calls rollback() on an
instance and then calls commit() and verifies no state change and no errors
(mirroring the existing repeated-rollback test pattern), referencing the
Operations class or function under test and its commit() and rollback() methods
to locate where to add the new test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c12fd7b2-841e-4e9a-836e-6e98bc904559

📥 Commits

Reviewing files that changed from the base of the PR and between 416d878 and 55bfe34.

📒 Files selected for processing (7)
  • .changeset/trim-operations-getter.md
  • README.md
  • package.json
  • src/lib/operations.ts
  • src/types.ts
  • tests/index.test.ts
  • tsdown.config.ts
💤 Files with no reviewable changes (1)
  • src/types.ts

@alexmarqs
alexmarqs merged commit 74a726b into main Jun 10, 2026
5 checks passed
@alexmarqs
alexmarqs deleted the chore/simplify-api-interface-plus-chores branch June 10, 2026 20:46
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