Bryan English
banner
bengl.dev
Bryan English
@bengl.dev
Staff Software Engineer - Datadog APM
(he/him/his)
Dad
Royal Oak, MI
https://bryanenglish.com
It's XML with the < and > replaced with &lt; and &gt; respectively, inside a SOAP envelope.
November 5, 2025 at 7:43 PM
I still live in the US in a state that went Trump. 🤷‍♂️
November 5, 2025 at 3:11 PM
So, an obvious alternative here is adding NODE_PATH support for ESM to Node.js 😂
October 23, 2025 at 5:45 PM
NODE_PATH would make this easy, since i'd just make sure the correct version of the tested library is first on the path.
October 23, 2025 at 5:41 PM
1 is a pain because of constantly changing tested modules. dynamic solves this, but i'd need to ensure i restore files correctly.

2 isn't great since failing tests could leave symlinks lying around.

3 is a non-starter, since i'm testing that i don't break static imports.
October 23, 2025 at 5:40 PM
1. rewrite the file for each test (statically or dynamically)
2. symlink into a local node_modules
3. dynamic import

I can't think of anything else, without NODE_PATH or a loader doing similar work.
October 23, 2025 at 5:40 PM
I have a test suite full of files that `import` things from pretty random places, re-using the file for the different places (think multiple versions of fastify installed, and testing against all of them). My options are either:
October 23, 2025 at 5:40 PM