Guía de Actualización a la Versión 2
This guide will take you step by step through the upgrade to version 2. If something is missing or incorrect, feel free to submit an issue or a PR on Github.
| Node versions | TS min version |
|---|---|
| 10.x, 12.x, 14.x | 4.0 |
For all
Upgrade your versions of TypeScript and Node.JS if necessary.
By topic
Authentication with sessions (session tokens) and CSRF protection
Service and application initialization
Error-handling and hook post functions
Common issue
If you get unexpected errors when building the application, please check the following points:
- You have updated all your
@foal/xpackages. - You have updated your
typescriptdependency to version 4.
Rare cases
- The following objects and functions have been removed:
ObjectDoesNotExist,isObjectDoesNotExist,PermissionDenied,isPermissionDenied,ValidationError,isValidationError,validate. - The
legacyoption has been removed fromhashPasswordandverifyPassword. If you used it, please submit an issue. - The command
foal g sub-apphas been removed. - The functions
createServiceandcreateControllerdo not accept aServiceManageras second argument. - The
@Hookdecorator only accepts one function. - The type
ExpressApplication = anyhas been removed. - The property
req.foal.ctxdoes not exist anymore in post middlewares.