Releases: triggerdotdev/trigger.dev
trigger.dev@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/build@4.1.1@trigger.dev/core@4.1.1@trigger.dev/schema-to-json@4.1.1
@trigger.dev/sdk@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.1.1
@trigger.dev/schema-to-json@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.1.1
@trigger.dev/rsc@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.1.1
@trigger.dev/redis-worker@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.1.1
@trigger.dev/react-hooks@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/core@4.1.1
@trigger.dev/python@4.1.1
Patch Changes
- Updated dependencies:
@trigger.dev/build@4.1.1@trigger.dev/core@4.1.1@trigger.dev/sdk@4.1.1
@trigger.dev/core@4.1.1
@trigger.dev/core@4.1.1
@trigger.dev/build@4.1.1
Patch Changes
-
The
prismaExtensionhas been completely redesigned to support multiple Prisma versions and deployment strategies. This update introduces three distinct modes to handle the evolving Prisma ecosystem, from legacy setups to the upcoming Prisma 7. (#2689)Highlights:
- 🎯 Three modes: Legacy, Engine-Only, and Modern
- 🎉 NEW: Support for
prisma.config.tsfiles (Legacy Mode) - 🔍 NEW: Enhanced version detection with filesystem fallback
Breaking Changes
⚠️ MIGRATION REQUIRED: TheprismaExtensionnow requires an explicitmodeparameter. Existing configurations without amodewill need to be updated.Note: All other existing options remain backward compatible. The new
configFileoption is optional and doesn't affect existing setups using theschemaoption.Before (Old API)
import { prismaExtension } from "@trigger.dev/build/extensions/prisma"; extensions: [ prismaExtension({ schema: "prisma/schema.prisma", migrate: true, typedSql: true, directUrlEnvVarName: "DATABASE_URL_UNPOOLED", }), ];
After (New API)
import { prismaExtension } from "@trigger.dev/build/extensions/prisma"; extensions: [ prismaExtension({ mode: "legacy", // ← MODE IS NOW REQUIRED schema: "prisma/schema.prisma", migrate: true, typedSql: true, directUrlEnvVarName: "DATABASE_URL_UNPOOLED", }), ];
New Features
1. Legacy Mode
Use when: You're using Prisma 6.x or earlier with the
prisma-client-jsprovider.Features:
- Automatic
prisma generateduring deployment - Supports single-file schemas (
prisma/schema.prisma) - Supports multi-file schemas (Prisma 6.7+, directory-based schemas)
- NEW: Supports Prisma config files (
prisma.config.ts) via@prisma/configpackage - Migration support with
migrate: true - TypedSQL support with
typedSql: true - Custom generator selection
- Handles Prisma client versioning automatically (with filesystem fallback detection)
- Automatic extraction of schema and migrations paths from config files
Schema Configuration:
generator client { provider = "prisma-client-js" previewFeatures = ["typedSql"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DATABASE_URL_UNPOOLED") }
Extension Configuration:
// Single-file schema prismaExtension({ mode: "legacy", schema: "prisma/schema.prisma", migrate: true, typedSql: true, directUrlEnvVarName: "DATABASE_URL_UNPOOLED", }); // Multi-file schema (Prisma 6.7+) prismaExtension({ mode: "legacy", schema: "./prisma", // ← Point to directory migrate: true, typedSql: true, directUrlEnvVarName: "DATABASE_URL_UNPOOLED", });
Tested Versions:
- Prisma 6.14.0 ✅
- Prisma 6.7.0+ (multi-file schema support) ✅
- Prisma 5.x ✅
2. Engine-Only Mode
Use when: You have a custom Prisma client output path and want to manage
prisma generateyourself.Features:
- Only installs Prisma engine binaries (no client generation)
- Automatic version detection from
@prisma/client - Manual override of version and binary target
- Minimal overhead - just ensures engines are available
- You control when and how
prisma generateruns
Schema Configuration:
generator client { provider = "prisma-client-js" output = "../src/generated/prisma" // Ensure the "debian-openssl-3.0.x" binary target is included for deployment to the trigger.dev cloud binaryTargets = ["native", "debian-openssl-3.0.x"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DATABASE_URL_UNPOOLED") }
Extension Configuration:
// Auto-detect version prismaExtension({ mode: "engine-only", }); // Explicit version (recommended for reproducible builds) prismaExtension({ mode: "engine-only", version: "6.19.0", });
Important Notes:
- You must run
prisma generateyourself (typically in a prebuild script) - Your schema must include the correct
binaryTargetsfor deployment to the trigger.dev cloud. The binary target isdebian-openssl-3.0.x. - The extension sets
PRISMA_QUERY_ENGINE_LIBRARYandPRISMA_QUERY_ENGINE_SCHEMA_ENGINEenvironment variables to the correct paths for the binary targets.
package.json Example:
{ "scripts": { "prebuild": "prisma generate", "dev": "trigger dev", "deploy": "trigger deploy" } }Tested Versions:
- Prisma 6.19.0 ✅
- Prisma 6.16.0+ ✅
3. Modern Mode
Use when: You're using Prisma 6.16+ with the new
prisma-clientprovider (withengineType = "client") or preparing for Prisma 7.Features:
- Designed for the new Prisma architecture
- Zero configuration required
- Automatically marks
@prisma/clientas external - Works with Prisma 7 beta releases & Prisma 7 when released
- You manage client generation (like engine-only mode)
Schema Configuration (Prisma 6.16+ with engineType):
generator client { provider = "prisma-client" output = "../src/generated/prisma" engineType = "client" previewFeatures = ["views"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DATABASE_URL_UNPOOLED") }
Schema Configuration (Prisma 7):
generator client { provider = "prisma-client" output = "../src/generated/prisma" } datasource db { provider = "postgresql" }
Extension Configuration:
prismaExtension({ mode: "modern", });
Prisma Config (Prisma 7):
// prisma.config.ts import { defineConfig, env } from "prisma/config"; import "dotenv/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: env("DATABASE_URL"), }, });
Important Notes:
- You must run
prisma generateyourself - Requires Prisma 6.16.0+ or Prisma 7 beta
- The new
prisma-clientprovider generates plain TypeScript (no Rust binaries) - Requires database adapters (e.g.,
@prisma/adapter-pgfor PostgreSQL)
Tested Versions:
- Prisma 6.16.0 with
engineType = "client"✅ - Prisma 6.20.0-integration-next.8 (Prisma 7 beta) ✅
Migration Guide
From Old prismaExtension to Legacy Mode
If you were using the previous
prismaExtension, migrate to Legacy Mode:// Old prismaExtension({ schema: "prisma/schema.prisma", migrate: true, }); // New prismaExtension({ mode: "legacy", // ← Add this schema: "prisma/schema.prisma", migrate: true, });
From Managing Your Own Prisma Setup
If you previously handled Prisma generation yourself and just needed engine binaries, use Engine-Only Mode:
prismaExtension({ mode: "engine-only", version: "6.19.0", // Match your @prisma/client version });
Preparing for Prisma 7
If you want to adopt the new Prisma architecture, use Modern Mode:
- Update your schema to use
prisma-clientprovider - Add database adapters to your dependencies
- Configure the extension:
prismaExtension({ mode: "modern", });
Version Compatibility Matrix
Prisma Version Recommended Mode Notes < 5.0 Legacy Older Prisma versions 5.0 - 6.15 Legacy Standard Prisma setup 6.7+ Legacy Multi-file schema support 6.16+ Engine-Only or Modern Modern mode requires engineType = "client"6.20+ (7.0 beta) Modern Prisma 7 with new architecture
Prisma Config File Support (Prisma 6+)
NEW: Legacy Mode now supports loading configuration from a
prisma.config.tsfile using the official@prisma/configpackage.Use when: You want to use Prisma's new config file format (Prisma 6+) to centralize your Prisma configuration.
Benefits:
- Single source of truth for Prisma configuration
- Automatic extraction of schema location and migrations path
- Type-safe configuration with TypeScript
- Works seamlessly with Prisma 7's config-first approach
prisma.config.ts:
import { defineConfig, env } from "prisma/config"; import "dotenv/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: env("DATABASE_URL"), directUrl: env("DATABASE_URL_UNPOOLED"), }, });
trigger.config.ts:
impor...
trigger.dev@4.1.0
Patch Changes
- Added external cache support for local image builds (#2682)
- Updated dependencies:
@trigger.dev/build@4.1.0@trigger.dev/core@4.1.0@trigger.dev/schema-to-json@4.1.0