-depth N is only supported in BSD, -min/maxdepth seems to be supported everywhere. Placing them before other options also removes a warning:
$ find /home/ubuntu/.local/m/versions -type d -depth
find: warning: you have specified the -depth option after a non-option argument -type, but options are not positional (-depth affects tests specified before it as well as those specified after it). Please specify options before other arguments.
find: paths must precede expression: `1'
$ find /home/ubuntu/.local/m/versions -maxdepth 1 -mindepth 1 -type d
/home/ubuntu/.local/m/versions/5.0.5
/home/ubuntu/.local/m/versions/5.2.0-rc2
/home/ubuntu/.local/m/versions/5.1.1
Thanks @dgomezferro ! BSD-ish options are generally there to be friendly with macOS' ancient userland tools, but min/maxdepth also appear to be work fine :)
-depth N is only supported in BSD, -min/maxdepth seems to be supported everywhere. Placing them before other options also removes a warning: