while newly created rules are missing the “version=…” part.
Both rule-types are working.
Installed is only JavaSript Scripting (according to bundle:list).
Does the “version=…” part have an effect at all if only one JavaScript version is installed?
application/javascript;version=ECMAScript-2021 was the MIME type for JavaScript Scripting in openHAB 3.4 and is still supported in 4.0, but in 4.0 JavaScript Scripting took application/javascript from NashornJS and made it is‘s primary MIME type.
FYI NashornJS has application/javascript;version=ECMAScript-5.1, and in general the version part does matter as it is part of the MIME type.