release: v2.3.0 - #57
Open
MrRefactoring wants to merge 6 commits into
Open
MrRefactoring wants to merge 6 commits into
MrRefactoring wants to merge 6 commits into
Conversation
The changelog section is renamed from `Unreleased`, which is what the release workflow greps for, and opens with the one warning a consumer needs: `Action` branches on `type` now, so reading `action.data.<field>` without narrowing first stops compiling. That is a compile break in a minor release, so the lede names it rather than leaving it to be found in a bullet, and it names the escape hatch too: `ActionUnknown` is exported, and casting to it reads `data` as `any` again. It hands back exactly the blindness this release removes, which is why it reads as a bookmark rather than a fix. The sections are reordered so `Changed` comes first. Nothing else in the release competes with the breaking change for attention.
getBoardActions, getCardActions, getListActions, getMemberActions and getOrganizationActions typed `fields` as an `Action`; getBoardLabels typed it as a `Label`. Trello's spec points those parameters at the object schema instead of at the matching ActionFields and LabelFields enums, so the client asked for a request the API could never answer. All six now take the shape the other thirty-five fields parameters already had: `string | string[]`, widened with the documented names so autocomplete offers them, so `fields: 'id,name'` and `fields: ['id', 'name']` both work.
The endpoint pages expanded every parameter and model type in place, so docs/api reached 22 MB with no links in it and VitePress ran out of an 8 GB heap before the build finished. typedoc keeps no aliasSymbol on a type that resolves through a conditional type, which is what `z.infer<typeof Schema>` is, so checker.typeToTypeNode serialized the structure instead of the name it was written under. The patch reads the annotation the author actually wrote, which typedoc already holds in maybeNode, and converts that as a reference. typedoc-plugin-zod then fills the pages those references point at. docs/api is 9.0 MB with no warnings, and the build peaks at 2.4 GB.
MrRefactoring
had a problem deploying
to
github-pages
September 10, 2026 19:33 — with
GitHub Actions
Failure
Eighty parameter schemas and one model paired an openEnum with a plain z.string() branch in the same union. The branch accepted nothing the open enum did not already accept, and in the type a bare string swallowed the literal names beside it, so an editor offered nothing for fields: '…', filter: '…' or pos: '…' — only the array form still suggested anything. Any string is still accepted, and nothing that compiled before stops compiling.
patches/typedoc@0.28.20.patch is keyed to that exact version, while the manifest allowed any 0.28.x. The next pnpm update would have resolved past it, dropped the patch, and taken docs/api back to 22 MB and an out-of-memory build — the thing the patch is there to prevent. The Docs workflow now also watches patches/ and pnpm-workspace.yaml, so a reissued patch rebuilds the reference instead of leaving Pages on the last build that happened to touch src/.
An array in searchParams reaches the wire as one comma-separated value through String(value), and nothing held that in place. Swapping set for a per-element append — the usual way arrays get "fixed" in a query builder — would send ?fields=id&fields=name, Trello would read the last one, and no test would have noticed.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts v2.3.0.
What ships
Actionis a union discriminated ontype. Twenty-nine action types carry their owndatashape, soaction.data.texton acommentCardis astringand reading a field that type does not have is a compile error rather thanundefinedat runtime. This is a compile break in a minor release;ActionUnknownis exported as an escape hatch. The CHANGELOG opens with it.fieldson six endpoints asked for a whole object.getBoardActions,getCardActions,getListActions,getMemberActionsandgetOrganizationActionstyped it asAction;getBoardLabelstyped it asLabel. Trello's spec points those parameters at the object schema instead of at the matchingActionFieldsandLabelFieldsenums. All six now take the shape the other thirty-fivefieldsparameters already had:string | string[], widened with the documented names so autocomplete offers them.The published API reference builds again. It did not before: every parameter and model type was expanded inline on the endpoint pages,
docs/apireached 22 MB with no links in it, and VitePress ran out of an 8 GB heap after roughly fifteen minutes.Why the docs needed a patch
type X = z.infer<typeof XSchema>resolves through a conditional type. TypeScript keeps noaliasSymbolon the result, sochecker.typeToTypeNodeserializes the structure instead of the name, and typedoc inlines it. Declaration emit does not have this problem, in TypeScript 6.0.3 or 7.0.2; onlytypeToTypeNodeloses the alias.typedoc already holds the annotation the author wrote, in
maybeNode, and uses it only for mapped types.patches/typedoc@0.28.20.patchreads it and converts it as a reference.typedoc-plugin-zodthen fills the pages those references point at with the fields and JSDoc the schemas carry.The patch is not upstreamable as written: it breaks typedoc's handling of the
@inlinetag, transient symbols and default exports, none of which this project uses. An issue with a zod-free reproduction goes upstream separately. Scope of the patch here is the docs build; it is adevDependenciespatch and reaches nothing that is published to npm.Measured
docs/apidocs:buildpnpm run build,pnpm run lintandpnpm vitest run(181 tests) are green.Not in this release
feat/schema-mismatchand its breaking changes, the 3.0.0 number, and the migration page.What the review changed
Four findings came out of the review of this branch; all four are in.
Open enums lost their own suggestions. Eighty parameter schemas and one model carried a plain
z.string()next to theopenEnumin the same union. It accepted nothing the open enum did not already accept, and in the type a barestringswallowed the literal names beside it — sofields: '…',filter: '…'andpos: '…'offered nothing, and only the array form still suggested anything. Fixed at the source and resynced; nothing that compiled before stops compiling.One consequence worth naming: with the
z.string()branch gone,TokenPermission.idModelis a closedz.enum(['*'])underTRELLO_STRICT_SCHEMAS. Normal mode is unchanged and consumers are unaffected — but the audit run will now speak up if a token carries a concrete id, which is what the audit is for.The docs patch was one
pnpm updatefrom falling off.patches/typedoc@0.28.20.patchis keyed to that exact version while the manifest allowed any 0.28.x; typedoc is pinned now. The Docs workflow also watchespatches/andpnpm-workspace.yaml, so a reissued patch rebuilds the reference rather than leaving Pages on whatever last touchedsrc/.The comma join was untested. An array in
searchParamsreaches the wire as one comma-separated value throughString(value)— the form this release newly advertises for six endpoints — and nothing held it in place. Two tests inbuildUrl.test.tsdo.Still open, deliberately:
docs:buildruns only on push tomaster, so the reference build is not gated on a PR. It builds locally after these changes —docs/apiat 9.0 MB — but adding a PR gate is a separate decision about CI time.