Back to Explore

estools/esquery

GitHub
2 watchersOpen source

Last release:

ESQuery is a JavaScript library for querying an Esprima-generated ECMAScript AST using a CSS-style selector syntax. It is useful for finding AST nodes that match patterns, such as node types, nested fields, and selector-based relationships like parent-child and sibling combinators.

Project status

  • Maintenance status: Evidence suggests some ongoing maintenance (last upstream push on 2025-12-31), but the most recent tagged updates available here are v1.6.0 (2024-07-08), which is about 23 months before today (2026-06-09), indicating a long documentation/tagging quiet period.
  • Update cadence: The tagged updates shown are irregular, with a gap of over a year between v1.6.0 (2024-07) and the prior v1.5.0 (2023-03), followed by earlier releases that also have multi-year gaps, so cadence appears sporadic rather than frequent.

AI summary generated

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

Recent updates

  • v1.6.0

    v1.6.0 introduces improved support for the CSS :has pseudo selector. Specifically, it extends parsing and matching so selectors inside :has() can begin with combinators such as > (child), allowing expressions like :has(> Identifier[name="x"]).

    Features
  • v1.5.0

    v1.5.0 introduces new customization hooks for esquery selectors, notably support for using a different AST node type property via an ESQueryOptions.nodeTypeKey option. It also extends the CSS-like :class pseudo selector handling with a new ESQueryOptions.matchClass callback and changes the selector grammar to accept a broader set of class names.

    BreakingFeatures
  • v1.4.2

    Release v1.4.2 was published on 2023-02-16, but no release notes were provided by the publisher. As a result, there is no documented information here about new features, fixes, breaking changes, or dependency updates.

  • v1.4.1

    No release notes were provided for v1.4.1. The code diff shows a substantial internal refactor in esquery.js focused on selector matching (including new matcher caching), along with a CI workflow change to add Node 18 and remove Node 6 testing.

  • v1.4.0

    v1.4.0 ships with substantial internal changes but the publisher provided no release notes. The code diff shows new support for querying custom AST node types via configurable visitor keys and traversal fallback logic, and it also includes changes to the selector grammar related to attribute name parsing. Build and CI configuration were updated as well.

    BreakingFeatures
  • v1.3.1

    Release v1.3.1 does not include any publisher-provided release notes. The code diff shows no library source changes, only an npm package version bump and dependency version updates in package.json.

  • v1.3.0

    Release v1.3.0 refactors esquery's selector matching internals by introducing a new traversal API. It adds query.traverse(ast, selector, visitor) and rewires query.match(ast, selector) to use the new traversal mechanism, with a new test covering traversal behavior.

    Features
  • v1.2.1

    Release v1.2.1 has no publisher release notes. The code diff shows changes primarily to build and test tooling (Babel setup, Rollup config, CI matrix, and test execution wiring), plus small test behavior adjustments for older Node versions.

    Breaking
  • v1.2.0

    v1.2.0 includes a major modernization of the project toolchain and build output (rollup-based bundling into dist artifacts) plus changes to the selector grammar and runtime implementation. Release notes were not provided by the publisher, so the behavioral and packaging changes below are inferred directly from the code diff.

    Features
  • v1.1.0

    The release is tagged v1.1.0, but no release notes or change details were provided by the publisher. As a result, the information available here does not indicate any new features, fixes, breaking changes, or dependency updates for developers.