Skip to content

feat!: consolidate API to VersionCheck object with consistent options#3

Merged
AlshehriAli0 merged 4 commits intomainfrom
feat/consolidate-api
Mar 5, 2026
Merged

feat!: consolidate API to VersionCheck object with consistent options#3
AlshehriAli0 merged 4 commits intomainfrom
feat/consolidate-api

Conversation

@AlshehriAli0
Copy link
Copy Markdown
Owner

Summary

  • Consolidated all APIs into VersionCheck object for consistency
  • Made all async methods use object-based parameters
  • Added country code support for region-specific store lookups (iOS)
  • Made getStoreUrl async for consistency
  • compareVersions now accessible as VersionCheck.compareVersions()

Test Coverage

  • 52 comprehensive tests with 87%+ coverage (exceeds 70% thresholds)
  • Jest setup with TypeScript support
  • Test files excluded from production build
  • GitHub Actions CI with coverage enforcement

Documentation

  • Updated API reference, migration guide, and usage examples
  • All examples show new VersionCheck.* pattern

Breaking Changes

All standalone function exports removed. Migration:

  • getCountry() → VersionCheck.getCountry()
  • getLatestVersion() → VersionCheck.getLatestVersion({ countryCode: 'US' })
  • compareVersions() → VersionCheck.compareVersions('1.0.0', '2.0.0')

BREAKING CHANGE: All standalone function exports removed. Use VersionCheck object.

- API consolidation: getCountry, getStoreUrl, getLatestVersion, needsUpdate now VersionCheck methods
- Consistent options: all async methods use object-based parameters { countryCode?, level? }
- compareVersions now part of VersionCheck object
- Country code support: optional region override for store lookups (iOS)
- Made getStoreUrl async for consistency
- 52 comprehensive tests with 87%+ coverage (exceeds 70% thresholds)
- Jest setup with TypeScript support, test files excluded from build
- GitHub Actions CI with coverage enforcement and codecov upload
- Updated iOS/Android native implementations with country code parameter
- All documentation updated (api-reference, migration-guide, usage-examples)

Migration: getCountry() → VersionCheck.getCountry()
          getLatestVersion() → VersionCheck.getLatestVersion({ countryCode: 'US' })
          compareVersions() → VersionCheck.compareVersions('1.0.0', '2.0.0')
@AlshehriAli0 AlshehriAli0 merged commit da47ed2 into main Mar 5, 2026
3 checks passed
@AlshehriAli0
Copy link
Copy Markdown
Owner Author

closes #1

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