Fix: Compatibility issue with Node.js 24 (related to apache/skywalking#13517)
Background
This PR fixes the compatibility issue reported in apache/skywalking#13517,
where the make license-dep command fails under Node.js 24 due to incorrect handling of platform-specific npm packages.
Root Cause
The SkyWalking Eyes tool failed to correctly recognize platform-specific npm packages
(e.g., @parcel/watcher-linux-x64-musl, @parcel/watcher-win32-arm64),
resulting in license parsing errors under newer Node.js versions.
Solution
- Added precise cross-platform package pattern recognition in the npm resolver.
- Implemented OS/architecture matching via regex (e.g.,
-linux-x64-musl$,-win32-arm64$). - Updated logic to skip unsupported or non-current platform packages before license parsing.
Verification
- Tested with Node.js 24.6.0 and npm 11.5.1 on Linux and macOS.
- All licenses are now correctly identified when running
make license-depin thebanyandbproject.
Related Issue
Fixes apache/skywalking#13517
Please fix CI and take a look at Copilot review comments.
Sorry for the long delay. I've completed the revisions. Could you please help rerun the CI and review the code?
I fixed the CI errors.
@kezhenxu94 Please take a look.
@hanahmily I think you could build a local version, and have a try?