@birtalanrobert/context 0.2.0 → 1.0.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +64 -1
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,69 @@
1
1
  # Changelog
2
2
 
3
- All packages share a version and are released together.
3
+ Each package carries its own version. A release publishes only the packages
4
+ whose version is not yet on the registry; `pnpm release` asks npm and skips the
5
+ rest.
6
+
7
+ ## 1.0.0
8
+
9
+ The version numbers become meaningful.
10
+
11
+ Until now every package shared one version and all twelve were republished
12
+ together. That does not survive contact with per-package releases while the
13
+ major is `0`: under semver a `^0.2.0` range excludes `0.3.0`, so changing one
14
+ package and releasing only it leaves every dependent pinned to the old copy —
15
+ and npm resolves that by installing both. Two copies of `observability` means
16
+ two distinct `MORTAR_LOGGER` symbols, and dependency injection stops working
17
+ with an error that names neither.
18
+
19
+ At `1.x` a caret range accepts later minors, so a package can be released on
20
+ its own and its dependents pick it up on their next install. From here:
21
+
22
+ - **patch** — a fix that changes no signature
23
+ - **minor** — anything added
24
+ - **major** — anything removed or changed in shape
25
+
26
+ ### Added
27
+
28
+ - **`DatabaseModule` can run migrations at boot** — `migrationsRun: true`.
29
+
30
+ Guarded by a Postgres advisory lock, so several replicas starting at once are
31
+ safe: one applies while the others wait, then find nothing pending. TypeORM
32
+ takes no lock of its own, and without one the second replica to reach a
33
+ `CREATE TABLE` fails and that container crash-loops. Also exported directly
34
+ as `runMigrationsWithLock` for release-step scripts.
35
+
36
+ - **`LoggerModule` provides `NestLoggerAdapter` and `LoggingInterceptor`.**
37
+ Both were exported but never registered, so `app.get(NestLoggerAdapter)` and
38
+ `{ provide: APP_INTERCEPTOR, useExisting: LoggingInterceptor }` — the two
39
+ documented ways to use them — both failed. Constructing them by hand still
40
+ works.
41
+
42
+ - **`PUBLIC_ROUTE_KEY` and `PublicRoute()` in `@birtalanrobert/http`**, and the
43
+ health controller now carries them. `@birtalanrobert/auth` re-exports the key
44
+ as `PUBLIC_KEY`, unchanged, so `PermissionsGuard` and `@Public()` behave
45
+ exactly as before — but a globally registered guard no longer 401s the
46
+ readiness probe, which previously left pods that never joined the load
47
+ balancer.
48
+
49
+ - **`auditEntities` and `idempotencyEntities`**, so every package that ships
50
+ entities exports them as an array the same way it exports its migrations.
51
+
52
+ ### Fixed
53
+
54
+ - **A circular import between `logger.module.ts` and the two classes it now
55
+ provides** left `MORTAR_LOGGER` `undefined` at decorator evaluation time, so
56
+ `@Inject(MORTAR_LOGGER)` silently degraded to reflected-type injection and
57
+ Nest reported that it could not resolve `Function`. The tokens moved to a
58
+ leaf module. Under CommonJS this class of bug fails at wiring time, never at
59
+ build time.
60
+
61
+ ### Testing
62
+
63
+ `@nestjs/testing` and `unplugin-swc` are now dev dependencies, and the Nest
64
+ modules are exercised by building a real container rather than by inspecting
65
+ the `DynamicModule` object. Every defect above was invisible to a test that
66
+ asserts on `module.providers` and obvious to one that calls `moduleRef.get()`.
4
67
 
5
68
  ## 0.2.0
6
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@birtalanrobert/context",
3
- "version": "0.2.0",
3
+ "version": "1.0.0",
4
4
  "description": "AsyncLocalStorage request context",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "commonjs",