At one point we had UMD[0], which effectively provided runtime-agnostic interface, but ES modules were incompatible with that.
Deno and Bun have decent Node compatibility, so couldn't Node APIs be used as the generic runtime interface?
[0]: https://github.com/umdjs/umd