From 25115bef6dc84aa66b0b72264de660bd27ecf27b Mon Sep 17 00:00:00 2001 From: Lydia Date: Wed, 13 Nov 2019 20:07:09 +1100 Subject: [PATCH] Update migration-guide-alpha.26-to-beta.md Please refer to issue #3971 for this fix --- .../migration-guide-alpha.26-to-beta.md | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/docs/3.0.0-beta.x/migration-guide/migration-guide-alpha.26-to-beta.md b/docs/3.0.0-beta.x/migration-guide/migration-guide-alpha.26-to-beta.md index e03535b450..c872d86a27 100644 --- a/docs/3.0.0-beta.x/migration-guide/migration-guide-alpha.26-to-beta.md +++ b/docs/3.0.0-beta.x/migration-guide/migration-guide-alpha.26-to-beta.md @@ -190,7 +190,54 @@ build ## Migrating `config` -You can leave all your files in `./config` unchanged but remove the `server.autoReload` key in `./config/environments/**/server.json`. + +### Remove the `server.autoReload` key + +You need to remove the `server.autoReload` key in `./config/environments/**/server.json`. + +### Bootstrap function + +The function exported in `config/functions/bootstrap.js` previously received a callback. This is not the case anymore. You can either use an async function, return a promise or simply run a synchronous function. + +**Before** + +```js +module.exports = cb => { + cb(); +}; +``` + +**After** + +**Async** + +```js +module.exports = async () => { + await someOperation(); +}; +``` + +**Promise** + +```js +module.exports = () => { + return new Promise(/* ... */); +}; +``` + +**Sync** + +```js +module.exports = () => { + someSyncCode(); +}; +``` + +**No Function** + +```js +module.exports = () => {}; +``` ## Migrating `plugins`