Skip to content

v2.0.0

Latest

Choose a tag to compare

@avishayil avishayil released this 15 Aug 17:05
· 2 commits to master since this release
f8004f7

First release of the modernized library. Breaking — see migration notes below.

⚠ Breaking changes

  • react and react-native are now peerDependencies (any version your app uses).
  • Removed the abortcontroller-polyfill and node-fetch runtime deps — the component uses the global fetch/AbortController (RN ≥ 0.60).

Features

  • Full TypeScript rewrite with bundled type definitions (import UserAvatar, { UserAvatarProps }).
  • New ignoreContentType prop for hosts (e.g. S3 URLs without an extension) that omit content-type.
  • Initials capped at 3 characters.

Bug fixes

  • textStyle now applies reliably, including after the async render (#117, #98).
  • Removed deprecated defaultProps and its console warning (#131, #130).
  • Trust responses without a content-type header (#120).
  • Aborted image fetches no longer warn (#103).
  • Correct, bundled TypeScript types — no more missing declaration file (#114, #129, #98).
  • Removed the fragile platform-specific header access and require-cycle warning (#118).

Tooling

  • react-native-builder-bob (commonjs + module + typescript), ESLint 8, Prettier 3, TypeScript 5, Jest 29, husky 9.
  • GitHub Actions CI + CodeQL + OIDC trusted publishing with provenance.
  • Example upgraded to Expo SDK 57 (React 19.2 / RN 0.82).

Migration

Most apps upgrade with no code changes. Ensure react/react-native are installed (they already are in any RN app). textStyle now works as documented.