Your AdonisJS ecosystem, in the loop.
All insights
release

Env Validation Overwrite and Route Invalidation Improvements in Assembler v8.6.0

· Developer impact : medium

The Assembler package v8.6.0 introduces an option to overwrite existing environment variable validations defined in `start/env.ts` via `defineEnvValidations`. This allows replacing validations instead of preserving them, fixing issues like stale enum values breaking type-checking. It also fixes code generation bugs related to trailing comments and improves route invalidation performance by parsing controllers once for all routes instead of per route. Additionally, the `ip-address` dependency was updated.

What this means for your code

Developers using codemods to define environment validations can now enable the `overwrite` option to replace existing validations, which helps avoid stale or conflicting validations. This is especially relevant when running configure commands with `--force`. The fix to trailing comment handling prevents invalid code generation. Route invalidation is more efficient, potentially speeding up development workflows. No breaking changes are indicated, and the overwrite option is opt-in.

  • Consider enabling the `overwrite` option in `defineEnvValidations` when regenerating env validations to avoid stale validations.
  • Review any custom env validation codemods to leverage the new overwrite behavior if desired.
  • Benefit from improved route invalidation performance without code changes.
  • No mandatory migration steps required.

Original sources

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.

Independent ecosystem watch. Sources linked in every insight.Built with AdonisJS · AI-assisted summariesBy Jérémy Chaufourier · chaufourier.fr