-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
Description
This module is downloaded about a million times every day (!), and its logic is perhaps run hundreds of times every second.
Making changes to something this highly depended upon is a little frightening, but if we can reduce the time/energy cost then I think it will be worthwhile.
The logic hasn't changed in over four years and (rather amazingly) it all still works, but the ecosystem around it has improved so it's time for this module to do likewise.
Goals:
- Expose functionality via both async and sync functions
- Reduce require-time CPU and I/O cost, defer as much logic as possible until functions are called
- Only spawn a child process where absolutely necessary, and consolidate into a single call
- The requirements of both
@mapbox/node-pre-gyp
andprebuild
become first-class concerns (perhaps others? Parcel? Electron?) - Support Node.js 8+, drop support for Node.js 6 and earlier
- Migrate CI to GitHub Actions, add more recent OS and Node.js versions to integration tests
- Use Node.js 12+ native report feature where available, allows family detection and glibc version (but not musl version)
Progress:
- Readme - https://github.com/lovell/detect-libc/tree/main
- Implement new API
- Unit tests - https://github.com/lovell/detect-libc/actions/runs/1708403127
- Integration tests (26 combinations) - https://github.com/lovell/detect-libc/actions/runs/1708403128
- JSDocs
- TypeScript type definitions
- Verify
prebuild
will work - Verify
@mapbox/node-pre-gyp
will work
coreprocess, gengjiawen and styfle