Skip to content

feat(yaml): introduce YamlSyntaxError with structured position info#7156

Open
tomas-zijdemans wants to merge 2 commits into
denoland:mainfrom
tomas-zijdemans:yml-error
Open

feat(yaml): introduce YamlSyntaxError with structured position info#7156
tomas-zijdemans wants to merge 2 commits into
denoland:mainfrom
tomas-zijdemans:yml-error

Conversation

@tomas-zijdemans

Copy link
Copy Markdown
Contributor

Introducing YamlSyntaxError mirroring XmlSyntaxError from @std/xml:

  • YamlSyntaxError extends SyntaxError with line, column, offset, snippet
  • parse() and parseAll() now throw it (including the multi-document case, with position pointing at the second ---)
  • onWarning callback type tightened to YamlSyntaxError
  • error.message format unchanged. Fully backward-compatible

@github-actions github-actions Bot added the yaml label May 26, 2026
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.85%. Comparing base (f017697) to head (e0abc68).

Files with missing lines Patch % Lines
yaml/_loader_state.ts 95.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7156      +/-   ##
==========================================
+ Coverage   94.84%   94.85%   +0.01%     
==========================================
  Files         617      618       +1     
  Lines       51422    51690     +268     
  Branches     9300     9353      +53     
==========================================
+ Hits        48769    49032     +263     
- Misses       2112     2113       +1     
- Partials      541      545       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant