-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Refactor FilesAdapter to ES6 style. #315
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
Conversation
@nlutsenko we can also start replacing |
I refactored the whole repo here: https://github.com/maysale01/parse-server/tree/es6-all-tests-passing |
Can re-use some of that, it's been like ~60 commits. All tests were passing as of HEAD-2 commits or so, I started to make everything async and abstracted the cache and have 1 or 2 tests not passing. |
Yeah, good call. The biggest point here is to create classes for pluggable modules - like Files or Database, but agree that we should probably do let/const instead of var. |
5ab58fc
to
53fdc9b
Compare
Updated with |
@nlutsenko updated the pull request. |
@maysale01 We definitely appreciate you making the es6 fork. The current plan is to es6ify files as we touch them moving forward. |
@peterdotjs Yeah it's too far gone at this point anyways. Might be a good reference point, or just to copy some boilerplate. It's 1-1 for the most part. |
I don't really like this |
@drew-gross What did you have in mind? |
@drew-gross since we're only using |
I would prefer the configuration accept 3 different options: 1) a instance of an object that meets the FilesAdapter interface 2) the name of an Rather than having the function exist and trying to police the PRs to make it never gets called inappropriately, we should just remove it and guarantee it's never called inappropriately :p |
@drew-gross I second that, and that could be extended for all adapters as discussed around #290 |
This is implemented per our discussion in #291. Needs to be reviewed |
Refactor FilesAdapter to ES6 style.
@maysale01 i can review now |
Class-based, nice import style and friends, also removed duplicate logic.
cc @drew-gross