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

Define JSONElement which represents the type exposed to the user #314

Merged
merged 3 commits into from
Jun 20, 2022

Conversation

hackerwins
Copy link
Member

@hackerwins hackerwins commented Jun 20, 2022

What this PR does / why we need it?

Define JSONElement which represents the type exposed to the user.

Change the package exposed to users from proxy to json.

json gives the impression that it can be used directly by the users. So
this commit changed the package that is not directly exposed to users to
crdt and rename proxy to json.

In addition, when the user uses custom methods on Array, it provides
types with getID to the user. Conversely, if the user uses native methods,
it returns types similar to the native interface as much as possible.

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #314 (ee5e5ee) into main (c7749f1) will decrease coverage by 0.04%.
The diff coverage is 83.60%.

@@            Coverage Diff             @@
##             main     #314      +/-   ##
==========================================
- Coverage   87.48%   87.44%   -0.05%     
==========================================
  Files          70       70              
  Lines        4993     4993              
  Branches      505      505              
==========================================
- Hits         4368     4366       -2     
- Misses        441      443       +2     
  Partials      184      184              
Impacted Files Coverage Δ
src/document/change/change.ts 64.28% <ø> (ø)
src/document/change/context.ts 100.00% <ø> (ø)
src/document/crdt/rga_tree_split.ts 93.79% <ø> (ø)
src/document/crdt/rht.ts 90.90% <ø> (ø)
src/document/crdt/rht_pq_map.ts 70.90% <ø> (ø)
src/document/operation/operation.ts 80.00% <ø> (ø)
src/document/operation/remove_operation.ts 64.28% <0.00%> (ø)
src/yorkie.ts 100.00% <ø> (ø)
test/helper/helper.ts 90.90% <ø> (ø)
test/integration/integration_helper.ts 93.75% <0.00%> (-6.25%) ⬇️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7749f1...ee5e5ee. Read the comment docs.

@hackerwins hackerwins force-pushed the strict-typing branch 2 times, most recently from 304a1f5 to 9ca17d6 Compare June 20, 2022 08:56
`json` gives the impression that it can be used directly by the users. So
this commit changed the package that is not directly exposed to users to
`crdt` and rename `proxy` to `json`.

In addition, when the user uses custom methods on Array, it provides
types with getID to the user. Conversely, if the user uses native methods,
it returns types similar to the native interface as much as possible.
@hackerwins hackerwins changed the title Define JSONType that represents the type exposed to the user Define JSONElement which represents the type exposed to the user Jun 20, 2022
@hackerwins hackerwins marked this pull request as ready for review June 20, 2022 10:24
@hackerwins hackerwins merged commit d58be35 into main Jun 20, 2022
@hackerwins hackerwins deleted the strict-typing branch June 20, 2022 10:26
hackerwins added a commit that referenced this pull request Jun 20, 2022
`json` gives the impression that it can be used directly by the users. So
this commit changed the package that is not directly exposed to users to
`crdt` and rename `proxy` to `json`.

In addition, when the user uses custom methods on Array, it provides
types with getID to the user. Conversely, if the user uses native methods,
it returns types similar to the native interface as much as possible.
parkeunae pushed a commit to parkeunae/yorkie-js-sdk that referenced this pull request Jul 23, 2022
`json` gives the impression that it can be used directly by the users. So
this commit changed the package that is not directly exposed to users to
`crdt` and rename `proxy` to `json`.

In addition, when the user uses custom methods on Array, it provides
types with getID to the user. Conversely, if the user uses native methods,
it returns types similar to the native interface as much as possible.
hackerwins added a commit to yorkie-team/yorkie that referenced this pull request Aug 16, 2022
hackerwins added a commit to yorkie-team/yorkie that referenced this pull request Aug 16, 2022
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