Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRename config/docs properties, centralize Zod brand/examples into a new metadata module, convert many runtime imports to type-only and explicit Changesv28 migration (types, metadata, imports, migration, tooling)
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Server as Server
participant Router as Router
participant Docs as Docs
participant Meta as Meta
Client->>Server: HTTP request
Server->>Router: dispatch route (uses recognizeMethodDependentRoutes)
Router->>Router: interpret path keys as method vs path (preferMethod)
alt wrong method on existing path
Router->>Server: apply or skip 405+Allow based on hintAllowedMethods
end
Docs->>Meta: request summary via summarizer(summary, description, trimSummary)
Docs->>Meta: request examples / brand via getExamples/getBrand
Meta-->>Docs: returns examples / brand metadata
Estimated code review effort 🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | [`^9.39.2` → `^10.0.0`](https://renovatebot.com/diffs/npm/eslint/9.39.2/10.0.0) |  |  | | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | [`^9.0.0` → `^9.0.0 \|\| ^10.0.0`](https://renovatebot.com/diffs/npm/eslint/9.39.2/10.0.0) |  |  | --- ### Release Notes <details> <summary>eslint/eslint (eslint)</summary> ### [`v10.0.0`](https://github.com/eslint/eslint/compare/v9.39.2...4e6c4ac042e321da8fc29ce53ed03c86dcaa44a7) [Compare Source](https://github.com/eslint/eslint/compare/v9.39.2...v10.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/RobinTail/express-zod-api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NS4yIiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Robin Tail <robin_tail@me.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
# Conflicts: # pnpm-lock.yaml
EOL soon. 22.18 is defined by `tsdown`
# Conflicts: # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
Complements #3364
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
6-8: Add explicitengines.nodeconstraint for native TypeScript execution.Lines 6 and 8 execute
.tsfiles directly withnode. The rootpackage.jsonlacks anengines.nodefield, which means contributors on Node 20 or older will encounter runtime failures. Add an explicit constraint aligned with your CI test matrix.Suggested patch
{ "private": true, "type": "module", + "engines": { + "node": ">=22.19.0" + }, "scripts": {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 6 - 8, The package.json is missing an engines.node constraint while prebuild and pretest scripts run .ts files directly with node; add an "engines": { "node": "<semver-constraint>" } entry to package.json (matching your CI test matrix, e.g., the minimum Node version that supports native TS execution used in CI) so contributors on older Node versions won't fail; update the semver to align with CI and ensure any README/contributor docs reflect the required Node version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@package.json`:
- Around line 6-8: The package.json is missing an engines.node constraint while
prebuild and pretest scripts run .ts files directly with node; add an "engines":
{ "node": "<semver-constraint>" } entry to package.json (matching your CI test
matrix, e.g., the minimum Node version that supports native TS execution used in
CI) so contributors on older Node versions won't fail; update the semver to
align with CI and ensure any README/contributor docs reflect the required Node
version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c571205f-e5f9-4138-93b4-da3850f8a373
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json
# Conflicts: # .github/workflows/node.js.yml # express-zod-api/package.json # migration/package.json # package.json # pnpm-lock.yaml # zod-plugin/package.json
There was a problem hiding this comment.
No new issues. Reviewed the following changes:
- Guarded
trimSummaryagainst non-positive andNaNlimits viaMath.max(1, limit || 0) - 1, ensuring the result is never longer than the requested limit and never produces a negative slice end - Added a parameterized test covering
limitvalues of 5, 0, -1, andNaN
Claude Opus | 𝕏
|
🚀 beta 5 includes the Node 26 support |
There was a problem hiding this comment.
No new issues. Reviewed the following changes:
- Hardened
trimSummaryagainst non-positive andNaNlimits by flooring the effective limit at 1, with parameterized tests covering5/0/-1/NaN - Widened
GlobalMeta[brandProperty]andxBrandparameter fromsymbol | string | numbertoPropertyKeyin the zod-plugin augmentation, with matching type-level tests - Merged
masterto pick up Node 26 support and extended v28's engines range to^22.19.0 || ^24.0.0 || ^26.0.0 - Bumped beta versions:
express-zod-api@28.0.0-beta.5,migration@28.0.0-beta.3,zod-plugin@5.0.0-beta.5 - Minor AGENTS.md wording tweak for
test.eachplaceholder guidance
Prior review feedback:
-
trimSummaryedge cases for non-positive limits — addressed
Claude Opus | 𝕏
|
@pullfrog please make the final review before releasing the next major version. Let me know if I'm missing something. Verify the CHANGELOG entry and the validity of the README to the changes of the implementation. |
There was a problem hiding this comment.
Important
The v28 public API renames and their internal wiring line up cleanly, and the CHANGELOG's migration snippets (summarizer: ({ summary, trim }) => trim(summary) etc.) are exactly equivalent to the old behaviour. A few gaps worth closing before the tag, in rough severity order:
- Migration codemod doesn't cover
.brand()→.xBrand()— silent breakage for anyone usingbrandHandlingwith user schemas. - README never mentions
summarizer— the new feature is advertised in the CHANGELOG but has no documentation for users. README.md.remap()sample is inconsistent — unlike the other plugin-only method examples, it lacks a "requires Zod Plugin" inline note.zod-plugin/CHANGELOG.mdv5.0.0 drops Node 26 from the supported list butzod-plugin/package.jsonkeeps it — contradicts both the plugin's own package.json and v4.2.0's "Supporting Node 26" entry.- Minor: the main CHANGELOG's migration bullet could mention the new ESLint 10 peer requirement, and the
getBrand()removal from@express-zod-api/zod-pluginexports (currently only documented in the plugin's own CHANGELOG).
Verified accurate (non-exhaustive):
- Node engines
^22.19.0 || ^24.0.0 || ^26.0.0are consistent across all workspacepackage.jsonfiles, CI matrix, and tsconfig. - All five property renames wire through correctly:
hintAllowedMethodsinrouting.ts:111,recognizeMethodDependentRoutesinrouting-walker.ts:40-54,summaryonendpoints-factory.ts/endpoint.ts/documentation.ts,summarizerindocumentation.ts:55-59,noBodySchemainintegration.ts. defaultSummarizerpreserves the oldhasSummaryFromDescription: truebehaviour, andtrimSummary(undefined)returnsundefined, so thesummarizer: ({ summary, trim }) => trim(summary)replacement forhasSummaryFromDescription: falseis semantically exact.- No framework
src/file invokes plugin-only methods (.brand(),.example(),.remap(),.deprecated(),.xBrand(),.label()); all six built-in brands use.meta({ [brandProperty]: ... })consistently. README.mdhas no surviving references to any of the five renamed options or to.brand()outside the Zod Plugin section; TOC anchors all resolve; example workspace usessummary,hintAllowedMethods, etc.SECURITY.mdcorrectly adds v28 (Koko, 05.2026).
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
README.md:552(RIGHT) — line 552 (RIGHT) is not inside a diff hunk
Claude Opus | 𝕏
| `.meta({ id: "UniqueName" })` for custom schema naming. | ||
| _See the complete example of the generated documentation | ||
| [here](https://github.com/RobinTail/express-zod-api/blob/master/example/example.documentation.yaml)_ | ||
|
|
There was a problem hiding this comment.
The CHANGELOG introduces summarizer as the replacement for hasSummaryFromDescription and a new feature (configurable trim limit, description fallback), but the README never mentions it — grep summarizer README.md returns zero hits. The natural home is right here under Creating documentation, alongside the summary/description example. Users upgrading who relied on hasSummaryFromDescription: false have no in-repo guidance on the replacement beyond the one-line CHANGELOG snippet.
| - The `trim()` function accepts a string and the limit (default: 50, best practice) that you can now customize; | ||
| - Breaking change to the `Integration` constructor argument (object): | ||
| - property `noContent` renamed to `noBodySchema`; | ||
| - Consider using [the automated migration](https://www.npmjs.com/package/@express-zod-api/migration). |
There was a problem hiding this comment.
Two small additions worth considering under the migration bullet: (a) the migration now requires ESLint ≥ 10 and typescript-eslint ≥ 8.58 (peer-dep bump in migration/package.json), so users on ESLint 9 will see a peer-dep error when installing; (b) getBrand() was removed from @express-zod-api/zod-plugin's exports — users who imported it (as encouraged by the old brandHandling docs) now need schema.meta()?.["x-brand"]. Currently only documented in the plugin's own CHANGELOG.
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
Adds a rule targeting `brandHandling` inside `Documentation` or
`Integration` constructor arguments. Since `.brand()` is no longer
patched in v28, the rule inserts a multiline JSDoc flagging manual
migration steps: install and import the plugin, switch `.brand()` to
`.xBrand()`, or use `.meta({ "x-brand": ... })`. Idempotent — will not
re-annotate if the JSDoc is already present.
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 `@migration/index.ts`:
- Around line 42-48: Update the selector regexes used for matching call
expressions to be anchored so they only match exact property names: replace the
unanchored `/build|buildVoid/` used in the selector for shortDescription with
`/^(build|buildVoid)$/`, and replace the unanchored
`/Documentation|Integration/` used in the brandHandling selector with
`/^(Documentation|Integration)$/`; edit the selectors that build the strings
(the ones constructing `${NT.CallExpression}[callee.property.name=...]` and
`${NT.NewExpression}[callee.name=...]`) so they use the anchored forms to avoid
matching substrings like "rebuild" or "buildSchema".
🪄 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
Run ID: 98aaf900-0c39-4945-bbce-3ef8bff00234
📒 Files selected for processing (2)
migration/index.spec.tsmigration/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- migration/index.spec.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
No new issues. Reviewed the following changes:
- Anchored the
shortDescriptionselector'scallee.property.nameregex to/^(build|buildVoid)$/so it no longer matches any method name containingbuildas a substring (e.g.,rebuild,buildConfig) - Anchored the
brandHandlingselector'scallee.nameregex to/^(Documentation|Integration)$/so it only matches those exact constructors rather than any identifier containing those substrings
Claude Opus | 𝕏

Koko Da Doll (aka Rasheeda Williams) was a 35-year-young Black trans woman, performance artist, singer, and star
of the acclaimed documentary Kokomo City. Born in College Park, Georgia, she was based in Atlanta and
became a prominent voice for transgender visibility and the rights of Black trans women.
She was a talented rap artist who released two singles: "Trick" (2020) and "Bulletproof" (2022).
A song she created was featured on the TV show The Chi in 2023, showcasing her artistic talents beyond her advocacy work.
Koko was one of four Black trans women featured in the groundbreaking documentary Kokomo City, directed by D. Smith. The film premiered at the 2023 Sundance Film Festival and won both the NEXT Innovator Award and NEXT Audience
Award. It also received the Berlinale Panorama Audience Award.
In the film, Koko spoke openly about her experiences as a sex worker and the challenges faced by Black trans women. She discussed doing sex work to avoid homelessness for her mother, sister, and herself.
After the Sundance première, Koko wrote on Instagram:
She hoped that her participation in the film would help save lives and create more opportunities for young trans women.
On April 18, 2023, at around 11pm, Koko Da Doll was found dead with a gunshot wound on a sidewalk near Holmes Shopping
Plaza in Southwest Atlanta. She was 35 years old.
A 17-year-old suspect was arrested on April 27, 2023, on suspicion of murder, aggravated assault, and possession of a firearm in the commission of a felony. Atlanta police indicated that a hate crime investigation was ongoing.
Koko was the 13th trans person killed in the United States in 2023. Following her death, Kokomo City was dedicated to her memory. She was honored during the In Memoriam segment at the 2023 BET Awards.
The New York Times described her as someone who "brims with vitality, ambition, and insight" — a woman who fought tooth and nail for her life and self-worth.
Her tragic death serves as a stark reminder of the ongoing violence and discrimination faced by trans women in America.
AP News · AL.com · TDoR
👩🏽🍳 Cooking...
Promise.withResolvers()#3268typescript-eslintfor TypeScript 6 support #3287undici8 #3294wrongMethodBehavior—>hintAllowedMethods#3299methodLikeRouteBehavior—>recognizeMethodDependentRoutes#3300hasSummaryFromDescription—>hasSummary#3302noContent—>noBodySchema#3303shortDescription—>summary,hasSummary—>summarizer(fn) #3310Summary by CodeRabbit
New Features
Documentation
Chores
Tests