@applitools/logger
Advanced tools
+10
-0
| # Changelog | ||
| ## [2.2.5](https://github.com/Applitools-Dev/sdk/compare/js/logger@2.2.4...js/logger@2.2.5) (2025-11-09) | ||
| ### Dependencies | ||
| * @applitools/utils bumped to 1.13.0 | ||
| #### Features | ||
| * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75)) | ||
| ## [2.2.4](https://github.com/Applitools-Dev/sdk/compare/js/logger@2.2.3...js/logger@2.2.4) (2025-09-16) | ||
@@ -4,0 +14,0 @@ |
+18
-3
@@ -30,2 +30,10 @@ "use strict"; | ||
| const utils = __importStar(require("@applitools/utils")); | ||
| function formatFunction(fn) { | ||
| const fnString = fn.toString(); | ||
| if (fnString.length <= 80) { | ||
| return fnString; | ||
| } | ||
| // Truncate to first 40 + "..." + last 40 characters | ||
| return fnString.slice(0, 40) + '...' + fnString.slice(-40); | ||
| } | ||
| const defaultColorTheme = { | ||
@@ -77,5 +85,12 @@ label: 'cyan', | ||
| const strings = chunks.map(chunk => { | ||
| let text = utils.types.isString(chunk) | ||
| ? (0, colorize_1.colorize)(chunk, { color }) | ||
| : util_1.inspect === null || util_1.inspect === void 0 ? void 0 : (0, util_1.inspect)(chunk, { colors: Boolean(colors), compact: 5, depth: 5 }); | ||
| let text; | ||
| if (utils.types.isString(chunk)) { | ||
| text = (0, colorize_1.colorize)(chunk, { color }); | ||
| } | ||
| else if (utils.types.isFunction(chunk)) { | ||
| text = formatFunction(chunk); | ||
| } | ||
| else { | ||
| text = (util_1.inspect === null || util_1.inspect === void 0 ? void 0 : (0, util_1.inspect)(chunk, { colors: Boolean(colors), compact: 5, depth: 5 })) || ''; | ||
| } | ||
| if (shouldMaskMessage) { | ||
@@ -82,0 +97,0 @@ masks === null || masks === void 0 ? void 0 : masks.forEach(mask => { |
+2
-2
| { | ||
| "name": "@applitools/logger", | ||
| "version": "2.2.4", | ||
| "version": "2.2.5", | ||
| "description": "Applitools logger", | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@applitools/utils": "1.12.0", | ||
| "@applitools/utils": "1.13.0", | ||
| "chalk": "4.1.2", | ||
@@ -55,0 +55,0 @@ "debug": "4.3.4" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
68084
1.24%921
1.66%1
Infinity%+ Added
- Removed
Updated