This issue has been upstreamed from tauri-apps/tauri-docs#1905
use ext from call extname for basename return wired result:
const ext = await extname('some-json-file.json'); // 'json'
const nameNoExt = await basename('some-json-file.json', ext); // 'some--file.'
Maybe the correct usage is as below?:
const ext = await extname('some-json-file.json'); // 'json'
const nameNoExt = await basename('some-json-file.json', '.' + ext); // some-json-file