Return result of wrapped function from context#144
Merged
mattrobenolt merged 2 commits intogetsentry:masterfrom Oct 17, 2013
Merged
Return result of wrapped function from context#144mattrobenolt merged 2 commits intogetsentry:masterfrom
mattrobenolt merged 2 commits intogetsentry:masterfrom
Conversation
mattrobenolt
added a commit
that referenced
this pull request
Oct 17, 2013
Return result of wrapped function from context
Contributor
|
Looks sensible to me! Thanks. 👍 |
Contributor
Author
|
No problem! Any idea when the next release'll be? Seems like it's been a while. |
Contributor
|
It has been a while. We are planning to get together this weekend and figure out the tooling and whatnot for this. I built some stuff that made things more difficult to do releases, so it has been a pain point. We're gonna switch to grunt and whatnot this weekend and get things into some standard tools. Also, finishing ravenjs.com as well for downloading custom built versions from our new CDN. :) |
Contributor
Author
|
Cool. Thanks for all the hard work (: |
mydea
added a commit
that referenced
this pull request
Jan 5, 2024
- fix(rrweb): Use unpatched requestAnimationFrame when possible [#150](getsentry/rrweb#150) - ref: Avoid async in canvas (#143) - feat: Bundle canvas worker manually (#144) - build: Build for ES2020 (#142)
mydea
added a commit
that referenced
this pull request
Jan 8, 2024
- fix(rrweb): Use unpatched requestAnimationFrame when possible [#150](getsentry/rrweb#150) - ref: Avoid async in canvas (#143) - feat: Bundle canvas worker manually (#144) - build: Build for ES2020 (#142)
mydea
added a commit
that referenced
this pull request
Jan 10, 2024
This bump contains the following changes: - fix(rrweb): Use unpatched requestAnimationFrame when possible [#150](getsentry/rrweb#150) - ref: Avoid async in canvas [#143](getsentry/rrweb#143) - feat: Bundle canvas worker manually [#144](getsentry/rrweb#144) - build: Build for ES2020 [#142](getsentry/rrweb#142) Extracted out from #9826 Closes #6946
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds one word ("
return") and a test (:The idea is that it makes the context method more of a transparent wrapping. This comes in handy with anything where the return value matters—for example, RequireJS:
Without Raven
With Raven
With Raven + This Change
This allows you wrap your entire module with little change (and without having to worry if you missed some errors that were done after the context call). It's even nicer in CoffeeScript thanks to the implicit returns:
Without Raven
With Raven + This Change
Basically, you just need to indent your code an extra level, as opposed with the current behavior where you need to create a variable in the outer context and close over it.
These are small examples to get the point across but obviously it has more of an impact as the amount of code grows.