Version 5.1 release notes
· 2 min de lectura

Version 5.1 of Foal is out!
Features
- The framework is now tested against Node.js 24 and so this version is officially supported.
- The
DiskandLocalDiskservices have a new methodmkdirIfNotExiststo creates directories. This is useful when using the local file system to ensure that a directory exists before saving files. Otherwise, an error can be thrown when it does not. On cloud storage services such as S3, directories are created automatically when saving files so this method does nothing. - The
Loggerservice has a new methodaddErrorContextwhich works likeaddLogContextbut only for error-level logs. This is useful to add context information that is only relevant for errors (e.g. request body, etc.) without polluting the other log levels. - The iteration count of the
hashPasswordfunction has been increased to 600,000 to match the latest OWASP recommendations.
Enhancements
- On new projects, the generated
src/index.tsfile has been improved to better log any errors thrown in themainfunction. - The
runfunction of theAsyncServicehas been improved to execute functions fully asynchronously, which was not the case before in very specific scenarios. - The missing OpenAPI documentation on the
@PermissionRequiredhook has been added.
Chores
- Sub-dependencies have been updated to their latest versions.
Dependencies
@foal/aws-s3@aws-sdk/client-s3@3.926@aws-sdk/lib-storage@3.926
@foal/clicommander@14.0
@foal/graphqlglob(removed and replaced by Node native API)
@foal/swagger-ui-distswagger-ui-dist@5.30