scancode.io icon indicating copy to clipboard operation
scancode.io copied to clipboard

improving npm basename matching

Open Aryan-SINGH-GIT opened this issue 1 year ago • 0 comments

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
image

Signed-off-by: Aryan Singh [email protected]

Aryan-SINGH-GIT avatar Dec 01 '25 21:12 Aryan-SINGH-GIT