Kotlin JS: Upgrading a single library in yarn.lock

As is well known, when bringing in just a single library using node, you often end up with a lot of transient dependencies as well.

I am in the situation that I need to upgrade a single transient dependency which is currently locked in yarn.lock. I could edit this file manually to achieve what I want, but it is not really recommended. All the guides online that I can find talks about how to upgrade libraries using the yarn command, but that doesn’t seem to work when using gradle to build a kotlin JS project.

Is there a simple way to achieve what I need?