diff --git a/index.js b/index.js index 0d481bb..2a27745 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,7 @@ export async function verifyConditions( logger.log(title); logs.push(title); for (let suggestion of suggestions) { - let message = ` ${formatMessage(suggestion, packageJson)}`; + let message = ` ${formatMessage(suggestion, packageJson, { color: false })}`; if (message) { logger.log(message); logs.push(message); @@ -91,7 +91,7 @@ export async function verifyConditions( logger.log(title); logs.push(title); for (let warning of warnings) { - let message = ` ${formatMessage(warning, packageJson)}`; + let message = ` ${formatMessage(warning, packageJson, { color: false })}`; if (message) { logger.log(message); logs.push(message); @@ -104,7 +104,7 @@ export async function verifyConditions( logger.log(title); logs.push(title); for (let error of errors) { - let message = ` ${formatMessage(error, packageJson)}`; + let message = ` ${formatMessage(error, packageJson, { color: false })}`; if (message) { logger.log(message); logs.push(message); @@ -113,15 +113,12 @@ export async function verifyConditions( } if (shouldThrow) { - let message = `publint reported ${errors.length} errors and ${ - warnings.length - } warnings\n${logs.join("\n")}`; if (DEBUG) { - logger.log(message + ", throwing"); + logger.log(`publint reported ${errors.length} errors and ${warnings.length} warnings\n${logs.join("\n")}`); } - throw new SemanticReleaseError(message, "EPUBLINT", `${suggestions.join("\n")} -${warnings.join("\n")} -${errors.join("\n")}`.trim()); + + const errorMessage = `publint reported ${errors.length} errors and ${warnings.length} warnings`; + throw new SemanticReleaseError(errorMessage, "EPUBLINT", logs.join("\n")); } } } diff --git a/package-lock.json b/package-lock.json index a5b7f4f..c4b2f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@semantic-release/error": "^4.0.0", "picocolors": "^1.0.1", - "publint": "^0.2.9" + "publint": "^0.2.11" }, "devDependencies": { "semantic-release": "^24.0.0" @@ -5201,9 +5201,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/picomatch": { @@ -5274,13 +5274,13 @@ "license": "ISC" }, "node_modules/publint": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/publint/-/publint-0.2.9.tgz", - "integrity": "sha512-nITKS1NSwD68PQlts0ntryhxrWObep6P0CCycwi1lgXI+K7uKyacMYRRCQi7hTae8imkI3FCi0FlgnwLxjM8yA==", + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/publint/-/publint-0.2.11.tgz", + "integrity": "sha512-/kxbd+sD/uEG515N/ZYpC6gYs8h89cQ4UIsAq1y6VT4qlNh8xmiSwcP2xU2MbzXFl8J0l2IdONKFweLfYoqhcA==", "license": "MIT", "dependencies": { "npm-packlist": "^5.1.3", - "picocolors": "^1.0.1", + "picocolors": "^1.1.0", "sade": "^1.8.1" }, "bin": { diff --git a/package.json b/package.json index 156bff8..41b2050 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "dependencies": { "@semantic-release/error": "^4.0.0", "picocolors": "^1.0.1", - "publint": "^0.2.9" + "publint": "^0.2.11" }, "devDependencies": { "semantic-release": "^24.0.0"