|
| 1 | +--- |
| 2 | +"@objectstack/cloud-connection": minor |
| 3 | +"@objectstack/metadata-protocol": minor |
| 4 | +"@objectstack/plugin-approvals": minor |
| 5 | +"@objectstack/plugin-audit": minor |
| 6 | +"@objectstack/plugin-auth": minor |
| 7 | +"@objectstack/plugin-email": minor |
| 8 | +"@objectstack/plugin-reports": minor |
| 9 | +"@objectstack/plugin-sharing": minor |
| 10 | +"@objectstack/plugin-webhooks": minor |
| 11 | +"@objectstack/service-knowledge": minor |
| 12 | +--- |
| 13 | + |
| 14 | +**BREAKING** (compile-time only): twelve logger sink types that declared an |
| 15 | +optional `error` now declare a **non-optional** `warn`, so a durability report |
| 16 | +always has somewhere to land (#9754, #10556). |
| 17 | + |
| 18 | +`minor`, not `major`: during the launch window this stack ships breaking changes |
| 19 | +as `minor` — every publishable package versions in lockstep, so a `major` would |
| 20 | +promote the whole release. `patch` would be wrong in the other direction, because |
| 21 | +this *can* break a consumer's build. |
| 22 | + |
| 23 | +`error` stays optional on every one of these types — hosts legitimately inject |
| 24 | +reduced sinks, and requiring `error` was measured and rejected as #9754 option C. |
| 25 | +What changes is that its *absence* now has a declared, guaranteed destination. |
| 26 | +Call sites keep the `logger?.warn?.(…)` spelling as the backstop for hosts the |
| 27 | +type cannot reach, so **no runtime behaviour changes**: nothing that printed |
| 28 | +before stops printing, and nothing silent starts printing. |
| 29 | + |
| 30 | +### Who has to change, and what to do |
| 31 | + |
| 32 | +Only a caller that hands one of these sinks an object with **no `warn` method** — |
| 33 | +for example `{ info }` or `{ error }` alone. Add a `warn` member; there is no |
| 34 | +rename, no removal, and no stored value or metadata key to rewrite. Every |
| 35 | +construction site inside this repo already supplied one, so the in-repo cost was |
| 36 | +zero; the compile error is reserved for the callers that were silently discarding |
| 37 | +these reports. |
| 38 | + |
| 39 | +The affected types, by package: |
| 40 | + |
| 41 | +- `@objectstack/cloud-connection` — the internal `PluginContext['logger']` |
| 42 | +- `@objectstack/metadata-protocol` — `IndexMigrationLogger` |
| 43 | +- `@objectstack/plugin-approvals` — the internal `MinimalLogger` of `lifecycle-hooks` |
| 44 | +- `@objectstack/plugin-audit` — `AuthEventAuditLogger`, `ReadAuditLogger` |
| 45 | +- `@objectstack/plugin-auth` — `ReconcileMembershipDeps['logger']`, the internal |
| 46 | + `LoggerLike` of `member-role-canonical`, and `AuthManagerOptions['logger']` |
| 47 | +- `@objectstack/plugin-email` — `ReclaimLogger`, via `ReclaimAttachmentContentOptions` |
| 48 | +- `@objectstack/plugin-reports` — `ReportServiceOptions['logger']` |
| 49 | +- `@objectstack/plugin-sharing` — the internal `MinimalLogger` of `bulk-recompute`, |
| 50 | + `rule-hooks` and `record-share-cascade` |
| 51 | +- `@objectstack/plugin-webhooks` — `OptionalLogger`, via `AutoEnqueuerOptions` |
| 52 | +- `@objectstack/service-knowledge` — `KnowledgeLogger` |
| 53 | + |
| 54 | +`AuthManagerOptions['logger']` is the one most likely to be reached from outside: |
| 55 | +`AuthManager` is public surface, its `logger` option stays optional, and a logger |
| 56 | +that *is* supplied must now carry `warn`. The only non-test construction site in |
| 57 | +this repo passes the kernel `Logger`, whose `warn` is already required. |
| 58 | + |
| 59 | +`ReportService` and `AutoEnqueuer` additionally stopped defaulting their logger |
| 60 | +field to `{}`. The field is now honestly optional rather than holding an empty |
| 61 | +object that declared it could report and discarded everything. Behaviour is |
| 62 | +unchanged in both directions. |
| 63 | + |
| 64 | +<!-- adr-0087: not-required (runtime-interface-only packages/plugins/plugin-auth/src/auth-manager.ts#AuthManagerOptions, packages/plugins/plugin-auth/src/reconcile-membership.ts#ReconcileMembershipDeps, packages/metadata-protocol/src/migrations/partial-index-probe.ts#IndexMigrationLogger, packages/plugins/plugin-audit/src/auth-event-audit.ts#AuthEventAuditLogger, packages/plugins/plugin-audit/src/read-audit.ts#ReadAuditLogger, packages/plugins/plugin-reports/src/report-service.ts#ReportServiceOptions, packages/services/service-knowledge/src/knowledge-service.ts#KnowledgeLogger) every tightened type is a plain TypeScript logger interface -- no Zod projection, no metadata surface, and none is referenced by one -- so `objectstack migrate meta` has nothing to rewrite. Nothing is removed or renamed and no stored value moves; the only consumer action is adding a `warn` member at a construction site the compiler names. --> |
0 commit comments