Add CI/publish workflows and strengthen tests for 1.2.0 - #4
Conversation
Migrate tests off Jest to Vitest against the current CLI, upgrade the emulator and Vitest deps, and add GitHub Actions for PR checks and npm publish. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 46 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
📝 WalkthroughWalkthroughThe package version and development dependencies were updated. CLI tests now run in subprocesses and cover transaction, limit, error, and help flows. GitHub Actions workflows were added for multi-version CI and npm publishing. ChangesCLI testing and release automation
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Rename prettier.config.js to .cjs for type:module, ignore template submodules, add TypeScript/@types/node so tsc succeeds, and build in CI/publish since bin is gitignored. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tests/index.test.js`:
- Around line 178-203: Update the “reports when the template file does not
exist” and “reports when the environment file does not exist” tests to expect a
consistent nonzero exit status and validate the error output on stderr. In the
CLI path used by runCli, handle the environment-file read failure from
fs.readFileSync so it reports the missing file through stderr and exits with the
same nonzero status as the missing-template case.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a541b6c-b0ca-4927-a666-6b15dcf62b4d
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.github/workflows/ci.yml.github/workflows/publish.ymlpackage.jsontests/index.test.js
Align error handling so both missing-file cases report on stderr and exit nonzero, and update the CLI tests to assert that behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
programmable-card-code-emulator/ VitestTest plan
npm ci && npm testv1.2.0and verify publish workflow (or run viaworkflow_dispatch)Made with Cursor
Summary by CodeRabbit
New Features
Bug Fixes
Tests