AdonisJS Core v7.7.0 Release: Secret Type Support and Env Validation Improvements
· Developer impact : medium
The AdonisJS core package version 7.7.0 introduces support for a new 'secret' type in the `env:add` command, allowing environment variables to be marked as secrets and excluded from `.env.example`. Additionally, the `configure` command now logs warnings when it retains environment validations in `start/env.ts`, improving clarity and preventing silent mismatches. A bug fix ensures that using `--force` with `configure` properly replaces environment validations for packages, preventing type-check failures.
Developers can now add secret environment variables using `env:add` with the `secret` type, enhancing security by excluding secrets from example env files. When configuring packages, warnings about retained environment validations help avoid configuration mismatches. Using `--force` with `configure` ensures environment validations are correctly updated, preventing potential runtime or type-check errors.
- Use `env:add` with `--type=secret` to add secret environment variables that won't appear in `.env.example`.
- Review warnings logged by `node ace configure <package>` about retained environment validations to ensure configuration consistency.
- Use `node ace configure <package> --force` to replace environment validations when changing package configurations to avoid type-check issues.
Original sources
AI-generated analysis based on the linked sources. Check the original documentation before changing your application.