Skip to content

feat: add distinct field JSDoc to findMany operation - #29269

Merged
jacek-prisma merged 1 commit into
prisma:mainfrom
connortessaro:fix-5509-jsdoc
Mar 3, 2026
Merged

feat: add distinct field JSDoc to findMany operation#29269
jacek-prisma merged 1 commit into
prisma:mainfrom
connortessaro:fix-5509-jsdoc

Conversation

@connortessaro

@connortessaro connortessaro commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #5509

Summary by CodeRabbit

  • Documentation
    • Enhanced JSDoc documentation to include the distinct option for findMany operations in the JavaScript client generator
    • Added support for documenting the distinct option across findMany, findFirst, and findFirstOrThrow operations in the TypeScript client generator

Copilot AI review requested due to automatic review settings February 27, 2026 14:09
@coderabbitai

coderabbitai Bot commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6586972 and 1ac358f.

📒 Files selected for processing (2)
  • packages/client-generator-js/src/TSClient/jsdoc.ts
  • packages/client-generator-ts/src/TSClient/jsdoc.ts

Walkthrough

This PR adds JSDoc documentation support for the distinct field in find-related operations. The distinct option is now included in JSDoc fields mapping for findMany (in both generators), and findFirst/findFirstOrThrow (in TypeScript generator).

Changes

Cohort / File(s) Summary
JavaScript Client Generator
packages/client-generator-js/src/TSClient/jsdoc.ts
Added distinct field to JSDoc fields mapping for findMany operations.
TypeScript Client Generator
packages/client-generator-ts/src/TSClient/jsdoc.ts
Added distinct field to JSDoc fields mapping for findMany, findFirst, and findFirstOrThrow operations.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding distinct field JSDoc support to findMany operations.
Linked Issues check ✅ Passed The PR adds distinct field JSDoc documentation to findMany and related operations, directly addressing issue #5509's request for improved inline JSDoc.
Out of Scope Changes check ✅ Passed All changes are scoped to adding distinct field JSDoc documentation to findMany/findFirst operations, directly aligned with issue #5509 objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@CLAassistant

CLAassistant commented Feb 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Prisma Client generator JSDoc metadata so the findMany operation documents the distinct argument (addressing #5509 by improving in-editor discoverability of findMany options).

Changes:

  • Adds distinct to the findMany JSDoc fields map in the TypeScript client generator.
  • Mirrors the same change in the JavaScript client generator.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/client-generator-ts/src/TSClient/jsdoc.ts Exposes distinct field documentation for findMany in generated TS client JSDoc.
packages/client-generator-js/src/TSClient/jsdoc.ts Keeps JS generator output aligned by adding the same distinct JSDoc field for findMany.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jacek-prisma
jacek-prisma merged commit 8e66b69 into prisma:main Mar 3, 2026
252 of 256 checks passed
@connortessaro
connortessaro deleted the fix-5509-jsdoc branch March 4, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve JSDoc documentation on findMany operations

4 participants