@raypx-kit/logger 0.0.0-alpha.1 → 0.0.0-alpha.2

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
@@ -1,5 +1,14 @@
1
1
  # @raypx-kit/logger
2
2
 
3
+ ## 0.0.0-alpha.2
4
+
5
+ ### Major Changes
6
+
7
+ - a6af9fe: Raise the minimum supported Node.js version from 22.14.0 to 22.21.0. Update
8
+ package engine declarations and library build targets to the new floor, and
9
+ verify installed consumers on Node 22.21.0. Upgrade older Node installations
10
+ before installing these releases. The repository development pin remains 24.22.0.
11
+
3
12
  ## 0.0.0-alpha.1
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -11,7 +11,7 @@ logger through every function.
11
11
  bun add @raypx-kit/logger
12
12
  ```
13
13
 
14
- ESM; Node 22.14+ or Bun. evlog is an external runtime dependency (`^2.33.1`), not
14
+ ESM; Node 22.21+ or Bun. evlog is an external runtime dependency (`^2.33.1`), not
15
15
  bundled or copied. Its framework adapters and their optional peers are not
16
16
  required. The Node-only context entry uses `node:async_hooks`; the root and
17
17
  pipeline entries do not import it.
@@ -1,8 +1,6 @@
1
1
  import { AuditableLogger } from "evlog";
2
- //#region src/context.d.ts
3
2
  /** Run work with an existing logger; the caller retains ownership of emit(). */
4
3
  export declare function runWithLogger<TResult>(logger: AuditableLogger<object>, callback: () => TResult): TResult;
5
4
  export declare function getLogger<T extends object = Record<string, unknown>>(): AuditableLogger<T> | undefined;
6
5
  export declare const useLogger: <T extends object = Record<string, unknown>>() => AuditableLogger<T>;
7
- //#endregion
8
6
  //# sourceMappingURL=context.d.mts.map
package/dist/context.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createLoggerStorage } from "evlog/toolkit/storage";
2
- //#region src/context.ts
2
+ // src/context.ts
3
3
  const context = createLoggerStorage("logger context. Wrap the operation in runWithLogger(logger, callback).", "@raypx-kit/logger/context");
4
4
  /** Run work with an existing logger; the caller retains ownership of emit(). */
5
5
  function runWithLogger(logger, callback) {
@@ -9,7 +9,6 @@ function getLogger() {
9
9
  return context.storage.getStore() === void 0 ? void 0 : context.useLogger();
10
10
  }
11
11
  const useLogger = context.useLogger;
12
- //#endregion
13
12
  export { getLogger, runWithLogger, useLogger };
14
13
 
15
14
  //# sourceMappingURL=context.mjs.map
package/dist/safe.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { DrainContext } from "evlog";
2
- //#region src/safe.d.ts
3
2
  export type JsonValue = null | boolean | number | string | JsonValue[] | {
4
3
  [key: string]: JsonValue;
5
4
  };
@@ -51,5 +50,4 @@ export declare function createEventPolicy({ fields, shapes, maxEventBytes, sensi
51
50
  * drops the event instead of interrupting the caller.
52
51
  */
53
52
  export declare function withEventPolicy(drain: SafeDrain, options: EventPolicyOptions): (context: DrainContext) => void | Promise<void>;
54
- //#endregion
55
53
  //# sourceMappingURL=safe.d.mts.map
package/dist/safe.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/safe.ts
1
+ // src/safe.ts
2
2
  const REDACTED = "[REDACTED]";
3
3
  const ENVELOPE = [
4
4
  "timestamp",
@@ -175,7 +175,6 @@ function withEventPolicy(drain, options) {
175
175
  return drain({ event });
176
176
  };
177
177
  }
178
- //#endregion
179
178
  export { DEFAULT_SENSITIVE_KEYS, createEventPolicy, safeError, withEventPolicy };
180
179
 
181
180
  //# sourceMappingURL=safe.mjs.map
package/dist/stream.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Writable } from "node:stream";
2
- //#region src/stream.d.ts
3
2
  export interface StreamDrainOptions {
4
3
  /** Defaults to `process.stderr`. A caller-owned stream is flushed but never ended. */
5
4
  stream?: Writable;
@@ -20,5 +19,4 @@ export interface StreamDrain {
20
19
  * instead of being thrown into the code that emitted the event.
21
20
  */
22
21
  export declare function createStreamDrain({ stream, maxPending }?: StreamDrainOptions): StreamDrain;
23
- //#endregion
24
22
  //# sourceMappingURL=stream.d.mts.map
package/dist/stream.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/stream.ts
1
+ // src/stream.ts
2
2
  /**
3
3
  * Writes one JSON line per event, in order. Failures are recorded for flush/close
4
4
  * instead of being thrown into the code that emitted the event.
@@ -57,7 +57,6 @@ function createStreamDrain({ stream = process.stderr, maxPending = 1024 } = {})
57
57
  };
58
58
  return drain;
59
59
  }
60
- //#endregion
61
60
  export { createStreamDrain };
62
61
 
63
62
  //# sourceMappingURL=stream.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raypx-kit/logger",
3
- "version": "0.0.0-alpha.1",
3
+ "version": "0.0.0-alpha.2",
4
4
  "description": "Evlog structured logging, wide events, drain pipelines and request-scoped context.",
5
5
  "homepage": "https://github.com/raypx/raypx-kit/tree/canary/packages/logger",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "test:coverage": "bun --bun vp test --run --passWithNoTests --coverage --coverage.reporter=text --coverage.reporter=json --coverage.reporter=lcov",
56
56
  "build": "tsdown",
57
57
  "dev": "tsdown --watch",
58
- "pack:check": "bun pm pack --dry-run --ignore-scripts"
58
+ "pack:check": "bun pm pack --dry-run"
59
59
  },
60
60
  "dependencies": {
61
61
  "evlog": "^2.33.1"
@@ -64,6 +64,6 @@
64
64
  "@vitest/coverage-v8": "^5.0.5"
65
65
  },
66
66
  "engines": {
67
- "node": ">=22.14"
67
+ "node": ">=22.21"
68
68
  }
69
69
  }