DEV Community

Cover image for FoalTS - NodeJS framework - version 5.1 is out
Loïc Poullain
Loïc Poullain

Posted on • Originally published at foalts.org

FoalTS - NodeJS framework - version 5.1 is out

Version 5.1 of Foal is out and brings some new features!

Features

  • The framework is now tested against Node.js 24 and so this version is officially supported.
  • The Disk and LocalDisk services have a new method mkdirIfNotExists to 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 Logger service has a new method addErrorContext which works like addLogContext but 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 hashPassword function has been increased to 600,000 to match the latest OWASP recommendations.

Enhancements

  • On new projects, the generated src/index.ts file has been improved to better log any errors thrown in the main function.
  • The run function of the AsyncService has been improved to execute functions fully asynchronously, which was not the case before in very specific scenarios.
  • The missing OpenAPI documentation on the @PermissionRequired hook has been added.

This post was originally posted on FoalTS blog

Top comments (0)