Open JamieMagee opened 2 years ago
Right now re2 is always imported. Regardless of if it's used or not:
re2
https://github.com/codefresh-io/node-docker-reference/blob/957b11b9d54a1583f6c4b78da7ef0c28fe19b37f/lib/parsers.js#L3
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:
node-docker-reference
RegExp
https://github.com/renovatebot/renovate/blob/48af4012e6d0b4d90a9aeb4df1471f452b677cd8/lib/util/regex.ts#L11-L20
Yes please, this is broken for ARM Macs.
@JamieMagee I implemented your suggestion here
https://github.com/swimlane/node-docker-reference
Right now
re2
is always imported. Regardless of if it's used or not:https://github.com/codefresh-io/node-docker-reference/blob/957b11b9d54a1583f6c4b78da7ef0c28fe19b37f/lib/parsers.js#L3
re2
is precompiled and not available for all architectures.node-docker-reference
should attempt to load it, but fall back toRegExp
ifre2
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