scancode.io
scancode.io copied to clipboard
improving npm basename matching
Fixes issue: #1862
Solution: Adds basename matching for D2D mapping when file extensions differ between deployment and development (e.g., .ts → .js, .scss → .css).
Changes:
- Added BASENAME_EXTENSION_MAP for extension transformations
- Added get_basename_without_extension() to handle compound extensions and .bak files
- Added find_basename_matches() for basename based matching
- Integrated basename matching as fallback in _map_path_resource() and _map_javascript_path_resource()
- Added test coverage
Signed-off-by: Aryan Singh [email protected]