Releases: feathersjs-ecosystem/feathers-vuex
accidental release
Because sometimes I don't npm very well. 🤷♂
Preserve reactivity after saving new records & export `d.ts` files
It includes better support for maintaining reactivity during the "new record to persisted record" workflow in every app. Thanks to a community contribution, the published version now includes d.ts files from the TypeScript build.
Fix `initAuth` (Nuxt utility) for Feathers V4
Fix: initAuth utility updated for Feathers V4
This fixes the initAuth
utility for SSR when the feathersClient is provided as one of the options. It now calls Feathers Authentication V4 methods.
Some tests have also been added to the find
actions to cover the $limit
query operator.
Fix new/temp records getting added to the store
This fixes the ability to create new model instances without needing to provide any arguments to the constructor.
Calling new MyModelClass()
without providing any arguments was not resulting in any temp records getting added to the store. For cases where an empty object was provided, the tempId was not getting properly assigned.
This means that these two are now equivalent:
new User()
new User({})
README.md update for NPM
No API changes with this patch release. The README.md file has been updated to correct the docs URL change.
Docs are now found at https://feathers-vuex.netlify.com.
Fix nested promise on Model
The BaseModel's static methods for actions were specified as async
, and they were also returning a promise. This double-promise wrapper was always returning undefined
. They are no longer specified as async
, and still return a promise.
Allow setting serverAlias of auth plugin
More details in this commit: 3009021
Fix bug with checking for `id` field
The getId
utility function has been updated to check the prototype chain for the id
property.
/**
* Get the id from a record in this order:
* 1. id
* 2. _id
* 3. the `idField`
* @param item
*/
export function getId(item, idField) {
if (!item) {
return
}
if (item.id != null || item.hasOwnProperty('id')) {
return item.id
}
if (item._id != null || item.hasOwnProperty('_id')) {
return item._id
}
if (item[idField] != null || item.hasOwnProperty(idField)) {
return item[idField]
}
}
Official [email protected] release
Since the 2.0.0 version was accidentally published on the prerelease tag (on npm), this is the official first release of Feathers-Vuex 2.x!
See the PR for details about what has changed: #216