refactor: [IOPID-4168] remove fp-ts from lollipop index and fetch utils - #8466
refactor: [IOPID-4168] remove fp-ts from lollipop index and fetch utils#8466Leerti wants to merge 4 commits into
Conversation
PR Title Validation for conventional commit type✅ All good! PR title follows the conventional commit type. |
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
Unused code checkKnip compared this branch against
Some of these may sit in files you never opened. Removing an import is all it takes to orphan whatever was on the other end of it. If it is intentional (upcoming work, dynamic imports, codegen templates), ignore this comment. Also, 1 previously reported item is no longer flagged as unused, having been either referenced or removed:
Advisory only. This check never blocks a merge. A renamed or moved item counts on both sides. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8466 +/- ##
=======================================
Coverage 63.79% 63.79%
=======================================
Files 1978 1978
Lines 37598 37603 +5
Branches 6360 6361 +1
=======================================
+ Hits 23985 23990 +5
Misses 12235 12235
Partials 1378 1378
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Short description
Removes fp-ts from
lollipop/index.tsandlollipop/utils/fetch.ts, replacingpipe/Task/TaskEither/Arraycombinators with native async/await and plain array methods.List of changes proposed in this pull request
chainSignPromises: now takes a singlePromise<Array<SignPromiseResult>>and returns[]on rejection via try/catch, instead ofA.sequence(TE.ApplicativePar)+TE.getOrElsehandleRegenerateEphemeralKey: rewritten with async/await and try/catch, returnsPublicKey | undefineddirectly (previously wrapped incorrectly inT.of(...), which returned an unresolvedTaskinstead of the value)taskRegenerateKeyrenamed toregenerateKeyand rewritten as a plain async function (no longer aTaskEither)customContentSignatureBases(fetch.ts): rewritten with a plainif/.mapinstead ofpipe/O.fromNullable/O.fold/A.mapWithIndexcustomContentToSignPromises(fetch.ts): rewritten withPromise.all/async-await instead ofpipe/A.map/TE.tryCatch/TE.mapindex.test.tsto match the newchainSignPromisessignature (plain promises instead ofTE.right/TE.left)How to test
pnpm nx run main-app:test-dev --testPathPattern=lollipop— all 168 tests should passpnpm nx run main-app:tsc-noemitandpnpm nx lint main-app— no errorscustomContentToSign)deleteKey/generateto reject) and confirm the app falls back gracefully (ephemeral key removed from store, login still proceeds without lollipop headers)