Fix CLI module discovery and create-app test mock

Resolve CLI module entry points relative to the target project root
rather than relying on bare module name resolution. This ensures modules
are found even when the CLI package is symlinked from a separate location,
such as in the E2E test workspace setup.

Also add the missing cli-module-* entries to the create-app tasks test
mock that were omitted in a previous commit.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-15 01:12:43 +01:00
parent f100c26c92
commit 935c646e89
3 changed files with 19 additions and 5 deletions
+11
View File
@@ -50,6 +50,17 @@ jest.mock('./versions', () => ({
packageVersions: {
root: '1.2.3',
'@backstage/cli': '1.0.0',
'@backstage/cli-module-auth': '1.0.0',
'@backstage/cli-module-build': '1.0.0',
'@backstage/cli-module-config': '1.0.0',
'@backstage/cli-module-create-github-app': '1.0.0',
'@backstage/cli-module-info': '1.0.0',
'@backstage/cli-module-lint': '1.0.0',
'@backstage/cli-module-maintenance': '1.0.0',
'@backstage/cli-module-migrate': '1.0.0',
'@backstage/cli-module-new': '1.0.0',
'@backstage/cli-module-test-jest': '1.0.0',
'@backstage/cli-module-translations': '1.0.0',
'@backstage/backend-defaults': '1.0.0',
'@backstage/backend-tasks': '1.0.0',
'@backstage/catalog-model': '1.0.0',