Skip to content

Using vitest 4#2815

Merged
RobinTail merged 36 commits intomasterfrom
use-vitest4-in-v25
Oct 23, 2025
Merged

Using vitest 4#2815
RobinTail merged 36 commits intomasterfrom
use-vitest4-in-v25

Conversation

@RobinTail
Copy link
Copy Markdown
Owner

@RobinTail RobinTail commented Jul 13, 2025

@RobinTail RobinTail added this to the v25 milestone Jul 13, 2025
@RobinTail RobinTail added the dependencies Pull requests that update a dependency file label Jul 13, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 13, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use-vitest4-in-v25

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.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jul 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-v8@​3.2.4 ⏵ 4.0.199 +110069 -399 +2100
Updatedvitest@​3.2.4 ⏵ 4.0.198 +11007999 +1100

View full report

@coveralls-official
Copy link
Copy Markdown

coveralls-official Bot commented Jul 13, 2025

Coverage Status

coverage: 99.845% (-0.2%) from 100.0%
when pulling 23b64b9 on use-vitest4-in-v25
into c1b5029 on master.

@RobinTail RobinTail changed the title Using vitest 4 (in v25 with vite 7) chore(v25): Using vitest 4 Jul 13, 2025
Base automatically changed from make-v25 to master August 2, 2025 09:04
RobinTail added a commit that referenced this pull request Aug 2, 2025
### Dedication


![image](https://github.com/user-attachments/assets/47dc18f9-70fa-4276-9c79-2a84ef360642)

**Sara Millerey González** was a 32 years young trans woman from Bello,
Antioquia, Colombia.
She was killed in April 2025. Millerey was raped, tortured, and thrown
into a ravine by a group of men. Denounced as a hate crime by press and
Antioquia's mayor, the Colombian National Working Group on Violence
Based on Victims' Sexual Orientation or Gender Identity is collaborating
with the Attorney's General's Office on identifying remaining suspects.

Transgender women suffer too frequently from transphobic violence and
cruelty, being the less protected social group. I'd like to raise an
awareness of this problem. Humans should be creators — not killers. But
most importantly, I want every transgender girl to have an opportunity
to create applications quickly and, in general, learn to write code
easily in order to receive job offers and leave dangerously transphobic
territories for more favorable and civilized ones, and live happily
there. Protect transgender women.

### Breaking

- `zod` version is `^4.0.0`;
  - Compatibility with `zod@^3` is dropped;
  - You SHOULD now `import { z } from "zod"` without the `/v4` suffix;
- Node.js version is `^20.19.0 || ^22.12.0 || ^24.0.0`;
  - The framework distribution is now ESM-only (finally);
  - All the Node.js versions listed above support `require(ESM)` syntax;
- Changes to the `Middleware` class:
- When the `input` schema is not defined, the `input` argument of the
`handler` method is now `unknown`;
- Plugin changes to metadata:
  - `example` removed;
  - object-based `examples` removed (only array remains);
- use either `.example()` or `.meta({})` with `examples` being an array.
- Public `getExamples()` helper removed:
  - use `.meta()?.examples` or `globalRegistry.get()?.examples` instead.

### Content

- #2622 
- #2711 
- #2740 
- #2742 
- #2777 
- #2809 
- #2814 
- #2815 
- #2842 
- #2843 
- #2844 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **New Features**
* Dropped support for Zod v3; now requires Zod v4 and updates all
imports to use `"zod"` directly.
* Framework is now distributed as ESM-only and supports Node.js
^20.19.0, ^22.12.0, or ^24.0.0.
  * Introduced a unified empty schema utility for input/output defaults.
* Added Vitest configuration with experimental eventsource flag for
testing.

* **Breaking Changes**
* Removed the public `getExamples()` helper; access examples via
`.meta()?.examples` or the global registry.
* Middleware and factory input schemas now default to `undefined` when
omitted, not an empty object schema.
* Dropped support for object-based `examples` in schema metadata; use
`.example()` or array-based `examples` instead.
* Removed deprecated enum and literal depicters from documentation
helpers.
* Updated import paths from `"zod/v4"` to `"zod"` throughout codebase
and examples.
* Adjusted migration rules to reflect import and metadata changes only.

* **Bug Fixes**
* Improved handling of empty schemas and type inference for middleware
and endpoint factories.

* **Chores**
* Updated documentation and changelogs for new Zod import paths and
version requirements.
* Updated build, test, and lint configurations for ESM-only output and
new dependency versions.
* Adjusted GitHub workflows to monitor new branches and updated Node.js
versions.
* Removed legacy migration rules and simplified migration logic focusing
on import and metadata changes.
* Removed legacy dependencies like `undici` and adjusted package
metadata.
  * Simplified ESLint and tsup configurations for ESM-only builds.
  * Updated startup logo dedication message.

* **Tests**
* Refactored and updated tests to align with new schema defaults and Zod
v4 usage.
* Simplified migration tests and rules to focus on import path changes.
  * Added tests for new empty schema utilities.

* **Style**
  * Updated dedication message in the startup logo.

* **Revert**
* Removed legacy and deprecated migration logic and configuration
overrides.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@RobinTail RobinTail force-pushed the use-vitest4-in-v25 branch from dbc1782 to 001a0c0 Compare August 2, 2025 09:31
@RobinTail RobinTail changed the title chore(v25): Using vitest 4 Using vitest 4 Aug 24, 2025
@RobinTail RobinTail removed this from the v25 milestone Aug 24, 2025
@RobinTail
Copy link
Copy Markdown
Owner Author

The number of removed dependencies is fantastic

@RobinTail RobinTail marked this pull request as ready for review October 23, 2025 10:09
Copy link
Copy Markdown
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

awesome

@RobinTail RobinTail merged commit 6ccabc9 into master Oct 23, 2025
12 checks passed
@RobinTail RobinTail deleted the use-vitest4-in-v25 branch October 23, 2025 10:14
RobinTail added a commit that referenced this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant