parse-community / parse-community/parse-server
Remove dependency on Parse JS SDK
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
Parse Server currently depends on the Parse JS SDK. This is because the Parse JS SDK is leading a double life - as a Parse client SDK and as a internal module of Parse Server that is uses for various features. This creates the following issues:
- Difficult development; its adds a circular dependency where changes in the server requires changes in the SDK and vice versa.
- Bloated client SDK; it contains code that is unnecessary outside of the Cloud Code environment.
Feature / Enhancement Description
Remove Parse Server's dependency on the Parse JS SDK. It should only be needed:
- As a
dependencyalongside Parse Server if a developer wants to use the Cloud Code feature. In that case the developer needs to add the Parse JS SDK as a dependency themselves. - As a
devDependencyfor the Parse Server tests of Cloud Code.
All elements of the Parse JS SDK that are currently in use in Parse Server should be moved to the Parse.Cloud namespace.
Future Enhancement
We could attempt a BYOSDK (Bring Your Own SDK) approach. If Parse Server allows to pass a SDK instance at start-up, then the developer is free to use any Parse JS SDK, as long as it's version compatible.
Roadmap
- 1. Merge https://github.com/parse-community/parse-server/pull/10256 as non-breaking change; parse-server will still have the JS SDK as prod dependency and use it in tests, but it should not rely on the JS SDK dependency directly anymore in prod code and instead use what's supplied via the SDK adapter (or fallback to JS SDK dependency as default if no JS SDK is supplied via parse-server config), e.g. error codes should be taken from the SDK supplied via adapter.
- 2. Migrate tests to use REST API directly and not go through JS SDK.
- 3. Migrate tests to use WS API directly and not go through JS SDK.
- 4. On next parse-server major release, move JS SDK from prod dependency to dev dependency if it’s still needed for tests; or remove completely if all test migrations are completed before that.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request #10256, which is the first roadmap step for removing direct production reliance on the Parse JS SDK. Then assess the REST and WS test migration steps. Done means Parse Server no longer depends on the SDK in production and the affected tests use the intended APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100