Fix: context for afterFind#7078
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7078 +/- ##
==========================================
+ Coverage 93.63% 93.65% +0.01%
==========================================
Files 169 169
Lines 12498 12499 +1
==========================================
+ Hits 11703 11706 +3
+ Misses 795 793 -2
Continue to review full report at Codecov.
|
mtrezza
left a comment
There was a problem hiding this comment.
Can you please also add the changelog entry? Then it should be good for merge.
fix tests Postgres Support Update parse to 2.19.0 (#7060) Fix Prettier (#7066) Remove cache clear on validateObjects Improve add class if not exist Improve modifying schema instead of clearing Improve enforce class exists Fix flaky Test Release 4.5.0 (#7070) * Release 4.5.0 * Update CHANGELOG.md Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com> * Improve braking change note * Create a breaking changes sub-section * Add release action Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com> Improve issue templates & add PR template (#7051) * improved feature suggestion template * added test case chapter to bug report template * PR wording * added PR template * improved formatting in issue template * removed checkbox for concept due to new GH discussions process * improved wording * improved PR todo list * amended PR checklist; minor rewording * removed duplicate wording * add securtiy check section to contribution guide fix PR template file location (#7074) Optimize redundant logic used in queries (#7061) * Optimize redundant logic used in queries * Added CHANGELOG * Fixed comments and code style after recommendations. * Fixed code style after recommendation. * Improved explanation in comments * Added tests to for logic optimizations * Added two test cases more and some comments * Added extra test cases and fixed issue found with them. * Removed empty lines as requested. Co-authored-by: Pedro Diaz <p.diaz@wemersive.com> FileUpload options for Server Config (#7071) * New: fileUpload options to restrict file uploads * review changes * update review * Update helper.js * added complete fileUpload values for tests * fixed config validation * allow file upload only for authenicated user by default * fixed inconsistent error messages * consolidated and extended tests * minor compacting * removed irregular whitespace * added changelog entry * always allow file upload with master key * fix lint * removed fit Co-authored-by: Manuel Trezza <trezza.m@gmail.com> Fix: context for afterFind (#7078) * Fix: context for afterFind * Update CHANGELOG.md Co-authored-by: Manuel <trezza.m@gmail.com> Fix max listener warning from livequery server (#7083) * fix max listner warning * fix * Clean test log Run definitions pg fix fix: upgrade ws from 7.4.0 to 7.4.1 (#7098) Snyk has created this PR to upgrade ws from 7.4.0 to 7.4.1. See this package in npm: https://www.npmjs.com/package/ws See this project in Snyk: https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr fix: upgrade ldapjs from 2.2.2 to 2.2.3 (#7095) Snyk has created this PR to upgrade ldapjs from 2.2.2 to 2.2.3. See this package in npm: https://www.npmjs.com/package/ldapjs See this project in Snyk: https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr fix: upgrade semver from 7.3.2 to 7.3.4 (#7092) Snyk has created this PR to upgrade semver from 7.3.2 to 7.3.4. See this package in npm: https://www.npmjs.com/package/semver See this project in Snyk: https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr fix: upgrade uuid from 8.3.1 to 8.3.2 (#7101) Snyk has created this PR to upgrade uuid from 8.3.1 to 8.3.2. See this package in npm: https://www.npmjs.com/package/uuid See this project in Snyk: https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
|
Hey, I tried to use it as I use on beforeSave / afterSave. On beforeFind I add: It's not available on afterFind, only works if I add the context in the .find() function. It's possible to do it? |
|
@matheusfrozzi I think you may have found a bug. I see a test for beforeFind and afterFind but not both together. Is this something you would like to work on? Can you open a new issue so we may track and investigate? |
|
I'm taking a look at the code right now, trying to find how to make it work. I found in the ParseHoock.spec it: Saying that I'm not allowed to do what I'm trying to do. So I don't know if it was supposed to work. |
|
Hey guys, I know I couldn't work on this one, but I think that fixing this issue of adding context in beforeFind that is not available on afterFind would be good before the new main release. |
|
@matheusfrozzi Would you please open a new issue for this so that it’s on our radar? An additional PR with at least a failing test would be great, but even just the issue helps. |
|
🎉 This change has been released in version 5.0.0-beta.1 |
|
🎉 This change has been released in version 5.0.0 |
New Pull Request Checklist
Issue Description
Adds context to
Parse.Cloud.afterFindRelated issue: #7058. Does not close this issue, but works towards.
Approach
Add context to
Parse.Cloud.afterFind