Skip to content

v0.3.0 - Prisma 6.x Support & Major Feature Updates

Latest

Choose a tag to compare

@omar-dulaimi omar-dulaimi released this 22 Aug 16:20
2b7703e

πŸš€ Major Release: Prisma 6.x Support & New Features

This release brings Prisma 6.x compatibility along with powerful new features that transform how you generate mock data for your REST APIs.

✨ New Features

πŸ“Š Configurable Data Volume

Control exactly how many records to generate per model:

{
  "recordCounts": {
    "User": 100,
    "Product": 500,
    "Order": 1000
  }
}

🎭 Custom Faker Patterns

Generate realistic data with 50+ faker.js patterns:

{
  "customPatterns": {
    "User.email": "{{internet.email}}",
    "Product.price": "{{commerce.price}}",
    "User.avatar": "{{image.avatar}}"
  }
}

🌱 Seed Data Support

Load existing data and generate additional records:

{
  "seedData": {
    "enabled": true,
    "seedDataPath": "./seeds/",
    "generateAdditionalRecords": true
  }
}

πŸ”§ External Configuration

Organize settings in a dedicated JSON file:

generator json_server {
  provider = "prisma-json-server-generator"
  config   = "./prisma/config.json"
}

πŸ”„ Breaking Changes & Upgrades

  • Prisma 6.14.0 - Full compatibility with latest Prisma version
  • faker.js v9.9.0 - Updated to latest faker API
  • TypeScript 5.9.2 - Modern TypeScript support
  • Zod validation - Robust configuration validation

πŸ§ͺ Testing & Quality

  • Added comprehensive test suite with Vitest
  • 95%+ test coverage across all features
  • Enhanced error handling and validation
  • Improved TypeScript strict mode compliance

πŸ“š Documentation

  • Modernized README with visual improvements
  • Real-world examples for e-commerce and social media apps
  • Comprehensive configuration guides
  • GitHub Sponsors integration

πŸ› οΈ Technical Improvements

  • Fixed model plural mapping for Prisma 6
  • Enhanced faker pattern evaluation
  • Better error messages and debugging
  • Streamlined build process

πŸ“¦ Installation

npm install [email protected] --save-dev

πŸš€ Quick Start

  1. Add to your schema.prisma:
generator json_server {
  provider = "prisma-json-server-generator"
}
  1. Generate data:
npx prisma generate
json-server --watch db.json --port 3001

Your REST API is now live at http://localhost:3001! πŸŽ‰


Full Changelog: v0.2.5...v0.3.0