Clone the drawio-desktop repo, careful this takes a while and it is pretty big (almost 600M)
git clone --recursive https://github.com/jgraph/drawio-desktop.git
Now you want to use the very last version instead of the one coming with drawio-desktop so you have to update the submodule.
cd drawio-desktop
cd drawio
git pull origin master # We want to update the submodule to the latest version
cd ..
Then we start electron
npm install
# you can eventually run
npm audit fix
cd draw io
npm install
npm audit fix
cd ..
NODE_ENV=production npm start
It is useful to do it that way as the JS only version always opens a file save dialog when saving, and it is a bit annoying when you are editing something and just want to do a quick save.