message: refactor: use async / await in rewritePageHandlers
diff: @@ -6,19 +6,18 @@ const logger = require("../utils/logger");
  const writeFileAsync = promisify(fs.writeFile);
  const renameAsync = promisify(fs.rename);
  -const processJsHandler = nextPage => {
  - return getCompatLayerCode(nextPage.pagePath).then(compatCodeContent => {
  +const processJsHandler = async nextPage => {
  + const compatCodeContent = await getCompatLayerCode(nextPage.pagePath);
  +
  logger.log(`Creating compat handler for page: ${nextPage.pageName}.js`);
  - return writeFileAsync(nextPage.pageCompatPath, compatCodeContent).then(
  - () => {
  +
  + await writeFileAsync(nextPage.pageCompatPath, compatCodeContent);
  +
  // build/serverless/page.js -> build/serverless/page.original.js
  - return renameAsync(nextPage.pagePath, nextPage.pageOriginalPath).then(
  + await renameAsync(nextPage.pagePath, nextPage.pageOriginalPath);
  +
  // .next/serverless/page.compat.js -> .next/serverless/page.js
  - () => renameAsync(nextPage.pageCompatPath, nextPage.pagePath)
  - );
  - }
  - );
  - });
  + await renameAsync(nextPage.pageCompatPath, nextPage.pagePath);
  };
  module.exports = nextPages => {
  