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

Make re2 optional #11

Open
JamieMagee opened this issue Jan 26, 2022 · 2 comments · May be fixed by #12
Open

Make re2 optional #11

JamieMagee opened this issue Jan 26, 2022 · 2 comments · May be fixed by #12

Comments

@JamieMagee
Copy link

Right now re2 is always imported. Regardless of if it's used or not:

const RE2 = require('re2');

re2 is precompiled and not available for all architectures. node-docker-reference should attempt to load it, but fall back to RegExp if re2 is not available. For example, here's how it's handled in Renovate:

https://github.com/renovatebot/renovate/blob/48af4012e6d0b4d90a9aeb4df1471f452b677cd8/lib/util/regex.ts#L11-L20

JamieMagee added a commit to JamieMagee/node-docker-reference that referenced this issue Jan 26, 2022
@JamieMagee JamieMagee linked a pull request Jan 26, 2022 that will close this issue
@adammfrank
Copy link

Yes please, this is broken for ARM Macs.

@adammfrank
Copy link

@JamieMagee I implemented your suggestion here

https://github.com/swimlane/node-docker-reference

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 a pull request may close this issue.

2 participants