For openSUSE Tumbleweed run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:frispete:java/openSUSE_Tumbleweed/home:frispete:java.repo
zypper refresh
zypper install yarn
For 15.5 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:frispete:java/15.5/home:frispete:java.repo
zypper refresh
zypper install yarn
For 15.4 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:frispete:java/15.4/home:frispete:java.repo
zypper refresh
zypper install yarn