Skip to content

Commit 4bf7d07

Browse files
committed
Export util package and a few misc fixes
1 parent 0c70368 commit 4bf7d07

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ A set of reusable [React Hooks](https://reactjs.org/docs/hooks-intro.html) for [
55
[![npm version](https://img.shields.io/npm/v/react-firebase-hooks.svg?style=flat-square)](https://www.npmjs.com/package/react-firebase-hooks)
66
[![npm downloads](https://img.shields.io/npm/dm/react-firebase-hooks.svg?style=flat-square)](https://www.npmjs.com/package/react-firebase-hooks)
77

8-
This documentation is for v4 of React Firebase Hooks which makes the package compatible with Firebase v9 and drops support for previous versions of Firebase - more details [here](https://github.com/CSFrequency/react-firebase-hooks/releases/tag/v4.0.0).
8+
This documentation is for v5 of React Firebase Hooks which requires Firebase v9 or higher.
99

10+
- For v3 documentation (Firebase v9), see [here](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2).
1011
- For v3 documentation (Firebase v8), see [here](https://github.com/CSFrequency/react-firebase-hooks/tree/v3.0.4).
1112
- For v2 documentation, see [here](https://github.com/CSFrequency/react-firebase-hooks/tree/v2.2.0).
1213

@@ -28,18 +29,18 @@ This assumes that you’re using the [npm](https://npmjs.com) or [yarn](https://
2829

2930
## Why?
3031

31-
There has been a **lot** of hype around React Hooks, but this hype merely reflects that there are obvious real world benefits of Hooks to React developers everywhere.
32-
3332
This library explores how React Hooks can work to make integration with Firebase even more straightforward than it already is. It takes inspiration for naming from RxFire and is based on an internal library that we had been using in a number of apps prior to the release of React Hooks. The implementation with hooks is 10x simpler than our previous implementation.
3433

35-
## Upgrading from v3 to v4
34+
## Upgrading from v4 to v5
3635

37-
To upgrade your project from v3 to v4 check out the [Release Notes](https://github.com/CSFrequency/react-firebase-hooks/releases/tag/v4.0.0) which have full details of everything that needs to be changed.
36+
To upgrade your project from v4 to v5 check out the [Release Notes](https://github.com/CSFrequency/react-firebase-hooks/releases/tag/v5.0.0) which have full details of everything that needs to be changed.
3837

3938
## Documentation
4039

41-
- [Auth Hooks](/auth)
40+
- [Authentication Hooks](/auth)
4241
- [Cloud Firestore Hooks](/firestore)
42+
- [Cloud Functions Hooks](/functions)
43+
- [Cloud Messaging Hooks](/messaging)
4344
- [Cloud Storage Hooks](/storage)
4445
- [Realtime Database Hooks](/database)
4546

auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ List of Auth hooks:
2323
- [useUpdateEmail](#useupdateemail)
2424
- [useUpdatePassword](#useupdatepassword)
2525
- [useUpdateProfile](#useupdateprofile)
26-
- [useSendPasswordResetEmaili](#usesendpasswordresetemail)
26+
- [useSendPasswordResetEmail](#usesendpasswordresetemail)
2727
- [useSendEmailVerification](#usesendemailverification)
2828

2929
### useAuthState

messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"name": "react-firebase-hooks/messaging",
33
"main": "dist/index.cjs.js",
44
"module": "dist/index.esm.js",
5-
"typings": "dist/functions/index.d.ts"
5+
"typings": "dist/messaging/index.d.ts"
66
}

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-firebase-hooks",
3-
"version": "5.0.0-alpha.1",
3+
"version": "5.0.0-alpha.3",
44
"description": "React Hooks for Firebase",
55
"author": "CS Frequency Limited (https://csfrequency.com)",
66
"license": "Apache-2.0",
@@ -35,15 +35,18 @@
3535
"functions/dist/*.js.flow",
3636
"functions/package.json",
3737
"messaging/dist/*.js",
38-
"messaging/dist/functions",
38+
"messaging/dist/messaging",
3939
"messaging/dist/util",
4040
"messaging/dist/*.js.flow",
4141
"messaging/package.json",
4242
"storage/dist/*.js",
4343
"storage/dist/storage",
4444
"storage/dist/util",
4545
"storage/dist/*.js.flow",
46-
"storage/package.json"
46+
"storage/package.json",
47+
"util/dist/*.js",
48+
"util/dist/util",
49+
"util/package.json"
4750
],
4851
"repository": {
4952
"type": "git",

rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import firestorePkg from './firestore/package.json';
1212
import functionsPkg from './functions/package.json';
1313
import messagingPkg from './messaging/package.json';
1414
import storagePkg from './storage/package.json';
15+
import utilPkg from './util/package.json';
1516

1617
const pkgsByName = {
1718
auth: authPkg,
@@ -20,6 +21,7 @@ const pkgsByName = {
2021
functions: functionsPkg,
2122
messaging: messagingPkg,
2223
storage: storagePkg,
24+
util: utilPkg,
2325
};
2426

2527
const plugins = [
@@ -30,7 +32,6 @@ const plugins = [
3032
commonjs(),
3133
];
3234

33-
const peerDependencies = pkg.peerDependencies || {};
3435
const external = [
3536
...Object.keys(pkg.peerDependencies),
3637
'firebase/auth',
@@ -39,6 +40,7 @@ const external = [
3940
'firebase/functions',
4041
'firebase/messaging',
4142
'firebase/storage',
43+
'firebase/util',
4244
];
4345

4446
const components = [
@@ -48,6 +50,7 @@ const components = [
4850
'functions',
4951
'messaging',
5052
'storage',
53+
'util',
5154
];
5255

5356
export default components

util/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "react-firebase-hooks/util",
33
"main": "dist/index.cjs.js",
4-
"module": "dist/index.esm.js"
4+
"module": "dist/index.esm.js",
5+
"typings": "dist/util/index.d.ts"
56
}

0 commit comments

Comments
 (0)