Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ site

# E2E test reports
e2e-test-report/

# Temporary artifacts when running `yarn generate-types`
/.temp-types
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/generated
dist
dist-types
coverage
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@ or when executing from the project root you can also use:
npx @red-hat-developer-hub/cli
```

### Bumping Backstage Dependencies

To update the `@backstage/*` dependencies to a new Backstage release:

1. Update the `--release` version in the `backstage:bump` script in `package.json` to the target Backstage release version.
2. Check the `resolutions` section in `package.json` and update any pinned versions if needed.
3. Run the bump:

```bash
yarn backstage:bump
```

This will update all `@backstage/*` packages, pin them with `~` (tilde) ranges, keep `@backstage/cli*` packages at exact versions, and run `yarn install && yarn dedupe`.

After bumping, verify the build and tests still pass:

```bash
yarn build
yarn tsc
yarn test
```

### Versioning Strategy

The versioning for rhdh-cli is designed to be straightforward and align directly with the main Red Hat Developer Hub (RHDH) product, ensuring a clear compatibility path for developers.
Expand Down
3 changes: 3 additions & 0 deletions backstage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.52.0"
}
37 changes: 21 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@red-hat-developer-hub/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "1.11.1",
"version": "1.11.2",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -29,22 +29,25 @@
"prettier:fix": "prettier --ignore-unknown --write .",
"test": "backstage-cli package test --passWithNoTests --coverage",
"test:e2e": "jest --config e2e-tests/jest.config.js",
"backstage:bump": "backstage-cli versions:bump --release 1.52.0 --skip-install && sed -i '/@backstage\\//s/\"\\^/\"~/g' package.json && sed -i '/@backstage\\/cli/s/\"~/\"/g' package.json && yarn install && yarn dedupe",
"clean": "backstage-cli package clean",
"generate-types": "node scripts/generate-backstage-types.js"
},
"bin": {
"rhdh-cli": "bin/rhdh-cli"
},
"dependencies": {
"@backstage/cli": "0.36.0",
"@backstage/cli-common": "^0.2.0",
"@backstage/cli-module-build": "0.1.0",
"@backstage/cli-node": "^0.3.0",
"@backstage/config": "^1.3.6",
"@backstage/config-loader": "^1.10.9",
"@backstage/errors": "^1.2.7",
"@backstage/release-manifests": "^0.0.13",
"@backstage/types": "^1.2.1",
"@backstage/cli": "0.36.3",
"@backstage/cli-common": "0.2.2",
"@backstage/cli-defaults": "0.1.3",
"@backstage/cli-module-build": "0.1.4",
"@backstage/cli-module-config": "0.1.3",
"@backstage/cli-node": "0.3.3",
"@backstage/config": "~1.3.8",
"@backstage/config-loader": "~1.10.12",
"@backstage/errors": "~1.3.1",
"@backstage/release-manifests": "~0.0.13",
"@backstage/types": "~1.2.2",
"@changesets/cli": "^2.29.4",
"@manypkg/get-packages": "^1.1.3",
"@openshift/dynamic-plugin-sdk-webpack": "^3.0.0",
Expand Down Expand Up @@ -90,12 +93,10 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "0.36.0",
"@backstage/cli-defaults": "0.1.0",
"@backstage/cli-module-test-jest": "0.1.0",
"@backstage/core-plugin-api": "1.10.3",
"@backstage/eslint-plugin": "0.2.2",
"@backstage/repo-tools": "^0.13.3",
"@backstage/cli-module-test-jest": "0.1.3",
"@backstage/core-plugin-api": "~1.12.7",
"@backstage/eslint-plugin": "~0.3.1",
"@backstage/repo-tools": "~0.17.3",
"@jest/globals": "^30.0.0-beta.3",
"@spotify/eslint-config-base": "15.0.0",
"@spotify/eslint-config-react": "15.0.0",
Expand All @@ -107,6 +108,7 @@
"@types/node": "18.19.34",
"@types/npm-packlist": "3.0.0",
"@types/recursive-readdir": "2.2.4",
"@types/semver": "^7.5.4",
"@types/tar": "^6.1.1",
"@types/yarnpkg__lockfile": "1.1.9",
"@typescript-eslint/eslint-plugin": "8.17.0",
Expand All @@ -126,6 +128,9 @@
"ts-node": "10.9.2",
"type-fest": "4.20.1"
},
"resolutions": {
"@backstage/config-loader": "~1.10.12"
},
"peerDependencies": {
"@microsoft/api-extractor": "^7.21.2"
},
Expand Down
41 changes: 21 additions & 20 deletions src/generated/backstage-cli-types.d.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@

/*
* Auto-generated TypeScript declarations for @backstage/cli-module-build
* Generated from @backstage/cli version: 0.36.0
* Generated on: 2026-04-08T00:00:00.000Z
* Generated from @backstage/cli version: 0.36.3
* Generated on: 2026-07-17T11:20:59.664Z
*
* DO NOT EDIT THIS FILE MANUALLY - it will be overwritten
* Run 'yarn generate-types' to regenerate
*
* These types are extracted from the official Backstage monorepo TypeScript
* sources (packages/cli-module-build) via `yarn tsc` at the commit matching
* the pinned @backstage/cli version.
* Types are extracted from packages/cli-module-build in the Backstage monorepo
* (same commit as the pinned @backstage/cli), via root `yarn tsc`.
*/


declare module '@backstage/cli-module-build/dist/lib/buildFrontend.cjs.js' {
interface BuildAppOptions {
targetDir: string;
writeStats: boolean;
configPaths: string[];
isModuleFederationRemote?: boolean;
webpack?: typeof import('webpack');
targetDir: string;
writeStats: boolean;
configPaths: string[];
isModuleFederationRemote?: boolean;
webpack?: typeof import('webpack');
}
export declare function buildFrontend(
options: BuildAppOptions,
): Promise<void>;
export declare function buildFrontend(options: BuildAppOptions): Promise<void>;
export {};

}


declare module '@backstage/cli-module-build/dist/lib/buildBackend.cjs.js' {
interface BuildBackendOptions {
targetDir: string;
skipBuildDependencies: boolean;
configPaths?: string[];
minify?: boolean;
targetDir: string;
skipBuildDependencies: boolean;
configPaths?: string[];
minify?: boolean;
}
export declare function buildBackend(
options: BuildBackendOptions,
): Promise<void>;
export declare function buildBackend(options: BuildBackendOptions): Promise<void>;
export {};

}

5 changes: 0 additions & 5 deletions src/lib/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import corePluginApiPkg from '@backstage/core-plugin-api/package.json';

import mockFs from 'mock-fs';

import { createPackageVersionProvider, packageVersions } from './version';
Expand Down Expand Up @@ -74,9 +72,6 @@ describe('createPackageVersionProvider', () => {
// If we're currently in pre-release we expect that to be picked instead
cliVersion.includes('-') ? `${cliVersion}` : '*',
);
expect(provider('@backstage/core-plugin-api')).toBe(
`${corePluginApiPkg.version}`,
);
expect(provider('@types/t', '1.4.2')).toBe('*');
});
});
Loading
Loading