Skip to content

Releases: CyCraft/magnetar

v1.2.9

10 Feb 22:00
Compare
Choose a tag to compare
  • chore: release v1.2.9 (ecb6b39)
  • chore: release v1.2.8 (0b9c3d5)
  • chore: update dependencies (3dce8a3)
  • fix: styles (3cf3fea)
  • docs: add description (97124a7)
  • chore: tweak footer (665c96f)
  • fix: add test for FieldValue.increment to plugin-firestore-admin (#123) (c0910d1)
  • chore: release v1.2.7 (25b63ad)
  • fix: correctly import path-to-prop (0e9bbad)
  • chore: cleanup (4384b1c)
  • chore: try bump for package-lock (0ee5f3b)
  • chore: update dependencies (e806d8f)
  • chore: release v1.2.6 (21a50c7)
  • chore: npm i (348d6b4)
  • fix: should only do unwrapStoreSplits for the object with constructo… (#122) (02402f2)
  • chore: release v1.2.5 (1956c9b)
  • fix: re-export styles (f5fe3c7)
  • chore: release v1.2.4 (0675efe)
  • fix: storeSplit usage in hooks (ef1dd5a)
  • test: add test (3c4b457)
  • test: add test (ebfa20e)
  • feat: add test (1c8fe15)
  • chore: release v1.2.3 (b5a2a9c)
  • fix: allow storeSplit to be used in hooks (788a01f)
  • chore: release v1.2.2 (1d75d87)
  • fix: issues on production in host apps (90c7643)

Full Changelog: v1.2.1...v1.2.9

v1.2.1

03 Jun 16:46
Compare
Choose a tag to compare

see CHANGELOG

05 Oct 10:08
Compare
Choose a tag to compare

Breaking: closing streams

22 Sep 12:52
Compare
Choose a tag to compare

highly improved the way streams can be closed. MUCH easier to use syntax now!!

breaking changes

stream

Before:

magnetar.collection('my-collection').stream()

// close stream:
const closeStream = magnetar.collection('my-collection').openStreams.get(undefined)
closeStream()

After:

magnetar.collection('my-collection').stream()

// close stream:
magnetar.collection('my-collection').closeStream()

See the new docs at: https://magnetar.cycraft.co/docs#stream-realtime-updates

Breaking: update return types for fetch and write actions.

12 May 04:21
Compare
Choose a tag to compare

breaking changes

fetch

fetch() now returns the fetched data immediately:

Before:

const myModule = await magnetar.collection('my-collection').doc('my-doc').fetch()
const data = myModule.data

After:

const data = await magnetar.collection('my-collection').doc('my-doc').fetch()

// or

const myModule = magnetar.collection('my-collection').doc('my-doc')
await myModule.fetch()
const data = myModule.data

merge, assign, replace, deleteProp

Before:

const myModule = await magnetar.collection('my-collection').doc('my-doc').merge({ key: 'value' })

myModule // the same `doc('my-doc')` ref

After:

const newData = await magnetar.collection('my-collection').doc('my-doc').merge({ key: 'value' })

newData // the modified data after `merge()`

delete

Before:

const myModule = await magnetar.collection('my-collection').doc('my-doc').delete()

myModule // the same `doc('my-doc')` ref

After:

const result = await magnetar.collection('my-collection').doc('my-doc').merge({ key: 'value' })

result // undefined

@magnetarjs/[email protected]

14 Apr 15:57
Compare
Choose a tag to compare

@magnetarjs/plugin-firestore: 0.1.0

breaking change:

You need to pass Firebase instance now, as opposed to the Firestore instance.

Eg.

// ---------------------------------------------
// 0. Make sure firebase is instantialized BEFORE magnetar
// ---------------------------------------------
import firebase from 'firebase/app'
import 'firebase/firestore'

firebase.initializeApp({
  // ...
})

// ---------------------------------------------
// 1. the plugin firestore for remote data store
// ---------------------------------------------
import { CreatePlugin as PluginFirestore } from '@magnetarjs/plugin-firestore'
import firebase from 'firebase/app'

// create the remote store plugin instance:
const remote = PluginFirestore({ firebase })