Version Packages (next)

This commit is contained in:
github-actions[bot]
2024-08-27 11:41:57 +00:00
parent 0a48cc88a8
commit 911bbe0d92
292 changed files with 5855 additions and 154 deletions
+61
View File
@@ -1,5 +1,66 @@
# @backstage/frontend-plugin-api
## 0.8.0-next.0
### Minor Changes
- 5446061: **BREAKING**: Removed support for "v1" extensions. This means that it is no longer possible to declare inputs and outputs as objects when using `createExtension`. In addition, all extension creators except for `createComponentExtension` have been removed, use the equivalent blueprint instead. See the [1.30 migration documentation](https://backstage.io/docs/frontend-system/architecture/migrations/#130) for more information on this change.
- fec8b57: **BREAKING**: Updated the type parameters for `ExtensionDefinition` and `ExtensionBlueprint` to only have a single object parameter. The base type parameter is exported as `ExtensionDefinitionParameters` and `ExtensionBlueprintParameters` respectively. This is shipped as an immediate breaking change as we expect usage of these types to be rare, and it does not affect the runtime behavior of the API.
This is a breaking change as it changes the type parameters. Existing usage can generally be updated as follows:
- `ExtensionDefinition<any>` -> `ExtensionDefinition`
- `ExtensionDefinition<any, any>` -> `ExtensionDefinition`
- `ExtensionDefinition<TConfig>` -> `ExtensionDefinition<{ config: TConfig }>`
- `ExtensionDefinition<TConfig, TConfigInput>` -> `ExtensionDefinition<{ config: TConfig, configInput: TConfigInput }>`
If you need to infer the parameter you can use `ExtensionDefinitionParameters`, for example:
```ts
import {
ExtensionDefinition,
ExtensionDefinitionParameters,
} from '@backstage/frontend-plugin-api';
function myUtility<T extends ExtensionDefinitionParameters>(
ext: ExtensionDefinition<T>,
): T['config'] {
// ...
}
```
The same patterns apply to `ExtensionBlueprint`.
This change is made to improve the readability of API references and ability to evolve the type parameters in the future.
### Patch Changes
- 2bb9517: Introduce the `@backstage/plugin-app` package to hold all of the built-in extensions for easy consumption and overriding.
- f3a2b91: Moved several implementations of built-in APIs from being hardcoded in the app to instead be provided as API extensions. This moves all API-related inputs from the `app` extension to the respective API extensions. For example, extensions created with `ThemeBlueprint` are now attached to the `themes` input of `api:app-theme` rather than the `app` extension.
- 98850de: Added support for defining `replaces` in `createExtensionInput` which will allow extensions to redirect missing `attachTo` points to an input of the created extension.
```ts
export const AppThemeApi = ApiBlueprint.makeWithOverrides({
name: 'app-theme',
inputs: {
themes: createExtensionInput([ThemeBlueprint.dataRefs.theme], {
// attachTo: { id: 'app', input: 'themes'} will be redirected to this input instead
replaces: [{ id: 'app', input: 'themes' }],
}),
},
factory: () {
...
}
});
```
- 4a66456: A new `apis` parameter has been added to `factory` for extensions. This is a way to access utility APIs without being coupled to the React context.
- Updated dependencies
- @backstage/core-components@0.14.10
- @backstage/core-plugin-api@1.9.3
- @backstage/types@1.1.1
- @backstage/version-bridge@1.0.8
## 0.7.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/frontend-plugin-api",
"version": "0.7.0",
"version": "0.8.0-next.0",
"backstage": {
"role": "web-library"
},