@contrail/util 1.2.1-alpha-plat927-3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.1] - 2026-03-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Structured logging support — util now uses the shared `@contrail/telemetry` logger. Logs from util automatically include request context when running in a service.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Minimum Node.js version is now 20 (required by pino v10).
|
|
19
|
+
|
|
10
20
|
## [1.2.0] - 2026-03-09
|
|
11
21
|
|
|
12
22
|
### Added
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare class StringUtil {
|
|
2
|
-
static logSomething(): void;
|
|
3
2
|
static convertToHyphenCase(entityName: string, transformToLowerCase?: boolean): string;
|
|
4
3
|
static parseVariables(variableString: string, data: any, quoteStrings?: boolean): string;
|
|
5
4
|
static convertToCamelCase(str: any): any;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StringUtil = void 0;
|
|
4
|
-
const telemetry_1 = require("@contrail/telemetry");
|
|
5
4
|
class StringUtil {
|
|
6
|
-
static logSomething() {
|
|
7
|
-
console.log('hi from console 🚨');
|
|
8
|
-
telemetry_1.logger.info('hi from logger 💥');
|
|
9
|
-
}
|
|
10
5
|
static convertToHyphenCase(entityName, transformToLowerCase = true) {
|
|
11
6
|
const slugName = entityName === null || entityName === void 0 ? void 0 : entityName.split(/(?=[A-Z])/).join('-');
|
|
12
7
|
if (slugName && transformToLowerCase) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/util",
|
|
3
|
-
"version": "1.2.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "General JavaScript utilities",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
10
10
|
"format-check": "prettier --check \"src/**/*.ts\" \"src/**/*.js\"",
|
|
11
11
|
"lint": "tslint -p tsconfig.json",
|
|
12
|
-
"test": "LOG_LEVEL=silent jest"
|
|
12
|
+
"test": "LOG_LEVEL=silent NODE_OPTIONS=--no-node-snapshot jest"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [],
|
|
15
15
|
"author": "",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"testEnvironment": "node"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@contrail/telemetry": "^1.0.2
|
|
42
|
+
"@contrail/telemetry": "^1.0.2",
|
|
43
43
|
"@contrail/types": "^3.1.3",
|
|
44
44
|
"fflate": "^0.8.2",
|
|
45
45
|
"lodash": "^4.17.21"
|