I have now submitted
`nodejs16` and `nodejs18` packages for Fedora.
You can test them with `dnf copr enable sgallagh/nodejs-alternatives`.
The final approach I took is one that follows the example of Python3.
The SRPM is versioned according to the major release number and the
output binary RPMs will be `nodejs[-*]` if it is the default version
for that release or `nodejs$MAJOR[-*]` if not.
I've tested the upgrade path from F36 and F37 and it appears to work
fine (and could, in fact, trivially be backported to the live releases
to simplify maintenance).
I'd appreciate package reviews from anyone with the available time. Thank you.