= {
- A: { color: theme.palette.eventLog.edited }, // array edited
- E: { color: theme.palette.eventLog.edited }, // edited
- D: { color: theme.palette.eventLog.diffSub }, // deleted
- N: { color: theme.palette.eventLog.diffAdd }, // added
- };
-
- const diffs =
- entry.data && entry.preData
- ? diff(entry.preData, entry.data)
- : undefined;
-
- const buildItemDiff = (diff: any, key: string) => {
- let change: JSX.Element | undefined;
- if (diff.lhs !== undefined) {
- change = (
-
- - {key}: {JSON.stringify(diff.lhs)}
-
- );
- } else if (diff.rhs !== undefined) {
- change = (
-
- + {key}: {JSON.stringify(diff.rhs)}
-
- );
- }
-
- return change;
- };
-
- const buildDiff = (diff: any, index: number): IEventDiffResult => {
- let change: JSX.Element | undefined;
- const key = diff.path?.join('.') ?? diff.index;
-
- if (diff.item) {
- change = buildItemDiff(diff.item, key);
- } else if (diff.lhs !== undefined && diff.rhs !== undefined) {
- change = (
-
-
- - {key}: {JSON.stringify(diff.lhs)}
-
-
- + {key}: {JSON.stringify(diff.rhs)}
-
-
- );
- } else {
- const changeValue = JSON.stringify(diff.rhs || diff.item);
- change = (
-
- {DIFF_PREFIXES[diff.kind]} {key}
- {changeValue
- ? `: ${changeValue}`
- : diff.kind === 'D'
- ? ' (deleted)'
- : ''}
-
- );
- }
-
- return {
- key: key.toString(),
- value: {change}
,
- index,
- };
- };
-
- let changes: any[] = [];
-
- if (diffs) {
- changes = diffs
- .map(buildDiff)
- .sort(sort)
- .map(({ value }) => value);
- } else if (entry.data == null || entry.preData == null) {
- // Just show the data if there is no diff yet.
- const data = entry.data || entry.preData;
- changes = [
-
- {JSON.stringify(data, null, 2)}
-
,
- ];
- }
-
- return (
-
- {changes.length === 0 ? '(no changes)' : changes}
-
- );
-};
-
-export const EventDiff: FC = (props) => {
- const useNewJsonDiff = useUiFlag('improvedJsonDiff');
- if (useNewJsonDiff) {
- return ;
- }
- return ;
-};
-
-/**
- * @deprecated remove the default export with flag improvedJsonDiff. Switch imports in files that use this to the named import instead.
- */
-export default EventDiff;
diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts
index fc6d3576b6..2c85786f61 100644
--- a/frontend/src/interfaces/uiConfig.ts
+++ b/frontend/src/interfaces/uiConfig.ts
@@ -88,7 +88,6 @@ export type UiFlags = {
customMetrics?: boolean;
lifecycleMetrics?: boolean;
createFlagDialogCache?: boolean;
- improvedJsonDiff?: boolean;
impactMetrics?: boolean;
crDiffView?: boolean;
changeRequestApproverEmails?: boolean;
diff --git a/pijul/identities/publickey.json b/pijul/identities/publickey.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/pijul/identities/publickey.json
@@ -0,0 +1 @@
+{}
diff --git a/src/lib/features/metrics/impact/metrics-translator.ts b/src/lib/features/metrics/impact/metrics-translator.ts
index 0e343f0caf..dcd577f141 100644
--- a/src/lib/features/metrics/impact/metrics-translator.ts
+++ b/src/lib/features/metrics/impact/metrics-translator.ts
@@ -54,7 +54,7 @@ export class MetricsTranslator {
): Record {
return {
...(sample.labels || {}),
- origin: (sample.labels && sample.labels.origin) || 'sdk',
+ origin: sample.labels?.origin || 'sdk',
};
}
diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts
index 852c72a84b..6378a9cb4e 100644
--- a/src/lib/types/experimental.ts
+++ b/src/lib/types/experimental.ts
@@ -58,7 +58,6 @@ export type IFlagKey =
| 'customMetrics'
| 'impactMetrics'
| 'createFlagDialogCache'
- | 'improvedJsonDiff'
| 'crDiffView'
| 'changeRequestApproverEmails'
| 'paygTrialEvents'
@@ -275,10 +274,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_APPROVER_EMAILS,
false,
),
- improvedJsonDiff: parseEnvVarBoolean(
- process.env.UNLEASH_EXPERIMENTAL_IMPROVED_JSON_DIFF,
- false,
- ),
crDiffView: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_CR_DIFF_VIEW,
false,
diff --git a/src/server-dev.ts b/src/server-dev.ts
index 893af00cfe..eefb22fd36 100644
--- a/src/server-dev.ts
+++ b/src/server-dev.ts
@@ -54,7 +54,6 @@ process.nextTick(async () => {
reportUnknownFlags: true,
customMetrics: true,
lifecycleMetrics: true,
- improvedJsonDiff: true,
impactMetrics: true,
crDiffView: true,
paygTrialEvents: true,