-
Notifications
You must be signed in to change notification settings - Fork 136
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
Rename escape
/unescape
to escapeText
/unescapeText
#746
Rename escape
/unescape
to escapeText
/unescapeText
#746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm seems ok, but also I wonder if the Reanimated Babel plugin should be able to distinguish between a global function call and a function call in a module namespace.
Not really important enough that I want to block this PR, so I'm going to proceed as-is
got some test failures though |
escape
/unescape
to escapeText
/unescapeText
escape
/unescape
to escapeText
/unescapeText
Marking as WIP until tests are ✅ |
I think this should be technically possible but I believe @tjzel can provide more details on that. Currently we just have a list of the names of the identifiers that never get captured: https://github.com/software-mansion/react-native-reanimated/blob/77644ca17d54b20a5547e7a1be8ec279cd2b5ded/packages/react-native-reanimated/plugin/src/globals.ts#L2-L116 I'll write it down on our TODO list.
My bad, I forgot to update the function names in the exports. Should be fixed now |
escape
/unescape
to escapeText
/unescapeText
escape
/unescape
to escapeText
/unescapeText
Whoops, can't merge this with unsigned commits. Please rebase and resign commits. |
2fab096
to
293c238
Compare
@roryabraham This is my first contribution to |
@roryabraham It seems possible to distinguish between such calls, I'll try to explore that direction in the future. |
🚀Published to npm in v2.0.49 |
This PR renames
escape
andunescape
functions inUtils
module toescapeText
andunescapeText
, accordingly.The reason for this change is that, although deprecated, both
escape
andunescape
are built-in JavaScript functions:Hence, these names might be confusing for other third-party libraries that rely on this rule, e.g. Reanimated Babel plugin.
These changes are needed for
ExpensiMark
to work properly in worklets inreact-native-live-markdown
:Fixed Issues
$ GH_LINK
Tests
QA