It excludes only if supplied for non commercial activity.
"In order not to hamper innovation or research, this Directive should not apply to free and open-source software developed or supplied outside the course of a commercial activity"
That is exactly what @ThePSF is asking for more clarity and better wording, as many open-source projects are used by commercial projects at no cost.
It could be worth maybe taking the word of open-source licenses? Licenses usually exclude any liability from the developer. I believe OS licenses should be taken into account by the law.
@ederlm @jmaris @ThePSF A law that demonstrably overrides all current software licenses and contracts with liability limitations would be a rather disruptive thing, indeed.