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

Adds ability to interpolate delete operations #289

Merged

Conversation

flovilmart
Copy link
Contributor

@flovilmart flovilmart commented May 29, 2016

On parse.com, when running a beforeSave hook, if a key is unset the change is not propagated to the client.

On parse-server, we forward this change by setting the key: {__op: Delete} that is interpolated by the JS SDK as an UnsetOp.

This proposed PR will set key = undefined in those cases fixing parse-community/parse-server#1840

parse-community/parse-server#1946

@codecov-io
Copy link

codecov-io commented May 29, 2016

Current coverage is 86.58%

Merging #289 into master will decrease coverage by <.01%

  1. 15 files (not in diff) in src were modified. more
    • Misses -4
    • Hits -32
  2. File src/ParseObject.js was modified. more
    • Misses 0
    • Partials 0
    • Hits -3
@@             master       #289   diff @@
==========================================
  Files            41         41          
  Lines          3852       3815    -37   
  Methods         703        636    -67   
  Messages          0          0          
  Branches        837        838     +1   
==========================================
- Hits           3336       3303    -33   
+ Misses          516        512     -4   
  Partials          0          0          

Powered by Codecov. Last updated by ef2b483...81cf0d2

@flovilmart flovilmart closed this May 29, 2016
@flovilmart flovilmart reopened this May 29, 2016
@flovilmart flovilmart force-pushed the handle-server-set-delete-op branch from f7afe5c to d3ef256 Compare May 29, 2016 18:12
@TylerBrock
Copy link
Contributor

Greatness

@flovilmart
Copy link
Contributor Author

We could have used null (it works right of the bat) but it's inconsistent with the undefined retuned when key is not set. Also, may cause problems with the iOS SDK as it interpolates to NSNull * and we usually don't love those.

@andrewimm
Copy link
Contributor

Shouldn't break things. For compatibility reasons, I might want to bump the version to 1.9.0 for this.

@andrewimm andrewimm merged commit 117c091 into parse-community:master Jun 6, 2016
@andrewimm
Copy link
Contributor

Also I can't express how happy I am that we're resolving this ridiculous piece of tech debt that has plagued Cloud Code for years 💯

@flovilmart
Copy link
Contributor Author

That should feel good to say it out loud 👍

@flovilmart
Copy link
Contributor Author

You can bump to 1.9.0, but it's unlikely that will break backwards.

@andrewimm
Copy link
Contributor

Agree it shouldn't break backwards, but I think it'd be easier to say "this functionality is fixed in SDK versions 1.9.0 and up"

@flovilmart
Copy link
Contributor Author

Yup!

@flovilmart flovilmart deleted the handle-server-set-delete-op branch June 24, 2016 20:13
@TylerBrock
Copy link
Contributor

Is there any timing on 1.9.0?

@andrewimm
Copy link
Contributor

Sorry @TylerBrock I forgot we were blocking this. I can ship it tomorrow.

@TylerBrock
Copy link
Contributor

no rush, i was just curious

@andrewimm
Copy link
Contributor

I was already intending to ship it this evening, actually, but then I got caught up in investigating the best CDN solution.

@andrewimm
Copy link
Contributor

Just released 1.9.0-rc1 as a beta release.

@andrewimm
Copy link
Contributor

@TylerBrock turns out I totally f-d up that publish (late night, little sleep). I'm trying to unpublish rc1, but it should all be there under parse@1.9.0-rc2, aka parse@rc

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.

6 participants