I can confirm in 24w18a
Can confirm
An easy fix without changing the code a bit would be to use this:
summon minecraft:villager ~ ~ ~ {VillagerData:{profession:"minecraft:cleric", level:5}, Offers:{Recipes:[{maxUses:100, sell:{count:99, id:"minecraft:emerald", components:{"minecraft:max_stack_size":99}}, buy:{count:99, id:"minecraft:diamond_sword", components:{"minecraft:max_stack_size":99}}}]}}
/summon minecraft:villager ~ ~ ~ {VillagerData:{profession:"minecraft:cleric", level:5}, Offers:{Recipes:[{maxUses:100, sell:{count:99, id:"minecraft:diamond_sword", components:{"minecraft:max_stack_size":99}}, buy:{count:99, id:"minecraft:emerald", components:{"minecraft:max_stack_size":99}}}]}}
This may not be fixed due to this
Can confirm
Can confirm.
Seems like a feature request.
It'd be nice tho because it'd be hard to add with a datapack.