Skip to content

Commit c298879

Browse files
committed
deprecate add method
1 parent 30e9d0f commit c298879

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/utils/src/userIntegrations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function setNestedKey(obj: Record<string, any>, keyPath: string, value: unknown)
5050
* @param userIntegrations Integrations defined by the user.
5151
* @param forcedOptions Options with which to patch an existing user-derived instance on the integration.
5252
* @returns A final integrations array.
53+
*
54+
* @deprecated This will be removed in v8.
5355
*/
5456
export function addOrUpdateIntegration<T extends UserIntegrations>(
5557
defaultIntegrationInstance: Integration,

packages/utils/test/userIntegrations.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ function runTest(testOptions: {
7676

7777
let integrations;
7878
if (typeof userIntegrations === 'function') {
79+
// eslint-disable-next-line deprecation/deprecation
7980
const wrappedUserIntegrationsFunction = addOrUpdateIntegration(forcedDogIntegrationInstance, userIntegrations, {
8081
dogName: 'Charlie',
8182
descriptor: 'goofy',
8283
});
8384
integrations = wrappedUserIntegrationsFunction(underlyingDefaultIntegrations);
8485
} else {
86+
// eslint-disable-next-line deprecation/deprecation
8587
integrations = addOrUpdateIntegration(
8688
forcedDogIntegrationInstance,
8789
userIntegrations,

0 commit comments

Comments
 (0)