@theholocron/observability 0.6.0 → 0.6.1-alpha.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/README.md CHANGED
@@ -16,18 +16,13 @@ pnpm install @theholocron/observability
16
16
 
17
17
  ## Usage
18
18
 
19
- See the [documentation](https://docs.theholocron.dev/observability/) for the API.
19
+ See the [documentation](https://docs.theholocron.dev/holocron/observability/) for the API.
20
20
 
21
21
  <!-- /holocron:installation -->
22
22
 
23
- ## Installation
23
+ ## Peer dependencies
24
24
 
25
- ```bash
26
- pnpm add @theholocron/observability
27
- ```
28
-
29
- Then add the peer dependencies for the subpaths you use — they are all
30
- optional:
25
+ Add the peers for the subpaths you use — they are all optional:
31
26
 
32
27
  | Subpath | Peers |
33
28
  | -------------------------------------- | -------------------------------------- |
@@ -37,7 +32,7 @@ optional:
37
32
  | `@theholocron/observability/analytics` | `posthog-node` |
38
33
  | `@theholocron/observability/testing` | `vitest` |
39
34
 
40
- ## Usage
35
+ ## Examples
41
36
 
42
37
  Application modules depend on the interfaces from `/core`, never a concrete
43
38
  adapter:
@@ -88,11 +83,11 @@ expect(log.info).toHaveBeenCalledWith(expect.objectContaining({ target: "product
88
83
  expect(errors.captureException).not.toHaveBeenCalled();
89
84
  ```
90
85
 
91
- For a non-vitest context that just needs a `Logger` with no output (an
86
+ For a non-vitest context that needs a `Logger` with no output (an
92
87
  example, a non-test opt-out path), use `NoopLogger` from `/core` — it
93
88
  discards everything, `child()` returns itself.
94
89
 
95
- See the [documentation](https://docs.theholocron.dev/observability/) for the
90
+ See the [documentation](https://docs.theholocron.dev/holocron/observability/) for the
96
91
  full API.
97
92
 
98
93
  ## Development
@@ -115,6 +110,6 @@ full API.
115
110
  <!-- holocron:releases -->
116
111
 
117
112
  Automated via [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
118
- See the [releases page](https://docs.theholocron.dev/observability/releases) and [CHANGELOG.md](./CHANGELOG.md).
113
+ See [CHANGELOG.md](./CHANGELOG.md).
119
114
 
120
115
  <!-- /holocron:releases -->
@@ -19,7 +19,7 @@ interface FakeAnalyticsSink extends AnalyticsSink {
19
19
  * expect(analytics.capture).toHaveBeenCalledWith("abc123", "deploy_triggered", { branch: "main" });
20
20
  * ```
21
21
  */
22
- export declare function fakeAnalyticsSink(): FakeAnalyticsSink;
22
+ declare function fakeAnalyticsSink(): FakeAnalyticsSink;
23
23
  //#endregion
24
24
  //#region src/testing/fake-error-sink.d.ts
25
25
  /** A {@link CommandSpan} whose methods are spies. */
@@ -46,7 +46,7 @@ interface FakeErrorSink extends ErrorSink {
46
46
  * expect(errors.captureException).not.toHaveBeenCalled();
47
47
  * ```
48
48
  */
49
- export declare function fakeErrorSink(): FakeErrorSink;
49
+ declare function fakeErrorSink(): FakeErrorSink;
50
50
  //#endregion
51
51
  //#region src/testing/fake-logger.d.ts
52
52
  /** A {@link Logger} whose level methods are spies; `child()` returns itself. */
@@ -68,7 +68,7 @@ interface FakeLogger extends Logger {
68
68
  * expect(log.info).toHaveBeenCalledWith(expect.objectContaining({ target: "production" }), "deploying");
69
69
  * ```
70
70
  */
71
- export declare function fakeLogger(): FakeLogger;
71
+ declare function fakeLogger(): FakeLogger;
72
72
  //#endregion
73
73
  //#region src/testing/silence-logger.d.ts
74
74
  /**
@@ -91,10 +91,10 @@ export declare function fakeLogger(): FakeLogger;
91
91
  * });
92
92
  * ```
93
93
  */
94
- export declare function silenceLogger<T extends {
94
+ declare function silenceLogger<T extends {
95
95
  createLogger: unknown;
96
96
  }>(actual: T): Omit<T, "createLogger"> & {
97
97
  createLogger: typeof createLogger;
98
98
  };
99
99
  //#endregion
100
- export type { FakeAnalyticsSink, FakeErrorSink, FakeLogger, FakeSpan };
100
+ export { type FakeAnalyticsSink, type FakeErrorSink, type FakeLogger, type FakeSpan, fakeAnalyticsSink, fakeErrorSink, fakeLogger, silenceLogger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/observability",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-alpha.1",
4
4
  "description": "Logging, error tracking, and analytics — one interface, swappable backends.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -12,9 +12,13 @@
12
12
  "pino",
13
13
  "theholocron"
14
14
  ],
15
- "homepage": "https://docs.theholocron.dev/observability/",
16
- "bugs": "https://github.com/theholocron/observability/issues",
17
- "repository": "theholocron/observability",
15
+ "homepage": "https://docs.theholocron.dev/holocron/observability/",
16
+ "bugs": "https://github.com/theholocron/holocron/issues",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/theholocron/holocron.git",
20
+ "directory": "observability"
21
+ },
18
22
  "license": "MIT",
19
23
  "author": "Newton Koumantzelis",
20
24
  "sideEffects": false,
@@ -54,75 +58,25 @@
54
58
  "files": [
55
59
  "dist"
56
60
  ],
57
- "scripts": {
58
- "build": "tsdown",
59
- "delivery.build": "tsdown",
60
- "holocron": "holocron",
61
- "knowledge.wiki": "holocron run knowledge.wiki --",
62
- "platform.commitStandards": "holocron run platform.commitStandards --",
63
- "platform.repoSync": "holocron run platform.repoSync --",
64
- "prepare": "husky",
65
- "security.secretDetection": "holocron run security.secretDetection --",
66
- "sourceQuality.deadCodeAnalysis": "holocron run sourceQuality.deadCodeAnalysis --",
67
- "sourceQuality.formatting": "holocron run sourceQuality.formatting --",
68
- "sourceQuality.staticAnalysis": "eslint .",
69
- "sourceQuality.structuredDataValidation": "holocron run sourceQuality.structuredDataValidation --",
70
- "test:coverage": "vitest run --coverage",
71
- "verification.typeSafety": "tsc --noEmit",
72
- "verification.unitTests": "vitest run"
73
- },
74
61
  "devDependencies": {
75
- "@astrojs/react": "catalog:",
76
- "@astrojs/starlight": "catalog:",
77
- "@axiomhq/pino": "catalog:",
78
- "@commitlint/cli": "catalog:",
79
- "@commitlint/types": "catalog:",
80
- "@eslint/js": "catalog:",
81
- "@semantic-release/changelog": "catalog:",
82
- "@semantic-release/exec": "catalog:",
83
- "@semantic-release/git": "catalog:",
84
- "@semantic-release/github": "catalog:",
85
- "@sentry/node": "catalog:",
86
- "@theholocron/astro-config": "catalog:configs",
87
- "@theholocron/astromech": "catalog:holocron",
88
- "@theholocron/cli": "catalog:holocron",
89
- "@theholocron/commitlint-config": "catalog:configs",
90
- "@theholocron/docs-theme": "catalog:",
91
- "@theholocron/eslint-config": "catalog:configs",
92
- "@theholocron/holocron-plugin-cloudflare": "catalog:holocron",
93
- "@theholocron/holocron-plugin-fern": "catalog:holocron",
94
- "@theholocron/holocron-plugin-github": "catalog:holocron",
95
- "@theholocron/lint-staged-config": "catalog:configs",
96
- "@theholocron/prettier-config": "catalog:configs",
97
- "@theholocron/semantic-release-config": "catalog:configs",
98
- "@theholocron/skills": "^1.3.2",
99
- "@theholocron/tsconfig": "catalog:configs",
100
- "@theholocron/tsdown-config": "catalog:configs",
101
- "@theholocron/vitest-config": "catalog:configs",
102
- "@types/node": "catalog:",
103
- "@vitest/coverage-v8": "catalog:",
104
- "astro": "catalog:",
105
- "conventional-changelog-conventionalcommits": "catalog:",
106
- "eslint": "catalog:",
107
- "eslint-plugin-n": "catalog:",
108
- "eslint-plugin-simple-import-sort": "catalog:",
109
- "globals": "catalog:",
110
- "husky": "catalog:",
111
- "knip": "catalog:",
112
- "lint-staged": "catalog:",
113
- "pino": "catalog:",
114
- "pino-pretty": "catalog:",
115
- "posthog-node": "catalog:",
116
- "prettier": "catalog:",
117
- "react": "catalog:",
118
- "react-dom": "catalog:",
119
- "semantic-release": "catalog:",
120
- "sort-package-json": "catalog:",
121
- "tsdown": "catalog:",
122
- "turbo": "^2.10.12",
123
- "typescript": "catalog:",
124
- "typescript-eslint": "catalog:",
125
- "vitest": "catalog:"
62
+ "@axiomhq/pino": "^2.0.0",
63
+ "@sentry/node": "^10.70.0",
64
+ "@theholocron/eslint-config": "^8.8.2",
65
+ "@theholocron/tsconfig": "^8.8.2",
66
+ "@theholocron/tsdown-config": "^8.8.2",
67
+ "@theholocron/vitest-config": "^8.8.2",
68
+ "@types/node": "^26",
69
+ "@vitest/coverage-v8": "^4.1.11",
70
+ "@vitest/eslint-plugin": "^1.6.27",
71
+ "eslint": "^10.8.1",
72
+ "eslint-plugin-n": "^18.3.0",
73
+ "globals": "^17.11.0",
74
+ "pino": "^10.3.1",
75
+ "pino-pretty": "^13.1.3",
76
+ "posthog-node": "^5.51.6",
77
+ "tsdown": "^0.22.14",
78
+ "typescript": "^5.9.3",
79
+ "vitest": "^4.1.11"
126
80
  },
127
81
  "peerDependencies": {
128
82
  "@axiomhq/pino": ">=2",
@@ -152,19 +106,17 @@
152
106
  "optional": true
153
107
  }
154
108
  },
155
- "packageManager": "pnpm@10.33.0",
156
109
  "engines": {
157
- "node": ">=22.0.0"
110
+ "node": ">=22"
158
111
  },
159
112
  "publishConfig": {
160
113
  "access": "public"
161
114
  },
162
- "pnpm": {
163
- "overrides": {
164
- "@commitlint/config-conventional>conventional-changelog-conventionalcommits": "7",
165
- "conventional-changelog-conventionalcommits": "9.3.1"
166
- }
167
- },
168
- "releases": "https://github.com/theholocron/observability/releases",
169
- "wiki": "https://github.com/theholocron/observability/wiki"
170
- }
115
+ "scripts": {
116
+ "delivery.build": "tsdown",
117
+ "sourceQuality.staticAnalysis": "eslint .",
118
+ "test:watch": "vitest",
119
+ "verification.typeSafety": "tsc --noEmit",
120
+ "verification.unitTests": "vitest run"
121
+ }
122
+ }