geprog / use-feathers Goto Github PK
View Code? Open in Web Editor NEWVue.js compositions for Feathers
Home Page: https://www.npmjs.com/package/@geprog/use-feathers
License: MIT License
Vue.js compositions for Feathers
Home Page: https://www.npmjs.com/package/@geprog/use-feathers
License: MIT License
It would be nice if we could set the ref-value of a useFind
query to something like null
to prevent the find from searching. As soon as the query changes to undefined
or some value it should start searching similar to the id behavior of useGet
.
Currently we expect all the responses from feathers to be an array of items. But feathers also have pagination in its adapter-commons. So we need to support this as well.
E.g. if skip
is set to 0 the response is not evaluated correctly as paginated data.
Looking at:
Lines 32 to 33 in c3f8a7d
and the corresponding test:
use-feathers/test/useFind.test.ts
Line 380 in c3f8a7d
This seems like a case that can not happen. When the query changes find
is called and overrides data.value
completely.
I stumbled across this because the test title mentions "when query is not matching anymore", but the test does not simulate a no longer matching query.
Additionally adding await nextTick();
before emitting the updated
event breaks the test. That should not happen.
It would be nice to export a function called unload
which can be used to unload the event listeners manually.
When you have a request like
const params = ref({ query: {} });
const { data } = useFind(service, params)`;
Then this request might take a while to respond.
When the params get updated while the first request is not yet finished e.g. by setting ref.value = { query: { _id: 123 } }
then a second request with the updated params is performed.
This second request is probably much faster than the first request which causes data to be [{ _id: 123, ...rest }]
.
When the first requests finishs afterwards data will be set to [...aLotOfItems]
which means that the data is not fitting to the query anymore.
Support $sort and $limit query selectors with sift https://github.com/crcn/sift.js#custom-behavior
Fix Unsafe call of an any typed value. (eslint@typescript-eslint/no-unsafe-call)
in useGet/useFind
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These branches will be created by Renovate only once you click their checkbox below.
@feathersjs/adapter-commons
, @feathersjs/errors
, @feathersjs/feathers
).github/workflows/lint-pr.yml
amannn/action-semantic-pull-request v3.4.0
.github/workflows/release.yml
actions/checkout v2
actions/setup-node v2
actions/cache v2
pnpm/action-setup v2.0.1
.github/workflows/tests.yml
actions/checkout v2
actions/setup-node v2
actions/cache v2
pnpm/action-setup v2.0.1
actions/checkout v2
actions/setup-node v2
actions/cache v2
pnpm/action-setup v2.0.1
actions/checkout v2
actions/setup-node v2
actions/cache v2
pnpm/action-setup v2.0.1
actions/checkout v2
actions/setup-node v2
actions/cache v2
pnpm/action-setup v2.0.1
package.json
sift ^15.0.0
@feathersjs/adapter-commons 5.0.0-pre.15
@feathersjs/errors 5.0.0-pre.15
@feathersjs/feathers 5.0.0-pre.15
@geprog/eslint-config 1.1.0
@geprog/semantic-release-config 1.0.0
@vue/test-utils 2.0.0
c8 7.11.3
eslint 8.8.0
jsdom 20.0.0
prettier 2.5.1
semantic-release 19.0.3
tsup 5.11.13
typescript 4.5.5
vite 3.0.3
vitest 0.19.1
vue 3.2.37
@feathersjs/adapter-commons ^5.0.0-pre.3
@feathersjs/feathers ^5.0.0-pre.3
vue ^3.0.11
pnpm 7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.