Skip to content

docs: autogenerated typedoc reference #2308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 24, 2025
Merged

Conversation

lukegalbraithrussell
Copy link
Contributor

@lukegalbraithrussell lukegalbraithrussell commented Jul 22, 2025

Summary

My last promise to Fil

Previously, we used a docusaurus typedoc plugin that was hard to navigate with our multiple packages. It also doesn't work for our planned setup of only keeping markdown files in this repo.

each package has a docs script in its package.json that generates the reference docs for that package.

After merge

  • check in reference docs - right now they're .gitignored

Requirements (place an x in each [ ])

Copy link

codecov bot commented Jul 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.74%. Comparing base (dd797cf) to head (5abf593).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2308   +/-   ##
=======================================
  Coverage   92.74%   92.74%           
=======================================
  Files          38       38           
  Lines       10660    10660           
  Branches      687      687           
=======================================
  Hits         9887     9887           
  Misses        761      761           
  Partials       12       12           
Flag Coverage Δ
cli-hooks 95.23% <ø> (ø)
cli-test 94.74% <ø> (ø)
oauth 77.39% <ø> (ø)
socket-mode 61.87% <ø> (ø)
web-api 97.99% <ø> (ø)
webhook 96.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lukegalbraithrussell lukegalbraithrussell marked this pull request as ready for review July 23, 2025 17:22
@lukegalbraithrussell lukegalbraithrussell requested a review from a team July 23, 2025 17:22
@@ -50,38 +52,40 @@ Releasing can feel intimidating at first, but rest assured: if you make a mistak

4. For each package to be released, run `npm run test` to verify that tests are passing and code is free of linting errors.

5. On your new branch, bump the version(s) in `package.json` (see [Versioning and Tags](https://github.com/slackapi/node-slack-sdk/blob/main/.github/maintainers_guide.md#-versioning-and-tags))
5. Generate the reference docs for that package by running `npm run docs`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this makes the most sense since the maintainer will be in the proper package subdirectory from the previous step, but may be wrong!

@zimeg zimeg added docs M-T: Documentation work only pkg:web-api applies to `@slack/web-api` pkg:rtm-api applies to `@slack/rtm-api` pkg:webhook applies to `@slack/webhook` pkg:logger applies to `@slack/logger` pkg:types applies to `@slack/types` pkg:oauth applies to `@slack/oauth` pkg:socket-mode applies to `@slack/socket-mode` labels Jul 23, 2025
@zimeg zimeg added the pkg:cli-test applies to `@slack/cli-test` label Jul 23, 2025
@zimeg zimeg changed the title Docs: autogenerated typedoc reference docs: autogenerated typedoc reference Jul 23, 2025
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@lukegalbraithrussell Super impressive changeset and I hold excitement! 📚 ✨

Requesting a few changes before merging this but am wanting to hear what you think about a few things too:

  • Can typedoc be kept with development dependencies?
  • Do we want to use versioned permalinks for code references?

Some other suggestions are more preference but please do keep me updated 👾

Comment on lines +71 to +74
{
type: 'autogenerated',
dirName: 'reference',
},
Copy link
Member

Choose a reason for hiding this comment

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

⭐ Automagic all around!

"useCodeBlocks": true,
"logLevel": "Error",
"readme": "none",
"gitRevision": "main",
Copy link
Member

Choose a reason for hiding this comment

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

🗣️ This seems reasonable to me for links that match:

Defined in: [src/WebClient.ts:133](https://github.com/slackapi/node-slack-sdk/blob/main/packages/web-api/src/WebClient.ts#L133)

Updating this to use the package version might be useful too since we're running this with the release process, but we can revisit this later I think:

https://typedoc.org/documents/Options.Input.html#includeversion

Defined in: [src/WebClient.ts:133](https://github.com/slackapi/node-slack-sdk/blob/49f8acc669f55335541561c50559aaf769d1efff/packages/web-api/src/WebClient.ts#L133)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the one thing is that this would make bookmarks to those links out of date without the user always noticing (or maybe that's a me thing)

Copy link
Member

Choose a reason for hiding this comment

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

Hmm I was imagining bookmarks would be more common to a page like:

Which will be refreshed with each tagged version 🚀

Between versions the code referenced on a specific line of main might change without the reference in docs updating otherwise, and might cause these links to point to missing lines or files altogether!

That's a bit more fragile to me and might be confusing if the reference links don't line up with the tagged version, but that might also be motivation to release more often... 👁️‍🗨️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh! i see. okay i'm sold

@lukegalbraithrussell
Copy link
Contributor Author

@zimeg thanks for your feedback! Fixed the issues

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@lukegalbraithrussell Thanks too for making those changes!

I do remain biased towards versioned code reference but don't think that should block us from these improvements as is - please feel free to merge when the time is right 🤖 ✨

And in rambling now, this makes me want to improve our jsdoc so much! 📚 🔍

@lukegalbraithrussell lukegalbraithrussell merged commit 22117c2 into main Jul 24, 2025
59 checks passed
@lukegalbraithrussell lukegalbraithrussell deleted the docs-autogen-reference branch July 24, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only pkg:cli-test applies to `@slack/cli-test` pkg:logger applies to `@slack/logger` pkg:oauth applies to `@slack/oauth` pkg:rtm-api applies to `@slack/rtm-api` pkg:socket-mode applies to `@slack/socket-mode` pkg:types applies to `@slack/types` pkg:web-api applies to `@slack/web-api` pkg:webhook applies to `@slack/webhook`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants