Conversation
WalkthroughThe changes update import statements across multiple files to use Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HTTP Layer
participant Validation Middleware
participant Zod v4 Schema
User->>HTTP Layer: Sends request
HTTP Layer->>Validation Middleware: Passes request data
Validation Middleware->>Zod v4 Schema: Validates input (body/query)
Zod v4 Schema-->>Validation Middleware: Returns parsed/validated data
Validation Middleware-->>HTTP Layer: Passes validated data
HTTP Layer-->>User: Returns response
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (4)
libs/http/body/src/lib/request-to-multipart-form-data/request-to-multipart-form-data.ts (1)
3-3: Same resolution concern as aboveThis file has the identical import-path change; see previous comment.
libs/http/body/src/lib/request-to-json.ts (1)
4-4: Same resolution concern as aboveThis file has the identical import-path change; see previous comment.
libs/http/body/src/lib/request-to-text.ts (1)
3-3: Same resolution concern as aboveThis file has the identical import-path change; see previous comment.
libs/binary/pdftk/src/lib/form-fill.ts (1)
6-6: Same resolver caveat forzod/v4See comment in
decrypt.ts; ensure the sub-path works for this package too (especially whenpdftkis used from other runtimes like AWS Lambda layers).
🧹 Nitpick comments (1)
libs/http/validate/src/lib/validate-single.spec.ts (1)
1-4: Cleaned imports & switched tozod/v4– nice cleanupUnused imports were removed and the test file now mirrors the new Zod import path. Reads cleaner and avoids tslint/ESLint warnings.
You could sort the remaining imports alphabetically to match the repo style, but that’s purely cosmetic.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
apps/pdftk/src/schema.ts(1 hunks)libs/binary/pdftk/src/lib/decrypt.ts(1 hunks)libs/binary/pdftk/src/lib/encrypt.ts(1 hunks)libs/binary/pdftk/src/lib/form-fill.ts(1 hunks)libs/binary/puppeteer/src/lib/body-schema.ts(1 hunks)libs/binary/puppeteer/src/lib/query-schema.ts(1 hunks)libs/binary/puppeteer/src/lib/render-to.ts(2 hunks)libs/http/body/src/lib/request-to-json.ts(1 hunks)libs/http/body/src/lib/request-to-multipart-form-data/request-to-multipart-form-data.ts(1 hunks)libs/http/body/src/lib/request-to-text.ts(1 hunks)libs/http/body/src/lib/validate-request-headers.ts(1 hunks)libs/http/multipart-form-data/src/lib/http-multipart-form-data.ts(1 hunks)libs/http/validate/src/lib/body.ts(3 hunks)libs/http/validate/src/lib/query.ts(3 hunks)libs/http/validate/src/lib/validate-combo.spec.ts(1 hunks)libs/http/validate/src/lib/validate-single.spec.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
libs/binary/puppeteer/src/lib/render-to.ts (2)
libs/binary/unoserver/src/lib/schema.ts (1)
schema(4-6)libs/binary/puppeteer/src/lib/body-schema.ts (1)
bodySchema(58-61)
libs/http/validate/src/lib/query.ts (2)
libs/http/route/src/lib/http-route.ts (2)
ReqRes(28-31)Next(39-41)libs/http/route/src/lib/route.ts (1)
Prefix(9-9)
🔇 Additional comments (19)
libs/http/multipart-form-data/src/lib/http-multipart-form-data.ts (1)
3-3: Verify that thezod/v4sub-path is correctly resolved by every runtime (Node, bundler, Jest, etc.)The official Zod package only exposes versioned entry points if you install the exact matching major version.
Before merging, double-check:
package.jsonactually pins"zod": "^4.x"(or contains anexportsmap exposing./v4).- Your tsconfig / Jest / Webpack/Rollup config doesn’t still alias plain
"zod"elsewhere – mixed import paths will lead to duplicate copies or runtime “module not found” errors.If any consumer still relies on the bare
"zod"path, consider re-exporting once from a local wrapper (e.g.src/zod.ts) to avoid churn.libs/binary/pdftk/src/lib/decrypt.ts (1)
3-3: Confirmzod/v4sub-path is resolvable in all build targetsUsing the sub-path export (
'zod/v4') is fine with Node ≥16 and bundlers that respect the"exports"field, but older tooling (Jest <29, ts-node <10.9, some Webpack configs) may not resolve it without extra configuration.
Please verify that every consumer (tests, CLIs, lambdas, etc.) runs on a resolver that supports package exports; otherwise fall back toimport { z } from 'zod'or add the necessary resolver upgrade.libs/binary/pdftk/src/lib/encrypt.ts (1)
3-3: Import path update looks good – just double-check compatibilityNo logic changes; once the resolver compatibility is confirmed, this is 👍.
apps/pdftk/src/schema.ts (1)
1-1: Schema file aligned withzod/v4Consistent with the rest of the refactor; no issues spotted beyond the resolver note already mentioned.
libs/http/validate/src/lib/validate-combo.spec.ts (1)
4-4: LGTM! Clean import path update for zod v4 migration.The import change is consistent with the PR objective and maintains the same functionality.
libs/binary/puppeteer/src/lib/query-schema.ts (2)
1-1: LGTM! Import path updated for zod v4.The import change aligns with the migration to zod/v4.
5-5: z.enum() usage is correct
Verified thatScreenshotTypeis defined as a TypeScriptenuminlibs/binary/puppeteer/src/lib/screenshot-type.ts:export enum ScreenshotType { png = 'png', jpeg = 'jpeg', webp = 'webp', }Using
z.enum(ScreenshotType)is therefore valid and no further changes are needed.libs/binary/puppeteer/src/lib/render-to.ts (2)
4-4: LGTM! Correct type import update for zod v4.The change from
TypeOftooutputis the correct migration path for zod v4.
46-46: LGTM! Parameter type correctly updated.The type annotation correctly uses the new
outputtype from zod v4, maintaining the same functionality.libs/binary/puppeteer/src/lib/body-schema.ts (2)
2-2: LGTM! Import updated for zod v4 with correct core type access.The import change correctly accesses the core types needed for the union parameters.
4-7: LGTM! Function signature and type correctly updated.The parameter type change from
RawCreateParamstocore.$ZodUnionParamsis the correct migration path for zod v4, and the multi-line formatting improves readability.libs/http/validate/src/lib/body.ts (4)
4-4: LGTM! Imports correctly updated for zod v4.The change from
ZodSchemaandTypeOftoZodTypeandoutputis the correct migration path for zod v4.
6-8: LGTM! Function signature correctly updated.The generic constraint and return type are properly updated to use
ZodTypeandoutputfrom zod v4.
23-24: LGTM! Overload signatures correctly updated.All the
nextBodyfunction overloads properly use the new zod v4 types while maintaining the same functionality.Also applies to: 29-31, 36-36
53-53: LGTM! Middleware function types correctly updated.The
middlewareBodyfunction generic constraints and return types are properly migrated to use zod v4 types.Also applies to: 61-63
libs/http/validate/src/lib/query.ts (4)
3-3: LGTM: Correct import update for zod v4.The import statement correctly updates to use the version-specific path and imports the appropriate types for zod v4.
23-24: LGTM: Consistent type updates in nextQuery overloads.All overload signatures correctly update the generic constraints from
ZodSchematoZodObjectand return types fromTypeOftooutput, maintaining consistency across the function declarations.Also applies to: 29-30, 34-34, 40-40
58-58: LGTM: Proper type updates in middlewareQuery.The function signature and return type annotations are correctly updated to use
ZodObjectandoutputrespectively, consistent with the zod v4 migration.Also applies to: 65-65, 67-67
5-7: No breaking change detected forvalidateQueryOur search found no calls to
validateQuerywith non‐object schemas anywhere in the repository. Since every usage passes an object schema, tightening the parameter type fromZodSchematoZodObjectintroduces no breaking changes.
bc11b9b to
f55e3ab
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
apps/pdftk/src/schema.ts(1 hunks)libs/binary/pdftk/src/lib/decrypt.ts(1 hunks)libs/binary/pdftk/src/lib/encrypt.ts(1 hunks)libs/binary/pdftk/src/lib/form-fill.ts(1 hunks)libs/binary/puppeteer/src/lib/body-schema.ts(1 hunks)libs/binary/puppeteer/src/lib/query-schema.ts(1 hunks)libs/binary/puppeteer/src/lib/render-to.ts(2 hunks)libs/binary/unoserver/src/lib/schema.ts(1 hunks)libs/http/body/src/lib/request-to-json.ts(1 hunks)libs/http/body/src/lib/request-to-multipart-form-data/request-to-multipart-form-data.ts(1 hunks)libs/http/body/src/lib/request-to-text.ts(1 hunks)libs/http/body/src/lib/validate-request-headers.ts(1 hunks)libs/http/multipart-form-data/src/lib/http-multipart-form-data.ts(1 hunks)libs/http/validate/src/lib/body.ts(3 hunks)libs/http/validate/src/lib/query.ts(3 hunks)libs/http/validate/src/lib/validate-combo.spec.ts(1 hunks)libs/http/validate/src/lib/validate-single.spec.ts(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- libs/binary/pdftk/src/lib/encrypt.ts
- libs/binary/pdftk/src/lib/form-fill.ts
🚧 Files skipped from review as they are similar to previous changes (14)
- libs/http/body/src/lib/request-to-multipart-form-data/request-to-multipart-form-data.ts
- libs/binary/pdftk/src/lib/decrypt.ts
- libs/http/multipart-form-data/src/lib/http-multipart-form-data.ts
- apps/pdftk/src/schema.ts
- libs/http/body/src/lib/request-to-json.ts
- libs/http/body/src/lib/request-to-text.ts
- libs/binary/puppeteer/src/lib/render-to.ts
- libs/http/validate/src/lib/validate-combo.spec.ts
- libs/binary/puppeteer/src/lib/body-schema.ts
- libs/binary/puppeteer/src/lib/query-schema.ts
- libs/http/body/src/lib/validate-request-headers.ts
- libs/http/validate/src/lib/validate-single.spec.ts
- libs/http/validate/src/lib/query.ts
- libs/http/validate/src/lib/body.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: test (ubuntu-24.04, arm64)
- GitHub Check: test (ubuntu-24.04, amd64)
🔇 Additional comments (1)
libs/binary/unoserver/src/lib/schema.ts (1)
1-1: LGTM! Import update aligns with Zod v4 migration.The explicit import from
zod/v4is consistent with the broader codebase migration mentioned in the PR summary.
Summary by CodeRabbit
Refactor
Style
Tests