[TIL] npm 패키지가 quality를 측정하는 방법

eunniverse·2024년 7월 24일

글쓰게된 계기

npm 패키지를 업로드한 후 quality 가 꽤나 높길래 어떻게 측정하는지 궁금해져서 알아보았다. 그래서 쓰게된 글이다.

quality 측정하는 기준

npm shows these graphs in search results, but they do not calculate these values themselves. If you look below the search results, you'll see "Powered by npms.io".

According to this service, they don't inspect the code, but use the following metrics to measure code quality:

Has README? Has license? Has .gitignore and friends?
Is the version stable (> 1.x.x)? Is it deprecated?
Has tests? What's their coverage %? Is the build passing?
Has outdated dependencies? Do they have vulnerabilities?
Has custom website? Has badges?
Are there linters configured?


해석은 다음과 같다.

[2020년 1월 답변]
NPM은 더 이상 "Powered by npms.io"를 표시하지 않습니다 . 이것이 여전히 정확한지 모르겠습니다.

[2018년 처음 답변]
npm은 검색 결과에 이러한 그래프를 표시하지만, 이러한 값을 직접 계산하지는 않습니다. 검색 결과 아래를 보면 "Powered by npms.io "가 표시됩니다.

이 서비스에 따르면, 코드를 검사하지는 않지만 다음과 같은 지표를 사용하여 코드 품질을 측정합니다.

README가 있나요? 라이센스가 있나요? .gitignore친구가 있나요?
버전이 안정적입니까( > 1.x.x)? 더 이상 사용되지 않습니까?
테스트가 있나요? 적용 범위는 얼마인가요? 빌드가 통과되나요?
오래된 종속성이 있나요? 취약점이 있나요?
맞춤형 웹사이트가 있나요? 배지가 있나요?
린터가 구성되어 있나요?'
출처: https://npms.io/about

출처는 stackoverflow 이다.

profile
능력이 없는 것을 두려워 말고, 끈기 없는 것을 두려워하라

0개의 댓글