Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.79 KB

MIGRATION_GUIDE.md

File metadata and controls

42 lines (32 loc) · 1.79 KB

Migration Guide

Follow this guide to help you migrate your reload use across major versions.

Table of contents

Version 2.x -> 3.x

  • Reload officially removed support for the server argument deprecated in Version 2. If you supply the server argument to reload the promise will reject and return an error.
  • Reload now uses promises:
    • To call Reload you should use a then/catch to call reload.
      • reload(app).then(function () {
          // Reload started
        }).catch(function (err) {
          // Reload did not start correctly, handle error
        })
    • If you are in an asynchronous function you can call Reload with await
      • async function asyncCall() {
          try {
            var reloadReturned = await reload(app)
          } catch (err) {
            // Handle error
          }
        }
  • Reload no longer supports Node versions 4, 5, 6, 7, 8, or 9. Although older versions of node like version 8 may work with Reload it is recommended to use a Node version officially supported.

Version 1.x -> 2.x

Reload dropped support for server. The only required parameter for reload is app.

  • Upgrade with required arguments: reload(server, app) becomes reload(app)

  • Upgrade with required arguments and the one optional argument: reload(server, app, true) becomes reload(app, {verbose: true})

To read more about the API breaking changes please refer to the changelog.