Skip to content

Comments

[Issue #525] Migrate cli to vitest#526

Merged
widal001 merged 6 commits intomainfrom
issue-525-migrate-cli-to-vitest
Feb 23, 2026
Merged

[Issue #525] Migrate cli to vitest#526
widal001 merged 6 commits intomainfrom
issue-525-migrate-cli-to-vitest

Conversation

@widal001
Copy link
Collaborator

@widal001 widal001 commented Feb 23, 2026

Summary

Migrates the CLI to vitest to align with other projects in this codebase and resolve a lingering CI failure that was blocking #522

Changes proposed

What was added, updated, or removed in this PR.

  • Replaces jest with vitest in dependencies
  • Updates CLI tests and configs to use vitest syntax
  • Updates packages to use catalog: for vitest dependency
  • Fixes most dependabot warnings, and temporarily ignores the ajv warning because of a conflict with eslint

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.

Testing instructions

There aren't really any additional checks for us to test manually. The main check is the CI which runs both the tests and pnpm audit.

Reason for this change

The move to vitest was long overdue and resolved a few other warnings that we'd get every time we installed all of the dev dependencies in lib/cli/. But mostly this was necessary to resolve this persistent CLI failure that stemmed from a mismatch between ESModule and CJS -- two different module formats for JavaScript.

TL;DR Jest is an outdated testing framework that uses an old JavaScript module format that was causing extra headaches. Switching to vitest aligns CLI with the rest of the codebase and fixes the blocking CI failures.

Notes

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

Screenshot 2026-02-23 at 12 07 44 PM

Skips ajv warnings because there are compatibility issues with eslint
Fixing the CVE for ajv causes some breaking changes with eslint
@github-actions github-actions bot added cli Issue or PR related to the @common-grants/cli library typescript Issue or PR related to TypeScript tooling labels Feb 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

🚀 Website Preview Deployed!

Preview your changes at: https://cg-pr-526.billy-daly.workers.dev

This preview will be automatically deleted when the PR is closed.

@github-actions github-actions bot added website Issues related to the website sdk Issue or PR related to our SDKs ts-sdk Related to TypeScript SDK labels Feb 23, 2026
@widal001 widal001 marked this pull request as ready for review February 23, 2026 17:08
@widal001 widal001 requested a review from jcrichlake February 23, 2026 17:08
@widal001 widal001 merged commit 3ee3e35 into main Feb 23, 2026
11 checks passed
@widal001 widal001 deleted the issue-525-migrate-cli-to-vitest branch February 23, 2026 17:36
@github-actions
Copy link
Contributor

🗑️ Preview Cleaned Up

The preview for this PR has been automatically deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Issue or PR related to the @common-grants/cli library sdk Issue or PR related to our SDKs ts-sdk Related to TypeScript SDK typescript Issue or PR related to TypeScript tooling website Issues related to the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Migrate test suite to vitest

2 participants