Back to Explore

syntax-tree/unist-util-position

GitHub
1 watchersOpen source

Last release: 7/7/2023

unist-util-position is a utility for unifiedjs that helps access positional information on unist syntax tree nodes. It provides functions like position(node), pointStart(node), and pointEnd(node), useful when you need node locations (for example when building or validating plugins that may encounter dirty position data).

Project status

  • The upstream GitHub repository appears actively maintained through regular versioned updates, with the latest noted push and update occurring on 2023-07-07.
  • The apparent updates cadence is low and bursty rather than frequent, with a larger gap between 4.0.4 (2023-01-21) and 5.0.0 (2023-07-07), and an additional larger gap before that (4.0.3 on 2022-03-31).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 5.0.0

    7/7/2023

    unist-util-position v5.0.0 updates the package for Node.js 16+, switches to an exports map for module resolution, and changes how positional data is validated. The core utilities (pointStart, pointEnd, position) now return undefined when position data is invalid instead of returning empty objects with null fields.

    Breaking
  • 4.0.4

    1/21/2023

    Version 4.0.4 is primarily a maintenance release, with code reorganized and documentation updated. The runtime entry point (index.js) now re-exports the implementation from a new lib/index.js file, while build, test, and tooling configuration were also updated.

  • 4.0.3

    3/31/2022

    Release 4.0.3 is a small patch that updates the library metadata and adjusts the inline type documentation used for positional lookup. The code change is limited, and runtime logic appears unchanged.