Open mafintosh opened 4 years ago
doesn't seem to work with macros
Right. Can we assume that napi-macros
will only include "basic" napi functions, not new experimental functions? Because if so, we could check if you have napi-macros
in dependencies and then include all the napi functions it uses (perhaps exported as a list by napi-macros
).
the binary compiled to figure out the minimum version needed
Don't we need to know the minimum version before we can compile?
If it weren't for the fact that it's written (read: cobbled together) in rust, this would be a viable replacement for nm
: https://github.com/vweevers/global-symbols
@vweevers i just compile twice :D
Unfortunately tree-sitter doesn't seem to work with macros which I use in all my projects. I did get inspired by this tho and made this little fellow, https://github.com/mafintosh/minimum-napi-version that uses the binary compiled to figure out the minimum version needed.
Maybe some of the techniques in there with getting the versions from the docs can be used here also?