Skip to content

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

Open
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:yml-error
Open

feat(yaml): introduce YamlSyntaxError with structured position info#7156
tomas-zijdemans wants to merge 1 commit 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
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.60%. Comparing base (f0c9f14) to head (5946b16).

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.57%   94.60%   +0.02%     
==========================================
  Files         636      637       +1     
  Lines       52138    52151      +13     
  Branches     9399     9401       +2     
==========================================
+ Hits        49311    49336      +25     
+ Misses       2249     2238      -11     
+ Partials      578      577       -1     

☔ View full report in Codecov by Sentry.
📢 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