schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs, SSR and SSG.
https://jasprpad.schultek.de
MIT License
1.07k stars 65 forks source link

fix: Prevent an infinate loop on Windows in build executables #131

Closed fuzzybinary closed 9 months ago

fuzzybinary commented 9 months ago

Description

When running jaspr through dart .\lib\main.dart or through a built Jaspr executable the _findRootProjectDir (in lib/src/server/server_handler.dart) would enter an infinite loop because Platform.script.path returns the the path with a leading slash.

This changes requests for Platform.script.path to Platform.script.toFilePath() which is more correct.

Also fix melos format on Windows and the real server test on Windows.

This also updates modules/build to a valid commit.

Fixes #130

Type of Change

Ready Checklist

github-actions[bot] commented 9 months ago

Package Version Report

The following packages have been updated: jaspr : 0.9.2 -> 0.9.3 jaspr_builder : 0.9.2 -> 0.9.3 jaspr_cli : 0.9.2 -> 0.9.3 jaspr_test : 0.9.2 -> 0.9.3

codecov[bot] commented 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e953451) 66.34% compared to head (aefa7d6) 66.34%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #131 +/- ## ======================================= Coverage 66.34% 66.34% ======================================= Files 96 96 Lines 3824 3824 ======================================= Hits 2537 2537 Misses 1287 1287 ``` | [Files](https://app.codecov.io/gh/schultek/jaspr/pull/131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kilian+Schulte) | Coverage Ξ” | | |---|---|---| | [packages/jaspr/lib/src/server/server\_handler.dart](https://app.codecov.io/gh/schultek/jaspr/pull/131?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kilian+Schulte#diff-cGFja2FnZXMvamFzcHIvbGliL3NyYy9zZXJ2ZXIvc2VydmVyX2hhbmRsZXIuZGFydA==) | `51.02% <0.00%> (ΓΈ)` | |

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

schultek commented 9 months ago

@fuzzybinary Feel free to open another PR and add yourself to the AUTHORS file.