31. August 2021
August release - 2021
Updated packages
Several packages are now stable and are no longer marked as @next
Updated packages:
@adonisjs/core 5.1.8 -> 5.3.2
@adonisjs/ally 4.0.2 -> 4.1.1
@adonisjs/view 6.0.3 -> 6.1.0
@adonisjs/repl 3.1.2 -> 3.1.6
@adonisjs/lucid 15.0.1 -> 16.0.0 (Breaking change)
@adonisjs/auth 8.0.5 -> 8.0.9
Ludic breaking change
Lucid models handle $extras
object slightly different. Before additional fields were in $extras
,
but now when you define same field in model it will no longer be moved to $extras
and you can access it directly
For it to work you need to enable useDefineForClassFields
in tsconfig.json
{
"compilerOptions": {
"useDefineForClassFields": true
}
}
Full notes about breaking change
Drive
Biggest addition is new @adonisjs/drive which is fully usable now. New version of Core (5.3) uses Drive under the hood, but if you are using older version of V5 you can install and use Drive manually
Drive has built-in support for AWS S3
(and alternatives), Google Cloud Storage
and local filesystem
.
Now there’s unified API for all those storages.
In case you want to to add new storage provider it’s relatively easily extendable
To get started with Drive install required driver and configure it (Installation is not required for local filesystem)
npm i @adonisjs/drive-gcs
node ace configure @adonisjs/drive-gcs
npm i @adonisjs/drive-s3
node ace configure @adonisjs/drive-s3
Ally
Ally Spotify driver is stable and usable
Lazy loading relationship aggregates
Lucid now allows you to lazy load relationship aggregates using the loadCount and loadAggregate methods.
The loadAggregate method allows you to define a custom aggregate method. For example:
Full relationship aggregates documentation
Edge
With Edge version update env
and config
helpers are included (/post/edge-env-config/)
Full release notes
Read full release notes at docs.adonisjs.com