Comparing version 5.1.1 to 6.0.0
20
index.js
@@ -21,5 +21,5 @@ 'use strict'; | ||
const Levels = Object.freeze({ | ||
Error: 'error', | ||
Info: 'info', | ||
Warn: 'warn', | ||
Error: 'error' | ||
Warn: 'warn' | ||
}); | ||
@@ -41,4 +41,8 @@ | ||
if (Object.keys(entry).includes(property)) { | ||
// Call the specified assert type function, which will throw on type error | ||
// Call the specified assert type function, which will throw on type error. | ||
// All values hard-coded in this module. | ||
// nosemgrep: eslint.detect-object-injection, unsafe-dynamic-method | ||
assert[type](entry[property]); | ||
// All values hard-coded in this module. | ||
// nosemgrep: eslint.detect-object-injection | ||
result[property] = entry[property]; | ||
@@ -74,3 +78,3 @@ } | ||
* @param {object} settings An object containing any valid log entry settings. | ||
* @param {Levels} [settings.level] The log level. | ||
* @param {Levels} [settings.level] The log level for the entry. | ||
* @param {boolean} [settings.isResult] Indicates the log entry is a result of another action, | ||
@@ -103,3 +107,3 @@ * and prefixes the entry with resultPrefix. | ||
* @param {string} entry.message The message to be logged. | ||
* @param {Levels} [entry.level] The log level. | ||
* @param {Levels} [entry.level] The log level for the entry. | ||
* @param {boolean} [entry.isResult] Indicates the log entry is a result of another action, | ||
@@ -151,3 +155,3 @@ * and prefixes the entry with resultPrefix. | ||
* @param {string} entry.message The message to be logged. | ||
* @param {Levels} [entry.level] The log level. | ||
* @param {Levels} [entry.level] The log level for the entry. | ||
* @param {boolean} [entry.isResult] Indicates the log entry is a result of another action, | ||
@@ -171,4 +175,4 @@ * and prefixes the entry with resultPrefix. | ||
console.error(`Fatal error - exiting (${errorCode})`); | ||
// For CI jobs, want process to exit with appropriate error cede. | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
/* eslint-disable-next-line unicorn/no-process-exit -- want process to | ||
exit with appropriate error code */ | ||
process.exit(errorCode); | ||
@@ -175,0 +179,0 @@ } |
@@ -13,3 +13,3 @@ 'use strict'; | ||
* | ||
* @param {string} expectedType The expected type. | ||
* @param {string} expectedType The expected type for the value. | ||
* @param {string} valueType The type of the value being checked. | ||
@@ -84,2 +84,2 @@ * @throws {TypeError} Always throws. | ||
module.exports = { object, string, integer, boolean }; | ||
module.exports = { boolean, integer, object, string }; |
{ | ||
"name": "ci-logger", | ||
"version": "5.1.1", | ||
"version": "6.0.0", | ||
"description": "Very simple logger for CI environments.", | ||
@@ -11,4 +11,4 @@ "main": "index.js", | ||
"lint": "npm run lint-md && npm run lint-js", | ||
"lint-md": "markdownlint **/*.md --ignore node_modules", | ||
"lint-js": "eslint \"**/*.js\"", | ||
"lint-md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"", | ||
"lint-js": "eslint .", | ||
"prettier-check": "prettier --check --ignore-path=.gitignore .", | ||
@@ -33,3 +33,3 @@ "prettier-fix": "prettier --write --ignore-path=.gitignore .", | ||
"engines": { | ||
"node": "^14.15.0 || ^16.13.0 || >=18.0.0" | ||
"node": "^16.13.0 || ^18.12.0 || >=20.0.0" | ||
}, | ||
@@ -46,11 +46,11 @@ "files": [ | ||
"devDependencies": { | ||
"@aarongoldenthal/eslint-config-standard": "^20.0.0", | ||
"eslint": "^8.33.0", | ||
"jest": "^29.4.1", | ||
"jest-junit": "^15.0.0", | ||
"markdownlint-cli": "^0.33.0", | ||
"prettier": "^2.8.3", | ||
"tsd": "^0.25.0", | ||
"typescript": "^4.9.5" | ||
"@aarongoldenthal/eslint-config-standard": "^22.1.0", | ||
"eslint": "^8.42.0", | ||
"jest": "^29.5.0", | ||
"jest-junit": "^16.0.0", | ||
"markdownlint-cli2": "^0.7.1", | ||
"prettier": "^2.8.8", | ||
"tsd": "^0.28.1", | ||
"typescript": "^5.1.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16188
313