-
Notifications
You must be signed in to change notification settings - Fork 475
Add trailing /
to transformIgnorePatterns
#146
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
Add trailing /
to transformIgnorePatterns
#146
Conversation
Fix a small bug with the `transformIgnorePatterns` suggested fix for performing proper transformations on the mocks for Jest compatibility. Need to add a trailing `/` to the regex for the transform ignore, otherwise it will match all packages in `node-modules` that start with the string `react-native`!
Hey @genuinezack , thanks for your contribution! This looks legit to me, although, I'll ask for a second opinion :) cc @thymikee |
@genuinezack this behavior is expected, as the vast majority of |
I disagree that this is expected/desirable, @thymikee, for three reasons:
That being said, it is a single character in a legacy documentation so no worries if you leave it as-is, I'll still use the package and appreciate you for making and maintaining it. |
Never happened to me in 2 years
Fun fact – Metro (the React Native bundler) transpiles all of your dependencies already with the same Babel preset. I get your point though, it's completely correct. I'm just too tired answering the same questions (I'm a Jest maintainer btw). What would be a nice compromise I guess, is leaving this regex as you like, explain what it does, and how to make it more permissive. It's not quite the scope of this package, but maybe it helps someone :) |
As suggested by @thymikee
@thymikee - I'm only 9 months into the world of react-native, but we ran into this recently with I updated my change with your suggested clarification and will leave the compromise in your court to approve/deny. (Oh also thanks for maintaining Jest too! I have no idea how y'all open source maintainers deal with hearing the same issues/suggestions/requests all day long, so sorry to add to the din.) |
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.
Sounds about right, thanks!
Right, this should resolve any doubts. Still fighting with CI, why failing randomly. |
Can't figure out why Android e2e fails at deps installations, so, for now, I'll go ahead and just merge this. |
Fix a small documentation issue with the
transformIgnorePatterns
suggested fix for performing proper transformations on the mocks for Jest compatibility. Need to add a trailing/
to the regex for the transform ignore, otherwise it will match all packages innode-modules
that start with the stringreact-native
!