E52F refactor!: Typescript by fratzinger · Pull Request #396 · feathersjs-ecosystem/feathers-sequelize · GitHub
[go: up one dir, main page]

Skip to content

refactor!: Typescript#396

Closed
fratzinger wants to merge 5 commits intofeathersjs-ecosystem:masterfrom
fratzinger:typescript
Closed

refactor!: Typescript#396
fratzinger wants to merge 5 commits intofeathersjs-ecosystem:masterfrom
fratzinger:typescript

Conversation

@fratzinger
Copy link
Contributor

Summary

Complete refactor to typescript. It's pretty straight forward. It's meant for feathers v4. So it can be released immediately.
I only changed a few things:

  • modernized: use eslint, c8 instead of nyc (follow other feathers packages)
  • moved sourcecode from '/lib' folder to '/src' folder and use '/lib' as compiled target (follow all feathers packages)
  • deprecate applyScope and rename it to ModelWithScope -> more declarative name
  • use import { hydrate } from 'feathers-sequelize' -> import from root and not subfolder
  • expose convertOperators functions since it can be useful for other
  • expose paramsToAdapter as suggested in feat: expose 'paramsToAdapter' method #390
  • class now has two generics: ´Service<T, M>´ where T is the crow generic for AdapterService and M is the type of the options.Model. This goes against the generics of dove but it is quite handy to have the right typings for service.Model!

Other than that there's nothing changed. The tests were left as is.

Considering these changes, I would release this as major, just to be sure. Even because the recommended way to import the hydrate/dehydrate hooks will stop working and changes from:

const hydrate = require('feathers-sequelize/hooks/hydrate');

to

const { hydrate } = require('feathers-sequelize');

Closes #390 #395

@fratzinger fratzinger changed the title Typescript refactor!: Typescript Aug 3, 2022
@fratzinger fratzinger mentioned this pull request Oct 2, 2022
@fratzinger fratzinger closed this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0