Skip to content

v0.14.21

Compare
Choose a tag to compare
@icebob icebob released this 30 Apr 11:03
· 251 commits to master since this release

20 commits from 2 contributors.

ESM support #1063

This version contains an ESM-based Moleculer Runner. This Runner is able to load ESM configuration file and ESM services. It can load the CJS services, as well

Example usage

moleculer-runner-esm --repl services/**/*.service.mjs

Moreover, the index.js file is wrapped into index.mjs, so you can import internal modules from the core in ESM modules. E.g.:

import { ServiceBroker, Errors } from "moleculer";

Please note, the hot-reload function doesn't work with this ESM Runner. The cause: https://github.com/nodejs/modules/issues/307
Node maintainers try to solve the missing features (module cache and module dependency tree) with loaders but this API is not stable yet.

Other Changes

  • broker.stopping property is created to indicate that broker is in stopping state.