Skip to content

Commit 29ea831

Browse files
MichaelVerdonmikehardy
authored andcommitted
fix(app): firebase-js-sdk bump 11.3.1 > 11.10.0
note: firebase-js-sdk firestore new versions have started using 'URL.hostname', but this is not implemented in react-native until react-native 0.80 so we need a URL polyfill in order to support it
1 parent 42f7194 commit 29ea831

File tree

4 files changed

+482
-3
lines changed

4 files changed

+482
-3
lines changed

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"react-native": "*"
5858
},
5959
"dependencies": {
60-
"firebase": "11.3.1"
60+
"firebase": "11.10.0"
6161
},
6262
"devDependencies": {
6363
"@react-native-async-storage/async-storage": "^2.1.2",

packages/firestore/lib/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ import version from './version';
4343
import fallBackModule from './web/RNFBFirestoreModule';
4444
import FirestorePersistentCacheIndexManager from './FirestorePersistentCacheIndexManager';
4545

46+
// react-native at least through 0.77 does not correctly support URL.host, which
47+
// is needed by firebase-js-sdk. It appears that in 0.80+ it is supported, so this
48+
// (and the package.json entry for this package) should be removed when the minimum
49+
// supported version of react-native is 0.80 or higher.
50+
import 'react-native-url-polyfill/auto';
51+
4652
const namespace = 'firestore';
4753

4854
const nativeModuleName = [

packages/firestore/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"realtime",
2727
"firestore"
2828
],
29+
"dependencies": {
30+
"react-native-url-polyfill": "2.0.0"
31+
},
2932
"peerDependencies": {
3033
"@react-native-firebase/app": "22.2.1"
3134
},

0 commit comments

Comments
 (0)