# Petit mais grand (AdonisJs 3.2.1)
I am about to step the paddle for the major release of Adonisjs version 4.0 (called dawn).
Dawn will be released with lots of exciting features including first class support for async/await, testing, tooling for deployment and bunch of ? features.
But It’s about the present #
This post is about the features you can use today in Adonisjs. Today I have released v3.2.1
which is ideally a small release but has lot more to offer.
Lucid #
Latest release of lucid ships with powerful features to filter data based upon relationships.
Fetch users with alteast one post #
Let’s say we want to fetch all users who have contributed alteast one post.
const User = use('App/Model/User')
yield User.query().has('posts', '>=', 1).fetch()
The has
method will filter out all records from the parent model, if child models doesn’t satisfy a rule.
Checkout official documentation for all available methods.
Get comments count for each post #
A common use case is to display the count of comments a post has received on posts listing page.
yield User.query().withCount('comments').fetch()
Each post will have an additional attribute called comments_count
.
Error Reporting For Neat Kids #
AdonisJs error reporting library youch is inspired by Whoops which displays errors as an HTML page, instead of dumping them to the console.
Newer release of youch has lots of exciting features focusing to improve your productivity when developing web apps.
- Pretty design
- It only shows stack traces of your code and eliminates all native stack traces, as they only create noise.
- Optionally, you can click Show all frames to view frames for native code or npm modules.
- Displays important HTTP headers and cookies.
New Adonis Cli #
@RomainLanz re-wrote adonis-cli
from scratch using Ace. The more it looks pretty, the more it offers options to customize the installation process. Under the hood it allows:
- Choose between
npm
andyarn
when installing dependencies. - Make use of 3rd party templates by defining a
--blueprint
flag. - Skip the modules installation process all together by passing
--skip-install
flag.
New Adonis Ally Drivers #
Adonis Ally let’s you add social login feature to your website. @iamraphson has done awesome piece of work by contributing 2 new drivers for
- Foursquare
? to @iamraphson