Merge branch 'canon-directives' into canon-website

This commit is contained in:
Charles de Dreuille
2025-01-07 16:51:30 +00:00
369 changed files with 5606 additions and 298 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Bumped create-app version.
+8 -1
View File
@@ -200,30 +200,37 @@
"breezy-coats-sort",
"calm-tigers-boil",
"create-app-1735034814",
"create-app-1736262177",
"cuddly-lions-knock",
"cyan-frogs-count",
"dry-hounds-study",
"famous-balloons-punch",
"famous-dryers-protect",
"gentle-deers-return",
"gorgeous-zebras-tan",
"khaki-fireants-begin",
"lemon-students-care",
"light-wasps-unite",
"little-scissors-fold",
"long-parrots-hide",
"metal-ravens-hammer",
"nasty-pears-taste",
"nervous-bottles-occur",
"nice-waves-count",
"orange-icons-sell",
"quick-poems-cover",
"red-hotels-sneeze",
"renovate-dcf1169",
"rich-penguins-stare",
"rich-vans-hope",
"shiny-walls-press",
"silly-bottles-raise",
"smart-plants-sip",
"spicy-tomatoes-hammer",
"strong-students-beg",
"tall-actors-clap",
"twenty-laws-tie",
"two-wasps-mix"
"two-wasps-mix",
"weak-frogs-nail"
]
}
+159 -23
View File
@@ -258,67 +258,203 @@ The `myUserTransformer`, `myGroupTransformer`, `myOrganizationTransformer`, and
The following provides an example of each kind of transformer. We recommend creating a `transformers.ts` file in your `packages/backend/src` folder for these.
```ts title="packages/backend/src/transformers.ts"
First, lets set up the basic structure of the file, with functions for each kind of transformer that simply passes through the default transformer unchanged.
```ts title="packages/backend/src/extensions/transformers.ts"
import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
import {
defaultGroupTransformer,
defaultUserTransformer,
defaultOrganizationTransformer,
microsoftGraphOrgEntityProviderTransformExtensionPoint,
MicrosoftGraphProviderConfig,
} from '@backstage/plugin-catalog-backend-module-msgraph';
import { GroupEntity, UserEntity } from '@backstage/catalog-model';
import { createBackendModule } from '@backstage/backend-plugin-api';
// This group transformer completely replaces the built in logic with custom logic.
// The Group transformer transforms Groups that are ingested from MS Graph
export async function myGroupTransformer(
group: MicrosoftGraph.Group,
groupPhoto?: string,
): Promise<GroupEntity | undefined> {
return {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Group',
metadata: {
name: group.id!,
annotations: {},
},
spec: {
type: 'Microsoft Entra ID',
children: [],
},
};
const backstageGroup = await defaultGroupTransformer(group, groupPhoto);
return backstageGroup;
}
// This user transformer makes use of the built in logic, but also sets the description field
// The User transformer transforms Users that are ingested from MS Graph
export async function myUserTransformer(
graphUser: MicrosoftGraph.User,
userPhoto?: string,
): Promise<UserEntity | undefined> {
const backstageUser = await defaultUserTransformer(graphUser, userPhoto);
if (backstageUser) {
backstageUser.metadata.description = 'Loaded from Microsoft Entra ID';
}
return backstageUser;
}
// Example organization transformer that removes the organization group completely
// The Organization transformer transforms the root MS Graph Organization into a Group
export async function myOrganizationTransformer(
graphOrganization: MicrosoftGraph.Organization,
): Promise<GroupEntity | undefined> {
return undefined;
const backstageOrg = await defaultOrganizationTransformer(graphOrganization);
return backstageOrg;
}
// Example config transformer that expands the group filter to also include 'azure-group-a'
// The Provider Config transformer enables modification of the plugin config
export async function myProviderConfigTransformer(
provider: MicrosoftGraphProviderConfig,
): Promise<MicrosoftGraphProviderConfig> {
return provider;
}
// Wrapping these functions in a Module allows us to inject them into the Catalog plugin easily
export default createBackendModule({
pluginId: 'catalog',
moduleId: 'msgraph-org',
register(reg) {
reg.registerInit({
deps: {
microsoftGraphTransformers:
microsoftGraphOrgEntityProviderTransformExtensionPoint,
},
async init({ microsoftGraphTransformers }) {
// Set the transformers to our custom functions
microsoftGraphTransformers.setUserTransformer(myUserTransformer);
microsoftGraphTransformers.setGroupTransformer(myGroupTransformer);
microsoftGraphTransformers.setOrganizationTransformer(
myOrganizationTransformer,
);
microsoftGraphTransformers.setProviderConfigTransformer(
myProviderConfigTransformer,
);
},
});
},
});
```
Now lets customize each of the providers to suit our needs.
This Group Transformer example will have the default logic completely removed and replaced with our custom logic:
```ts
export async function myGroupTransformer(
group: MicrosoftGraph.Group,
groupPhoto?: string,
): Promise<GroupEntity | undefined> {
// highlight-remove-start
const backstageGroup = await defaultGroupTransformer(group, groupPhoto);
return backstageGroup;
// highlight-remove-end
// highlight-add-start
// All of our groups are prefixed with the organisational unit: 'Engineering - Team A'
// We want to drop the org unit from the group name and use it for the namespace instead
const groupNameArr = group.displayName.split(' - ');
const displayName = groupNameArr[1];
// Standardise name and namespace by replacing spaces with hyphens and converting to lowercase
const namespace = groupNameArr[0].replace(' ', '-').toLowerCase();
const groupName = groupNameArr[1].replace(' ', '-').toLowerCase();
return {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Group',
metadata: {
name: groupName,
description: group.description,
annotations: {},
},
spec: {
type: 'team',
displayName: displayName,
email: group.mail,
children: [],
},
};
// highlight-add-end
}
```
This User Transformer example makes use of the built-in logic, but also modifies the username and sets a description
```ts
export async function myUserTransformer(
graphUser: MicrosoftGraph.User,
userPhoto?: string,
): Promise<UserEntity | undefined> {
const backstageUser = await defaultUserTransformer(graphUser, userPhoto);
// highlight-add-start
// Make sure the default transformer returned an entity
if (backstageUser) {
// Update the description to make it obvious where this entity came from
backstageUser.metadata.description =
'Loaded from Microsoft Entra ID via MyCustomUserTransformer';
// The default transformer sets the username to the email address with invalid characters subbed out: 'user_domain.com'
// Set the username to the local part of the email address in lowercase without the domain
const newName = backstageUser.metadata.name.split('_')[0].toLowerCase();
backstageUser.metadata.name = newName;
return backstageUser;
}
return undefined;
// highlight-add-end
// highlight-remove-start
return backstageUser;
// highlight-remove-end
}
```
This Organization Transformer example removes the organization group completely by returning undefined
```ts
export async function myOrganizationTransformer(
graphOrganization: MicrosoftGraph.Organization,
): Promise<GroupEntity | undefined> {
// highlight-remove-start
const backstageOrg = await defaultOrganizationTransformer(graphOrganization);
return backstageOrg;
// highlight-remove-end
// highlight-add-start
// The org transformer creates a group to be used as the base of the relationship tree for groups
// We don't need this to be created, so return undefined instead of an entity
return undefined;
// highlight-add-end
}
```
This Config Transformer example expands the group filter to also include 'azure-group-a'
```ts
export async function myProviderConfigTransformer(
provider: MicrosoftGraphProviderConfig,
): Promise<MicrosoftGraphProviderConfig> {
// highlight-add-start
// The filter in our config file relies on a property that has been intermittantly causing this important group to fail ingestion
// Ensure the group is always discovered by the filter
if (!provider.groupFilter?.includes('azure-group-a')) {
provider.groupFilter = `${provider.groupFilter} or displayName eq 'azure-group-a'`;
}
// highlight-add-end
return provider;
}
```
Now we just need to add our new module to the Backend.
```ts title="packages/backend/src/index.ts"
// Your file will have more than this in it
const backend = createBackend();
...
// highlight-add-start
backend.add(import('./extensions/transformers'));
// highlight-add-end
...
backend.start();
```
## Troubleshooting
### No data
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "1.35.0-next.1",
"version": "1.35.0-next.2",
"private": true,
"repository": {
"type": "git",
+11
View File
@@ -1,5 +1,16 @@
# @backstage/app-defaults
## 1.5.16-next.0
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/core-app-api@1.15.4-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/plugin-permission-react@0.4.30-next.0
- @backstage/theme@0.6.3
## 1.5.15
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/app-defaults",
"version": "1.5.15",
"version": "1.5.16-next.0",
"description": "Provides the default wiring of a Backstage App",
"backstage": {
"role": "web-library"
@@ -1,5 +1,13 @@
# app-next-example-plugin
## 0.0.19-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-components@0.16.3-next.0
## 0.0.18
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "app-next-example-plugin",
"version": "0.0.18",
"version": "0.0.19-next.0",
"description": "Backstage internal example plugin",
"backstage": {
"role": "frontend-plugin",
+45
View File
@@ -1,5 +1,50 @@
# example-app-next
## 0.0.19-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-techdocs@1.12.1-next.1
- @backstage/plugin-scaffolder-react@1.14.3-next.2
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/plugin-catalog@1.26.1-next.1
- @backstage/plugin-api-docs@0.12.3-next.1
- @backstage/plugin-scaffolder@1.27.4-next.2
- @backstage/core-compat-api@0.3.5-next.0
- @backstage/frontend-app-api@0.10.4-next.0
- @backstage/frontend-defaults@0.1.5-next.0
- @backstage/plugin-app@0.1.5-next.0
- @backstage/plugin-app-visualizer@0.1.15-next.0
- @backstage/plugin-catalog-graph@0.4.15-next.1
- @backstage/plugin-catalog-import@0.12.9-next.1
- @backstage/plugin-catalog-react@1.15.1-next.1
- @backstage/plugin-home@0.8.4-next.2
- @backstage/plugin-kubernetes@0.12.3-next.1
- @backstage/plugin-org@0.6.35-next.1
- @backstage/plugin-search@1.4.22-next.1
- @backstage/plugin-search-react@1.8.5-next.0
- @backstage/plugin-user-settings@0.8.18-next.1
- @backstage/app-defaults@1.5.16-next.0
- @backstage/cli@0.29.5-next.1
- @backstage/core-app-api@1.15.4-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/integration-react@1.2.3-next.0
- @backstage/plugin-auth-react@0.1.11-next.0
- @backstage/plugin-catalog-unprocessed-entities@0.2.13-next.0
- @backstage/plugin-kubernetes-cluster@0.0.21-next.1
- @backstage/plugin-notifications@0.5.1-next.0
- @backstage/plugin-permission-react@0.4.30-next.0
- @backstage/plugin-signals@0.0.15-next.0
- @backstage/plugin-techdocs-module-addons-contrib@1.1.20-next.1
- @backstage/plugin-techdocs-react@1.2.13-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/plugin-search-common@1.2.17-next.0
- @backstage/plugin-catalog-common@1.1.3-next.0
- @backstage/theme@0.6.3
## 0.0.19-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app-next",
"version": "0.0.19-next.1",
"version": "0.0.19-next.2",
"backstage": {
"role": "frontend"
},
+41
View File
@@ -1,5 +1,46 @@
# example-app
## 0.2.105-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-techdocs@1.12.1-next.1
- @backstage/plugin-scaffolder-react@1.14.3-next.2
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/plugin-catalog@1.26.1-next.1
- @backstage/plugin-api-docs@0.12.3-next.1
- @backstage/plugin-scaffolder@1.27.4-next.2
- @backstage/frontend-app-api@0.10.4-next.0
- @backstage/plugin-catalog-graph@0.4.15-next.1
- @backstage/plugin-catalog-import@0.12.9-next.1
- @backstage/plugin-catalog-react@1.15.1-next.1
- @backstage/plugin-devtools@0.1.23-next.0
- @backstage/plugin-home@0.8.4-next.2
- @backstage/plugin-kubernetes@0.12.3-next.1
- @backstage/plugin-org@0.6.35-next.1
- @backstage/plugin-search@1.4.22-next.1
- @backstage/plugin-search-react@1.8.5-next.0
- @backstage/plugin-user-settings@0.8.18-next.1
- @backstage/app-defaults@1.5.16-next.0
- @backstage/cli@0.29.5-next.1
- @backstage/core-app-api@1.15.4-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/integration-react@1.2.3-next.0
- @backstage/plugin-auth-react@0.1.11-next.0
- @backstage/plugin-catalog-unprocessed-entities@0.2.13-next.0
- @backstage/plugin-kubernetes-cluster@0.0.21-next.1
- @backstage/plugin-notifications@0.5.1-next.0
- @backstage/plugin-permission-react@0.4.30-next.0
- @backstage/plugin-signals@0.0.15-next.0
- @backstage/plugin-techdocs-module-addons-contrib@1.1.20-next.1
- @backstage/plugin-techdocs-react@1.2.13-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/plugin-search-common@1.2.17-next.0
- @backstage/plugin-catalog-common@1.1.3-next.0
- @backstage/theme@0.6.3
## 0.2.105-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app",
"version": "0.2.105-next.1",
"version": "0.2.105-next.2",
"backstage": {
"role": "frontend"
},
+14
View File
@@ -1,5 +1,19 @@
# @backstage/backend-app-api
## 1.1.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/config@1.3.2-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-permission-node@0.8.7-next.1
- @backstage/cli-common@0.1.15
## 1.1.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-app-api",
"version": "1.1.1-next.0",
"version": "1.1.1-next.1",
"description": "Core API used by Backstage backend apps",
"backstage": {
"role": "node-library"
+20
View File
@@ -1,5 +1,25 @@
# @backstage/backend-defaults
## 0.7.0-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-app-api@1.1.1-next.1
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/cli-node@0.2.12-next.0
- @backstage/config@1.3.2-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-events-node@0.4.7-next.1
- @backstage/integration-aws-node@0.1.15-next.0
- @backstage/plugin-permission-node@0.8.7-next.1
- @backstage/backend-dev-utils@0.1.5
- @backstage/cli-common@0.1.15
- @backstage/integration@1.16.1-next.0
## 0.7.0-next.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-defaults",
"version": "0.7.0-next.0",
"version": "0.7.0-next.1",
"description": "Backend defaults used by Backstage backend apps",
"backstage": {
"role": "node-library"
@@ -1,5 +1,30 @@
# @backstage/backend-dynamic-feature-service
## 0.5.3-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-app-api@1.1.1-next.1
- @backstage/backend-defaults@0.7.0-next.1
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/cli-node@0.2.12-next.0
- @backstage/config@1.3.2-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-catalog-backend@1.30.0-next.1
- @backstage/plugin-events-backend@0.4.1-next.1
- @backstage/plugin-events-node@0.4.7-next.1
- @backstage/plugin-permission-common@0.8.4-next.0
- @backstage/plugin-scaffolder-node@0.6.3-next.1
- @backstage/plugin-search-common@1.2.17-next.0
- @backstage/plugin-permission-node@0.8.7-next.1
- @backstage/plugin-search-backend-node@1.3.7-next.1
- @backstage/plugin-app-node@0.1.29-next.1
- @backstage/cli-common@0.1.15
## 0.5.3-next.0
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-dynamic-feature-service",
"version": "0.5.3-next.0",
"version": "0.5.3-next.1",
"description": "Backstage dynamic feature service",
"backstage": {
"role": "node-library"
+40
View File
@@ -1,5 +1,45 @@
# example-backend-legacy
## 0.2.106-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-defaults@0.7.0-next.1
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/catalog-model@1.7.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/plugin-app-backend@0.4.4-next.1
- @backstage/plugin-auth-backend@0.24.2-next.1
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-catalog-backend@1.30.0-next.1
- @backstage/plugin-catalog-node@1.15.1-next.1
- @backstage/plugin-events-backend@0.4.1-next.1
- @backstage/plugin-events-node@0.4.7-next.1
- @backstage/plugin-kubernetes-backend@0.19.2-next.1
- @backstage/plugin-permission-common@0.8.4-next.0
- @backstage/plugin-proxy-backend@0.5.10-next.1
- @backstage/plugin-scaffolder-backend@1.29.0-next.2
- @backstage/plugin-scaffolder-backend-module-rails@0.5.5-next.1
- @backstage/plugin-search-backend@1.8.1-next.1
- @backstage/plugin-signals-backend@0.3.0-next.2
- @backstage/plugin-signals-node@0.1.16-next.1
- @backstage/plugin-scaffolder-backend-module-gitlab@0.7.1-next.1
- @backstage/plugin-permission-backend@0.5.53-next.1
- @backstage/plugin-permission-node@0.8.7-next.1
- @backstage/plugin-search-backend-node@1.3.7-next.1
- @backstage/plugin-techdocs-backend@1.11.5-next.2
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.4-next.1
- @backstage/plugin-catalog-backend-module-unprocessed@0.5.4-next.1
- @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.3.5-next.1
- @backstage/plugin-search-backend-module-catalog@0.3.0-next.1
- @backstage/plugin-search-backend-module-elasticsearch@1.6.4-next.1
- @backstage/plugin-search-backend-module-explore@0.2.7-next.1
- @backstage/plugin-search-backend-module-pg@0.5.40-next.1
- @backstage/plugin-search-backend-module-techdocs@0.3.5-next.1
- @backstage/catalog-client@1.9.1-next.0
- @backstage/integration@1.16.1-next.0
## 0.2.106-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend-legacy",
"version": "0.2.106-next.1",
"version": "0.2.106-next.2",
"backstage": {
"role": "backend"
},
@@ -1,5 +1,14 @@
# @backstage/backend-openapi-utils
## 0.4.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/errors@1.2.7-next.0
## 0.4.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-openapi-utils",
"version": "0.4.1-next.0",
"version": "0.4.1-next.1",
"description": "OpenAPI typescript support.",
"backstage": {
"role": "node-library"
+12
View File
@@ -1,5 +1,17 @@
# @backstage/backend-plugin-api
## 1.1.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-permission-common@0.8.4-next.0
- @backstage/cli-common@0.1.15
## 1.1.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-plugin-api",
"version": "1.1.1-next.0",
"version": "1.1.1-next.1",
"description": "Core API used by Backstage backend plugins",
"backstage": {
"role": "node-library"
+14
View File
@@ -1,5 +1,19 @@
# @backstage/backend-test-utils
## 1.2.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-app-api@1.1.1-next.1
- @backstage/backend-defaults@0.7.0-next.1
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-events-node@0.4.7-next.1
## 1.2.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/backend-test-utils",
"version": "1.2.1-next.0",
"version": "1.2.1-next.1",
"description": "Test helpers library for Backstage backends",
"backstage": {
"role": "node-library"
+38
View File
@@ -1,5 +1,43 @@
# example-backend
## 0.0.34-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-defaults@0.7.0-next.1
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/catalog-model@1.7.3-next.0
- @backstage/plugin-app-backend@0.4.4-next.1
- @backstage/plugin-auth-backend@0.24.2-next.1
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-catalog-backend@1.30.0-next.1
- @backstage/plugin-catalog-backend-module-openapi@0.2.6-next.1
- @backstage/plugin-devtools-backend@0.5.1-next.1
- @backstage/plugin-events-backend@0.4.1-next.1
- @backstage/plugin-kubernetes-backend@0.19.2-next.1
- @backstage/plugin-permission-common@0.8.4-next.0
- @backstage/plugin-proxy-backend@0.5.10-next.1
- @backstage/plugin-scaffolder-backend@1.29.0-next.2
- @backstage/plugin-search-backend@1.8.1-next.1
- @backstage/plugin-signals-backend@0.3.0-next.2
- @backstage/plugin-auth-backend-module-github-provider@0.2.4-next.1
- @backstage/plugin-notifications-backend@0.5.1-next.1
- @backstage/plugin-permission-backend@0.5.53-next.1
- @backstage/plugin-permission-node@0.8.7-next.1
- @backstage/plugin-search-backend-node@1.3.7-next.1
- @backstage/plugin-techdocs-backend@1.11.5-next.2
- @backstage/plugin-catalog-backend-module-backstage-openapi@0.4.4-next.1
- @backstage/plugin-auth-backend-module-guest-provider@0.2.4-next.1
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.4-next.1
- @backstage/plugin-catalog-backend-module-unprocessed@0.5.4-next.1
- @backstage/plugin-permission-backend-module-allow-all-policy@0.2.4-next.1
- @backstage/plugin-scaffolder-backend-module-github@0.5.5-next.2
- @backstage/plugin-scaffolder-backend-module-notifications@0.1.6-next.1
- @backstage/plugin-search-backend-module-catalog@0.3.0-next.1
- @backstage/plugin-search-backend-module-explore@0.2.7-next.1
- @backstage/plugin-search-backend-module-techdocs@0.3.5-next.1
## 0.0.34-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.0.34-next.1",
"version": "0.0.34-next.2",
"backstage": {
"role": "backend"
},
@@ -14,6 +14,8 @@
* limitations under the License.
*/
'use client';
import React, { forwardRef } from 'react';
import { Icon } from '../Icon';
import { ButtonProps } from './types';
@@ -14,6 +14,8 @@
* limitations under the License.
*/
'use client';
import React, { forwardRef } from 'react';
import { HeadingProps } from './types';
import { useCanon } from '../../contexts/canon';
@@ -14,6 +14,8 @@
* limitations under the License.
*/
'use client';
import React from 'react';
import { useCanon } from '../../contexts/canon';
import type { IconProps } from './types';
@@ -14,6 +14,8 @@
* limitations under the License.
*/
'use client';
import React, { forwardRef } from 'react';
import { TextProps } from './types';
import { useCanon } from '../../contexts/canon';
+2
View File
@@ -14,6 +14,8 @@
* limitations under the License.
*/
'use client';
import React, { createContext, useContext, ReactNode } from 'react';
import { IconMap, IconNames } from '../components/Icon/types';
import { icons } from '../components/Icon/icons';
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-client
## 1.9.1-next.0
### Patch Changes
- Updated dependencies
- @backstage/catalog-model@1.7.3-next.0
- @backstage/errors@1.2.7-next.0
## 1.9.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-client",
"version": "1.9.0",
"version": "1.9.1-next.0",
"description": "An isomorphic client for the catalog backend",
"backstage": {
"role": "common-library"
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-model
## 1.7.3-next.0
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/errors@1.2.7-next.0
## 1.7.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-model",
"version": "1.7.2",
"version": "1.7.3-next.0",
"description": "Types and validators that help describe the model of a Backstage Catalog",
"backstage": {
"role": "common-library"
+9
View File
@@ -1,5 +1,14 @@
# @backstage/cli-node
## 0.2.12-next.0
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/cli-common@0.1.15
## 0.2.11
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/cli-node",
"version": "0.2.11",
"version": "0.2.12-next.0",
"description": "Node.js library for Backstage CLIs",
"backstage": {
"role": "node-library"
+16
View File
@@ -1,5 +1,21 @@
# @backstage/cli
## 0.29.5-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/cli-node@0.2.12-next.0
- @backstage/config@1.3.2-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/release-manifests@0.0.12
- @backstage/cli-common@0.1.15
- @backstage/eslint-plugin@0.1.10
- @backstage/integration@1.16.1-next.0
## 0.29.5-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/cli",
"version": "0.29.5-next.0",
"version": "0.29.5-next.1",
"description": "CLI for developing Backstage plugins and apps",
"backstage": {
"role": "cli"
+10
View File
@@ -1,5 +1,15 @@
# @backstage/config-loader
## 1.9.5-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/cli-common@0.1.15
## 1.9.5-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/config-loader",
"version": "1.9.5-next.0",
"version": "1.9.5-next.1",
"description": "Config loading functionality used by Backstage backend, and CLI",
"backstage": {
"role": "node-library"
+8
View File
@@ -1,5 +1,13 @@
# @backstage/config
## 1.3.2-next.0
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/errors@1.2.7-next.0
## 1.3.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/config",
"version": "1.3.1",
"version": "1.3.2-next.0",
"description": "Config API used by Backstage core, backend, and CLI",
"backstage": {
"role": "common-library"
+10
View File
@@ -1,5 +1,15 @@
# @backstage/core-app-api
## 1.15.4-next.0
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/types@1.2.1-next.0
- @backstage/config@1.3.2-next.0
- @backstage/version-bridge@1.0.10
## 1.15.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/core-app-api",
"version": "1.15.3",
"version": "1.15.4-next.0",
"description": "Core app API used by Backstage apps",
"backstage": {
"role": "web-library"
+9
View File
@@ -1,5 +1,14 @@
# @backstage/core-compat-api
## 0.3.5-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/version-bridge@1.0.10
## 0.3.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/core-compat-api",
"version": "0.3.4",
"version": "0.3.5-next.0",
"backstage": {
"role": "web-library"
},
+11
View File
@@ -1,5 +1,16 @@
# @backstage/core-components
## 0.16.3-next.0
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/theme@0.6.3
- @backstage/version-bridge@1.0.10
## 0.16.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/core-components",
"version": "0.16.2",
"version": "0.16.3-next.0",
"description": "Core components used by Backstage plugins and apps",
"backstage": {
"role": "web-library"
+11
View File
@@ -1,5 +1,16 @@
# @backstage/core-plugin-api
## 1.10.3-next.0
### Patch Changes
- b40eb41: Move `Expand` and `ExpandRecursive` to `@backstage/types`
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/version-bridge@1.0.10
## 1.10.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/core-plugin-api",
"version": "1.10.2",
"version": "1.10.3-next.0",
"description": "Core API used by Backstage plugins",
"backstage": {
"role": "web-library"
+8
View File
@@ -1,5 +1,13 @@
# @backstage/create-app
## 0.5.24-next.2
### Patch Changes
- Bumped create-app version.
- Updated dependencies
- @backstage/cli-common@0.1.15
## 0.5.24-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/create-app",
"version": "0.5.24-next.1",
"version": "0.5.24-next.2",
"description": "A CLI that helps you create your own Backstage app",
"backstage": {
"role": "cli"
+14
View File
@@ -1,5 +1,19 @@
# @backstage/dev-utils
## 1.1.6-next.1
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/plugin-catalog-react@1.15.1-next.1
- @backstage/app-defaults@1.5.16-next.0
- @backstage/core-app-api@1.15.4-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/integration-react@1.2.3-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/theme@0.6.3
## 1.1.6-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/dev-utils",
"version": "1.1.6-next.0",
"version": "1.1.6-next.1",
"description": "Utilities for developing Backstage plugins.",
"backstage": {
"role": "web-library"
+9
View File
@@ -1,5 +1,14 @@
# e2e-test
## 0.2.24-next.2
### Patch Changes
- Updated dependencies
- @backstage/create-app@0.5.24-next.2
- @backstage/errors@1.2.7-next.0
- @backstage/cli-common@0.1.15
## 0.2.24-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "e2e-test",
"version": "0.2.24-next.1",
"version": "0.2.24-next.2",
"description": "E2E test for verifying Backstage packages",
"backstage": {
"role": "cli"
+7
View File
@@ -1,5 +1,12 @@
# @backstage/errors
## 1.2.7-next.0
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
## 1.2.6
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/errors",
"version": "1.2.6",
"version": "1.2.7-next.0",
"description": "Common utilities for error handling within Backstage",
"backstage": {
"role": "common-library"
+14
View File
@@ -1,5 +1,19 @@
# @backstage/frontend-app-api
## 0.10.4-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/types@1.2.1-next.0
- @backstage/frontend-defaults@0.1.5-next.0
- @backstage/core-app-api@1.15.4-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
- @backstage/version-bridge@1.0.10
## 0.10.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/frontend-app-api",
"version": "0.10.3",
"version": "0.10.4-next.0",
"backstage": {
"role": "web-library"
},
+11
View File
@@ -1,5 +1,16 @@
# @backstage/frontend-defaults
## 0.1.5-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/frontend-app-api@0.10.4-next.0
- @backstage/plugin-app@0.1.5-next.0
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
## 0.1.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/frontend-defaults",
"version": "0.1.4",
"version": "0.1.5-next.0",
"backstage": {
"role": "web-library"
},
+9
View File
@@ -1,5 +1,14 @@
# @internal/frontend
## 0.0.5-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/types@1.2.1-next.0
- @backstage/version-bridge@1.0.10
## 0.0.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@internal/frontend",
"version": "0.0.4",
"version": "0.0.5-next.0",
"backstage": {
"role": "web-library",
"inline": true
+11
View File
@@ -1,5 +1,16 @@
# @backstage/frontend-plugin-api
## 0.9.4-next.0
### Patch Changes
- b40eb41: Move `Expand` and `ExpandRecursive` to `@backstage/types`
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/types@1.2.1-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/version-bridge@1.0.10
## 0.9.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/frontend-plugin-api",
"version": "0.9.3",
"version": "0.9.4-next.0",
"backstage": {
"role": "web-library"
},
+13
View File
@@ -1,5 +1,18 @@
# @backstage/frontend-test-utils
## 0.2.5-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/types@1.2.1-next.0
- @backstage/frontend-app-api@0.10.4-next.0
- @backstage/plugin-app@0.1.5-next.0
- @backstage/test-utils@1.7.4-next.0
- @backstage/config@1.3.2-next.0
- @backstage/version-bridge@1.0.10
## 0.2.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/frontend-test-utils",
"version": "0.2.4",
"version": "0.2.5-next.0",
"backstage": {
"role": "web-library"
},
@@ -1,5 +1,13 @@
# @backstage/integration-aws-node
## 0.1.15-next.0
### Patch Changes
- Updated dependencies
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
## 0.1.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/integration-aws-node",
"version": "0.1.14",
"version": "0.1.15-next.0",
"description": "Helpers for fetching AWS account credentials",
"backstage": {
"role": "node-library"
+9
View File
@@ -1,5 +1,14 @@
# @backstage/integration-react
## 1.2.3-next.0
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/integration@1.16.1-next.0
## 1.2.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/integration-react",
"version": "1.2.2",
"version": "1.2.3-next.0",
"description": "Frontend package for managing integrations towards external systems",
"backstage": {
"role": "web-library"
+8
View File
@@ -1,5 +1,13 @@
# @backstage/integration
## 1.16.1-next.0
### Patch Changes
- Updated dependencies
- @backstage/config@1.3.2-next.0
- @backstage/errors@1.2.7-next.0
## 1.16.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/integration",
"version": "1.16.0",
"version": "1.16.1-next.0",
"description": "Helpers for managing integrations towards external systems",
"backstage": {
"role": "common-library"
+12
View File
@@ -1,5 +1,17 @@
# @backstage/repo-tools
## 0.12.1-next.1
### Patch Changes
- Updated dependencies
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/catalog-model@1.7.3-next.0
- @backstage/cli-node@0.2.12-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/cli-common@0.1.15
## 0.12.1-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/repo-tools",
"version": "0.12.1-next.0",
"version": "0.12.1-next.1",
"description": "CLI for Backstage repo tooling ",
"backstage": {
"role": "cli"
@@ -1,5 +1,13 @@
# @internal/scaffolder
## 0.0.5-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-scaffolder-react@1.14.3-next.2
- @backstage/frontend-plugin-api@0.9.4-next.0
## 0.0.5-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@internal/scaffolder",
"version": "0.0.5-next.1",
"version": "0.0.5-next.2",
"backstage": {
"role": "web-library",
"inline": true
@@ -1,5 +1,24 @@
# techdocs-cli-embedded-app
## 0.2.104-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-techdocs@1.12.1-next.1
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/plugin-catalog@1.26.1-next.1
- @backstage/app-defaults@1.5.16-next.0
- @backstage/cli@0.29.5-next.1
- @backstage/core-app-api@1.15.4-next.0
- @backstage/core-components@0.16.3-next.0
- @backstage/integration-react@1.2.3-next.0
- @backstage/test-utils@1.7.4-next.0
- @backstage/plugin-techdocs-react@1.2.13-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/theme@0.6.3
## 0.2.104-next.1
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "techdocs-cli-embedded-app",
"version": "0.2.104-next.1",
"version": "0.2.104-next.2",
"backstage": {
"role": "frontend"
},
+11
View File
@@ -1,5 +1,16 @@
# @techdocs/cli
## 1.8.25-next.1
### Patch Changes
- Updated dependencies
- @backstage/backend-defaults@0.7.0-next.1
- @backstage/catalog-model@1.7.3-next.0
- @backstage/config@1.3.2-next.0
- @backstage/plugin-techdocs-node@1.12.16-next.1
- @backstage/cli-common@0.1.15
## 1.8.25-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@techdocs/cli",
"version": "1.8.25-next.0",
"version": "1.8.25-next.1",
"description": "Utility CLI for managing TechDocs sites in Backstage.",
"backstage": {
"role": "cli"
+13
View File
@@ -1,5 +1,18 @@
# @backstage/test-utils
## 1.7.4-next.0
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/types@1.2.1-next.0
- @backstage/core-app-api@1.15.4-next.0
- @backstage/plugin-permission-react@0.4.30-next.0
- @backstage/config@1.3.2-next.0
- @backstage/plugin-permission-common@0.8.4-next.0
- @backstage/theme@0.6.3
## 1.7.3
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/test-utils",
"version": "1.7.3",
"version": "1.7.4-next.0",
"description": "Utilities to test Backstage plugins and apps.",
"backstage": {
"role": "web-library"
+6
View File
@@ -1,5 +1,11 @@
# @backstage/types
## 1.2.1-next.0
### Patch Changes
- b40eb41: Move `Expand` and `ExpandRecursive` to `@backstage/types`
## 1.2.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/types",
"version": "1.2.0",
"version": "1.2.1-next.0",
"description": "Common TypeScript types used within Backstage",
"backstage": {
"role": "common-library"
+2 -1
View File
@@ -42,6 +42,7 @@
"@backstage/cli": "workspace:^",
"@yarnpkg/builder": "^4.0.0",
"fs-extra": "^11.2.0",
"nodemon": "^3.0.1"
"nodemon": "^3.0.1",
"yaml": "^2.0.0"
}
}
+306
View File
@@ -0,0 +1,306 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { join as joinPath } from 'path';
import { spawn, SpawnOptionsWithoutStdio } from 'child_process';
import fs from 'fs-extra';
import yaml from 'yaml';
import { findPaths } from '@backstage/cli-common';
import { createMockDirectory } from '@backstage/backend-test-utils';
jest.setTimeout(30_000);
const mockDir = createMockDirectory();
const executeCommand = (
command: string,
args: string[],
options?: SpawnOptionsWithoutStdio,
): Promise<{
exitCode: number;
stdout: string;
stderr: string;
}> => {
return new Promise((resolve, reject) => {
const stdout: Buffer[] = [];
const stderr: Buffer[] = [];
const shell = process.platform === 'win32';
const proc = spawn(command, args, { ...options, shell });
proc.stdout?.on('data', data => {
stdout.push(Buffer.from(data));
});
proc.stderr?.on('data', data => {
stderr.push(Buffer.from(data));
});
proc.on('error', reject);
proc.on('exit', exitCode => {
resolve({
exitCode: exitCode ?? 0,
stdout: Buffer.concat(stdout).toString('utf8'),
stderr: Buffer.concat(stderr).toString('utf8'),
});
});
});
};
const runYarnInstall = () =>
executeCommand('yarn', ['--mode=update-lockfile'], { cwd: mockDir.path });
const nonWorkspaceEntries = (lockFileString: string = '') => {
const lockFile = yaml.parse(lockFileString);
const result: Record<string, string> = {};
for (const key of Object.keys(lockFile)) {
if (lockFile[key].version !== '0.0.0-use.local') {
result[key] = lockFile[key];
}
}
return result;
};
describe('Backstage yarn plugin', () => {
describe.each`
yarnVersion
${'4.1.1'}
${'stable'}
`('yarn $yarnVersion', ({ yarnVersion }) => {
let initialLockFileContent: string | undefined;
beforeAll(async () => {
const { targetRoot } = findPaths(process.cwd());
await executeCommand('yarn', ['build'], {
cwd: joinPath(targetRoot, 'packages/yarn-plugin'),
});
mockDir.setContent({
'yarn.lock': '',
'package.json': JSON.stringify({
workspaces: {
packages: ['packages/*'],
},
}),
'backstage.json': JSON.stringify({ version: '0.9.0' }),
packages: {
a: {
'package.json': JSON.stringify({
name: 'a',
dependencies: {
'@backstage/config': '^0.1.2',
},
}),
},
b: {
'package.json': JSON.stringify({
name: 'b',
dependencies: {
'@backstage/cli-common': '^0.1.1',
'@backstage/config': '^0.1.2',
},
}),
},
},
});
await executeCommand('yarn', ['set', 'version', yarnVersion], {
cwd: mockDir.path,
});
await executeCommand(
'yarn',
['config', 'set', 'enableGlobalCache', 'true'],
{ cwd: mockDir.path },
);
await runYarnInstall();
initialLockFileContent = await fs.readFile(
joinPath(mockDir.path, 'yarn.lock'),
'utf-8',
);
await executeCommand(
'yarn',
[
'plugin',
'import',
joinPath(
targetRoot,
'packages/yarn-plugin/bundles/@yarnpkg/plugin-backstage.js',
),
],
{
cwd: mockDir.path,
},
);
});
beforeEach(() => {
mockDir.addContent({
'backstage.json': JSON.stringify({ version: '0.9.0' }),
packages: {
a: {
'package.json': JSON.stringify({
name: 'a',
dependencies: {
'@backstage/config': '^0.1.2',
},
}),
},
b: {
'package.json': JSON.stringify({
name: 'b',
dependencies: {
'@backstage/cli-common': '^0.1.1',
'@backstage/config': '^0.1.2',
},
}),
},
},
});
});
it('does not change yarn.lock when no backstage:^ versions are present', async () => {
await runYarnInstall();
await expect(
fs.readFile(joinPath(mockDir.path, 'yarn.lock'), 'utf-8'),
).resolves.toEqual(initialLockFileContent);
});
describe('with backstage:^ dependencies', () => {
beforeEach(async () => {
mockDir.addContent({
'packages/a/package.json': JSON.stringify({
name: 'a',
dependencies: {
'@backstage/config': 'backstage:^',
},
}),
'packages/b/package.json': JSON.stringify({
name: 'b',
dependencies: {
'@backstage/config': 'backstage:^',
'@backstage/cli-common': 'backstage:^',
},
}),
});
await runYarnInstall();
});
it('retains existing lockfile entries', async () => {
const lockFileContent = await fs.readFile(
joinPath(mockDir.path, 'yarn.lock'),
'utf-8',
);
expect(nonWorkspaceEntries(lockFileContent)).toEqual(
nonWorkspaceEntries(initialLockFileContent),
);
});
it('bumps packages when backstage.json changes', async () => {
mockDir.addContent({
'backstage.json': JSON.stringify({
version: '1.0.0',
}),
});
await runYarnInstall();
const lockFileContent = await fs.readFile(
joinPath(mockDir.path, 'yarn.lock'),
'utf-8',
);
const lockFile = yaml.parse(lockFileContent);
// Versions from old manifest no longer appear in lockfile
expect(lockFile['@backstage/cli-common@npm:^0.1.1']).toBeUndefined();
expect(lockFile['@backstage/config@npm:^0.1.2']).toBeUndefined();
// Versions from new manifest have been added to lockfile
expect(lockFile['@backstage/cli-common@npm:^0.1.8']).toBeDefined();
expect(lockFile['@backstage/config@npm:^1.0.0']).toBeDefined();
});
describe('after removing backstage:^ dependencies', () => {
beforeEach(async () => {
mockDir.addContent({
'packages/a/package.json': JSON.stringify({
name: 'a',
dependencies: {
'@backstage/config': '^0.1.2',
},
}),
'packages/b/package.json': JSON.stringify({
name: 'b',
dependencies: {
'@backstage/config': '^0.1.2',
'@backstage/cli-common': '^0.1.1',
},
}),
});
await runYarnInstall();
});
it('restores the original yarn.lock content', async () => {
const lockFileContent = await fs.readFile(
joinPath(mockDir.path, 'yarn.lock'),
'utf-8',
);
expect(lockFileContent).toEqual(initialLockFileContent);
});
});
describe.each`
packageName | description
${'node-fetch'} | ${'non-Backstage package'}
${'@backstage/foo'} | ${'invalid Backstage package'}
`(
'when backstage:^ range is used with $description "$packageName"',
({ packageName }) => {
beforeEach(async () => {
mockDir.addContent({
'packages/c/package.json': JSON.stringify({
name: 'c',
dependencies: {
[packageName]: 'backstage:^',
},
}),
});
});
it('fails to install', async () => {
const { exitCode, stdout } = await runYarnInstall();
expect(exitCode).toEqual(1);
expect(stdout).toContain(
`Package ${packageName} not found in manifest for Backstage v0.9.0`,
);
});
},
);
});
});
});
+16
View File
@@ -1,5 +1,21 @@
# @backstage/plugin-api-docs
## 0.12.3-next.1
### Patch Changes
- dcf6e72: Fix typo in default path of api docs definition route
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/plugin-catalog@1.26.1-next.1
- @backstage/core-compat-api@0.3.5-next.0
- @backstage/plugin-catalog-react@1.15.1-next.1
- @backstage/core-components@0.16.3-next.0
- @backstage/plugin-permission-react@0.4.30-next.0
- @backstage/catalog-model@1.7.3-next.0
- @backstage/plugin-catalog-common@1.1.3-next.0
## 0.12.3-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-api-docs",
"version": "0.12.3-next.0",
"version": "0.12.3-next.1",
"description": "A Backstage plugin that helps represent API entities in the frontend",
"backstage": {
"role": "frontend-plugin",
+13
View File
@@ -1,5 +1,18 @@
# @backstage/plugin-app-backend
## 0.4.4-next.1
### Patch Changes
- Updated dependencies
- @backstage/types@1.2.1-next.0
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/config@1.3.2-next.0
- @backstage/config-loader@1.9.5-next.1
- @backstage/errors@1.2.7-next.0
- @backstage/plugin-auth-node@0.5.6-next.1
- @backstage/plugin-app-node@0.1.29-next.1
## 0.4.4-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-app-backend",
"version": "0.4.4-next.0",
"version": "0.4.4-next.1",
"description": "A Backstage backend plugin that serves the Backstage frontend app",
"backstage": {
"role": "backend-plugin",
+8
View File
@@ -1,5 +1,13 @@
# @backstage/plugin-app-node
## 0.1.29-next.1
### Patch Changes
- Updated dependencies
- @backstage/backend-plugin-api@1.1.1-next.1
- @backstage/config-loader@1.9.5-next.1
## 0.1.29-next.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-app-node",
"version": "0.1.29-next.0",
"version": "0.1.29-next.1",
"description": "Node.js library for the app plugin",
"backstage": {
"role": "node-library",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-app-visualizer
## 0.1.15-next.0
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.9.4-next.0
- @backstage/core-plugin-api@1.10.3-next.0
- @backstage/core-components@0.16.3-next.0
## 0.1.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-app-visualizer",
"version": "0.1.14",
"version": "0.1.15-next.0",
"description": "Visualizes the Backstage app structure",
"backstage": {
"role": "frontend-plugin",

Some files were not shown because too many files have changed in this diff Show More