How to run a preinstall-like script in Yarn Berry?

I don’t need to support this behavior as a library author or anything, but if I wanted to run something in my own project before yarn install, is there really no way to do that anymore since preinstall was removed?