Releases: prescottprue/react-redux-firebase
Releases · prescottprue/react-redux-firebase
v2.0.0-beta.15
- feat(auth):
UNLOAD_PROFILEis dispatched whenloginaction creator is called - #301 - feat(auth):
signInWithPhoneNumberaction creator added - #319 - fix(firebaseConnect): function passed receives consistent arguments regardless of lifecycle - #320
- fix(query):
queryIdnow includesstoreAsto 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):
storeis passed as second argument offirebaseConnect- #278 - feat(firestoreConnect):
storeis passed as second argument offirestoreConnect - fix(query):
dispatchRemoveActionis nowfalseby default - prevents multiple state updates when callingremoveif listener associated is attached
Potentially Breaking
storebeing passed as second argument offirebaseConnect(andfirestoreConnect), which means any components using that second argument will break (most commonly used for gettinguid). To accessuidor 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_CHANGEcase to Profile Reducer - #305 - feat(constants):
enableEmptyAuthChangesconfig option replaced bypreserveOnEmptyAuthChange- #305 - feat(docs):
promiseEventsadded to SSR docs - #299 - feat(profile):
autoPopulateProfilesupport for v2 (stilldisabledby default) - fix(presence): support presence option on
react-native-firebaseversions withoutsetPriorityonRNFirebase.database.ThenableReference- #267 - fix(core):
withFirebasenow 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):
recomposeused forwithFirebaseandwithFirestoreHOCs - feat(core):
promiseEventsmethod added. Similar tofirebaseConnect, but not a React Higher Order Component - #299 - thanks @marekolszewski - feat(core):
redux-firestoreis no longer included and is now an optionalDependency (increased bundle size too much) - feat(helpers):
getValadded 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
errorsstate - feat(reducer):
preservenow 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: nullin initial state instead oferrors: []) - requested on gitter - feat(docs): Firestore setup instructions switched to using
redux-firestoreexternally - feat(examples): firestore example uses
redux-firestoredirectly (since it is no longer included) - fix(reducer):
LOGIN_ERRORaction no longer affectsprofilestate (fixes consistence ofisLoadedandisEmptystates) - #301 - fix(typings): remove an artifact from a previous merge conflict - #304 - thanks @cbellino
- fix(reducer):
authErrorstate is nownullby default (tests changed to match) - fix(examples): examples all point to
nexttag for consistency - fix(examples): snippets README.md files updated
- fix(examples):
testsfolder 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.
authErrorstate is nownullby default instead of{}- this is more clear, and more closely resemblesv1.*.*profilestate only showsisLoadedwhen it is loaded (i.e. not affected byLOGIN_ERROR) - #301
v1.5.1
- fix(populate):
orderedset for populate - fix(populate):
orderedcorrectly set tonullwhen empty (instead ofundefinedwhich could causeisLoadedto be incorrect) - feat(query):
orderedcorrectly set when usingpopulate - fix(query): Return Promise rejection to
watchEventfor once queries - feat(auth):
disableEmptyAuthDispatchconfig option added for disabling dispatch ofLOGOUTaction when auth updates withnull- #115 - feat(docs):
api-docs-uploadutil added from v2.0.0 (for uploading different versions of docs) - feat(examples):
watchEventsnippet 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):
firestoreReduceris exported fromredux-firestoreincluded to handle managingfirestorestate - #286 - feat(core):
withFirebase- React HOC for just passingprops.firebase(firebaseConnectwithout any listener management) - feat(docs): Firestore page added to docs (outlining usage of
firestoreConnectandsetListener) - 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.isLoadedset totrueonAUTH_EMPTY_CHANGEaction dispatch - #290 - feat(storage): customizable file name with
uploadFileanduploadFilesthroughnameoption (can be String or Function) - #285 - bugfix(query):
removedispatchesREMOVEaction type with associated reducer case - #257 - feat(query):
removeaccepts an options object as third argument - feat(query):
removenow hasdispatchActionoption for disabling dispatch of newREMOVEaction type - feat(query):
dispatchRemoveActionconfig option add for global control of dispatching when callingremove
v2.0.0-beta.9
- feat(auth):
reloadAuthadded for reloading auth (callsfirebase.auth().currentUser.reload()) - #273 - feat(auth):
linkWithCredentialadded for linking auth with credential - #268 - feat(auth):
store.firebaseAuthIsReadyis now added byreactReduxFirebasestore enhancer - promise that resolves once auth state is ready - #264 - feat(auth):
authIsReadypromise added for waiting for auth to be ready - #264 - feat(queries):
orderedalways set asnullinstead ofundefined- fixes possible issue ofisLoadednot always being correct - feat(core):
firebaseStateNameconstant - assumed name of firebase state to be used inauthIsReady - feat(core):
attachAuthIsLoadedconstant - boolean for enabling/disabling the
attaching offirebaseAuthIsReadyto store (trueby default) - feat(build):
yarn.lockremoved - npm5 is faster - fix(build):
v2.0.0branch added to travis config (so v2.0.0 pushes/merges are built) - fix(build):
babel-preset-envused 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
browserfield has been removed frompackage.jsonwhich means commonJS build is used instead ofUMDbuild from Webpack (much smaller)- [firebaseConnect] Uses
prop-typesinstead 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
createFirebaseConnectfor creatingfirebaseConnectHOCs connected to different stores - [auth]
loginmethod supportscredentialparameter (with matching docs and tests updates) - [auth] deprecation warning added for
tokenandprovidercombo inloginmethod - [auth] Adds
updateProfile,updateAuth, andupdateEmailmethods that dispatch associated start/success/failure actions - [helpers]
deleteFilemethod response no longer includesdbPathif it is undefined (test added to check this case) - [helpers] No more race condition with
uniqueSet- #207 - [typescript] Typescript typings - #142, #214
- [query]
watchEventaccepts 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]
uploadFileanduploadFilesno longer track progress by default (storageRef.putcalled directly) - [config] Usage of
profileFactoryis wrapped in try/catch to handle and reject errors within provided factory function - [config]
distpatchOnUnsetListenerspelling fixed to bedispatchOnUnsetListener(depreciation warning added along with a test confirm it is displayed) - [config]
enableEmptyAuthChangesconfig option added - #137
Build
- Firebase is now an external in Webpack config (shrinks UMD build size)
.npmignoreexpanded to include more files that do not needed to be included in published version (including.babelrcwhich can cause build errors).babelrcsettings are now environment specific (decorators only used in testing)babel-preset-stage-1removed (unnecessary).eslintrcadded to tests folder which contains globals that are only necessary for testing (simplifies top level eslint config).eslintrcfile now using yaml format instead of JSON format (easier to read)async/awaitadded to unit tests- Webpack 2
firebase-serverused in tests instead of connecting to a real Firebase instance
Docs
- Query docs updated with
storeAsandkeyPropquery options redux-persistrecipe 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
watchEventaccepts options object as third argumentasync/awaitcapability added to unit tests- Material example updated with new build setup including Webpack 3
npm run testandnpm run test:covcommands are now consistentpackage-lock.jsonadded