Skip to content

docs(changelog): upgrade notes of interface-database 0.3.0 - #84

Merged
Upd4ting merged 1 commit into
mainfrom
docs/ant-1816
Nov 10, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
docs/ant-1816

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Why

A user upgrading @antelopejs/interface-database to 0.3.0 should learn from its release notes which changes break their code and how to adapt. Today the ## v0.3.0 section of CHANGELOG.md and the v0.3.0 GitHub release list the five type-level changes (#51, #59, #62, #63, #65) only as "Land the cleanup campaign on main (#71, #72)". Their upgrade notes live in UPGRADING.md (from #70), and the manual step that copies them into the changelog was never done.

What

Adds a ### Upgrade notes block under ## v0.3.0 in CHANGELOG.md. It holds the UPGRADING.md v0.3.0 bullets verbatim, right after the compare link, which is where the v0.1.11 block sits. No implementer action is listed: all five changes are compile-time types, so database modules have nothing new to implement.

Pending step for Antony

The v0.3.0 GitHub release body has not been edited. Paste the text under Release notes to paste into https://github.com/AntelopeJS/interface-database/releases/tag/v0.3.0. It is the current release body with the same upgrade-notes block inserted after the compare link.

Release notes to paste

[compare changes](https://github.com/AntelopeJS/interface-database/compare/v0.2.0...v0.3.0)

### Upgrade notes

- **`update()` with an `any`-typed argument resolves to `never`.** Reading its result, for example `.run()`, fails to compile (TS2339). A function argument still matches only the updater overload and an object argument only the document overload, so typed calls are unchanged. Unchecked `any` writes become compile errors. `ReturnType<typeof table.update>` is now `Query<number>`, so `await ...run()` is a `number` instead of `any` ([#65](https://github.com/AntelopeJS/interface-database/pull/65)).
- **The entries of a `FieldType` codec are typed `unknown`.** `IoTsCodec` is now a type alias with the same members, so `Object.entries` on a codec gives `[string, unknown]` instead of `[string, any]`. A consumer that passed those entries on as `FieldType` stops compiling. Narrow each entry first. Every value assignable to `FieldType` before still is ([#63](https://github.com/AntelopeJS/interface-database/pull/63)).
- **Stage operands are checked as query values.** A generic `T` operand, or a class instance with methods such as `ObjectId`, no longer compiles as a stage operand. Neither does an operand that holds a `bigint`, a `symbol`, a function or a value typed `unknown`. `eq`, `ne`, `gt`, `ge`, `lt`, `le` and `includes` check their operand against the receiver's type. `constant`, `default`, `sub`, `merge` and the default of `key` refuse an `interface`-typed record: declare it with `type`. A generic `K extends keyof T` no longer compiles as a `ValueProxy.key`. `any` stays `any` ([#62](https://github.com/AntelopeJS/interface-database/pull/62)).
- **Query stages are typed by name.** `QueryStage` is a union discriminated on `stage`, built from the new exported `QueryStageMap`, and `QueryStage(name, options, ...args)` is typed by name. The protected `StagedObject#stage(type, stage)` takes a built `QueryStage`. `ValueProxy#eq` and `#ne` take `StagedObject | T` instead of `unknown`. `pluck` answers `Pick<T, K>` and `without` answers `Omit<T, K>`. Key, table, index and field names are `keyof T & string`. `Table#between` bounds are `T[TK] & IndexBound`, so a field that holds no index value stops compiling as a bound. `ValueProxy#add` takes an operand that fits its receiver, so two dates, or a string on a number, stop at compile time ([#51](https://github.com/AntelopeJS/interface-database/pull/51)).
- **Written documents are typed as write values.** `DeepPartial` drops `bigint` and `symbol` leaves, maps a field typed `unknown` to `WriteValue`, keeps a field typed `any` as `any`, and maps any other non-object type to `never`. The `insert`, `update` and `replace` builders compile only while every leaf of the document is a `WriteValue`: text, a number, a boolean, `null`, `undefined`, a `Date`, a list or a nested document ([#59](https://github.com/AntelopeJS/interface-database/pull/59)).

### 📖 Documentation

- **readme:** Use one Discord invite ([#57](https://github.com/AntelopeJS/interface-database/pull/57))
- **github:** Send questions and ideas to Discord ([#64](https://github.com/AntelopeJS/interface-database/pull/64))

### 📦 Build

- **deps:** Test against @antelopejs/mongodb 1.6.0 ([#46](https://github.com/AntelopeJS/interface-database/pull/46))
- **deps:** Bump @antelopejs/tooling-configs to 0.2.17 ([#48](https://github.com/AntelopeJS/interface-database/pull/48))

### 🏡 Chore

- Land the cleanup campaign on main ([#71](https://github.com/AntelopeJS/interface-database/pull/71))
- Land the cleanup campaign on main ([#72](https://github.com/AntelopeJS/interface-database/pull/72))

### ❤️ Contributors

- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))

Proof

CHANGELOG diff:

diff --git a/CHANGELOG.md b/CHANGELOG.md
index b102285..05433e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,14 @@
 
 [compare changes](https://github.com/AntelopeJS/interface-database/compare/v0.2.0...v0.3.0)
 
+### Upgrade notes
+
+- **`update()` with an `any`-typed argument resolves to `never`.** Reading its result, for example `.run()`, fails to compile (TS2339). A function argument still matches only the updater overload and an object argument only the document overload, so typed calls are unchanged. Unchecked `any` writes become compile errors. `ReturnType<typeof table.update>` is now `Query<number>`, so `await ...run()` is a `number` instead of `any` ([#65](https://github.com/AntelopeJS/interface-database/pull/65)).
+- **The entries of a `FieldType` codec are typed `unknown`.** `IoTsCodec` is now a type alias with the same members, so `Object.entries` on a codec gives `[string, unknown]` instead of `[string, any]`. A consumer that passed those entries on as `FieldType` stops compiling. Narrow each entry first. Every value assignable to `FieldType` before still is ([#63](https://github.com/AntelopeJS/interface-database/pull/63)).
+- **Stage operands are checked as query values.** A generic `T` operand, or a class instance with methods such as `ObjectId`, no longer compiles as a stage operand. Neither does an operand that holds a `bigint`, a `symbol`, a function or a value typed `unknown`. `eq`, `ne`, `gt`, `ge`, `lt`, `le` and `includes` check their operand against the receiver's type. `constant`, `default`, `sub`, `merge` and the default of `key` refuse an `interface`-typed record: declare it with `type`. A generic `K extends keyof T` no longer compiles as a `ValueProxy.key`. `any` stays `any` ([#62](https://github.com/AntelopeJS/interface-database/pull/62)).
+- **Query stages are typed by name.** `QueryStage` is a union discriminated on `stage`, built from the new exported `QueryStageMap`, and `QueryStage(name, options, ...args)` is typed by name. The protected `StagedObject#stage(type, stage)` takes a built `QueryStage`. `ValueProxy#eq` and `#ne` take `StagedObject | T` instead of `unknown`. `pluck` answers `Pick<T, K>` and `without` answers `Omit<T, K>`. Key, table, index and field names are `keyof T & string`. `Table#between` bounds are `T[TK] & IndexBound`, so a field that holds no index value stops compiling as a bound. `ValueProxy#add` takes an operand that fits its receiver, so two dates, or a string on a number, stop at compile time ([#51](https://github.com/AntelopeJS/interface-database/pull/51)).
+- **Written documents are typed as write values.** `DeepPartial` drops `bigint` and `symbol` leaves, maps a field typed `unknown` to `WriteValue`, keeps a field typed `any` as `any`, and maps any other non-object type to `never`. The `insert`, `update` and `replace` builders compile only while every leaf of the document is a `WriteValue`: text, a number, a boolean, `null`, `undefined`, a `Date`, a list or a nested document ([#59](https://github.com/AntelopeJS/interface-database/pull/59)).
+
 ### 📖 Documentation
 
 - **readme:** Use one Discord invite ([#57](https://github.com/AntelopeJS/interface-database/pull/57))

pnpm run checks:

> @antelopejs/interface-database@0.3.1 checks
> antelopejs-checks

Checks: 9 passed, 0 failed.

The CI docs check reads only README.md and docs/, so this PR does not change its inputs. It runs in CI on this PR.

@Upd4ting
Upd4ting merged commit e1b5c68 into main Nov 10, 2026
7 checks passed
@Upd4ting
Upd4ting deleted the docs/ant-1816 branch November 10, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant