# @cucumber/query

> Cucumber Query - query messages

Latest version **16.1.1** (published 2026-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cucumber/query
pnpm add @cucumber/query
yarn add @cucumber/query
bun add @cucumber/query
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 16.1.1 |
| Published | 2026-08-05 |
| First published | 2020-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 129.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Cucumber Limited |
| Maintainers | cukebot |
| Keywords | cucumber |

## Links

- npm: https://www.npmjs.com/package/@cucumber/query
- Repository: https://github.com/cucumber/query
- Homepage: https://github.com/cucumber/query#readme
- Issues: https://github.com/cucumber/query/issues
- npm.io page: https://npm.io/package/@cucumber/query

## Dependencies (2)

- [lodash.sortby](https://npm.io/package/lodash.sortby.md) ^4.7.0
- [@teppeis/multimaps](https://npm.io/package/@teppeis/multimaps.md) 3.0.0

## Recent versions

- 16.1.1 (latest) — 2026-08-05
- 16.1.0 — 2026-07-27
- 16.0.1 — 2026-06-21
- 16.0.0 — 2026-06-11
- 15.0.1 — 2026-01-22
- 15.0.0 — 2026-01-22
- 14.7.0 — 2025-12-08
- 14.6.0 — 2025-10-27
- 14.5.0 — 2025-10-08
- 14.4.0 — 2025-09-28
- 14.3.0 — 2025-09-17
- 14.2.3 — 2025-09-16
- 14.1.0 — 2025-09-15
- 14.0.1 — 2025-09-11
- 14.0.0 — 2025-09-11
- … 33 more at https://npm.io/package/@cucumber/query/versions

## README

<h1 align="center">
  <img src="https://raw.githubusercontent.com/cucumber/cucumber-js/7df2c9b4f04099b81dc5c00cd73b404401cd6e46/docs/images/logo.svg" alt="">
  <br>
  Cucumber Query
</h1>
<p align="center">
  <b>Given one <a href="https://github.com/cucumber/messages">Cucumber Message</a>, find another</b>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@cucumber/query">
    <img src="https://img.shields.io/npm/v/@cucumber/query.svg?color=dark-green" alt="npm">
  </a>
  <a href="https://central.sonatype.com/artifact/io.cucumber/query">
    <img src="https://img.shields.io/maven-central/v/io.cucumber/query.svg?label=Maven%20Central&color=dark-green" alt="maven-central">
  </a>
  <a href="https://rubygems.org/gems/cucumber-query">
    <img src="https://img.shields.io/gem/v/cucumber-query.svg?color=dark-green" alt="rubygems">
  </a>
  <a href="https://github.com/cucumber/query/actions/workflows/release-github.yaml">
    <img src="https://github.com/cucumber/query/actions/workflows/release-github.yaml/badge.svg" alt="build">
  </a>
  <a href="https://opencollective.com/cucumber">
    <img src="https://opencollective.com/cucumber/backers/badge.svg" alt="backers">
  </a>
  <a href="https://opencollective.com/cucumber">
    <img src="https://opencollective.com/cucumber/sponsors/badge.svg" alt="sponsors">
  </a>
</p>

## Overview

The different message types in `cucumber-messages` have references to each other
using `id` fields. It's a bit similar to rows in a relational database, with
primary and foreign keys.

Consumers of these messages may want to *query* the messages for certain information.
For example, [@cucumber/react-components](https://github.com/cucumber/react-components) needs to know the status of
a [Step](https://github.com/cucumber/messages/blob/main/messages.md#step) as it
is rendering the [GherkinDocument](https://github.com/cucumber/messages/blob/main/messages.md#gherkindocument)

The Query library makes this easy by providing a function to look up the
status of a step, a scenario or an entire file.

---
_Source: https://npm.io/package/@cucumber/query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
