Skip to content

[release-1.9] fix(deps): enforce @backstage/* dependencies to be compatible with 1.45.3 - #138

Merged
kadel merged 2 commits into
release-1.9from
backstage-bump-1.45.3
Jul 17, 2026
Merged

kadel merged 2 commits into
release-1.9from
backstage-bump-1.45.3

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.45.3
  • Add backstage:bump script to automate future upgrades with tilde pinning and deduplication
  • 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.9.1 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.9 (rhdh-cli 1.9.1) (6834860)

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

release-1.9 with updated dependencies

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

release-1.9 with updated dependencies (and a resolution for yarn.lock)

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

Add backstage:bump script to automate future Backstage dependency
upgrades with tilde pinning and deduplication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christoph-jerolimov christoph-jerolimov changed the title chore(deps): bump @backstage/* to 1.45.3 [release-1.9] fix(deps): enforce @backstage/* dependencies to be compatible with 1.45.3 Jul 17, 2026
@christoph-jerolimov
christoph-jerolimov requested review from davidfestal and kadel and removed request for kadel July 17, 2026 09:28
@christoph-jerolimov
christoph-jerolimov force-pushed the backstage-bump-1.45.3 branch 3 times, most recently from 7abc6eb to 84ef8a2 Compare July 17, 2026 10:05
Pin @backstage/cli to exact version 0.34.5 (no tilde) to ensure
the CLI binary matches exactly. Update backstage:bump script to
strip tilde from @backstage/cli after the bulk replace. Fix
LinkedPackageResolvePlugin tests to use os.tmpdir() and update
version provider test assertions.

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

Copy link
Copy Markdown

Comment thread package.json
@kadel
kadel merged commit d4007ed into release-1.9 Jul 17, 2026
6 checks passed
@kadel
kadel deleted the backstage-bump-1.45.3 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