SailsJS v1.0.0 Release Notes

  • โฌ†๏ธ Sails v1.0 comes with a host of new features and improvements as well as some breaking changes to previous versions. Please see the migration guide if you're upgrading from a previous version of Sails!

    • ๐Ÿ“š [ENHANCEMENT] Introduce Actions 2 -- ability to declare actions as Machines in individual files. See the Actions and controllers and Action target syntax docs for more info.
    • ๐Ÿ“š [ENHANCEMENT] Introduce Helpers -- the successor to services. See the Helpers docs for more info.
    • ๐Ÿ›  [BUGFIX] Improve path resolution in moduleloader for Windows f13bb77
    • ๐Ÿ›  [BUGFIX] Fix output for virtual requests that have non 2xx/3xx status codes and no body 525c7c5
    • ๐Ÿšš [REMOVAL] Remove support for (undocumented) "action/model" route syntax for binding routes to blueprint actions
    • ๐Ÿ›  [BUGFIX] Fix issue causing Sails to sometimes crash when using Redis sessions if it receives a request after the Redis server has unexpectedly disconnected 3f29dce
    • [ENHANCEMENT] Add sails.getActions() method to return a dictionary of registered Sails actions 5598179
    • [ENHANCEMENT] Add sails.registerAction() method to programmatically register a Sails action dd9af88
    • ๐Ÿ’ป [ENHANCEMENT] Add exposeLocalsToBrowser local in all views
    • [ENHANCEMENT] Add sails.registerActionMiddleware() to programmatically register middleware to be applied to one or more actions 2c281d5
    • [ENHANCEMENT] Allow explicitly defined actions in Sails config via sails.config.controllers.moduleDefinitions 3b264fa, 4ad23dd
    • ๐Ÿ›  [BUGFIX] Default req.options.populate to the value of `sails.config.blueprints.populate d8f4df8
    • [ENHANCEMENT] Add sails.reloadActions() method to reload actions from disk / config while an app is running df2ee46
    • [ENHANCEMENT] Allow loaded modules (actions, controllers, policies, models, etc.) to have any file extension besides .md and .txt (which are ignored). Direct support for anything besides plain Javascript has been removed; variants like CoffeeScript and TypeScript can be used by registering them in the app.js file. See the Using CoffeeScript tutorial for an example.
    • โฌ†๏ธ [REMOVAL] Remove support for custom blueprints. These can easily be replaced by regular actions. See the migration guide for more info. 0fd4362
    • ๐Ÿšš [REMOVAL] Remove support for blueprint route target syntax 0fd4362
    • ๐Ÿšš [REMOVAL] Remove deprecated dontFlattenConfig option 56c9b5b
    • [ENHANCEMENT] Humanize config vars that are loaded from the environment 7eb6af6
    • ๐Ÿšš [REMOVAL] Remove most Resourceful PubSub methods, leaving just .subscribe(), .unsubscribe() and .publish(). c981c6e
    • [ENHANCEMENT] Expose Sails generator for programmatic use e008a6b
    • โฌ†๏ธ [UPGRADE] Upgrade to Express 4.14.0. Thanks to josebaseba for his help in the transition to Express 4!
    • ๐Ÿ“š [ENHANCEMENT] Improved CORS support. See the migration guide and CORS docs for more info.
    • ๐Ÿšš [REMOVAL] Removed req.validate() functionality. Use Actions 2 instead, which automatically validate parameters. 68fa8ff
    • ๐Ÿ“š [ENHANCEMENT] Updated syntax for policies. See the migration guide and the policies documentation for more details. 66d2b2d
    • ๐Ÿ‘€ [ENHANCEMENT] Automatically sort routes to avoid wildcards swallowing static routes. See the sort-route-addresses module for more info on route sorting.
    • ๐Ÿ”’ [ENHANCEMENT] Combine CORS and CSRF hooks into new "Security" hook. See the migration guide for more details.
    • ๐Ÿ“š [ENHANCEMENT] Update CSRF configuration and replace /csrfToken route with an action that can be bound to any route. See the migration guide and CSRF docs for more info. 7328c05
    • 0๏ธโƒฃ [REMOVAL] res.created() will no longer be included by default. 7988866
    • ๐Ÿ›  [BUGFIX] Ignore default installed hooks when searching node_modules for hooks. #3855.
    • ๐Ÿ”’ [SECURITY] Don't serve CSRF token via websockets 50b0684
    • ๐Ÿ“ฆ [INTERNAL] Bring EJS layout code into Sails rather than relying on the unmaintained ejs-locals package d3ba9bd
    • โฌ†๏ธ [REMOVAL] Remove handlebars dependency and support for layouts in view engines other than EJS. See the migration guide for more details. ae7e656, 9f1f2fb
    • โฌ†๏ธ [ENHANCEMENT] Don't set NODE_ENV based on Sails environment, except in special circumstances. See the migration guide for more details. cf20d07, abbf1f7
    • [ENHANCEMENT] Make session hook routesDisabled use Sails route address syntax (including regular expression syntax) aba8f2f
    • [BUGFIX] Supply res.locals._csrf to all routes when CSRF protection is enabled. Fixes #3865
    • โฌ†๏ธ [REMOVAL] Remove Consolidate dependency -- view template engines are now configurable via the sails.config.views.getRenderFn setting. See the migration guide for more details. 6316452
    • ๐Ÿšš [REMOVAL] Remove deprecated RPS "firehose" 86b88
    • ๐Ÿšš [REMOVAL] Remove deprecated 0.9.x socket support 6464d8f
    • ๐Ÿ›  [BUGFIX] Update and standardize precedence of route param, query and body in req.param() and req.allParams() 820d1eb
    • ๐Ÿšš [REMOVAL] Remove JSONP support from blueprints. CORS is fairly ubiquitous now. effd6c3
    • ๐Ÿšš [REMOVAL] Remove deprecated sails.getBaseUrl method. d0fe4ff
    • ๐Ÿšš [INTERNAL] Remove sails-util 1fee468
    • ๐Ÿšš [INTERNAL] Remove grunt, sockets and ORM hooks 48750d7, 07c59ce
    • ๐Ÿšš [REMOVAL] Remove deprecated req.params.all() method 9c6b217
    • ๐Ÿ›  [BUGFIX] Correctly load custom adapters (stored in either FooAdapter.js files or in subfolders) #3884
    • [INTERNAL] Add benchmarks 6b4ba32
    • ๐Ÿฑ [ENHANCEMENT] Requests for assets will skip running session middleware by default 3c5ddf7
    • ๐Ÿ‘ [ENHANCEMENT] Support routesDisabled for sessions in virtual requests a00cf78
    • ๐Ÿ”’ [INTERNAL] Standardize log level for warnings to always use "debug" except for warning related to security.
    • ๐Ÿšš [ENHANCEMENT] Add 404, 500 and startRequestTimer to middleware order automatically (and remove them from default sails.config.http.middleware.order) a22e4e7, f788e39
    • ๐Ÿšš [REMOVAL] Remove the handleBodyParserError middleware from the stack, use the onBodyParserError option in Skipper instead. f788e39
    • ๐Ÿ›  [BUGFIX] Take locale into account in views.render() #3833
    • [ENHANCEMENT] Allow session adapter to be required directly 039d245
    • ๐Ÿšš [REMOVAL] Remove support for Express 3 session adapters 628a55b
    • โฌ†๏ธ [INTERNAL] Switch from i18n to i18n-2. See the migration guide for more details. 4a90de2
    • ๐Ÿ›  [BUGFIX] Fail to lift Sails if connect-redis can't initialize. #3590
    • ๐Ÿšš [REMOVAL] Remove method-override from default middleware list. 575c4a3
    • ๐Ÿ‘ฏ [BUGFIX] Use _.clone() instead of _.cloneDeep() for config overrides, to preserve things like Redis clients passed into config. 1b970b6
    • โšก๏ธ [ENHANCEMENT] Update sails.config.globals functionality. See the migration guide for more details. 44c6d9b
    • [ENHANCEMENT] Add sails.config.session.onDisconnect and sails.config.session.onReconnect functions 1e55c63
    • [ENHANCEMENT] Add sails.config.sockets.adapterOptions.onDisconnect and sails.config.sockets.adapterOptions.onReconnect functions 3a25971
    • ๐Ÿ—„ [DEPRECATION] Deprecate .jsonx() cdcc3c0
    • โšก๏ธ [INTERNAL] Update default responses 510504e
    • โšก๏ธ [REMOVAL] Remove update-via-POST blueprint route 5c3814d
    • [INTERNAL] Disconnect Redis session client when Sails is lowering 80fb71b
    • โฌ†๏ธ [UPGRADE] Upgrade EJS dependency to v2.5.3 6bfad70
    • ๐Ÿšš [REMOVAL] Removed deprecated connect-flash middleware c5c4900
    • ๐Ÿ‘€ [REMOVAL] Removed 16 unused dependencies (see full list here)

    ๐Ÿ‘€ > Also see the Waterline changelog.