Releases: charpeni/react-native-url-polyfill
v2.0.0
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
v1.3.0
v1.2.0
This is a significant release that improved the stability of react-native-url-polyfill
by making sure it's working well on older versions of React Native and newer as well. As always, this is backed by Detox tests. 🎉
- Added Detox tests for React Native 0.62 (#185 by @charpeni).
- Added support for React Native 0.59, 0.60—probably earlier versions as well—and Detox tests for RN 0.60 (#186 by @charpeni, see #154 for further info, and thanks to @chrisbobbe for reporting it).
- Added
buffer
as a dependency ofwhatwg-url-without-unicode
, instead of relying on a global definition (charpeni/whatwg-url#3 and #189 by @chrisbobbe). - Added
punycode
as a dependency ofwhatwg-url-without-unicode
(#200, thanks to @donavon for reporting it in #140). - Fixed an incompatibility issue with iOS 10's JavaScript Core (#203 by @charpeni, thanks to @xseignard for reporting it in #190).
- Added Detox tests for React Native 0.63 (#207 by @charpeni).
Thanks to everyone who reported issues and contributed to it. 👏