Merge branch 'backstage:master' into core-components-docs-update

This commit is contained in:
Łukasz Żeromski
2021-12-21 17:18:15 +01:00
committed by GitHub
77 changed files with 1709 additions and 134 deletions
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/core-plugin-api': minor
---
**BREAKING CHANGE** The `StorageApi` has received several updates that fills in gaps for some use-cases and makes it easier to avoid mistakes:
- The `StorageValueChange` type has been renamed to `StorageValueSnapshot`, the `newValue` property has been renamed to `value`, the stored value type has been narrowed to `JsonValue`, and it has received a new `presence` property that is `'unknown'`, `'absent'`, or `'present'`.
- The `get` method has been deprecated in favor of a new `snapshot` method, which returns a `StorageValueSnapshot`.
- The `observe$` method has had its contract changed. It should now emit values when the `presence` of a key changes, this may for example happen when remotely stored values are requested on page load and the presence switches from `'unknown'` to either `'absent'` or `'present'`.
The above changes have been made with deprecations in place to maintain much of the backwards compatibility for consumers of the `StorageApi`. The only breaking change is the narrowing of the stored value type, which may in some cases require the addition of an explicit type parameter to the `get` and `observe$` methods.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes': minor
---
Includes `KubernetesBackendClient` in the export to allow developers to use it externally.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': minor
---
Updated `WebStorageApi` to reflect the `StorageApi` changes in `@backstage/core-plugin-api`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/test-utils': minor
---
Updated `MockStorageApi` to reflect the `StorageApi` changes in `@backstage/core-plugin-api`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-newrelic-dashboard': patch
---
Created a New Plugin , which imports dashboard links and snapshots from New Relic
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-home': patch
---
Fix undefined identity bug in `WelcomeTitle` caused by using deprecated methods of the IdentityApi
+30
View File
@@ -0,0 +1,30 @@
---
'@backstage/create-app': patch
---
The `index.html` template of the app has been updated to use the new `config` global provided by the Backstage CLI.
To apply this change to an existing app, make the following changes to `packages/app/public/index.html`:
```diff
- <title><%= app.title %></title>
+ <title><%= config.getString('app.title') %></title>
```
```diff
- <% if (app.googleAnalyticsTrackingId && typeof app.googleAnalyticsTrackingId === 'string') { %>
+ <% if (config.has('app.googleAnalyticsTrackingId')) { %>
<script
async
- src="https://www.googletagmanager.com/gtag/js?id=<%= app.googleAnalyticsTrackingId %>"
+ src="https://www.googletagmanager.com/gtag/js?id=<%= config.getString('app.googleAnalyticsTrackingId') %>"
></script>
```
```diff
- gtag('config', '<%= app.googleAnalyticsTrackingId %>');
+ gtag(
+ 'config',
+ '<%= config.getString("app.googleAnalyticsTrackingId") %>',
+ );
```
+15
View File
@@ -0,0 +1,15 @@
---
'@backstage/cli': patch
---
The frontend configuration is now available as a `config` global during templating of the `index.html` file. This allows for much more flexibility as the values available during templating is not longer hardcoded to a fixed set of values.
For example, to access the app title, you would now do the following:
```html
<title><%= config.getString('app.title') %></title>
```
Along with this change, usage of the existing `app.<key>` values has been deprecated and will be removed in a future release. The general pattern for migrating existing usage is to replace `<%= app.<key> %>` with `<%= config.getString('app.<key>') %>`, although in some cases you may need to use for example `config.has('app.<key>')` or `config.getOptionalString('app.<key>')` instead.
The [`@backstage/create-app` changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md#049) also contains more details how to migrate existing usage.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Do not `setState` when unmounted in `OverflowTooltip`
+5
View File
@@ -0,0 +1,5 @@
---
'embedded-techdocs-app': patch
---
The `index.html` template was updated to use the new `config` global.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Fixed a bug preventing cache from being enabled in TechDocs "recommended" deployment mode.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Add DescriptionField override to support Markdown