-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: compressed option should be false by default #567
Conversation
The `compressed` option is not enabled by default. There is no code setting it to true, except where the old `gzip` property is true. I confirmed this behavior in testing. The documentation for it appears to have been inadvertently updated when the `timing` option was added in commit 1d26bb8.
WalkthroughThe pull request introduces changes to the Changes
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
76-76
: Add hyphen in "auto-decode" for better grammar.Consider adding a hyphen between "auto" and "decode" as it forms a compound modifier.
- - ***compressed*** Boolean - Accept `gzip, br` response content and auto decode it, default is `false`. + - ***compressed*** Boolean - Accept `gzip, br` response content and auto-decode it, default is `false`.🧰 Tools
🪛 LanguageTool
[uncategorized] ~76-~76: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ... Acceptgzip, br
response content and auto decode it, default isfalse
. - *timing...(AUTO_HYPHEN)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md
(1 hunks)src/Request.ts
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~76-~76: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ... Accept gzip, br
response content and auto decode it, default is false
. - *timing...
(AUTO_HYPHEN)
🔇 Additional comments (2)
src/Request.ts (1)
108-108
: LGTM! Documentation accurately reflects the default behavior.
The updated documentation correctly states that the compressed
option defaults to false
, which aligns with the actual implementation.
README.md (1)
76-76
: LGTM! Documentation is consistent with the type definition.
The updated documentation in README.md correctly reflects that the compressed
option defaults to false
, maintaining consistency with the type definition in src/Request.ts
.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~76-~76: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ... Accept gzip, br
response content and auto decode it, default is false
. - *timing...
(AUTO_HYPHEN)
You'll find my PR easier to follow if you ignore the AI summary, which is longer than the change set, and wrong 😂 |
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
=======================================
Coverage 95.70% 95.70%
=======================================
Files 11 11
Lines 1282 1282
Branches 309 310 +1
=======================================
Hits 1227 1227
Misses 51 51
Partials 4 4 ☔ View full report in Codecov by Sentry. |
@n8han Thanks ❤️ |
[skip ci] ## [4.6.11](v4.6.10...v4.6.11) (2024-12-20) ### Bug Fixes * compressed option should be false by default ([#567](#567)) ([a0a8dc5](a0a8dc5))
The
compressed
option is not enabled by default. There is no code setting it to true, except where the oldgzip
property is true. I confirmed this behavior in testing. The documentation for it appears to have been inadvertently updated when thetiming
option was added in commit 1d26bb8.Summary by CodeRabbit
Documentation
README.md
to reflect the change in default value for thecompressed
option in theasync request(url[, options])
method fromtrue
tofalse
.Bug Fixes
compressed
property in request handling to prevent automatic decoding ofgzip
andbr
responses unless specified by the user.Chores
ctx
property inRequestOptions
, recommending the use of theopaque
property instead.