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

feat: env var __MINIMATCH_NO_FASTTEST__=1 disables fastTest #227

Closed
wants to merge 1 commit into from

Conversation

legobeat
Copy link
Contributor

The optimized fastTests for common patterns work by overwriting the test property on a RegExp instance. This can cause issues in some locked down runtime environments or trip up static analysis tools.

This proposes allowing short-circuiting and disable the optimizations by setting environment variable __MINIMATCH_NO_FASTTEST__ (open for naming suggestions) to 1.

I opted for an environment variable rather than an API change because this is more likely to be relevant for end software operators rather than authors of depending software. Might also be useful for debugging minimatch itself (#215).

Permutation of RegEx object can cause compatibility issues in locked
down environments.
@legobeat legobeat marked this pull request as draft February 20, 2024 13:32
@legobeat
Copy link
Contributor Author

Closing in favor of #228 (as that solves our problem without need of environment variables)

@legobeat legobeat closed this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant