share / share/sharedb-mongo

ottypes/json1 support

Open
#136 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
152
Forks
68
Avg merge
1d 5h
Merged PRs (30d)
3

Description

Submitting operations using the json1 syntax (directly or through helpers such as insertOp) fails the opContainsAnyField check, which checks the existence of a p field (which contains the path in json0).

Is it intended for sharedb-mongo to have built-in checks on the json0 syntax?
The call fails, but as mentioned in the comments, it is caught in sharedb and I don't see any side-effect apart from log pollution (for my usecase anyway).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading index.js around line 1044 and the opContainsAnyField check, then trace how sharedb handles the caught failure for json1 operations and helpers such as insertOp. Compare the existing json0 assumption with the linked json1 syntax; done means establishing and testing the intended behavior for json1 submissions without unintended log pollution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.