Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [IOBP-527] Remove require cycles in CGN #5480

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

forrest57
Copy link
Contributor

Short description

removed require cycles in CGN folder

List of changes proposed in this pull request

  • moved circular imports to shared files

How to test

yarn jest and yarn tsc:noemit should be enough;
The existance of circular dependencies has been checked this VSCode extension, along with VSCode's very useful search in non-edit views feature.

@forrest57 forrest57 requested a review from a team as a code owner February 1, 2024 16:07
@pagopa-github-bot pagopa-github-bot changed the title [IOBP-527] remove require cycles in CGN chore: [IOBP-527] Remove require cycles in CGN Feb 1, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Feb 1, 2024

Affected stories

  • ⚙️ IOBP-527: risolvere require cycle in CGN
    subtask of
    • ⚙️ IOBP-516: Risolvere warnings Require cycle nei flussi bonus e wallet

Generated by 🚫 dangerJS against 08d2d26

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.92%. Comparing base (9f72690) to head (38182e8).
Report is 16 commits behind head on master.

❗ Current head 38182e8 differs from pull request most recent head 08d2d26. Consider uploading reports for the commit 08d2d26 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5480      +/-   ##
==========================================
- Coverage   48.31%   47.92%   -0.40%     
==========================================
  Files        1466     1399      -67     
  Lines       31114    30188     -926     
  Branches     7559     7390     -169     
==========================================
- Hits        15034    14468     -566     
+ Misses      16011    15651     -360     
  Partials       69       69              
Files Coverage Δ
ts/features/bonus/cgn/navigation/actions.ts 50.00% <ø> (ø)
...ga/networking/activation/getBonusActivationSaga.ts 11.62% <ø> (ø)
.../cgn/saga/networking/eyca/details/getEycaStatus.ts 94.11% <ø> (ø)
...a/orchestration/activation/handleActivationSaga.ts 72.22% <ø> (ø)
.../cgn/screens/merchants/CgnMerchantDetailScreen.tsx 12.82% <ø> (ø)
...gn/screens/merchants/CgnMerchantLandingWebview.tsx 14.28% <ø> (ø)
...n/screens/merchants/CgnMerchantsListByCategory.tsx 6.66% <ø> (ø)
...s/cgn/screens/merchants/CgnMerchantsListScreen.tsx 10.25% <ø> (ø)
ts/features/bonus/cgn/store/actions/activation.ts 100.00% <ø> (ø)
...eatures/bonus/cgn/store/actions/eyca/activation.ts 100.00% <ø> (ø)
... and 6 more

... and 588 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27c6779...08d2d26. Read the comment docs.

@mastro993
Copy link
Contributor

mastro993 commented Feb 1, 2024

Running npx madge --circular --extensions ts ./ command I still get require cycle warnings in CGN flows:

ts/App.tsx > ts/RootContainer.tsx > ts/navigation/AppStackNavigator.tsx > ts/features/bonus/cgn/navigation/navigator.tsx > ts/features/bonus/cgn/screens/CgnDetailScreen.tsx > ts/features/bonus/cgn/components/detail/CgnUnsubscribe.tsx > ts/store/actions/navigation.ts > ts/features/wallet/creditCard/screen/CreditCardDetailScreen.tsx > ts/features/wallet/component/features/PaymentMethodFeatures.tsx > ts/features/wallet/component/features/PaymentMethodInitiatives.tsx > ts/navigation/params/AppParamsList.ts > ts/features/messages/navigation/params.ts > ts/features/pn/navigation/params.ts > ts/features/pn/screens/PaidPaymentScreen.tsx > ts/screens/wallet/payment/TransactionSummaryScreen.tsx > ts/navigation/params/WalletParamsList.ts > ts/features/bonus/common/navigation/navigator.tsx > ts/features/bonus/common/screens/AvailableBonusScreen.tsx > ts/screens/services/ServiceDetailsScreen.tsx > ts/components/services/SpecialServices/SpecialServicesCTA.tsx > ts/features/pn/components/ServiceCTA.tsx

@@ -0,0 +1,39 @@
import { CgnActivationDetail } from "../../../../../../definitions/cgn/CgnActivationDetail";
Copy link
Contributor

@mastro993 mastro993 Feb 2, 2024

Choose a reason for hiding this comment

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

It's more like [...]/cgn/types/index.ts than [...]/cgn/store/actions/utils.ts, what do you think?

Comment on lines +29 to +30
// ------------ SCREEN NAVIGATION PARAMS

Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary comment, imho

Suggested change
// ------------ SCREEN NAVIGATION PARAMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants