Commit graph

11 commits

Author SHA1 Message Date
Julien Pivotto
5e280be974 ui: do not tag pre-release npm packages as latest
Derive the npm dist-tag from the Prometheus version (VERSION file) and
download.json so pre-releases and old patches never move the "latest"
tag: pre-releases publish under their channel (rc/beta/alpha/next), the
latest stable under "latest", the newest LTS under "lts", and older
stable or LTS patches under "oldstable". Fail the publish if
download.json cannot be fetched.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-23 10:28:21 +02:00
George Krajcsovits
2fe27be7ac
ui: fix check-package version read under pnpm (#18976)
checkPackage read each workspace package's version via `pnpm run env | grep
npm_package_version`, an npm-ism. pnpm has no built-in `env` script, so it
fails with ERR_PNPM_NO_SCRIPT and returns an empty string, making
`ui_release.sh --check-package` report a false version mismatch for every
package.

Read the version with `pnpm pkg get version` instead. Leftover from the
npm-to-pnpm migration (#18797).

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 10:22:15 +02:00
George Krajcsovits
12cb96a63c
fix: no need to pnpm update the react-app separately (#18975)
You get
[ERR_PNPM_VERSION_NOT_CHANGED] Version was not changed: 0.313.0-rc.0
error if you try.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2026-06-19 12:00:27 +00:00
Julien
18fa2d8b8e
ui: link react-app to local codemirror-promql instead of an npm version (#18967)
Some checks are pending
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests for 32-bit x86 (push) Waiting to run
CI / Go tests for Prometheus upgrades and downgrades (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Compliance testing (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
react-app is not part of the pnpm workspace, so it pulled
@prometheus-io/codemirror-promql from the npm registry by exact version.
During a release, `make ui-bump-version` rewrote that pin to the new,
not-yet-published version, so the subsequent `pnpm install` failed with
ERR_PNPM_NO_MATCHING_VERSION.

Use pnpm's "link:" protocol to consume the locally built workspace package
instead. There is no version to publish or rewrite, react-app always builds
against the in-tree codemirror-promql, and its lockfile stays isolated (which
is why react-app was separated from the workspace in the first place).

build_ui.sh --all already builds the modules before react-app, so dist/ is
present at build time; `make ui-build` passes. Drop the dependency-rewriting
sed from ui_release.sh's bumpVersion accordingly.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-19 10:00:48 +02:00
Julien Pivotto
53cde1b1be chore(UI): Move to pnpm
Switch the UI workspace from npm to pnpm. Declare jest as a direct
devDependency in lezer-promql (pnpm's strict isolation requires every
binary to be an explicit dependency), fix the moduleNameMapper path in
codemirror-promql's jest config to reflect pnpm's per-package
node_modules layout, and add a localStorage mock to mantine-ui's test
setup so module-level Redux slice initializers work under Node.js v22+,
which pre-defines localStorage as undefined on globalThis.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
2026-06-11 14:13:28 +02:00
Julius Volz
e8bbe191d4 Build both old & new UI into Prometheus, allow choosing via feature flag
This keeps the old "react-app" directory in its existing location (to make
it easier to merge changes from the main branch), but separates it from the
npm workspaces setup. Thus it now needs to be npm-installed/built/linted
separately. This is a bit hacky, but should only be needed temporarily,
until the old UI can be removed.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2024-04-18 15:08:40 +02:00
Daniel Mellado
6ee3db15e4
Add version in web/ui/package-lock.json (#12771)
This commit adds the option --include-workspace-root in ui_release.sh
npm scripts in order to also include the version in web/ui/pagkage jsons
files when bumping the version. This also avoids issues when building
directly with npm install on some systems.

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
2023-09-01 10:38:15 +02:00
Augustin Husson
f3c480e7bc
fix indentation issue
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-12-29 11:23:46 +01:00
Augustin Husson
2ced3c78c0
fix ui bump version on mac
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-12-24 18:32:39 +01:00
Julien Pivotto
7479cd95b0
Fix UI release script and bump UI release (#10981)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-07-05 15:12:59 +02:00
Augustin Husson
7b006e804c
enable ui module publication (#10876)
* enable ui module publication

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* use main changelog of Prometheus to reflect the changes of the packages

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* ignore changelog and license in the libs

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* replace perses references

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-06-30 12:10:10 +02:00