@nathapp/nestjs-prisma 4.1.1 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -16,6 +16,7 @@ the driver adapter for your database in your consuming app:
16
16
  npm install @prisma/client@^7.10.0 @prisma/adapter-pg@^7.10.0 # PostgreSQL
17
17
  npm install @prisma/client@^7.10.0 @prisma/adapter-mariadb@^7.10.0 # MySQL / MariaDB
18
18
  npm install -D prisma@^7.10.0
19
+ npm install dotenv # imported by the prisma.config.ts snippet below
19
20
  ```
20
21
 
21
22
  Always pin `prisma@^7`: the `latest` tag of the `prisma` package may point at a
@@ -67,12 +68,15 @@ datasource db {
67
68
  ```ts
68
69
  // prisma.config.ts
69
70
  import 'dotenv/config';
70
- import { defineConfig, env } from 'prisma/config';
71
+ import { defineConfig } from 'prisma/config';
71
72
 
72
73
  export default defineConfig({
73
74
  schema: 'prisma/schema.prisma',
74
75
  migrations: { path: 'prisma/migrations' },
75
- datasource: { url: env('DATABASE_URL') },
76
+ // Use process.env with a fallback instead of prisma/config's env():
77
+ // generate/validate never open a connection, but env() throws when the
78
+ // variable is unset, breaking env-less CI and build steps.
79
+ datasource: { url: process.env.DATABASE_URL ?? 'postgresql://localhost:5432/app' },
76
80
  });
77
81
  ```
78
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nestjs-prisma",
3
- "version": "4.1.1",
3
+ "version": "4.2.1",
4
4
  "description": "NestJS Prisma integration with multi-database support",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist/ .turbo/",
@@ -20,8 +20,8 @@
20
20
  "types": "dist/index.d.ts",
21
21
  "main": "dist/index.js",
22
22
  "dependencies": {
23
- "@nathapp/nestjs-common": "^4.1.0",
24
- "@nathapp/nestjs-data": "^4.1.0"
23
+ "@nathapp/nestjs-common": "^4.2.1",
24
+ "@nathapp/nestjs-data": "^4.2.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@nathapp/eslint-config": "1.0.1",