v13.3.0: Strict.

8 views
Skip to first unread message

Evan Tahler

unread,
Mar 30, 2016, 12:10:22 PM3/30/16
to actionHero.js
https://github.com/evantahler/actionhero/releases/tag/v13.3.0

Strict Mode:

We now enforce javasctipt's strict mode (via 'use strict';) at the top of most Actionhero files. This enables easier opt-in to new ES6 features, and will help catch errors which might sneak by otherwise. You should notice no change in Actionhero's behavior. Newly generated files (Actions, Tasks, etc) will also contain the line 'use strict'; at the top of each file, but you can remove it if you don't want strict mode for some reason.

You can learn more about strict mode here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

null HTTP Headers

You can now set some of the default HTTP headers to null if you don't want them returned to the client. For example, if you no longer want to send Access-Control-Allow-Origin, you can do the following in config/servers/web.js:

exports.production = { 
  servers: {
    web: function(api){
      return {
        httpHeaders : {
          'Access-Control-Allow-Origin' : null,
        },
      }
    }
  }
}

Misc

  • Show which port/ip the web and socket server are bound to at boot
  • Update ESLint to latest version
  • Update docs to run/build documentation site on OSX
Reply all
Reply to author
Forward
0 new messages