unjs / unimport

Unified utils for auto importing APIs in modules.
MIT License
513 stars 60 forks source link

fix: resolve module path conversion issue in scanExports on Windows #356

Closed kiki-kanri closed 2 months ago

kiki-kanri commented 2 months ago

PR #354 fixed the module import resolution issue, but it did not consider Windows systems. On Windows, serious errors occur due to the use of \.

This PR fixes the issue by standardizing path separators to / after determining the module path.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.24%. Comparing base (a4a5e0a) to head (9ac46be). Report is 13 commits behind head on main.

Files Patch % Lines
src/node/scan-dirs.ts 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #356 +/- ## ========================================== - Coverage 98.73% 97.24% -1.49% ========================================== Files 14 13 -1 Lines 1817 1199 -618 Branches 374 385 +11 ========================================== - Hits 1794 1166 -628 - Misses 23 33 +10 ```

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