API : dotenv 18.0.5, démarrage sans ligne « injected env »

Reprend la PR Dependabot #34 (18.0.5, correctif publié depuis). Depuis la 17.0.0, config() écrit « ◇ injected env (N) from .env » à chaque démarrage, même sans fichier .env (vu avec la 18.0.5 : « injected env (0) »), ce qui glisse une ligne hors format dans les journaux JSON de production : config({ quiet: true }). Les autres ruptures de la 18.0.0 (préchargement -r dotenv/config retiré, .env.vault retiré) ne touchent pas Parenthèse, qui n'appelle que config() dans config/env.ts. La CLI Prisma garde sa propre copie de dotenv 16. 113 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Opus 5.5 committed 2026-10-01 11:13:50 +02:00
1 parent f6fb6540e7
commit ca4138ebc2
3 files changed
+24 -4

No files matched your search

+20 -2
View File
@@ -13,7 +13,7 @@
"@fastify/rate-limit": "^11.2.0",
"@prisma/client": "^6.15.0",
"bcryptjs": "^3.0.2",
"dotenv": "^16.6.1",
"dotenv": "^18.0.5",
"fastify": "^5.6.1",
"sharp": "^0.35.5",
"zod": "^4.6.5"
@@ -1745,6 +1745,19 @@
}
}
},
"node_modules/c12/node_modules/dotenv": {
"version": "16.6.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
"devOptional": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/chai": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",
@@ -1850,8 +1863,13 @@
}
},
"node_modules/dotenv": {
"version": "16.6.1",
"version": "18.0.5",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-18.0.5.tgz",
"integrity": "sha512-aBrGvt6KhjxbEnatqMWOMidftwsrCiCvqh1yNIGB9QyF0J+VcWkKDMsvYOEm7ZS82oiV+BT1sTOtIlAmUlTpwQ==",
"license": "BSD-2-Clause",
"bin": {
"dotenv": "dist/index.cjs"
},
"engines": {
"node": ">=12"
},
+1 -1
View File
@@ -22,7 +22,7 @@
"@fastify/rate-limit": "^11.2.0",
"@prisma/client": "^6.15.0",
"bcryptjs": "^3.0.2",
"dotenv": "^16.6.1",
"dotenv": "^18.0.5",
"fastify": "^5.6.1",
"sharp": "^0.35.5",
"zod": "^4.6.5"
+3 -1
View File
@@ -1,7 +1,9 @@
import { config as loadDotenv } from 'dotenv'
import { z } from 'zod'
loadDotenv()
// dotenv 17+ écrit « injected env (N) from .env » à chaque démarrage, même sans fichier : les journaux
// de l'API restent au format JSON de Fastify
loadDotenv({ quiet: true })
const DEV_DATABASE_URL = 'postgresql://postgres:postgres@localhost:5432/genealogy'
const DEV_JWT_SECRET = 'dev-secret-change-me-please'