Version Packages#78
Merged
Merged
Conversation
a748ec0 to
096046f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@amritk/yaml@0.1.0
Minor Changes
185c63b: Squeeze more throughput out of the parser hot path and shrink the node tree.
Hot-path tuning (no API change): a precomputed first-character lookup table for
plain-scalar resolution, eliminate a redundant
key:colon scan when entering ablock mapping, hoist quoted-key handling out of the colon scanner's per-character
loop, and build
toJScollections with index loops instead of a per-sequence.mapclosure.Smaller nodes (breaking shape change): each node and error now carries inline
start/endnumber fields instead of arange: [start, end](and errorpos) tuple. This removes a second heap allocation per node — on a 100 KB OpenAPIdocument that is ~12k fewer arrays — cutting retained tree memory by ~35–45% and
making the source-mapped parse ~9–19% faster (largest gains on small/medium docs).
Migration: replace
node.range[0]→node.start,node.range[1]→node.end,and
error.pos[0]→error.start. TheRangetype export is removed. Nodeguards (
isMap/isScalar/…) andnodeAtPathare unchanged.84e3cda: Add
@amritk/yaml: a tiny, dependency-free YAML parser with exact sourcepositions, built for diagnostics. Every node records its
[start, end)sourcerange so a consumer can map any value back to an exact
line:column. It parsesto data via
parse, to a positioned tree viaparseDocument, resolves a JSONpath to its node with
nodeAtPath, and maps offsets toline:columnwithlineCounter. Covers block and flow collections, all quoting styles, blockscalars with chomping, comments, anchors, aliases, and merge keys, with YAML 1.2
core-schema scalar resolution. Benchmarked ~20× faster than
yamlfor buildinga source-mapped tree and ~7.6× smaller, with a differential test suite pinning
data output to
yamlacross full OpenAPI specs.