docs(docs): document orderBy() nulls, remove {bin} from CLI hints, and check the engine version against prisma - #8342
Conversation
…postgres 8.0.0-rc.13 Document the nulls option of orderBy() in the SQL query builder, replace the stale executionHash in the GitHub Actions guide, and update version numbers to the current releases. The version check now takes the expected @prisma/cli-engine version from the dependencies of prisma@latest, because that is the version a reader installs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
🍈 Lychee Link Check Report90 links: ✅ All links are working!Full Statistics Table
|
prisma 8.0.0-rc.19 installs @prisma/cli-engine 0.6.2, which prints prisma in these hints. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review. WalkthroughThe documentation version linter now checks ChangesDocumentation updates
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Merge Risk: ⚪ Minimal · up to This change updates documentation example values and version references. No actionable merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The same line changes as #8342, so the version check passes here and the two pull requests merge in either order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Keep the Composer 0.25.0 skill line, which prisma init prints with prisma 8.0.0-rc.19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
At a glance
The SQL query builder reference said that the
nullsoption oforderBy()does nothing. On@prisma/orm-postgres8.0.0-rc.13 it works:What this pull request does
It corrects the Prisma ORM 8 pages that are still wrong for the packages npm installs today,
prisma8.0.0-rc.19 and@prisma/orm-postgres8.0.0-rc.13. It also changes the rule the docs version check applies to@prisma/cli-engine, so that the check stops failing on correct pages between an engine release and theprismarelease that uses it.#8345 already moved the
prismaand@prisma/cli-engineversion numbers to 8.0.0-rc.19 and 0.6.2. This pull request does not repeat that.The changes
orderBy()andnulls.orm/reference/sql-query-builder.mdxnow listsoptions.nullsin the options table, states the PostgreSQL default and the error for an invalid value, and has an example that uses the option. The paragraph that said the option does nothing is gone, and so is theCASE WHENworkaround.CLI hints.
guides/database/schema-changes.mdxshowed a literal{bin}where the CLI names itself in a hint, for example{bin} migration status. That was a bug in@prisma/cli-engine, fixed in 0.6.2 (prisma/prisma-cli#313), whichprisma8.0.0-rc.19 installs. The CLI now printsprismathere. The six output lines showprisma, and the two sentences that explained{bin}as a placeholder are removed. No other current page contains{bin}.Contract hash. In
guides/integrations/github-actions.mdx, theexecutionHashthatprisma contract emitprints for the guide's contract changed in 8.0.0-rc.13. ThestorageHashand theprofileHashare the same as before.Composer version in
prisma initoutput. Inguides/frameworks/solid-start.mdx, the skill line for@prisma/composernow shows0.25.0, whichprisma initprints withprisma8.0.0-rc.19.The version check.
pnpm lint:versionsinapps/docscompares each version in the docs with thelatesttag of the package on npm. For@prisma/cli-enginethat rule is wrong, because a reader never installs the engine'slatest.prisma orm initinstalls the exact engine version that theprismapackage depends on. On 29 September the engine'slatestbecame 0.6.2 before anyprismarelease used it, and in that window the check reported nine correct lines as stale on every docs pull request. The script now reads the expected engine version from thedependenciesofprisma@latest, and fails with an error if that dependency is missing or is not an exact version. The rule for every other package is unchanged.apps/docs/AGENTS.mddescribes the new rule.What was checked
orderBy()withnulls, run against PostgreSQL 17 with the schema from the reference page. The SQL comes from the PostgreSQL statement log.{ direction: 'asc' }ORDER BY "description" ASC{ direction: 'asc', nulls: 'first' }ORDER BY "description" ASC NULLS FIRST{ direction: 'desc' }ORDER BY "description" DESC{ direction: 'desc', nulls: 'last' }ORDER BY "description" DESC NULLS LAST{ nulls: 'middle' }orderBy()throwsORM.ARGUMENT_INVALID, "orderBy nulls must be "first" or "last""The team guide's scenario, run in a pseudo-terminal with two PostgreSQL 17 databases and
prisma8.0.0-rc.19, printed these lines. Every contract hash in the run matches the hash on the page.db migrate --advance-ref db→ Check every space against the database: prisma migration statusmigration status, two branch tips⚠ No migration path from the database state (91e7f9f03580) to the application's contract (1e5059c1976c). Run `prisma migration plan --name <name>` to author one.migration status, one pending⚠ 1 pending — run `prisma db migrate --to 1e5059c1976c`(the page keeps its colon)migration planwith nodbref→ Point the db ref at the origin contract: prisma migration ref set db <contract>,→ Plan from an explicit origin: prisma migration plan --from <contract>,→ Plan from an empty database deliberately: prisma migration plan --from @emptynpx prisma contract emiton the contract from the GitHub Actions guide printed the three hashes that the page now shows.npx prisma initreported@prisma/composer0.25.0.pnpm lint:versionspasses: "Every pinned version in 300 files is current."pnpm lint:linksandcspellon the changed pages pass.What this does not do
nullsoption was not run on SQLite.latestand the versionprismadepends on were the same.Agent: keen-finch-33
🤖 Generated with Claude Code
Summary by CodeRabbit
prismadirectly and clarified the correspondingnpx prismacommands.orderBy(), including how to place null values first or last.