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

Consider making re2 an optional dependency? #33

Open
aldenquimby opened this issue Nov 21, 2024 · 2 comments · May be fixed by #34
Open

Consider making re2 an optional dependency? #33

aldenquimby opened this issue Nov 21, 2024 · 2 comments · May be fixed by #34

Comments

@aldenquimby
Copy link

aldenquimby commented Nov 21, 2024

Thank you for this library! My team recently started using it, and it's great.

We hit issues initially with re2 that took us a bit to work around. re2 causes difficulties for many build systems, e.g evanw/esbuild#1051

Would you be open to making this an optional peer? That way anyone that wants it can install it, but if it's problematic for a build and you aren't worried about backtracking, then it doesn't need to be installed.

Here is an example of what the implementation could look like, from a lib getting 100k+ downloads per week: https://github.com/spamscanner/url-regex-safe/blob/6c1e2c3b5557709633a2cc971d599469ea395061/src/index.js#L37-L49

@baptistejamin
Copy link
Contributor

We are opened to contributions :)

@aldenquimby aldenquimby linked a pull request Nov 21, 2024 that will close this issue
@aldenquimby
Copy link
Author

@baptistejamin ok great! Here you go #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants