Releases: prescottprue/react-redux-firebase
Releases · prescottprue/react-redux-firebase
v2.0.0-beta.15
- feat(auth):
UNLOAD_PROFILE
is dispatched whenlogin
action creator is called - #301 - feat(auth):
signInWithPhoneNumber
action creator added - #319 - fix(firebaseConnect): function passed receives consistent arguments regardless of lifecycle - #320
- fix(query):
queryId
now includesstoreAs
to fix issue with listeners - #294 - fix(populate): ordered (array data) correctly populating - #239 - thanks @0x80
- fix(reducer): property removed from profile is removed from state - thanks @fej-snikduj
- fix(docs): inconsistencies in redux-auth-wrapper example - #325
v2.0.0-beta.14
- fix(typings): Updated type definitions - #311
- fix(populate): dispatch for errors during profile population - #312
- feat(firebaseConnect):
store
is passed as second argument offirebaseConnect
- #278 - feat(firestoreConnect):
store
is passed as second argument offirestoreConnect
- fix(query):
dispatchRemoveAction
is nowfalse
by default - prevents multiple state updates when callingremove
if listener associated is attached
Potentially Breaking
store
being passed as second argument offirebaseConnect
(andfirestoreConnect
), which means any components using that second argument will break (most commonly used for gettinguid
). To accessuid
or other info from redux state, usestore.getState()
like so:
firebaseConnect(
(props, store) => {
const { firebase: { auth } } = store.getState()
// be careful, listeners are not re-attached when auth state changes unless props change
return [{ path: `todos/${auth.uid || ''}` }]
}
)
More details are included in the migration guide.
v2.0.0-beta.13
- fix(reducers): add
EMPTY_AUTH_CHANGE
case to Profile Reducer - #305 - feat(constants):
enableEmptyAuthChanges
config option replaced bypreserveOnEmptyAuthChange
- #305 - feat(docs):
promiseEvents
added to SSR docs - #299 - feat(profile):
autoPopulateProfile
support for v2 (stilldisabled
by default) - fix(presence): support presence option on
react-native-firebase
versions withoutsetPriority
onRNFirebase.database.ThenableReference
- #267 - fix(core):
withFirebase
now works for all main methods - feat(examples): material example updated to be much more simple (uses mostly functional components over classes)
v2.0.0-beta.12
- feat(core):
recompose
used forwithFirebase
andwithFirestore
HOCs - feat(core):
promiseEvents
method added. Similar tofirebaseConnect
, but not a React Higher Order Component - #299 - thanks @marekolszewski - feat(core):
redux-firestore
is no longer included and is now an optionalDependency (increased bundle size too much) - feat(helpers):
getVal
added to simplify migration from v1 to v2 (can easily replacedataToJS
) - #305 - thanks @fej-snikduj - feat(reducer): added error to clearly indicate wrong initial state being passed to
errors
state - feat(reducer):
preserve
now supports passing an object to preserveauth
,profile
,errors
, andordered
- feat(reducer): clear error is thrown if an invalid initial state is passed to errorsReducer (i.e. setting
errors: null
in initial state instead oferrors: []
) - requested on gitter - feat(docs): Firestore setup instructions switched to using
redux-firestore
externally - feat(examples): firestore example uses
redux-firestore
directly (since it is no longer included) - fix(reducer):
LOGIN_ERROR
action no longer affectsprofile
state (fixes consistence ofisLoaded
andisEmpty
states) - #301 - fix(typings): remove an artifact from a previous merge conflict - #304 - thanks @cbellino
- fix(reducer):
authError
state is nownull
by default (tests changed to match) - fix(examples): examples all point to
next
tag for consistency - fix(examples): snippets README.md files updated
- fix(examples):
tests
folder removed from material example
Potentially Breaking
Only really potentially breaking for v2.0.0 series. Please reach out if things do actually break, the goal is to not have this happen at all costs.
authError
state is nownull
by default instead of{}
- this is more clear, and more closely resemblesv1.*.*
profile
state only showsisLoaded
when it is loaded (i.e. not affected byLOGIN_ERROR
) - #301
v1.5.1
- fix(populate):
ordered
set for populate - fix(populate):
ordered
correctly set tonull
when empty (instead ofundefined
which could causeisLoaded
to be incorrect) - feat(query):
ordered
correctly set when usingpopulate
- fix(query): Return Promise rejection to
watchEvent
for once queries - feat(auth):
disableEmptyAuthDispatch
config option added for disabling dispatch ofLOGOUT
action when auth updates withnull
- #115 - feat(docs):
api-docs-upload
util added from v2.0.0 (for uploading different versions of docs) - feat(examples):
watchEvent
snippet added to show querying outside offirebaseConnect
(i.e. "lazy querying") - #232
v2.0.0-beta.11
- fix(populate): missing childKey causes no population - #277 (thanks @JeremyPlease)
- feat(firestore):
firestoreConnect
- React HOC that sets listeners to Cloud Firestore (similar tofirebaseConnect
, but for Cloud Firestore instead of Real Time Database) - #286 - feat(firestore):
firestoreReducer
is exported fromredux-firestore
included to handle managingfirestore
state - #286 - feat(core):
withFirebase
- React HOC for just passingprops.firebase
(firebaseConnect
without any listener management) - feat(docs): Firestore page added to docs (outlining usage of
firestoreConnect
andsetListener
) - feat(examples): Firestore complete example added
- feat(docs): README and Query examples simplified + improved
- feat(docs): FAQ moved to its own docs page
v2.0.0-beta.10
- bugfix(auth):
auth.isLoaded
set totrue
onAUTH_EMPTY_CHANGE
action dispatch - #290 - feat(storage): customizable file name with
uploadFile
anduploadFiles
throughname
option (can be String or Function) - #285 - bugfix(query):
remove
dispatchesREMOVE
action type with associated reducer case - #257 - feat(query):
remove
accepts an options object as third argument - feat(query):
remove
now hasdispatchAction
option for disabling dispatch of newREMOVE
action type - feat(query):
dispatchRemoveAction
config option add for global control of dispatching when callingremove
v2.0.0-beta.9
- feat(auth):
reloadAuth
added for reloading auth (callsfirebase.auth().currentUser.reload()
) - #273 - feat(auth):
linkWithCredential
added for linking auth with credential - #268 - feat(auth):
store.firebaseAuthIsReady
is now added byreactReduxFirebase
store enhancer - promise that resolves once auth state is ready - #264 - feat(auth):
authIsReady
promise added for waiting for auth to be ready - #264 - feat(queries):
ordered
always set asnull
instead ofundefined
- fixes possible issue ofisLoaded
not always being correct - feat(core):
firebaseStateName
constant - assumed name of firebase state to be used inauthIsReady
- feat(core):
attachAuthIsLoaded
constant - boolean for enabling/disabling the
attaching offirebaseAuthIsReady
to store (true
by default) - feat(build):
yarn.lock
removed - npm5 is faster - fix(build):
v2.0.0
branch added to travis config (so v2.0.0 pushes/merges are built) - fix(build):
babel-preset-env
used in place ofbabel-preset-es2015
(fixes deprecation warning)
NOTE v2.0.0 pre-releases are now made available on the next
tag instead of the canary
tag
v1.5.0
🍾 🥂 🎆
Breaking Changes
browser
field has been removed frompackage.json
which means commonJS build is used instead ofUMD
build from Webpack (much smaller)- [firebaseConnect] Uses
prop-types
instead of importing from React - #122
Core
- [firebaseConnect] Allow usage of different stores in
firebaseConnect
- #148, #29 - [firebaseConnect] statics are now hoisted thanks to
hoist-non-react-statics
- [firebaseConnect] exposed
createFirebaseConnect
for creatingfirebaseConnect
HOCs connected to different stores - [auth]
login
method supportscredential
parameter (with matching docs and tests updates) - [auth] deprecation warning added for
token
andprovider
combo inlogin
method - [auth] Adds
updateProfile
,updateAuth
, andupdateEmail
methods that dispatch associated start/success/failure actions - [helpers]
deleteFile
method response no longer includesdbPath
if it is undefined (test added to check this case) - [helpers] No more race condition with
uniqueSet
- #207 - [typescript] Typescript typings - #142, #214
- [query]
watchEvent
accepts options object as third argument - [populate] Lodash path syntax support - #132
- [populate] accept a function for populate for item based populate config - #132
- [populate] Profile population (
profileParamsToPopulate
) supports single item and list population - #203 - [storage]
uploadFile
anduploadFiles
no longer track progress by default (storageRef.put
called directly) - [config] Usage of
profileFactory
is wrapped in try/catch to handle and reject errors within provided factory function - [config]
distpatchOnUnsetListener
spelling fixed to bedispatchOnUnsetListener
(depreciation warning added along with a test confirm it is displayed) - [config]
enableEmptyAuthChanges
config option added - #137
Build
- Firebase is now an external in Webpack config (shrinks UMD build size)
.npmignore
expanded to include more files that do not needed to be included in published version (including.babelrc
which can cause build errors).babelrc
settings are now environment specific (decorators only used in testing)babel-preset-stage-1
removed (unnecessary).eslintrc
added to tests folder which contains globals that are only necessary for testing (simplifies top level eslint config).eslintrc
file now using yaml format instead of JSON format (easier to read)async/await
added to unit tests- Webpack 2
firebase-server
used in tests instead of connecting to a real Firebase instance
Docs
- Query docs updated with
storeAs
andkeyProp
query options redux-persist
recipe added
v1.5.0-rc.5
🎆 Final v1.5.0 Release Candidate! 🎆
Unless there are any hiccups, v1.5.0 release to @latest will be in 8-12 days
watchEvent
accepts options object as third argumentasync/await
capability added to unit tests- Material example updated with new build setup including Webpack 3
npm run test
andnpm run test:cov
commands are now consistentpackage-lock.json
added