Skip to content

v1.7.21: Make createApp/createAppNode/Edge/Lambda/Worker async for ESM config file support

Latest

Choose a tag to compare

@M-Chris M-Chris released this 19 Feb 10:16
· 1 commit to main since this release

feat!: make createApp/createAppNode/Edge/Lambda/Worker async for ESM config file support

  • All createApp* functions now return Promise — must be awaited
  • Config file loaded via dynamic import() (same as all other modules)
  • ESM config files (projects with type:module) now load correctly
  • Moro constructor accepts optional preloaded config from async factory
  • Added loadConfigFromAllSourcesAsync + initializeConfigAsync internals
  • Updated all tests to await createApp() and use async beforeEach/beforeAll
  • Sync fallback still works via new Moro() directly (env vars + options only)

Migration: const app = createApp() → const app = await createApp()

This is a breaking change, points is all create methods App, Node, Edge etc. are now await.