actionhero / next-in-actionhero

An example project that runs the Next.JS react server inside of ActionHero
4 stars 0 forks source link

Update actionhero to the latest version 🚀 #9

Closed greenkeeper[bot] closed 6 years ago

greenkeeper[bot] commented 6 years ago

Version 19.0.0 of actionhero was just published.

Dependency actionhero
Current Version 18.1.3
Type dependency

The version 19.0.0 is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of actionhero.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


Release Notes v19.0.0 Jest and StuckWorkers

Node Resque & Tasks

We've updated to Node-Resque v5.3.0, which includes support for automatically pruning old stuck or crashed worker processes. The setting which controls how long a worker has to be non-response for in actionhero is api.config.tasks.stuckWorkerTimeout

Lear more here: https://github.com/taskrabbit/node-resque/releases/tag/v5.3.0

Web Server

Capture full rawBody even if formidable fails

  • If formidable fails, the connection processing finishes before the (full) request body is processed and available to actions/middleware
  • by @chimmelb via #1198

ActionHero Websocket

We noticed that the way that we were sharing session between WS and WEB connections (headers) was unlikely to work with some primus/websocket transports. We've changed to using query params which is what Priums recommends.

  • Added a new ActionHeroWebSocket option (generated automatically) cookieKey. This must now be added to your config files to share sessions between WEB and WEBSOCKET connections in the same browser.

Jest

ActionHero now uses jest for testing. We've removed mocha and and chai. You can continue to use these older tools in your projects, but all new projects will be generated with a jest-friendly layout.

Jest has a number of features which make it better than mocha:

  • interactive testing
  • test on file change
  • more popular
  • parallel testing

The project changes include:

  • all tests moved to __tests__, per Jest convention
  • update all test files to work with jest and jasmine-style matchers
  • removes the dev dependencies: mocha, chai, dirty-chai, and cross-env
  • adds the dev dependencies: jest, jest-environment-webdriver
  • updates the allowed global variables (for standard.js testing) as provided by jest
  • updates actionhero generate to use jasmine in new projects
  • adds chromedriver as a dev dependency; test cookies and sessions in a real browser with selenium
    • a guide on using chromedriver can be found here
  • Updated various configs to use process.env.JEST_WORKER_ID in tests to allow parallel testing without cross-pollution of redis, servers, etc.

Misc

  • Chat middleware now bubbles up errors properly (and maintains async priority execution)
  • forEach() handling of async changed to for..of
  • Ensure that merging routes files from multiple config folders has the expected behavior
  • Update all dependancies to latest versions
  • Test with node.js v10 (in addition to node v8 and v9)
  • Avoid double-disconnection message to closed socket (#1215)
  • ensure cluster_pidfile follows api.config.general.paths.pid path directive

Upgrade Guide

Configuration

  • in config/tasks.js add api.config.tasks.stuckWorkerTimeout = 3600000. This will be a 1 hour timeout for stuck/crashed worker processes
  • in config/servers/websocket.js add api.config.servers.websocket.client.cookieKey = api.config.servers.web.fingerprintOptions.cookieKey. This will instruct the ActionHero Websocket Clients to share the same cookie as the web server to share a fingerprint, which can be used to share session information.
  • If you plan to use Jest for your tests, and want to test in parallel, you will need to configure your server in the test environment to make use of process.env.JEST_WORKER_ID. Please view config/api.js, config/redis.js, config/servers/socket.js, and config/servers/web.js for more information
Commits

The new version differs by 39 commits.

  • 55f1f90 v19.0.0
  • 990e3dd Avoid double-disconnection message to closed socket (#1215)
  • 4de5c47 test with circleCI node v10 images
  • 694edec test with circleCI node v10 images
  • 3b4b978 Fix routes override on multiple config folders (#1214)
  • b0dc608 more time for lsof tests
  • 1aced90 forEach() handling of async changed to for..of
  • 566778e Update to node 10 in .nvmrc
  • b5a3acf Merge pull request #1210 from Martinlck/master
  • 4d4e31b Merge branch 'master' into master
  • 1c2b0b2 Update config.yml
  • 856c3c5 Merge branch 'master' of https://github.com/Martinlck/actionhero
  • 5193ea6 Removed the checks of instanceof Error. Not needed anymore since errors bubble correctly.
  • 5847cb3 Merge branch 'master' into master
  • 3e505b8 Reverted last function which was still async.

There are 39 commits in total.

See the full diff

FAQ and help There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).

Your Greenkeeper bot :palm_tree: