• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moleculerjs / moleculer / 31783699895
94%
master: 94%

Build:
Build:
LAST BUILD BRANCH: fix/e2e-wait-for-reverse-registry-sync
DEFAULT BRANCH: master
Ran 14 Aug 2026 08:24AM UTC
Jobs 1
Files 131
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Aug 2026 08:23AM UTC coverage: 94.065%. Remained the same
31783699895

Pull #1366

github

icebob-ai
fix(runner): create the ESM runner's `require` lazily

`src/runner-esm.mjs` called `createRequire(import.meta.url)` at module scope.
Because `index.mjs` re-exports this module (`export const Runner = RunnerESM`),
every ESM import of `moleculer` eagerly evaluated it.

In hosts where `import.meta.url` is undefined -- notably bundled edge runtimes
such as Cloudflare Workers -- that throws before any user code runs:

    Uncaught TypeError: The argument 'path' must be a file URL object,
    a file URL string, or an absolute path string. Received 'undefined'
      at createRequire (node:module:34:15)

`require` is only used by `tryConfigPath()`, so creating it lazily keeps the
behaviour identical on Node while letting the ESM entry point be imported and
bundled anywhere.

Verified with `npm run test:esm` (config file resolution goes through the
lazy path) and by booting a ServiceBroker inside workerd.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #1366: fix(runner): create the ESM runner's `require` lazily so the ESM entry point can be bundled

5354 of 5913 branches covered (90.55%)

Branch coverage included in aggregate %.

7245 of 7481 relevant lines covered (96.85%)

517.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31783699895.1 14 Aug 2026 08:24AM UTC 262
95.05
GitHub Action Run
Source Files on build 31783699895
  • Tree
  • List 131
  • Changed 111
  • Source Changed 0
  • Coverage Changed 111
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #31783699895
  • Pull Request #1366
  • PR Base - master (#29911859226)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc