Skip to content

Conversation

lposen
Copy link
Contributor

@lposen lposen commented Oct 7, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

Copy link

qltysh bot commented Oct 7, 2025

6 new issues

Tool Category Rule Count
qlty Structure Function with many parameters (count = 4): initialize2WithApiKey 4
qlty Structure Function with high complexity (count = 6): setupUserNotificationCenter 1
qlty Structure Function with many returns (count = 8): IterableAppProvider 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

…lure' into MOB-12231-refactor-classes-to-reduce-circular-dependencies
…lure' into MOB-12231-refactor-classes-to-reduce-circular-dependencies
Copy link

github-actions bot commented Oct 9, 2025

Lines Statements Branches Functions
Coverage: 50%
51.11% (276/540) 26.44% (55/208) 48.5% (97/200)

Copy link

qltysh bot commented Oct 9, 2025

Diff Coverage: The code coverage on the diff in this pull request is 82.4%.

Total Coverage: This PR will increase coverage by 3.98%.

File Coverage Changes
Path File Coverage Δ Indirect
src/core/classes/Iterable.ts 1.2
src/core/classes/IterableApi.ts 82.9
src/core/classes/IterableAuthManager.ts 0.0
src/inbox/classes/IterableInboxDataModel.ts 0.2
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@lposen lposen marked this pull request as ready for review October 9, 2025 19:23
@Ayyanchira Ayyanchira self-requested a review October 9, 2025 22:31
Copy link
Member

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially reviewed

"prepare": "yarn build",
"release": "release-it"
"release": "release-it",
"circ": "npx madge --circular --extensions ts ./"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a dedicated package to results circular dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup!

import type { IterableCommerceItem } from './IterableCommerceItem';
import { IterableConfig } from './IterableConfig';
import { IterableLogger } from './IterableLogger';
import type { IterableAuthFailure } from '../types/IterableAuthFailure';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import 'type' is removed above. Is this one ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The issue was coming from the use of Iterable.logger in IterableInAppManager. This has been changed to not require that anymore.


const RNEventEmitter = new NativeEventEmitter(RNIterableAPI);

const defaultConfig = new IterableConfig();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how default implementation comes into play. Any possibility of regression?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No -- it's the same functionality as was there before -- it's just assigning it to a variable

Comment on lines +45 to +49
static initialize2WithApiKey(
apiKey: string,
config: IterableConfig = new IterableConfig(),
version: string,
apiEndPoint: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 4): initialize2WithApiKey [qlty:function-parameters]

Comment on lines +163 to +168
static trackPushOpenWithCampaignId(
campaignId: number,
templateId: number,
messageId: string | null | undefined,
appAlreadyRunning: boolean,
dataFields?: unknown
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Comment on lines +253 to +257
static trackInAppClose(
message: IterableInAppMessage,
location: IterableInAppLocation,
source: IterableInAppCloseSource,
clickedUrl?: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 4): trackInAppClose [qlty:function-parameters]

Comment on lines +512 to +518
static updateSubscriptions(
emailListIds: number[] | null,
unsubscribedChannelIds: number[] | null,
unsubscribedMessageTypeIds: number[] | null,
subscribedMessageTypeIds: number[] | null,
campaignId: number,
templateId: number
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

@lposen lposen closed this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants