Skip to content

Releases: marshallswain/feathers-pinia

v4.5.4

24 May 03:36
Compare
Choose a tag to compare

What's Changed

  • fix: handle unpaginated find response by @jd1378 in #172

Full Changelog: v4.5.3...v4.5.4

v4.4.1

14 Apr 17:54
70083e4
Compare
Choose a tag to compare

What's Changed

  • Add support to pass params to create method. by @dallinbjohnson in #165
  • fix: prevent client from emitting the events back to server by @jd1378 in #166
  • fix: allow custom types for User and export AuthenticateData by @jd1378 in #168
  • feat(normalize-find): provide default context.result for find by @MajesticPotatoe in #153

New Contributors

Full Changelog: v4.2.6...v4.4.1

fix: refactor dynamic nested computed in useAuth

10 Mar 10:36
356eefd
Compare
Choose a tag to compare

It's possible that the nested dynamic computed is breaking reactivity. The nested computed has been replaced with a direct reference to the stored value in itemsById.

fix: internal `byId` storage now uses `ref`

10 Mar 10:21
709358a
Compare
Choose a tag to compare

Some reactivity in Pinia breaks when you use reactive instead of ref. This update switched the byId object to use a ref to fix reactivity.

🎁 useBackup, New Relationship Utils, Bye Bye storeAssociated, Shared Stores, and Proxy Services

12 Feb 05:09
307cd4a
Compare
Choose a tag to compare

🎁 useBackup

The new useBackup utility is the opposite of working with clones. Instead of binding your form to a clone, you use
the original record. It keeps a copy, letting you call backup or restore to revert changes. The save method
auto-diffs from the backup, keeping data size to a minimum.

🎁 New Relationship Utilities

New methods have been added to the FeathersPinia Client. These utilities can be used inside setupInstance functions to
help form relationships between services:

🔥 storeAssociated Deprecated

As of Feathers-Pinia v4.2, the storeAssociated utility has been replaced with a suite of smaller, more-flexible,
single-purpose utilities. See Data Modeling for the new way to store associated data.

🎁 Share Stores Between Services

The PiniaServiceConfig interface now accepts a storeName string. storeName {String} is the name of the store to use for the service. It defaults to service:${servicePath}. You can also use storeName to make two services share the same store.

🎁 Proxy Services

The PiniaServiceConfig interface now also accepts an instanceServicePath string. The instanceServicePath {String} overrides the service used for instance-level service methods, like patch, and remove. This is useful for "proxy" services. For example: pages/full loads the page record with populated data, but you want to patch/remove the record through the pages service.

Also New

  • Expose the diff util: the internal diff utility is now available in the exports.

Fixes

  • Fixes an issue with Cloudflare Workers compatibility (which do not support EventEmitter)
  • The useFind internal watch now uses flush: 'sync' to prevent an infinite loop during SSR.

🔥 Revert the bug that the last bug "fix" caused.

18 Aug 02:51
db2d43b
Compare
Choose a tag to compare

It turns out that faulty conditional was saving us from a more serious problem. It caused a large fire when my CPU went up in flames. Just kidding. It just wasn't a simple fix, after all.

Reverts the changes made in this release: https://github.com/marshallswain/feathers-pinia/releases/tag/v3.0.6

🐜 Addresses a faulty conditional for find responses

18 Aug 02:44
a6095e3
Compare
Choose a tag to compare

Intended to solve the find response not being handled, as described in this issue: #126

🐜 Fix mismatch type error for some Feathers Clients

18 Aug 01:08
253297c
Compare
Choose a tag to compare

All @feathersjs/ packages have been updated to the latest versions. As a result, some internal types were updated to prevent errors when using the FeathersPinia client.

The documentation has also been updated to show how to ensure all FeathersPiniaService methods are available for untyped Feathers clients. See the "Common Pitfalls" section on this page: https://feathers-pinia.pages.dev/guide/common-patterns.html

The basic gist is that you need to provide a ServiceTypes generic when calling the feathers() function:

// import the FeathersService type
import { feathers, type FeathersService } from '@feathersjs/feathers'

// Create a ServiceTypes generic
type ServiceTypes = Record<string, FeathersService>

// Provide `ServiceTypes` in angle brackets before the parentheses
const feathersClient = feathers<ServiceTypes>()

🐜 Fix OFetch adapter swallowing errors

10 Jun 23:12
ba63d99
Compare
Choose a tag to compare

The included feathers-ofetch adapter was swallowing Feathers errors and turning them into a plain text error. Now the full error from the server is correctly returned from requests.

This didn't have any effect on WebSocket communication, which did not experience the error.

🎁 Environment compatibility upgrades

10 Jun 23:10
b0ed8f3
Compare
Choose a tag to compare

There are no practical changes for existing users, but this release improves compatibility with some Node.js versions and WebContainers.

Many thanks to @FossPrime! ❤️