Skip to content

Latest commit

 

History

History
116 lines (73 loc) · 3.35 KB

File metadata and controls

116 lines (73 loc) · 3.35 KB

Contributing to Prisma VS Code Extension

Getting Started

See the Development Guide for setup instructions.

Quick start:

pnpm install
pnpm watch

Then press F5 in VS Code → Launch VS Code extension.

Documentation

Debugging

  • Set "prisma.trace.server": "messages" or "verbose" in VS Code settings to trace communication between VS Code and the language server.
  • Use the Language Server Protocol Inspector to visualize and filter LSP traffic (save logs from the output channel to a file).

Testing

Manual testing: see TESTING.md.

E2E tests:

pnpm test:e2e  # from repository root

Pull Requests

When you open a PR, the PR Build extension workflow automatically builds and uploads a pr<NUMBER>-prisma.vsix file linked in a comment.

Installing a PR Build

Via UI:

  1. In Extensions, filter with @installed prisma
  2. Disable Prisma and Prisma Insider extensions
  3. Extensions...Install from VSIX...

Via command line:

# Download the artifact (replace <NUMBER> with PR number)
wget --content-disposition \
  "https://github.com/prisma/language-tools/blob/artifacts/pull-request-artifacts/pr<NUMBER>-prisma.vsix?raw=true"

# Install it
code --install-extension pr<NUMBER>-prisma.vsix

# Launch with marketplace extensions disabled
code --disable-extension Prisma.prisma --disable-extension Prisma.prisma-insider

Cleanup After Testing

rm pr<NUMBER>-prisma.vsix
code --uninstall-extension Prisma.prisma-insider-pr-build

Publishing

The extension is automatically published via GitHub Actions using an Azure DevOps Personal Access Token.

Note: The token expires yearly and must be renewed manually.

Automatic Publishing

Upon any Prisma dev release a new insiders release of the extension is automatically performed.

Upon any Prisma latest release a new stable release of the extension is automatically performed.

Manual Publishing (Extension-Only Release)

For releases that don't coincide with a Prisma ORM release:

Insider release:

Stable release:

Dependencies

The @types/vscode version must be ≤ the engines.vscode version in package.json, otherwise the extension cannot be packaged.

Resources