Sails v0.12.2

Sails
3 min readAug 20, 2018

--

Apr 1st, 2016

Sails 0.12.2 will be published later today. At the moment, the pre-release is available when you run npm install sails@beta.

If anyone wants to try it out and let us know how it goes, the core team would greatly appreciate it!

The documentation has been updated for the newest release as well, and will be available on sailsjs.org as soon as cloudflare allows it. (Until then, you can find the un-cached version here.)

Oh, and in case you were wondering, this is definitely not an April Fool’s prank. That would be the boringest April Fools prank ever.

Sails v0.12.2 is live on NPM! Here is a quick summary of what’s new:

0.12.2

  • [ENHANCEMENT] Allow use of fn in expanded route targets e1790b7
  • [BUGFIX] Add blacklist to “update” blueprint action so that it can be used with primary keys that are not “id” 3625
  • [ENHANCEMENT] Allow hooks to be turned off by setting their environment var to the string “false” 3618
  • [BUGFIX] Allow view target syntax for routes to specify deeply-nested views 3604
  • [BUGFIX] Allow custom bodyParser middleware config 3592
  • [BUGFIX] When lifting with unknown validation rule, exit gracefully instead of throwing.
  • [BUGFIX] Update validation rules from anchor 3649
  • [BUGFIX] Respond with an error if attempting to use req.file() from a virtual request (i.e. when Skipper is not available). And don’t pass in res when building the mock request, since it is not available yet. 3656
  • [BUGFIX] Fix incorrect handling of errors in responses hook. Thanks @tapuzzo-fsi! 3645
  • [BUGFIX] Fix error from routeCorsConfig sometimes being undefined 3662
  • [INTERNAL] Replace ready event with an async handleLift lifecycle callback in order to simplify the behavior of sails lift and ensure the timing of the “done” callback is correct when using it programmatically.
  • [INTERNAL] Massive overhaul of tests. See b033f2d thru e85810a.
  • [INTERNAL] Extrapolate ORM hook into sails-hook-orm.
  • [INTERNAL] Force asynchronicity in the optional third argument of res.view()/res.render() to pave the way for better, request-agnostic view rendering methods. This prevents double-calling of the callback if userland code throws an error. Thanks @lennym! cd413e15435947aa855e27aab16d9cd9e65ad493
  • [ENHANCEMENT] Update version of i18n to 0.8.1 3631.
  • [ENHANCEMENT] Improve auto-migrate prompt, and skip the prompt and log an info message instead if sails.config.models.migrate is being automatically set to production anyways. sails-hook-orm/commit/3161c34edbe0aa07055f8665493734dda1688c2a
  • [ENHANCEMENT] Add production check in case sails-disk is being used, and experimental sails.config.orm.skipProductionWarnings flag for preventing the warning. sails-hook-orm/commit/9a0d46e135dadf00bc4576341624a31e50b12838
  • [INTERNAL] Don’t clone target function in expanded route syntax 6cfb2de
  • [BUGFIX] Replace naughty code in implicit default res.forbidden() response; relevant when api/responses/ is deleted. See #3667 for more info. Thanks @Biktop!4767585994c45e7a7040402a057f0e41660d341919
  • [INCONSISTENCY] Fix embarassing old link that was being shown when you console.log the sails app instance. Thanks @wulfsolter52d45688fcfb6c4437348115f3e9c91595a8d379!
  • [INTERNAL] Get rid of a whimsical little --require in mocha.opts that must have gotten lost. Don’t ask us how it ended up there. Thanks @markelog! 06837a53b48352de7c46a1be84e87e28a084ffe2

see CHANGELOG.md for more information

Thanks so much to everyone who helped with this release! Even though it was just a patch, it fixed some important usability/consistency bugs, and hit some important milestones in the journey towards Sails v1.0. Stay tuned for more on that this month.

~Mike

--

--