@carecard/telemetry 3.16.0 → 3.18.0

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/README.md CHANGED
@@ -2,15 +2,24 @@
2
2
 
3
3
  Privacy-safe OpenTelemetry tracing for CareCard Node.js server processes.
4
4
 
5
+ Mandatory repository policy: load
6
+ `$pkg-telemetry-coding-standards-and-best-practices` before changing, reviewing,
7
+ testing, documenting, or releasing this package.
8
+
5
9
  The package owns one explicit tracing bootstrap for CareCard services. It uses
6
10
  W3C Trace Context, exports OTLP/HTTP spans to Grafana Alloy, and instruments
7
11
  HTTP, PostgreSQL, and Kafka without sending application payloads to the tracing
8
12
  backend.
9
13
 
14
+ Non-negotiable TypeScript type rule: Never use the TypeScript type `any`; always
15
+ use specific domain types, generics, existing project types, or `unknown` with
16
+ explicit narrowing in all TypeScript-family files (`.ts`, `.tsx`, `.mts`,
17
+ `.cts`, and `.d.ts`).
18
+
10
19
  ## Install
11
20
 
12
21
  ```sh
13
- npm install @carecard/telemetry@3.16.0 --save-exact
22
+ npm install @carecard/telemetry@3.17.0 --save-exact
14
23
  ```
15
24
 
16
25
  ## Bootstrap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carecard/telemetry",
3
- "version": "3.16.0",
3
+ "version": "3.18.0",
4
4
  "description": "Privacy-safe OpenTelemetry tracing for CareCard Node.js services",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -31,10 +31,10 @@
31
31
  "registry": "https://registry.npmjs.org/"
32
32
  },
33
33
  "scripts": {
34
- "test": "node --test test/*.test.js test/*.test.mjs",
34
+ "test": "node --test test/*.test.js test/*.test.mjs scripts/packageTaskRunner.test.mjs",
35
35
  "test:types": "tsc --noEmit",
36
36
  "test:coverage": "node --test --experimental-test-coverage --test-coverage-lines=90 --test-coverage-functions=90 --test-coverage-branches=85 test/*.test.js test/*.test.mjs",
37
- "test:All": "npm run test && npm run test:types && npm run test:coverage",
37
+ "test:All": "node scripts/runPackageTask.mjs test:All",
38
38
  "format": "prettier --write .",
39
39
  "format:check": "prettier --check .",
40
40
  "prepare": "husky",
@@ -15,10 +15,8 @@ function parseBoolean(value, defaultValue) {
15
15
  }
16
16
 
17
17
  function parseEndpoint(value = DEFAULT_ENDPOINT) {
18
- let endpoint;
19
- try {
20
- endpoint = new URL(value);
21
- } catch {
18
+ const endpoint = URL.parse(value);
19
+ if (endpoint === null) {
22
20
  throw new Error('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT must be a valid http or https URL');
23
21
  }
24
22
  if (!['http:', 'https:'].includes(endpoint.protocol)) {