From 8b80447be61bf18a757b9c2f68ec1567707e7bc3 Mon Sep 17 00:00:00 2001 From: Md Junaed Hossain <169046794+junaed-optimizely@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:46:16 +0600 Subject: [PATCH 1/4] [FSSDK-12115] type def update --- lib/core/decision_service/index.ts | 3 +- lib/core/notification_center/index.ts | 14 ++-- lib/export_types.ts | 17 ++++ lib/shared_types.ts | 111 +++++++++++++++++++++++--- lib/utils/enums/index.ts | 4 +- 5 files changed, 130 insertions(+), 19 deletions(-) diff --git a/lib/core/decision_service/index.ts b/lib/core/decision_service/index.ts index 28f97a09e..3a66f4a03 100644 --- a/lib/core/decision_service/index.ts +++ b/lib/core/decision_service/index.ts @@ -44,6 +44,7 @@ import * as stringValidator from '../../utils/string_value_validator'; import { BucketerParams, DecisionResponse, + DecisionSource, Experiment, ExperimentBucketMap, FeatureFlag, @@ -60,7 +61,7 @@ const MODULE_NAME = 'DECISION_SERVICE'; export interface DecisionObj { experiment: Experiment | null; variation: Variation | null; - decisionSource: string; + decisionSource: DecisionSource; } interface DecisionServiceOptions { diff --git a/lib/core/notification_center/index.ts b/lib/core/notification_center/index.ts index a0a91dffe..0192dfece 100644 --- a/lib/core/notification_center/index.ts +++ b/lib/core/notification_center/index.ts @@ -15,7 +15,7 @@ */ import { LogHandler, ErrorHandler } from '../../modules/logging'; import { objectValues } from '../../utils/fns'; -import { NotificationListener, ListenerPayload } from '../../shared_types'; +import { NotificationListener, NotificationPayloadMap } from '../../shared_types'; import { LOG_LEVEL, @@ -80,9 +80,9 @@ export class NotificationCenter { * can happen if the first argument is not a valid notification type, or if the same callback * function was already added as a listener by a prior call to this function. */ - addNotificationListener( - notificationType: string, - callback: NotificationListener + addNotificationListener( + notificationType: K, + callback: NotificationListener ): number { try { const notificationTypeValues: string[] = objectValues(NOTIFICATION_TYPES); @@ -202,9 +202,9 @@ export class NotificationCenter { * @param {string} notificationType One of NOTIFICATION_TYPES * @param {Object} notificationData Will be passed to callbacks called */ - sendNotifications( - notificationType: string, - notificationData?: T + sendNotifications( + notificationType: K, + notificationData?: NotificationPayloadMap[K] ): void { try { (this.notificationListeners[notificationType] || []).forEach( diff --git a/lib/export_types.ts b/lib/export_types.ts index 759bb86c0..d9e714085 100644 --- a/lib/export_types.ts +++ b/lib/export_types.ts @@ -37,6 +37,9 @@ export { UserProfileService, UserProfile, ListenerPayload, + DecisionListenerPayload, + LogEventListenerPayload, + NotificationPayloadMap, OptimizelyDecision, OptimizelyUserContext, NotificationListener, @@ -47,4 +50,18 @@ export { NotificationCenter, OptimizelySegmentOption, ICache, + // Decision info types + DecisionNotificationType, + DecisionSource, + DecisionSourceInfo, + VariablesMap, + // Specific decision info types for type narrowing + AbTestDecisionInfo, + FeatureDecisionInfo, + FeatureTestDecisionInfo, + FeatureVariableDecisionInfo, + AllFeatureVariablesDecisionInfo, + FlagDecisionInfo, + DecisionInfoMap, + DecisionListenerPayloadForType, } from './shared_types'; diff --git a/lib/shared_types.ts b/lib/shared_types.ts index 0dc03e41f..c18ecc957 100644 --- a/lib/shared_types.ts +++ b/lib/shared_types.ts @@ -23,7 +23,7 @@ import { ErrorHandler, LogHandler, LogLevel, LoggerFacade } from './modules/logg import { EventProcessor } from './modules/event_processor'; import { NotificationCenter as NotificationCenterImpl } from './core/notification_center'; -import { NOTIFICATION_TYPES } from './utils/enums'; +import { NOTIFICATION_TYPES, DECISION_NOTIFICATION_TYPES, DECISION_SOURCES } from './utils/enums'; import { IOptimizelyUserContext as OptimizelyUserContext } from './optimizely_user_context'; @@ -120,13 +120,106 @@ export interface ListenerPayload { attributes?: UserAttributes; } -export type NotificationListener = (notificationData: T) => void; +export type DecisionNotificationType = + | typeof DECISION_NOTIFICATION_TYPES.AB_TEST + | typeof DECISION_NOTIFICATION_TYPES.FEATURE + | typeof DECISION_NOTIFICATION_TYPES.FEATURE_TEST + | typeof DECISION_NOTIFICATION_TYPES.FEATURE_VARIABLE + | typeof DECISION_NOTIFICATION_TYPES.ALL_FEATURE_VARIABLES + | typeof DECISION_NOTIFICATION_TYPES.FLAG; -// NotificationCenter-related types +export type DecisionSource = + | typeof DECISION_SOURCES.FEATURE_TEST + | typeof DECISION_SOURCES.ROLLOUT + | typeof DECISION_SOURCES.EXPERIMENT; + +export type DecisionSourceInfo = { + experimentKey?: string; + variationKey?: string; +}; + +export type VariablesMap = { [variableKey: string]: unknown }; + +export type AbTestDecisionInfo = { + experimentKey: string; + variationKey: string | null; +}; + +export type FeatureDecisionInfo = { + featureKey: string; + featureEnabled: boolean; + source: DecisionSource; + sourceInfo: DecisionSourceInfo; +}; + +export type FeatureTestDecisionInfo = { + experimentKey: string; + variationKey: string | null; +}; + +export type FeatureVariableDecisionInfo = { + featureKey: string; + featureEnabled: boolean; + source: DecisionSource; + variableKey: string; + variableValue: FeatureVariableValue; + variableType: VariableType; + sourceInfo: DecisionSourceInfo; +}; + +export type AllFeatureVariablesDecisionInfo = { + featureKey: string; + featureEnabled: boolean; + source: DecisionSource; + variableValues: VariablesMap; + sourceInfo: DecisionSourceInfo; +}; + +export type FlagDecisionInfo = { + flagKey: string; + enabled: boolean; + variationKey: string | null; + ruleKey: string | null; + variables: VariablesMap; + reasons: string[]; + decisionEventDispatched: boolean; + experimentId?: string; + variationId?: string; +}; + +export type DecisionInfoMap = { + [DECISION_NOTIFICATION_TYPES.AB_TEST]: AbTestDecisionInfo; + [DECISION_NOTIFICATION_TYPES.FEATURE]: FeatureDecisionInfo; + [DECISION_NOTIFICATION_TYPES.FEATURE_TEST]: FeatureTestDecisionInfo; + [DECISION_NOTIFICATION_TYPES.FEATURE_VARIABLE]: FeatureVariableDecisionInfo; + [DECISION_NOTIFICATION_TYPES.ALL_FEATURE_VARIABLES]: AllFeatureVariablesDecisionInfo; + [DECISION_NOTIFICATION_TYPES.FLAG]: FlagDecisionInfo; +}; + +export type DecisionListenerPayloadForType = ListenerPayload & { + type: T; + decisionInfo: DecisionInfoMap[T]; +}; + +export type DecisionListenerPayload = { + [T in DecisionNotificationType]: DecisionListenerPayloadForType; +}[DecisionNotificationType]; + +export type LogEventListenerPayload = Event; + +export type NotificationPayloadMap = { + [NOTIFICATION_TYPES.ACTIVATE]: ActivateListenerPayload; + [NOTIFICATION_TYPES.DECISION]: DecisionListenerPayload; + [NOTIFICATION_TYPES.TRACK]: TrackListenerPayload; + [NOTIFICATION_TYPES.LOG_EVENT]: LogEventListenerPayload; + [NOTIFICATION_TYPES.OPTIMIZELY_CONFIG_UPDATE]: undefined; +}; + +export type NotificationListener = (notificationData: T) => void; export interface NotificationCenter { - addNotificationListener( - notificationType: string, - callback: NotificationListener + addNotificationListener( + notificationType: K, + callback: NotificationListener ): number; removeNotificationListener(listenerId: number): boolean; clearAllNotificationListeners(): void; @@ -385,14 +478,14 @@ export interface Client { } export interface ActivateListenerPayload extends ListenerPayload { - experiment: import('./shared_types').Experiment; - variation: import('./shared_types').Variation; + experiment?: import('./shared_types').Experiment; + variation?: import('./shared_types').Variation; logEvent: Event; } export interface TrackListenerPayload extends ListenerPayload { eventKey: string; - eventTags: EventTags; + eventTags?: EventTags; logEvent: Event; } diff --git a/lib/utils/enums/index.ts b/lib/utils/enums/index.ts index 4b70e6a97..a89a9470e 100644 --- a/lib/utils/enums/index.ts +++ b/lib/utils/enums/index.ts @@ -230,7 +230,7 @@ export const DECISION_NOTIFICATION_TYPES = { FEATURE_VARIABLE: 'feature-variable', ALL_FEATURE_VARIABLES: 'all-feature-variables', FLAG: 'flag', -}; +} as const; /* * Represents the source of a decision for feature management. When a feature @@ -242,7 +242,7 @@ export const DECISION_SOURCES = { FEATURE_TEST: 'feature-test', ROLLOUT: 'rollout', EXPERIMENT: 'experiment', -}; +} as const; export const AUDIENCE_EVALUATION_TYPES = { RULE: 'rule', From 4fb49e524a68b15ebd4d5f5b705ce34348c335c9 Mon Sep 17 00:00:00 2001 From: Md Junaed Hossain <169046794+junaed-optimizely@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:27:22 +0600 Subject: [PATCH 2/4] [FSSDK-12115] review update --- lib/core/notification_center/index.ts | 14 +++++++------- lib/shared_types.ts | 22 ++++++++-------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/lib/core/notification_center/index.ts b/lib/core/notification_center/index.ts index 0192dfece..92337a994 100644 --- a/lib/core/notification_center/index.ts +++ b/lib/core/notification_center/index.ts @@ -15,7 +15,7 @@ */ import { LogHandler, ErrorHandler } from '../../modules/logging'; import { objectValues } from '../../utils/fns'; -import { NotificationListener, NotificationPayloadMap } from '../../shared_types'; +import { ListenerPayload, NotificationListener, NotificationPayloadMap } from '../../shared_types'; import { LOG_LEVEL, @@ -80,9 +80,9 @@ export class NotificationCenter { * can happen if the first argument is not a valid notification type, or if the same callback * function was already added as a listener by a prior call to this function. */ - addNotificationListener( - notificationType: K, - callback: NotificationListener + addNotificationListener( + notificationType: string, + callback: NotificationListener ): number { try { const notificationTypeValues: string[] = objectValues(NOTIFICATION_TYPES); @@ -202,9 +202,9 @@ export class NotificationCenter { * @param {string} notificationType One of NOTIFICATION_TYPES * @param {Object} notificationData Will be passed to callbacks called */ - sendNotifications( - notificationType: K, - notificationData?: NotificationPayloadMap[K] + sendNotifications( + notificationType: string, + notificationData?: T ): void { try { (this.notificationListeners[notificationType] || []).forEach( diff --git a/lib/shared_types.ts b/lib/shared_types.ts index c18ecc957..7f13a3592 100644 --- a/lib/shared_types.ts +++ b/lib/shared_types.ts @@ -120,13 +120,7 @@ export interface ListenerPayload { attributes?: UserAttributes; } -export type DecisionNotificationType = - | typeof DECISION_NOTIFICATION_TYPES.AB_TEST - | typeof DECISION_NOTIFICATION_TYPES.FEATURE - | typeof DECISION_NOTIFICATION_TYPES.FEATURE_TEST - | typeof DECISION_NOTIFICATION_TYPES.FEATURE_VARIABLE - | typeof DECISION_NOTIFICATION_TYPES.ALL_FEATURE_VARIABLES - | typeof DECISION_NOTIFICATION_TYPES.FLAG; +export type DecisionNotificationType = typeof DECISION_NOTIFICATION_TYPES[keyof typeof DECISION_NOTIFICATION_TYPES]; export type DecisionSource = | typeof DECISION_SOURCES.FEATURE_TEST @@ -215,11 +209,11 @@ export type NotificationPayloadMap = { [NOTIFICATION_TYPES.OPTIMIZELY_CONFIG_UPDATE]: undefined; }; -export type NotificationListener = (notificationData: T) => void; +export type NotificationListener = (notificationData: T) => void; export interface NotificationCenter { - addNotificationListener( - notificationType: K, - callback: NotificationListener + addNotificationListener( + notificationType: string, + callback: NotificationListener ): number; removeNotificationListener(listenerId: number): boolean; clearAllNotificationListeners(): void; @@ -478,14 +472,14 @@ export interface Client { } export interface ActivateListenerPayload extends ListenerPayload { - experiment?: import('./shared_types').Experiment; - variation?: import('./shared_types').Variation; + experiment: import('./shared_types').Experiment; + variation: import('./shared_types').Variation; logEvent: Event; } export interface TrackListenerPayload extends ListenerPayload { eventKey: string; - eventTags?: EventTags; + eventTags: EventTags; logEvent: Event; } From bd5de4ee0dfea376686a013a771b7a526d70ce68 Mon Sep 17 00:00:00 2001 From: Md Junaed Hossain <169046794+junaed-optimizely@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:30:53 +0600 Subject: [PATCH 3/4] [FSSDK-12115] review update --- lib/shared_types.ts | 5 +- package-lock.json | 408 -------------------------------------------- 2 files changed, 1 insertion(+), 412 deletions(-) diff --git a/lib/shared_types.ts b/lib/shared_types.ts index 7f13a3592..7ff6e0311 100644 --- a/lib/shared_types.ts +++ b/lib/shared_types.ts @@ -122,10 +122,7 @@ export interface ListenerPayload { export type DecisionNotificationType = typeof DECISION_NOTIFICATION_TYPES[keyof typeof DECISION_NOTIFICATION_TYPES]; -export type DecisionSource = - | typeof DECISION_SOURCES.FEATURE_TEST - | typeof DECISION_SOURCES.ROLLOUT - | typeof DECISION_SOURCES.EXPERIMENT; +export type DecisionSource = typeof DECISION_SOURCES[keyof typeof DECISION_SOURCES]; export type DecisionSourceInfo = { experimentKey?: string; diff --git a/package-lock.json b/package-lock.json index 70b2e15be..882b453bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2622,32 +2622,6 @@ "node": ">=0.1.90" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -3016,17 +2990,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/@jest/core/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/@jest/core/node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -3106,51 +3069,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/@jest/create-cache-key-function": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", @@ -4348,38 +4266,6 @@ "node": ">= 10" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/@types/babel__core": { "version": "7.20.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", @@ -6522,17 +6408,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/create-jest/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/create-jest/node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -6612,59 +6487,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -9089,17 +8911,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/jest-cli/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/jest-cli/node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -9179,51 +8990,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -14716,14 +14482,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -16961,31 +16719,6 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -17268,14 +17001,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true - }, "jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -17331,29 +17056,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true - }, - "ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } } } }, @@ -18356,38 +18058,6 @@ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "optional": true, - "peer": true - }, "@types/babel__core": { "version": "7.20.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", @@ -20079,14 +19749,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true - }, "jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -20142,40 +19804,9 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true - }, - "ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } } } }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "optional": true, - "peer": true - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -21963,14 +21594,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true - }, "jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -22026,29 +21649,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true - }, - "ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } } } }, @@ -26372,14 +25972,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true, - "peer": true - }, "v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", From 37c96751f84d66689ba77db0c30958259dfc5f91 Mon Sep 17 00:00:00 2001 From: Md Junaed Hossain <169046794+junaed-optimizely@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:33:31 +0600 Subject: [PATCH 4/4] update --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 3afd182b1..c9d67d807 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,7 @@ "@react-native-async-storage/async-storage": ">=1.0.0 <3.0.0", "@react-native-community/netinfo": ">=5.0.0 <12.0.0", "fast-text-encoding": "^1.0.6", - "react-native-get-random-values": "^1.11.0" + "react-native-get-random-values": ">=1.11.0 <3.0.0" }, "peerDependenciesMeta": { "@react-native-async-storage/async-storage": {