prometheus/web/ui/module/lezer-promql
Jyotishmoy Deka 300b4f495b
web/ui: fix lezer-promql module build on Windows (#18725)
Signed-off-by: jyotishmoy12 <jyotishmoydeka62@gmail.com>
2026-05-19 15:50:28 +02:00
..
src promql/ui: highlight start()/end()/range()/step() as functions; start()/end() as modifiers only after @ 2026-04-17 16:48:54 +02:00
test promql/ui: highlight start()/end()/range()/step() as functions; start()/end() as modifiers only after @ 2026-04-17 16:48:54 +02:00
.gitignore enable ui module publication (#10876) 2022-06-30 12:10:10 +02:00
.npmignore codemirror-promql: Preserve source files in npm package (#16804) 2025-07-02 15:31:02 +02:00
build.sh UI: stabilize dependencies and environment (#10517) 2022-04-05 11:49:22 +02:00
generate-types.sh UI: stabilize dependencies and environment (#10517) 2022-04-05 11:49:22 +02:00
jest.config.cjs UI: stabilize dependencies and environment (#10517) 2022-04-05 11:49:22 +02:00
package.json Revert "chore: prepare 3.12.0-rc.0 release" 2026-05-19 08:40:18 +01:00
README.md Add readme for lezer-promql and update codemirror-promql readme (#10875) 2022-06-22 16:57:03 +02:00
rollup.config.js web/ui: fix lezer-promql module build on Windows (#18725) 2026-05-19 15:50:28 +02:00

lezer-promql

Overview

This is a PromQL grammar for the lezer parser system. It is inspired by the initial grammar coming from Prometheus written in yacc.

This library is stable but doesn't provide any guideline of how to use it as it has been integrated into codemirror-promql. If you want to use this library, you perhaps want to actually use @prometheus-io/codemirror-promql instead.

Note: This library is a lezer-based implementation of the authoritative, goyacc-based PromQL grammar. Any changes to the authoritative grammar need to be reflected in this package as well.

Installation

This package is available as an npm package:

npm install --save @prometheus-io/lezer-promql

Note: you will have to manually install the lezer dependencies as it is a peer dependency to this package.

npm install --save @lezer/lr @lezer/highlight

Development

Building

npm i
npm run build

Testing

npm run test

License

The code is licensed under an Apache 2.0 license.