Skip to content

refactor(adapter): Improve readability of adapterUtils - #85

Open
Rebne wants to merge 24 commits into
octet-stream:mainfrom
Rebne:refactor/improve-readability-of-adapter-utils
Open

refactor(adapter): Improve readability of adapterUtils#85
Rebne wants to merge 24 commits into
octet-stream:mainfrom
Rebne:refactor/improve-readability-of-adapter-utils

Conversation

@Rebne

@Rebne Rebne commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR improves the readability of adapterUtils by making the code easier to follow without changing behavior.

Changes

  • rename helpers, variables, and types to better reflect their roles
  • simplify a few control-flow paths and small helper implementations
  • inline trivial abstractions where the extra indirection was not helping
  • clean up related JSDoc comments for clarity and consistency

Notes

  • intended as a readability/refactor pass only
  • no functional changes

@changeset-bot

changeset-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0740a94

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
better-auth-mikro-orm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.06%. Comparing base (fd75f09) to head (0740a94).

Files with missing lines Patch % Lines
src/utils/adapterUtils.ts 94.28% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
- Coverage   92.51%   92.06%   -0.45%     
==========================================
  Files           3        3              
  Lines         187      189       +2     
  Branches       47       49       +2     
==========================================
+ Hits          173      174       +1     
- Misses         14       15       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Rebne Rebne changed the title Improve readability of adapterUtils refactor(adapter): Improve readability of adapterUtils Aug 16, 2026
@Rebne
Rebne force-pushed the refactor/improve-readability-of-adapter-utils branch from de43e12 to 6522165 Compare August 18, 2026 19:29
Rebne added 24 commits August 26, 2026 09:52
Rename AdapterFactoryCustomizeAdapterCreatorConfig to BetterAuthAdapterFactoryConfig
Inline WHERE-clause construction into normalizeWhereClause and remove
createWhereClause and createWhereInClause. Validate in and not_in arrays
in place, and normalize LIKE and comparison operators using the normalized
path and value. Assign the target once after operator handling.
Fix JSDoc warnings reported by IntelliJ JSDoc inspection
@Rebne
Rebne force-pushed the refactor/improve-readability-of-adapter-utils branch from 6522165 to 0740a94 Compare August 26, 2026 06:52
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.

1 participant