github moleculerjs/moleculer v0.14.21

latest releases: v0.15.0-beta1, v0.14.33, v0.14.32...
2 years ago

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: nodejs/modules#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.

Don't miss a new moleculer release

NewReleases is sending notifications on new releases.