Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 10, 2025

Bumps wretch from 2.11.1 to 3.0.3.

Release notes

Sourced from wretch's releases.

3.0.3

3.0.3 (2025-11-10)

🐛 Bug fix(es)

  • Use body size when available to compute upload total bytes (27c0443), closes #278
import wretch from "wretch"
import ProgressAddon from "wretch/addons/progress"
const testString = Array(50_000).fill("This is a test string.")
const file = new File(testString, "test.txt", { type: "text/plain" })
wretch("https://httpbin.org/post")
.addon(ProgressAddon())
.content("text/plain")
.body(file)
.onUpload((loaded, total) => {
console.log(Uploaded ${loaded} of ${total})
})
.post()
.res(res => console.log(res.status))
.catch(console.error)

Uploaded 0 of 1100000
Uploaded 589824 of 1100000
Uploaded 1100000 of 1100000

✅ Test improvement(s)

  • Migrate documentation examples from httpbun.org to htt (df84f73)

3.0.2

3.0.2 (2025-10-24)

🐛 Bug fix(es)

  • Clone the body before assigning to WretchError message (5379037), closes #277
try {
  // ..blah
} catch (err: unknown)
  if (err instanceof WretchError)
    // Should now work fine, used to crash with an error of type: "body has already been read"
</tr></table> 

... (truncated)

Changelog

Sourced from wretch's changelog.

3.0.3 (2025-11-10)

🐛 Bug fix(es)

  • Use body size when available to compute upload total bytes (27c0443), closes #278

✅ Test improvement(s)

  • Migrate documentation examples from httpbun.org to htt (df84f73)

3.0.2 (2025-10-24)

🐛 Bug fix(es)

  • Clone the body before assigning to WretchError message (5379037), closes #277

3.0.1 (2025-10-21)

🐛 Bug fix(es)

  • Fix malformed package.json key (ddf3b4c)

📝 Documentation update(s)

  • Fix typescript API links (831598a)

3.0.0 (2025-10-19)

⬆️ Version update(s)

🎨 Code improvement(s)

  • Add automated npm publishing workflow (745b8a0)

... (truncated)

Commits
  • 77a2d94 v3.0.3
  • df84f73 ✅ Migrate documentation examples from httpbun.org to httpbin...
  • 27c0443 🐛 Use body size when available to compute upload total bytes
  • 1680ef7 v3.0.2
  • 5379037 🐛 Clone the body before assigning to WretchError message
  • 66c0f09 v3.0.1
  • ddf3b4c 🐛 Fix malformed package.json key
  • 831598a 📝 Fix typescript API links
  • 5528b73 v3.0.0
  • 4347e4b 🏭 Add request parameter to .customError transformer
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for wretch since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by CodeRabbit

  • Chores
    • Updated internal testing infrastructure dependencies for improved stability and compatibility.

Bumps [wretch](https://github.com/elbywan/wretch) from 2.11.1 to 3.0.3.
- [Release notes](https://github.com/elbywan/wretch/releases)
- [Changelog](https://github.com/elbywan/wretch/blob/master/CHANGELOG.md)
- [Commits](elbywan/wretch@2.11.1...3.0.3)

---
updated-dependencies:
- dependency-name: wretch
  dependency-version: 3.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

devDependency version for wretch updated from ^2.11.0 to ^3.0.3 in the universal-testing-utils package.

Changes

Cohort / File(s) Summary
Dependency version update
packages/app/universal-testing-utils/package.json
Updated wretch devDependency from ^2.11.0 to ^3.0.3 (major version bump)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Major version bump: Verify wretch v3.0.3 is compatible with current usage in universal-testing-utils; review wretch release notes for breaking changes between v2 and v3
  • Lock file impact: Confirm lock file updates are correct and dependency resolution succeeds without conflicts

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks the required template sections. It is missing the 'Changes' section describing the modifications, and the checklist is incomplete with no labels applied and documentation/test update statuses unchecked. Add a 'Changes' section describing the update and ensure the checklist is completed with an appropriate label (likely 'major' for the v2->v3 bump) and confirmations about documentation and test updates.
Linked Issues check ⚠️ Warning The PR changes do not address the linked issues. PR #774 updates wretch to 3.0.3, but linked issues #278 and #277 require updating vite-plugin-dts and vite dependencies respectively, which are unrelated to this wretch bump. Either verify that the correct linked issues are associated with this PR, or remove the incorrect issue links and re-assess the PR against its actual objectives.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: bumping the wretch dependency from version 2.11.1 to 3.0.3, which matches the single file change in the changeset.
Out of Scope Changes check ✅ Passed The PR makes only one focused change: updating the wretch devDependency version in the universal-testing-utils package.json file. This is narrowly scoped to the stated objective of bumping wretch and contains no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dependabot/npm_and_yarn/wretch-3.0.3

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 47d7e76 and a7f4e7d.

📒 Files selected for processing (1)
  • packages/app/universal-testing-utils/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build (22.x)
  • GitHub Check: build (24.x)
  • GitHub Check: build (20.x)

"typescript": "5.9.3",
"vitest": "^3.2.4",
"wretch": "^2.11.0",
"wretch": "^3.0.3",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify wretch v3.0.0+ breaking changes and test compatibility.

This is a major version bump (2.x → 3.x). While the PR description mentions bug fixes and migration work, it doesn't detail API breaking changes. Ensure:

  1. All code in this package that uses wretch is compatible with v3.0.3 API.
  2. CI tests pass with the updated version.
  3. Any wretch API calls have been updated if breaking changes exist.

Since wretch v3 is a major version bump, please verify the following:

Additionally, please search the web for wretch v3.0.0 migration guide and breaking changes to confirm compatibility with how this package uses the library.


🏁 Script executed:

#!/bin/bash
# Description: Check if wretch v3.0.0+ has API breaking changes and identify wretch usage in the package.

# Find files that import or use wretch (excluding node_modules and dist)
echo "=== Files using wretch ==="
rg -g '!node_modules' -g '!dist' 'wretch|from\s+["\']wretch' --type=ts --type=js -n

# Check if there are any wretch-related test files
echo ""
echo "=== Wretch test files ==="
fd -g '!node_modules' -g '!dist' 'wretch|test' --type=f

Length of output: 96


🌐 Web query:

What are the breaking changes in wretch v3.0.0?

💡 Result:

Here are the breaking changes introduced in wretch v3.0.0 (summary):

  • Requires Node.js 22+ (no older Node support). [1]
  • .errorType() removed; replaced by the new .customError() with improved TypeScript support. [1]
  • Global/static configuration methods removed (e.g., wretch.options(), wretch.errorType(), wretch.polyfills()); configuration is per-instance now. [1]
  • Some addon method signatures changed to accept options objects (notably .query(), .formData(), and .setTimeout()). [1]
  • Retry middleware default behavior changed: retries skip 4xx client errors and target 5xx server errors + network failures. [1]
  • General API and defaults modernized (smaller bundle, native Web APIs usage, other internal tooling changes that may affect integration). [1]

Source: wretch v3.0.0 release notes / migration guide. [1]

References
[1] elbywan/wretch — v3.0.0 release notes / migration summary.


🏁 Script executed:

#!/bin/bash
# Description: Find wretch imports and usage in packages/app/universal-testing-utils

# Search for wretch imports
echo "=== Wretch imports ==="
rg 'import.*wretch|from.*wretch|require.*wretch' packages/app/universal-testing-utils --type=ts --type=js -n -A2 -B2

# Search for wretch method calls that may be affected by breaking changes
echo ""
echo "=== Potential breaking API usage ==="
rg 'errorType|wretch\.options|wretch\.polyfills|\.query\(|\.formData\(|\.setTimeout\(' packages/app/universal-testing-utils --type=ts --type=js -n -C2

# List all source files in the package to understand structure
echo ""
echo "=== Source files in packages/app/universal-testing-utils ==="
find packages/app/universal-testing-utils -type f \( -name "*.ts" -o -name "*.js" \) ! -path "*/node_modules/*" ! -path "*/dist/*" | head -20

Length of output: 1495


🏁 Script executed:

#!/bin/bash
# Description: Examine actual wretch usage and Node.js version requirements

# Show wretch usage in MswHelper.spec.ts
echo "=== Wretch usage in MswHelper.spec.ts ==="
rg 'wretch' packages/app/universal-testing-utils/src/MswHelper.spec.ts -n -A1 -B1

# Show wretch usage in MockttpHelper.spec.ts
echo ""
echo "=== Wretch usage in MockttpHelper.spec.ts ==="
rg 'wretch' packages/app/universal-testing-utils/src/MockttpHelper.spec.ts -n -A1 -B1

# Check Node.js version requirement in root package.json
echo ""
echo "=== Node.js version requirement (root package.json) ==="
rg '"engines"' package.json -A3 -B1

# Check Node.js version requirement in this package's package.json
echo ""
echo "=== Node.js version requirement (packages/app/universal-testing-utils/package.json) ==="
rg '"engines"' packages/app/universal-testing-utils/package.json -A3 -B1

Length of output: 3726


🏁 Script executed:

#!/bin/bash
# Description: Find Node.js version specifications and inspect helper functions

# Search for Node version files
echo "=== Node.js version specifications ==="
find . -maxdepth 2 -type f \( -name ".node-version" -o -name ".nvmrc" -o -name ".tool-versions" \) 2>/dev/null

# Check GitHub workflows for Node version
echo ""
echo "=== Node version in CI/workflows ==="
fd -t f '\.(yml|yaml)$' .github/workflows 2>/dev/null | head -5 | xargs grep -l 'node' 2>/dev/null | head -3 | xargs grep 'node-version\|node_version' 2>/dev/null | head -10

# Get full engines field from root package.json
echo ""
echo "=== Full engines field (cat) ==="
cat package.json | grep -A 10 '"engines"' 2>/dev/null || echo "No engines field"

# Inspect the helper functions that use wretch
echo ""
echo "=== sendByPayloadRoute and sendByGetRoute implementations ==="
rg 'export.*function.*sendByPayloadRoute|export.*function.*sendByGetRoute|const sendByPayloadRoute|const sendByGetRoute' packages/app/universal-testing-utils/src --type=ts -A 15

Length of output: 476


🏁 Script executed:

#!/bin/bash
# Description: Find helper function implementations and verify release workflow compatibility

# Broader search for helper functions in test files
echo "=== Searching for sendByPayloadRoute definition ==="
rg -B 2 'sendByPayloadRoute' packages/app/universal-testing-utils/src --type=ts | head -30

# Check if helpers are imported from elsewhere
echo ""
echo "=== Import statements for helpers ==="
rg 'import.*sendByPayloadRoute|import.*sendByGetRoute' packages/app/universal-testing-utils/src --type=ts -B 1 -A 1

# Find where these functions are defined
echo ""
echo "=== Search for function definitions ==="
rg 'sendByPayloadRoute|sendByGetRoute' packages/app/universal-testing-utils/src --type=ts --type=js -l

# Check the full release.package.yml to see if Node 20 is really a blocker
echo ""
echo "=== Release workflow Node.js usage ==="
cat .github/workflows/release.package.yml | grep -A 5 -B 5 'node-version'

Length of output: 3374


Update release workflow and add Node.js version constraint for wretch v3.0.3 compatibility.

wretch v3.0.0+ requires Node.js 22+, but .github/workflows/release.package.yml uses Node 20.x for releases. This will cause release builds to fail.

Required fixes:

  1. Update .github/workflows/release.package.yml to use node-version: 22.x or higher
  2. Add "engines": { "node": ">=22.0.0" } to packages/app/universal-testing-utils/package.json to prevent incompatible installations

The wretch API usage in test files (basic .post(), .get() calls) is compatible with v3.0.0—no breaking API changes detected in this package's code.

🤖 Prompt for AI Agents
In packages/app/universal-testing-utils/package.json around line 64, wretch
v3.0.3 requires Node 22+, but the release workflow uses Node 20.x; update
.github/workflows/release.package.yml to use node-version: 22.x (or higher) and
add an "engines": { "node": ">=22.0.0" } entry to
packages/app/universal-testing-utils/package.json to prevent installs on
incompatible Node versions so release builds won't fail.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Dec 1, 2025

Superseded by #792.

@dependabot dependabot bot closed this Dec 1, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/wretch-3.0.3 branch December 1, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant