Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Ready for Feathers v5 Dove #171

Open
8 tasks
marshallswain opened this issue Feb 12, 2022 · 16 comments
Open
8 tasks

Getting Ready for Feathers v5 Dove #171

marshallswain opened this issue Feb 12, 2022 · 16 comments
Assignees

Comments

@marshallswain
Copy link
Member

The following changes are needed to fully prepare feathers-objection for Feathers v5 Dove:

  • Port to TypeScript
  • Support the updated @feathersjs/adapter-tests suite. (including params.adapter)
  • Publish compiled JS version
  • Automate Postgres Tests
@ramsestom
Copy link

Is this plugin still planned to be made fully compatible with Feathers v5 dove (and integrated back into feathers cli as an option when generating services)?

@dekelev
Copy link
Member

dekelev commented Feb 24, 2023

@ramsestom It might already work with Feather v5. I'm not aware of any breaking-changes and it seems that the list from @marshallswain is mostly about TypeScript and tests. I'm not using FeathersJS in my current projects, but any PRs are welcome.

@dekelev
Copy link
Member

dekelev commented Mar 4, 2023

While upgrading dependencies, I've tried running the tests with Feathers v5 and it didn't work. Looks like the AdapterService class that it is extending doesn't exist anymore. As much as I'd like to help, I'm not into TypeScript development these days and also haven't used FeathersJS for the past 2 years, so unless I get a PR regarding this upgrade, this library will remain unsupported in FeathersJS v5 (same for other plugins that I contributed in the past - feathers-cassandra, feathers-service-tests-cassandra, feathers-http-disributed, feathers-opentracing, feathers-kong, feathers-stripe-webhooks, feathers-hubspot-webhooks).

@marshallswain
Copy link
Member Author

@dekelev I think that it got moved to @feathersjs/adapter-commons and renamed to AdapterBase. Does this look like the right class? https://github.com/feathersjs/feathers/blob/dove/packages/adapter-commons/src/service.ts#L22-L29

@dekelev
Copy link
Member

dekelev commented Mar 8, 2023

Thanks @marshallswain , I tried that now and got this error on invalid service object that was trying to initialize for the tests. Any idea why it's failing?

image

image

@dekelev
Copy link
Member

dekelev commented Mar 8, 2023

I had to remove the underscore from the service method names. It works now, but some tests are failing on code related to the FeathersError class. This import is not defined anymore:

import errors from '@feathersjs/errors';

It works when importing each class in separate.

@dekelev
Copy link
Member

dekelev commented Mar 8, 2023

Any idea where's the filterQuery base service method?
It's not defined in the old place (this.filterQuery).

@marshallswain
Copy link
Member Author

Try importing it from @feathersjs/adapter-commons, as well. https://github.com/feathersjs/feathers/blob/dove/packages/adapter-commons/src/query.ts#L137

@marshallswain
Copy link
Member Author

import errors from '@feathersjs/errors';

I think it's now

import * as errors from '@feathersjs/errors' 

if you want them all.

@dekelev
Copy link
Member

dekelev commented Mar 8, 2023

Got it, thanks

@dekelev
Copy link
Member

dekelev commented Mar 8, 2023

image

Is the whitelist option deprecated? Was it replaced by something else?

@marshallswain
Copy link
Member Author

@dekelev, Two solutions replaced it. If you're using @feathersjs/schema or @feathersjs/typebox, the query validators replace the need for whitelist. If you're not using the new validators, you can find the replacement for the whitelist here: https://feathersjs.com/guides/migrating.html#custom-filters-operators

@dekelev
Copy link
Member

dekelev commented Mar 16, 2023

Thanks! I'll check it out

@nickdex
Copy link

nickdex commented Mar 25, 2023

@dekelev Can you push your branch? I’ll see if I can help 🙂

@dekelev
Copy link
Member

dekelev commented Mar 25, 2023

Sure, I'll push it soon. It's still a mess and I haven't got time to work on it since last week.

@dekelev
Copy link
Member

dekelev commented Mar 25, 2023

I pushed the feathers-dove branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants