Jasmine 5 ESM config loading across Node.js 16 CI and Node 18+ local
0 reputation · 16 Nov 2024, 14:47 UTC
Goal is to use Jasmine 5 native ES module support with package.json "type": "module" and a jasmine.json config file in both local development and CI pipelines.
Jasmine 5 loads the config via dynamic import(). Node.js 18.19+ stabilizes ESM without flags, while Node 16/17 require --experimental-vm-modules for ESM config loading. The Jasmine CLI does not auto-detect Node version or inject flags, and --experimental-vm-modules is deprecated in Node 18 and removed in Node 20.
With differing Node versions across environments, config loading behavior is not consistent and the handling of mixed-version environments is unresolved.
Should Jasmine emit a warning when config loading depends on experimental VM modules? Is there a documented compatibility boundary for jasmine.json loading across Node 16, 18 and 20? How should projects declare supported Node versions for Jasmine 5 ESM configs?