Skip to content

doc: list the stability status of each module - #36223

Closed
Lxxyx wants to merge 6 commits into
nodejs:masterfrom
Lxxyx:master
Closed

doc: list the stability status of each module#36223
Lxxyx wants to merge 6 commits into
nodejs:masterfrom
Lxxyx:master

Conversation

@Lxxyx

@LxxyxLxxyx commented Nov 22, 2020

Copy link
Copy Markdown
Member

Fixes: #23723

Generate a module compatibility table from out/doc/all.json and insert it into documentation.html/md/json.

Preview:
image

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Nov 22, 2020
@mscdex

Copy link
Copy Markdown
Contributor

I'm not sure something like this is that useful for at least a couple of reasons:

  • Users have to know to specifically navigate to the "about this documentation" to see it/know about it. If anything, something like this should probably live in the left sidebar so it's immediately visible, perhaps as a colored icon next to each category name?

  • Ultimately assigning a stability to each category is misleading/confusing. What does the stability cover? The existence of the module itself? The entirety of the APIs that live under that category? Something else? For example, the Buffer category is shown here as "Stable", however the category contains several deprecated APIs. Even once we figure out what it should be representing, how do we communicate that clearly and easily to the end user (and is this information particularly useful)?

@Lxxyx

Copy link
Copy Markdown
MemberAuthor

@mscdex Thank you for your feedback.

  1. In the previous issues doc: list the stability status of each API in one place? #23723 (comment), it was decided to put the stability table on the "About this documentation" page. And the stability table helps the developer to choose the right module when using Node.js

  2. What is shown here is the stability of the modules. We are not creating a new semantics, just showing it.

  3. As for Buffer, the Buffer module has some deprecated methods, but the module is stable (many modules have a similar situation).

@joyeecheungjoyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, though @mscdex 's idea of adding icons to the sidebar to indicate stability also sounds good. Any thoughts? @nodejs/documentation

@gireeshpunathil

Copy link
Copy Markdown
Member

some improvements possible (splitting the exact API that is non-stable into separate rows etc) , but thinking more about , it may be difficult to maintain - this is simple and useful as is.

@MylesBorins

Copy link
Copy Markdown
Contributor

It looks like Modules is not fully covered. There are a variety of APIs that have stability levels including

  • commonjs modules
  • ES Modules
  • various package.json based features (e.g. package exports)
  • the module API

I think this goes back to @cjihrig's comment that this isn't entirely accurate for all cases as some modules have methods that are deprecated or experimental.

There is also an inconsistency here between the section title and the API name. fs is in lower case but HTTP is all caps (the module is http). I'd like to see a bit more consistency here.

To be clear, this is great work and I'm mostly pointing out edgecases. I won't block, but it would be nice to see some of these cases worked through

@Lxxyx
Lxxyxforce-pushed the master branch 2 times, most recently from e1937d8 to bd75e2cCompareNovember 24, 2020 03:16
@Lxxyx

Copy link
Copy Markdown
MemberAuthor

@MylesBorins Thank you for your feedback.

I updated the code so that the section title and API name are now identical and in lowercase.

Preview:
image

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While there will always be ways to improve it and I don't want to discourage those improvements, this is an improvement as it stands and so I'd be fine with landing it, especially since the table is maintained programmatically and so should not be a maintenance annoyance that gets out of synch with other docs.

@MylesBorinsMylesBorins 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.

This is a great iterative improvement. Definitely places to improve, but that will drive more contributions to node!

LGTM

@Trott

Trott commented Jan 8, 2021

Copy link
Copy Markdown
Member

dgram is showing up in an unexpected place in the table (because it's being ordered as udp I guess). Not a blocking comment. This can land. But if it's easy enough to fix, let's do that.

@Lxxyx

Lxxyx commented Jan 8, 2021

Copy link
Copy Markdown
MemberAuthor

dgram is showing up in an unexpected place in the table (because it's being ordered as udp I guess). Not a blocking comment. This can land. But if it's easy enough to fix, let's do that.

Thanks for the reply, the problem has been fixed.

Preview

image

Comment threadMakefile
Comment threadtools/doc/stability.js Outdated
Lxxyxand others added 2 commits January 19, 2021 12:26
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

@aduh95aduh95 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.

Apologies, my suggestion was flawed – we need to specify the position, otherwise it sometimes jump to the end of the file.

Comment threadtools/doc/stability.js Outdated
Comment threadtools/doc/stability.js Outdated
Lxxyxand others added 2 commits January 19, 2021 19:13
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Comment threadtools/doc/stability.js Outdated
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 19, 2021
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

Copy link
Copy Markdown
Contributor

Landed in 2bb42bf

@aduh95aduh95 closed this Jan 20, 2021
aduh95 pushed a commit that referenced this pull request Jan 20, 2021
Fixes: #23723
PR-URL: #36223
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
ruyadorno pushed a commit that referenced this pull request Jan 22, 2021
Fixes: #23723
PR-URL: #36223
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@ruyadornoruyadorno mentioned this pull request Jan 22, 2021
ruyadorno pushed a commit that referenced this pull request Jan 25, 2021
Fixes: #23723
PR-URL: #36223
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request May 1, 2021
Fixes: #23723
PR-URL: #36223
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@danielleadamsdanielleadams mentioned this pull request May 3, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.buildIssues and PRs related to build files or the CI.docIssues and PRs related to the documentations.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc: list the stability status of each API in one place?

11 participants

@Lxxyx@mscdex@gireeshpunathil@MylesBorins@Trott@nodejs-github-bot@aduh95@fhinkel@jasnell@joyeecheung@aymen94