chore: check that it's not already a bound version

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-10-08 11:27:54 +02:00
parent 3605718b1d
commit d5f254f8e4
@@ -44,7 +44,10 @@ export class BackstageResolver implements Resolver {
* the version in backstage.json changes.
*/
bindDescriptor(descriptor: Descriptor): Descriptor {
if (descriptor.range !== 'backstage:^') {
if (
descriptor.range !== 'backstage:^' &&
!descriptor.range.startsWith('backstage:')
) {
throw new Error(
`Unsupported version range "${
descriptor.range