denoland / std

The Deno Standard Library
https://jsr.io/@std
MIT License
3.21k stars 621 forks source link

fix(fs): improve the docs and error message of `ensureSymlink(Sync)` #6198

Closed kt3k closed 1 day ago

kt3k commented 2 days ago

This PR addresses the feedback given in #6191

This PR improves the error message of fs.ensureSymlink when the link target doesn't exist. Also this improves the documentation by adding examples.

closes #6191

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.57%. Comparing base (82ccee6) to head (9361eb0). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
fs/ensure_symlink.ts 80.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6198 +/- ## ========================================== - Coverage 96.58% 96.57% -0.02% ========================================== Files 532 532 Lines 40801 40819 +18 Branches 6105 6111 +6 ========================================== + Hits 39409 39422 +13 - Misses 1350 1355 +5 Partials 42 42 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

kt3k commented 1 day ago

Nit: update target param description that it should be relative to dirname of linkName when it's a string?

Sounds good! Updated