-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
doc: add missing options.info for ZstdOptions #58360
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
nodejs-github-bot
merged 1 commit into
nodejs:main
from
hkleungai:doc-api-zlib-add-missing-ZstdOptions.info
May 28, 2025
Merged
doc: add missing options.info for ZstdOptions #58360
nodejs-github-bot
merged 1 commit into
nodejs:main
from
hkleungai:doc-api-zlib-add-missing-ZstdOptions.info
May 28, 2025
Conversation
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
aduh95
reviewed
May 25, 2025
doc/api/zlib.md
Outdated
@@ -1049,6 +1049,7 @@ Each Zstd-based class takes an `options` object. All options are optional. | |||
* `params` {Object} Key-value object containing indexed [Zstd parameters][]. | |||
* `maxOutputLength` {integer} Limits output size when using | |||
[convenience methods][]. **Default:** [`buffer.kMaxLength`][] | |||
* `info` {boolean} (If `true`, returns an object with `buffer` and `engine`.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
* `info` {boolean} (If `true`, returns an object with `buffer` and `engine`.) | |
* `info` {boolean} If `true`, returns an object with `buffer` and `engine`. **Default:** `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also repushed #58359. Please help review.
Source code of `class Zstd` calls ctor of parent `ZlibBase` via `super()` By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is further used to determine the return shapes of `*Sync()` methods in children class. This information will need to be revealed in nodejs doc. This PR is separated from the one for `BrotliOptions`, since these two changes potentially need to be backported to different minimum versions.
9ba31de
to
714ee55
Compare
aduh95
approved these changes
May 28, 2025
Landed in d5345b6 |
targos
pushed a commit
that referenced
this pull request
May 31, 2025
Source code of `class Zstd` calls ctor of parent `ZlibBase` via `super()` By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is further used to determine the return shapes of `*Sync()` methods in children class. This information will need to be revealed in nodejs doc. This PR is separated from the one for `BrotliOptions`, since these two changes potentially need to be backported to different minimum versions. PR-URL: #58360 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jun 10, 2025
Source code of `class Zstd` calls ctor of parent `ZlibBase` via `super()` By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is further used to determine the return shapes of `*Sync()` methods in children class. This information will need to be revealed in nodejs doc. This PR is separated from the one for `BrotliOptions`, since these two changes potentially need to be backported to different minimum versions. PR-URL: #58360 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
doc
Issues and PRs related to the documentations.
zlib
Issues and PRs related to the zlib subsystem.
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.
Source code of
class Zstd
calls ctor of parentZlibBase
viasuper()
By inspecting
opts
inZlibBase
ctor, we can seeopts?.info
isfurther used to determine the return shapes of
*Sync()
methods inchildren class. This information will need to be revealed in nodejs doc.
node/lib/zlib.js
Line 267 in 3ea97d5
This PR is separated from the one for
BrotliOptions
, since these twochanges potentially need to be backported to different minimum versions.