New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

codeowners-audit

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeowners-audit - npm Package Compare versions

Comparing version
2.5.0
to
2.6.0
+16
-2
package.json
{
"name": "codeowners-audit",
"version": "2.5.0",
"version": "2.6.0",
"description": "Generate an HTML report for CODEOWNERS ownership gaps and run in CI or from the CLI to fail when files are not covered.",

@@ -32,3 +32,17 @@ "type": "module",

},
"homepage": "https://github.com/watson/codeowners-audit#readme"
"homepage": "https://github.com/watson/codeowners-audit#readme",
"publishConfig": {
"access": "public",
"provenance": true
},
"devDependencies": {
"@commitlint/cli": "^20.4.3",
"@commitlint/config-conventional": "^20.4.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^12.0.6",
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.0",
"semantic-release": "^25.0.3"
}
}

@@ -1012,3 +1012,3 @@ #!/usr/bin/env node

for (const warning of missingPathWarnings) {
console.error('- %s', colorizeCliText(warning.pattern, [ANSI_YELLOW], colorStderr))
console.error('%s', formatMissingPathWarningForCli(warning, colorStderr))
}

@@ -1269,2 +1269,31 @@ console.error('')

/**
* Format a missing CODEOWNERS path warning for CLI output.
* @param {{
* codeownersPath: string,
* pattern: string,
* owners: string[]
* }} warning
* @param {boolean} useColor
* @returns {string}
*/
function formatMissingPathWarningForCli (warning, useColor) {
const bullet = colorizeCliText('- ', [ANSI_DIM], useColor)
const warningPath = colorizeCliText(warning.pattern, [ANSI_YELLOW], useColor)
const ownerLabel = colorizeCliText(' owners: ', [ANSI_DIM], useColor)
const ownerList = formatCodeownersOwnersList(warning.owners)
const ownerText = colorizeCliText(ownerList, [ANSI_CYAN], useColor)
return bullet + warningPath + ownerLabel + ownerText
}
/**
* Format a CODEOWNERS owner list for human-readable output.
* @param {string[]|undefined} owners
* @returns {string}
*/
function formatCodeownersOwnersList (owners) {
if (!Array.isArray(owners) || owners.length === 0) return '(none)'
return owners.join(', ')
}
/**
* Determine if a path points to any CODEOWNERS file.

@@ -1271,0 +1300,0 @@ * @param {string} filePath

@@ -250,2 +250,6 @@ <!doctype html>

}
.warning-owners {
color: #67e8f9;
font-weight: 600;
}
.warning-text {

@@ -622,2 +626,14 @@ color: var(--muted);

const ownerLabelSpan = document.createElement('span')
ownerLabelSpan.className = 'warning-text'
ownerLabelSpan.textContent = ' owners: '
item.appendChild(ownerLabelSpan)
const ownersSpan = document.createElement('span')
ownersSpan.className = 'warning-owners'
ownersSpan.textContent = Array.isArray(warning.owners) && warning.owners.length > 0
? warning.owners.join(', ')
: '(none)'
item.appendChild(ownersSpan)
list.appendChild(item)

@@ -624,0 +640,0 @@ }