Skip to content

[release-1.10] fix(deps): enforce @backstage/* dependencies to be compatible with 1.49.4 - #140

Merged
kadel merged 1 commit into
release-1.10from
backstage-bump-1.49.4
Jul 17, 2026
Merged

kadel merged 1 commit into
release-1.10from
backstage-bump-1.49.4

Conversation

@christoph-jerolimov

@christoph-jerolimov christoph-jerolimov commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Bump all @backstage/* dependencies to Backstage release 1.49.4
  • Add backstage:bump script to automate future upgrades with tilde pinning and deduplication
  • Pin @backstage/cli* packages to exact versions (no tilde)
  • Pin @backstage/config-loader via resolutions to avoid version conflicts

This is a fix for https://redhat.atlassian.net/browse/RHDHBUGS-3474, addressing the problem that the rhdh-cli 1.10.7 picked up transitive dependencies from new Backstage versions. In the case of this issue a newer config-loader failed now. The root case was a failure in the theme package and new additional added validation in the config-loader.

This PR changes the dependencies of rhdh-cli from ^ to ~ so that the cli doesn't pick up newer versions of Backstage dependencies. I've reproduced the problem with the intelligent-assistant plugin:

  • Repo: rhdh-plugins
  • Plugin: workspaces/intelligent-assistant/plugins/intelligent-assistant
  • Commit: c1e6d0fd17 (before the theme was updated to incl. a related fix)

reproduce.sh

#!/usr/bin/env bash
set -euo pipefail

CLI_DIR="$(cd "$(dirname "$0")" && pwd)"
PLUGIN_DIR=~/git/rhd/rhdh-plugins/workspaces/intelligent-assistant/plugins/intelligent-assistant

echo "=== Building rhdh-cli ==="
cd "$CLI_DIR"
yarn build
yarn pack --filename rhdh-cli.tgz
npm install -g "$CLI_DIR/rhdh-cli.tgz"

test1=0
test2=0

echo ""
echo "=== Test 1: plugin export via local bin/rhdh-cli ==="
cd "$PLUGIN_DIR"
rm -rf dist dist-dynamic
if "$CLI_DIR/bin/rhdh-cli" plugin export; then
  test1=0
else
  test1=1
fi

echo ""
echo "=== Test 2: plugin export via globally installed rhdh-cli ==="
cd "$PLUGIN_DIR"
rm -rf dist dist-dynamic
if rhdh-cli plugin export; then
  test2=0
else
  test2=1
fi

echo ""
echo "=== Results ==="
[ "$test1" -eq 0 ] && echo "Test 1 (local bin/rhdh-cli):     PASS" || echo "Test 1 (local bin/rhdh-cli):     FAIL"
[ "$test2" -eq 0 ] && echo "Test 2 (npm installed rhdh-cli): PASS" || echo "Test 2 (npm installed rhdh-cli): FAIL"

exit $((test1 + test2))

release-1.10 (rhdh-cli 1.10.7) (f8f0788)

Test 1 (local bin/rhdh-cli):     PASS
Test 2 (npm installed rhdh-cli): FAIL

release-1.10 with just updated dependencies

Test 1 (local bin/rhdh-cli):     FAIL
Test 2 (npm installed rhdh-cli): FAIL

release-1.10 with added dependencies cli-defaults, cli-module-build and cli-module-config as 0.1.0

Test 1 (local bin/rhdh-cli):     PASS
Test 2 (npm installed rhdh-cli): PASS

Why 0.1.0 and not ~0.1.0? Because Backstage 1.50 is using 0.1.1, see https://github.com/backstage/versions/blob/main/v1/releases/1.49.4/manifest.json vs https://github.com/backstage/versions/blob/main/v1/releases/1.50.0/manifest.json

Add backstage:bump script to automate future Backstage dependency
upgrades with tilde pinning (exact for @backstage/cli* packages)
and deduplication. Pin @backstage/config-loader via resolutions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@christoph-jerolimov christoph-jerolimov changed the title chore(deps): bump @backstage/* to 1.49.4 [release-1.10] fix(deps): enforce @backstage/* dependencies to be compatible with 1.49.4 Jul 17, 2026
@kadel
kadel merged commit 04ec276 into release-1.10 Jul 17, 2026
10 checks passed
@kadel
kadel deleted the backstage-bump-1.49.4 branch July 17, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants