Skip to content

Releases: mesqueeb/vuex-easy-firestore

Fillables & guard improved! 🐳

15 Dec 15:42
5abd35f
Compare
Choose a tag to compare

Vuex easy firestore now supports nested fields for fillables & guard!

Nested usage

In the example below we will prevent the nested field called notAllowed from being synced:

const docToPatch = {nested: {allowed: true, notAllowed: true}}

// in your module config, either set the fillables like so:
fillables: ['nested.allowed']

// OR set your guard like so:
guard: ['nested.notAllowed']

Wildcard usage

You can also use wildcards now!

In this example you have a document with an object called lists. The lists each have an id as the key, and a nested property you want to prevent from being synced:

const docToPatch = {
  lists: {
    'list-id1': {allowed: true, notAllowed: true},
    'list-id2': {allowed: true, notAllowed: true}
  }
}

// in your module config, either set the fillables like so:
fillables: ['lists.*.allowed']

// OR set your guard like so:
guard: ['lists.*.notAllowed']

Enjoy! 💫

Bojack 🐴

30 Nov 10:16
76874f8
Compare
Choose a tag to compare

Phew! A lot has happened over the past few weeks!
Lots of requests, bug fixes and new features!

  • support arrayUnion and arrayRemove 🐥 (see documentation)
  • can now disable auto gen. fields. 🦞 (see documentation)
  • Update hooks documentation 🦆 (see documentation)
  • Allow updating filters on openDBChannel 🦈 (see #87)
  • Multiple pathVars in where filters 🐙 (see #86)

Auto gen. fields

updated_at, updated_by, created_at, created_by, id can all be disabled now by adding them to guard.

Hooks!

Be careful of the execution timing of hooks!! I have carefully updated the documentation on the timings. There are some "gotcha's" in there, so recommended for all to double check the docs!

arrayUnion and arrayRemove

I made it so it's very similar to the usage with Firestore! Hurray!

Enjoy!! ☃️

Duplicating all day long! 👭👬

14 Oct 10:38
d4f4f73
Compare
Choose a tag to compare

Time for some new stuff! 🌱

Improved documentation 🛫

Enjoy!! 🚤

Critical fixes 🐡

11 Oct 04:44
57160ef
Compare
Choose a tag to compare

It's recommended for everyone to update to the latest version!

npm i vuex-easy-firestore@latest
// or
yarn add vuex-easy-firestore@latest

There have been several critical issues fixed related to:

  • '%convertTimestamp%' see documentation here
  • Usage of Firestore reference fields #55
  • Multiple Firestore collections, with quick inserts behind one another failing #50
  • custom pathVariables #59

TypeScript

Excited to announce that I've converted the codebase to TypeScript! Giving some awesome feedback for all of you TypeScripters out there!!

Enjoy!! 🐯

Make Firebase a peer dependency 🦁

27 Sep 09:24
0bb2d93
Compare
Choose a tag to compare

Peer pressure 👥

I made Firebase a peer dependency to make sure there is no version difference causing potential bugs.

New users will need to use the following install method going forward:

npm i vuex-easy-firestore firebase

Console logging control 🎙

23 Sep 08:43
3e40246
Compare
Choose a tag to compare

All new documentation with VuePress! 📗

If you haven't seen it yet, I've made an all now documentation website! Check it out here!!

Also see the blog post I wrote on Medium!

Logging 📌

Changed the behaviour that console logging on API calls is now turned off by default.
It can be enabled like so:

import createEasyFirestore from 'vuex-easy-firestore'
const easyFirestore = createEasyFirestore(userDataModule, {logging: true}) // here

store: {
  plugins: [easyFirestore]
}

Updated the relevant documentation.

Enjoy!! 🎇

fetchAndAdd action 🎢

10 Sep 14:14
373b441
Compare
Choose a tag to compare

Whoah! Two new updates in 1 day! : D

New! 🌱

You can now use the all new fetchAndAdd action!

Please read the updated documentation on fetching to see how.

Also see the other new update (v1.10.0) below!

Enjoy 🌆

Auto convert firebase Timestamps! 🕰

10 Sep 11:00
ff80f19
Compare
Choose a tag to compare

New! 🌱

You can set '%convertTimestamp%' as a default value to automatically convert Firestore Timestamps' to new Date() objects!
Please read the updated documentation on defaultValues to see how.

Enjoy 🌇

custom variables for firestorepath and filters 🐸

03 Sep 15:37
d7626f5
Compare
Choose a tag to compare

v1.8.0 introduced a bug related to fillables which has been fixed. 🐞

New! 🌱

Since v1.9.0 you can use `'{userId}' in the where filter as well as any other custom variable you can set!

(closes #23 and #28)

This is useful in cases like eg.:
You have custom groups per user; You need a user's groupId from the user's document, to use that value in the firestorePath (like groups/{groupId}/users/{userId}/data) to this other document to retrieve more information.

Please see the docs here.

Enjoy! 🌻

Jolly days 🕺🏼

26 Aug 10:03
3499830
Compare
Choose a tag to compare

New features

  • support '{userId}' in 3rd param of sync.where filter 🐯 (#23)
  • Improvements to batch actions, see here
    • new insertBatch action 🦖
    • separate hooks for batch actions, see here.
  • Great improvements to error handling & warning the dev when there are wrong config options passed

Enjoy! 🌞