Skip to content

docs: generate TypeDoc for every package - #18331

Merged
WikiRik merged 1 commit into
WikiRik/postgres-type-parser-formatfrom
WikiRik/typedoc-all-packages
Sep 7, 2026
Merged

WikiRik merged 1 commit into
WikiRik/postgres-type-parser-formatfrom
WikiRik/typedoc-all-packages

Conversation

@WikiRik

@WikiRik WikiRik commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description of Changes

Stacked on #18330. This must land before the TypeScript 6.0 PR above it — TypeDoc 0.27 refuses to run on TypeScript 6.0 (yarn docs exits 3 with "You are running with an unsupported TypeScript version"), and docs is a required CI job.

Every package is documented now

TypeDoc goes to 0.28.19 and typedoc-plugin-missing-exports to 4.1.3.

TypeStrong/typedoc#2467 is fixed in 0.28, and that issue is what kept packages/postgres — and with it every other dialect package — out of the documentation build:

// Note: packages/postgres cannot be included until TypeStrong/typedoc#2467 is fixed
entryPoints: ['packages/core', 'packages/utils', 'packages/validator-js'],

All 12 documented packages are now entry points, so the dialect packages get API docs for the first time. (packages/cli is deliberately not included — it has no typedoc.json.)

Link resolution

The {@link} targets pointing at sql and its members are qualified with @sequelize/core!. Unqualified, TypeDoc cannot resolve a member of the sql tag function and silently drops the link. Those names are mapped to their generated pages through externalSymbolLinkMappings in typedoc.base.json.

This accounts for most of the diff and is mechanical.

Worth knowing: the mappings hardcode relative output paths such as ../functions/_sequelize_core.index.sql.html#fn. Nothing fails loudly if TypeDoc changes its output layout later.

⚠️ One change that deserves a second opinion

Association#foreignKey becomes a getter, which makes it read-only. association.foreignKey = x would now fail to compile and throw at runtime.

This is not required by the compiler — I verified that reverting it still compiles cleanly, including under TypeScript 6.0. It is required only by TypeDoc, which otherwise documents the abstract property and the subclass field as two separate symbols. That is an API change made for a documentation reason, so please weigh it deliberately rather than waving it through; I'm happy to drop it and accept the duplicated symbol instead.

Verification

yarn docs completes with no warnings across all 12 packages, on TypeScript 5.8.3. yarn build, yarn test-unit (2203 passing) and yarn test-typings all pass.


🤖 Generated with Claude Code

https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh

@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: ed1c8f76-6b8c-418f-afec-52e6a3eb0f3e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WikiRik
WikiRik force-pushed the WikiRik/typedoc-all-packages branch from 04bd9ba to 0b1b706 Compare September 3, 2026 12:47
@WikiRik
WikiRik force-pushed the WikiRik/typedoc-all-packages branch from 0b1b706 to 7ba51de Compare September 3, 2026 13:13
@WikiRik
WikiRik force-pushed the WikiRik/typedoc-all-packages branch 2 times, most recently from 29e1c8d to 92e4bc1 Compare September 3, 2026 17:53
@WikiRik
WikiRik force-pushed the WikiRik/typedoc-all-packages branch from 92e4bc1 to 70a18e0 Compare September 3, 2026 20:14
@WikiRik
WikiRik marked this pull request as ready for review September 3, 2026 20:17
@WikiRik
WikiRik requested a review from a team as a code owner September 3, 2026 20:17
@WikiRik
WikiRik requested review from SippieCup and sdepold September 3, 2026 20:17
Update TypeDoc to 0.28.19 and typedoc-plugin-missing-exports to 4.1.3.

TypeStrong/typedoc#2467 is fixed in 0.28, which is what kept packages/postgres,
and with it every other dialect package, out of the documentation build. Add all
of them to the entry points, so the dialect packages are documented too.

Qualify the `{@link}` targets that point at `sql` and its members, and at the
other core exports, with `@sequelize/core!`. Unqualified, TypeDoc cannot resolve
a member of the `sql` tag function and drops the link. Map those names to their
generated pages through `externalSymbolLinkMappings`.

Note for review: `Association#foreignKey` becomes a getter, which makes it
read-only. This is not required by the compiler, only by TypeDoc, which
otherwise documents the abstract property and the subclass field as two separate
symbols. It is an API change and worth a second opinion.

`yarn docs` completes with no warnings across all 13 packages.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh

@SippieCup SippieCup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WikiRik
WikiRik merged commit bbb42ad into main Sep 7, 2026
140 of 141 checks passed
@WikiRik
WikiRik deleted the WikiRik/typedoc-all-packages branch September 7, 2026 05:58
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.

2 participants