Highlights
⚠️ It was released as a major version because it contains significant changes, but we don't expect any breaking changes. The upgrade should be seamless.
Official support for Expo & web.
We're now testing react-native-url-polyfill
against latest versions of Expo to prevent any issues.
Also, previously, relying on react-native-url-polyfill/auto
would also apply the polyfill if executed on the web (e.g., via react-native-web
). Starting from now, react-native-url-polyfill/auto
won't apply on the web platform and will be a no-op. If you would like to still apply it on web, you'll need to rely on setupPolyfill
directly as such:
import { setupURLPolyfill } from 'react-native-url-polyfill';
setupURLPolyfill();
Moving away from React Native's internals
To better support different versions of React Native and web usages, we moved away from using polyfillGlobal
, which is part of React Native's internals. Instead, we use globalThis
. See #373 and #413.
What's Changed
- Remove usage of RN's polyfillGlobal by @charpeni in #373
- Fix a phrasing issue in README by @plbrault in #442
- Add test for Expo 48 by @charpeni in #453
- Use globalThis instead of global in auto.js by @staltz in #413
- Fix Typescript error by @raykle in #444
- Add
bundle-size
script by @charpeni in #455 - Don't auto polyfill on web by @charpeni in #456
- Only default export is available soon by @charpeni in #458
New Contributors
- @plbrault made their first contribution in #442
- @staltz made their first contribution in #413
- @raykle made their first contribution in #444
Full Changelog: v1.3.0...v2.0.0