Merge pull request #30735 from backstage/camilal/nfs-inline-common-analytics-context-type

[NFS] (frontend-plugin-api): inline `CommonAnalyticsContext` type
This commit is contained in:
Camila Belo
2025-08-04 13:17:49 +02:00
committed by GitHub
4 changed files with 16 additions and 21 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-plugin-api': minor
---
**BREAKING**: The `CommonAnalyticsContext` has been removed, and inlined into `AnalyticsContextValue` instead.
+6 -9
View File
@@ -114,9 +114,12 @@ export const AnalyticsContext: (options: {
}) => JSX_2.Element;
// @public
export type AnalyticsContextValue = CommonAnalyticsContext & {
[param in string]: string | boolean | number | undefined;
};
export interface AnalyticsContextValue {
// (undocumented)
[key: string]: string | boolean | number | undefined;
extensionId: string;
pluginId: string;
}
// @public
export type AnalyticsEvent = {
@@ -329,12 +332,6 @@ export { bitbucketAuthApiRef };
export { bitbucketServerAuthApiRef };
// @public
export type CommonAnalyticsContext = {
pluginId: string;
extensionId: string;
};
// @public (undocumented)
export type ComponentRef<T extends {} = {}> = {
id: string;
@@ -15,5 +15,5 @@
*/
export { AnalyticsContext } from './AnalyticsContext';
export type { AnalyticsContextValue, CommonAnalyticsContext } from './types';
export type { AnalyticsContextValue } from './types';
export { useAnalytics } from './useAnalytics';
@@ -15,11 +15,11 @@
*/
/**
* Common analytics context attributes.
* Analytics context envelope.
*
* @public
*/
export type CommonAnalyticsContext = {
export interface AnalyticsContextValue {
/**
* The nearest known parent plugin where the event was captured.
*/
@@ -29,13 +29,6 @@ export type CommonAnalyticsContext = {
* The nearest known parent extension where the event was captured.
*/
extensionId: string;
};
/**
* Analytics context envelope.
*
* @public
*/
export type AnalyticsContextValue = CommonAnalyticsContext & {
[param in string]: string | boolean | number | undefined;
};
[key: string]: string | boolean | number | undefined;
}