Skip to content

feat: support prisma-8 magic comment - #2002

Merged
SevInf merged 1 commit into
mainfrom
feat/prisma-8-magic-comment
Sep 14, 2026
Merged

SevInf merged 1 commit into
mainfrom
feat/prisma-8-magic-comment

Conversation

@StevenMcClankerton

Copy link
Copy Markdown
Contributor

Adds // use prisma-8 as an alias for // use prisma-next, preserving the existing directive semantics.

Changes

  • Update the shared detector used by the extension and legacy language server.
  • Test both spellings, including whitespace, placement, token boundaries, and VS Code diagnostic toggling.
  • Document the equivalent directives.

Why

Using the shared detector keeps both spellings on the same routing path without duplicating logic or changing existing behavior.

Validation

  • All 259 language-server tests passed.
  • Language-server type-checking and git diff --check passed.
  • VS Code integration tests updated but not run.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dc3d6587-a75f-4b45-b6b8-bd60cfd52824

📥 Commits

Reviewing files that changed from the base of the PR and between 3c526c3 and b60fce4.

📒 Files selected for processing (4)
  • docs/language-server.md
  • packages/language-server/src/__test__/prismaNext.test.ts
  • packages/language-server/src/lib/prismaNext.ts
  • packages/vscode/src/__test__/language-server/prismaNext.test.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Summary by CodeRabbit

  • Documentation

    • Clarified language-server routing for files without a Prisma directive.
    • Documented that prisma-next and prisma-8 directives are equivalent and apply per file when placed at the start.
  • Bug Fixes

    • Recognized both supported directive formats when selecting language-server behavior.
  • Tests

    • Added coverage for valid and invalid directive placements and formats.
    • Verified diagnostics toggle correctly for both supported directives.

Walkthrough

The language server now recognizes both // use prisma-next and // use prisma-8 directives. New tests cover accepted and rejected directive forms. The VS Code diagnostic toggle test runs for both directives. Documentation describes the equivalent directives and file-routing rules.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b60fc

The supported directive aliases and malformed-token handling are covered, so this change is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 2 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: support for the prisma-8 magic comment.
Description check ✅ Passed The description directly explains the prisma-8 alias, affected components, tests, documentation, and validation results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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 2 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prisma-8-magic-comment
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/prisma-8-magic-comment

Comment @coderabbitai help to get the list of available commands.

@SevInf SevInf added this to the 8.0.0 milestone Sep 14, 2026
@SevInf
SevInf merged commit d09fbab into main Sep 14, 2026
9 checks passed
@SevInf
SevInf deleted the feat/prisma-8-magic-comment branch September 14, 2026 14:47
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.

2 participants