Skip to content

Conversation

@KetanReddy
Copy link
Member

@KetanReddy KetanReddy commented Feb 13, 2025

Closes #186

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Release Notes

Use source maps, if available, to map validation errors back to authored content. If not available, the location in the compiled content will be used to point to the error.

@KetanReddy KetanReddy added the patch Increment the patch version when merged label Feb 13, 2025
@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.82%. Comparing base (ece57cd) to head (a403df6).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #191   +/-   ##
=======================================
  Coverage   66.82%   66.82%           
=======================================
  Files          86       86           
  Lines        8997     8997           
  Branches     1251     1251           
=======================================
  Hits         6012     6012           
  Misses       2962     2962           
  Partials       23       23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kharrop kharrop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool! Thanks for adding in this feature; went over the logic and it made sense for what criteria it was checking against.

I assume people would always want the source file if available, otherwise was going to suggest a flag to show the compiled file path.

@KetanReddy
Copy link
Member Author

@kharrop that was what I was thinking as well. Maps should always be available but there is one case where you could get mixed results if JSON content was authored in a TS file as that wouldn't generate a source map as it currently only comes from JSX elements.

@KetanReddy KetanReddy merged commit 1f3a9ab into main Feb 13, 2025
8 checks passed
@KetanReddy KetanReddy deleted the feature/source-maps-for-validations branch February 13, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation: Errors Should Use Sourcemaps

3 participants