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

Regex overrides improvements #1691

Open
aurimasmi opened this issue Sep 5, 2024 · 0 comments
Open

Regex overrides improvements #1691

aurimasmi opened this issue Sep 5, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@aurimasmi
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Currently regex overrides doesn't take into account if override was already applied. Therefore we need to write complex and weird patterns just to avoid override being applied every time platform being run.

Example of @flexn/create override

In this override I want to add new import which comes right away after last import. But I can't simply do something like:

"import Platform from '../../Utilities/Platform';": "\nimport NativeModules from '../../BatchedBridge/NativeModules';"

because if I do that next time I run my app, rnv recognizes that my pattern is still exists(because I appended string not override) and it will apply my override again and again.

And this is one of examples even in the same file rest of overrides also facing same issues that's why there are complex patterns.

Describe the solution you'd like
My expectations is that whatever pattern is added there rnv should recognise that it was already executed and ONLY execute it again if something changed in that pattern

@aurimasmi aurimasmi added the enhancement New feature or request label Sep 5, 2024
@ElenaDiachenko ElenaDiachenko self-assigned this Sep 5, 2024
@ElenaDiachenko ElenaDiachenko added this to the 1.2 milestone Sep 5, 2024
@Marius456 Marius456 modified the milestones: 1.2, 1.3 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants