Skip to content

Improve default Windows outputPath

Compare
Choose a tag to compare
@TheJaredWilcurt TheJaredWilcurt released this 13 Jan 17:29
· 26 commits to main since this release
4c71b11

Breaking Changes:

  • NONE! Your code should work exactly the same without changing anything.

Enhancements:

  • On Windows computers that store the desktop in a OneDrive folder, (or any any other oddball location), we now specifically ask Windows where the desktop is, instead of assuming it is at the root of the user profile. Though if we cannot get a response from Windows, we fall back on the assumed location. This only occurs if an outputPath is not specified. This may increase runtime by upwards of 300ms on platforms with powershell.exe, however results in a more accurate default location to place the shortcut.

Special thanks to @StoneyEagle for bringing this to my attention and with suggestions on solutions, and @sysrage for inspiring adding a note to encourage an async/ESM port of this library.

Maintenance:

  • Updated dependencies
  • Updated documentation
    • Document the changes to the default windows output path
    • Add a note about endorsing an ESM/async fork

Code Quality:

  • Added timer to manual test.
    • On Windows 7 - Node 13.13.0 - using powershell to lookup the default output path takes 330ms to execute the task. With an outputPath supplied it takes 65ms.
  • Linting and Test coverage remains at 100%
  • E2E tests all passing

Code Changes