# @bufbuild/cel-spec

> CEL definitions and test data

Latest version **0.6.1** (published 2026-08-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @bufbuild/cel-spec
pnpm add @bufbuild/cel-spec
yarn add @bufbuild/cel-spec
bun add @bufbuild/cel-spec
```

## Health

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

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

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2026-08-27 |
| First published | 2025-04-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 5.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 38 |
| Maintainers | bufdev, tstamm-buf, bufbot, jdailey_buf, doriakeung, cmahony |
| Keywords | javascript, typescript, protobuf, cel, common-expression-language |

## Links

- npm: https://www.npmjs.com/package/@bufbuild/cel-spec
- Repository: https://github.com/bufbuild/cel-es
- Homepage: https://github.com/bufbuild/cel-es#readme
- Issues: https://github.com/bufbuild/cel-es/issues
- npm.io page: https://npm.io/package/@bufbuild/cel-spec

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.6.1 (latest) — 2026-08-27
- 0.6.0 — 2026-06-01
- 0.5.0 — 2026-05-06
- 0.4.0 — 2026-01-20
- 0.3.0 — 2025-07-28
- 0.2.0 — 2025-06-04
- 0.1.0 — 2025-05-02
- 0.0.1 — 2025-04-30

## README

# @bufbuild/cel-spec

This package provides CEL definitions and test data from
[the CEL specification](https://github.com/google/cel-spec)
(<!-- upstreamCelSpecRef -->v0.25.1<!-- upstreamCelSpecRef -->).

CEL uses Protocol Buffer definitions for parsed expressions. For example, the
message `cel.expr.ParsedExpr` provides an abstract representation of a parsed
CEL expression. The message types and schemas can be imported from
`@bufbuild/cel-spec`:

```ts
import { ParsedExpr } from "@bufbuild/cel-spec/cel/expr/syntax_pb.js";
```

CEL's conformance test suite also uses Protocol Buffers to define test cases.
All messages from the `cel.expr.conformance` namespace are exported from this
package as well, and the function `getConformanceSuite` provides conformance
test data:

```ts
import { getConformanceSuite } from "@bufbuild/cel-spec/testdata/tests.js";
import { getTestRegistry } from "@bufbuild/cel-spec/testdata/registry.js";
```

In addition to CEL's conformance test data, this package also exports parser
tests extracted from [`cel-go`](github.com/google/cel-go):

```ts
import { getParsingSuite, getComprehensionSuite } from "@bufbuild/cel-spec/testdata/tests.js";
```

## Incremental approach

The tests aggregated by this package are useful for _incremental_ testing of a
CEL implementation. That is, they provide input expressions along with outputs
at multiple points in the lifecycle of a CEL program, not only its final output.

Chiefly, tests provide some or all of the following outputs:
- The parsed abstract syntax tree (AST) for an input expression
- The output type that should be statically inferred by a type checker for an
  expression
- The final result of compiling and running the expression

It should be noted that only the final result is actually provided by the
conformance tests sourced from the CEL specification repo. The incremental
outputs are derived from the `cel-go` implementation, considering it to be
positioned as a reference implementation.

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