aboutcode-org / aboutcode-org/scancode.io

Improving D2D mapping for npm - Basename matching

Open
#1,862 1 comment 0 reactions 1 assignee Claimed by @Aryan-SINGH-GIT View on GitHub
Dominant language
Python
Stars
215
Forks
203
Avg merge
4d 8h
Merged PRs (30d)
6

Description

In some cases, file extensions may differ between the deployment codebase and the development codebase due to transformations during the build process. The tool should account for these discrepancies and perform mapping based on file basenames where appropriate.
Below is the proposed list of basename matches to support this logic:

| deployed extension | can be from extension | notes |
| ---------------------- | ------------------| ------|
| .cjs | .ts, .mts or .js||
|.mjs | .ts, .mts or .js||
|.css | .less or .scss||
|.d.ts | .ts or .js||
|.js |.ts ||
|.min.js |.js||
|.js| .ts, .tsx, .coffee, .jsx, .vue. .svelte, .elm||
|.bak||It is a backup typed file|
|"extension1"."extension2"|"extension1"| nrlmsise_interface.cpp.o <- nrlmsise_interface.cpp
headers.h.gch <- headers.h|
|.d.mts| .mts, .ts ||
|"filename"|"filename"| In certain cases, files may share the same filename but differ in their hash values due to changes during the build process. To determine a valid match, the tool should consider both the filename and the corresponding path.|

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.