Skip to content

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

Merged
bartlomieju merged 2 commits into
denoland:mainfrom
tomas-zijdemans:yml-error
Jul 30, 2026
Merged

feat(yaml): introduce YamlSyntaxError with structured position info#7235
bartlomieju merged 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

Note

Recreates #7156, which was closed automatically when I accidentally deleted the head fork. The branch is identical to the original PR head.

@github-actions github-actions Bot added the yaml label Jul 15, 2026
@bartlomieju
bartlomieju merged commit 6861a2b into denoland:main Jul 30, 2026
34 checks passed
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.

2 participants