Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 27, 2025

Bumps wretch from 2.11.1 to 3.0.2.

Release notes

Sourced from wretch's releases.

3.0.2

🐛 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"
    console.log(await err.response.json());
  }
}

3.0.1

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

This major version represents a significant evolution of the library.

After extensive development, v3 delivers a smaller, faster, and more powerful fetch wrapper with improved type safety, smarter defaults, and exciting new features.

✨ What's New

🚀 Embracing Modern JavaScript

Wretch v3 now requires Node.js 22 or higher, allowing us to fully embrace the native Web APIs that are now built into the runtime. This means zero polyfill overhead - fetch, FormData, URLSearchParams, AbortController, and the Performance API are all used directly from Node.js.

The result? A significantly smaller bundle size and better performance thanks to highly optimized native implementations.

🎯 Better Error Handling with .customError()

Say goodbye to .errorType() and hello to the new .customError() method! This new helper function provides full TypeScript support for custom error properties, giving you complete control over error parsing.

Instead of being limited to predefined error types, you can now transform and parse errors exactly how you need them:

interface ApiError {
  code: number
</tr></table> 

... (truncated)

Changelog

Sourced from wretch's changelog.

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)
  • Golf bytes (b0316f1)
  • Improve .customError typings (6efdb24)
  • Remove deno related docuentation and tests (1ceac88)
  • Remove global config and dead code (bdb8134)
  • Use proto to manage tools (23f22e4)

🐛 Bug fix(es)

  • Fix custom error conflicting with catchers (0486e49)

🏁 Performance update(s)

... (truncated)

Commits
  • 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
  • 745b8a0 🎨 Add automated npm publishing workflow
  • 299bd90 🏁 Improve snippet testing
  • aa8ef0a :feature: Add .toFetch method
  • 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)

@coderabbitai
Copy link

coderabbitai bot commented Oct 27, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated development dependencies to improve internal tooling compatibility.

Note: This release contains no user-facing changes.

Walkthrough

A single devDependency in the universal-testing-utils package.json was updated: wretch bumped from ^2.11.0 to ^3.0.2. This represents a major version change of the HTTP client library. No other files, scripts, or dependencies were modified in this change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas requiring attention:
    • Verify wretch 3.0.2 introduces no breaking changes affecting the test utilities or their consumers
    • Confirm existing test suite passes with the new major version
    • Check if any wretch API usage in the codebase requires updating due to major version differences

Pre-merge checks

❌ Failed checks (4 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The linked issue #277 specifies objectives to "Bump vite from 5.3.5 to 5.4.0" with requirements about updating package.json/lockfile, ensuring CI passes, and verifying no breaking changes in vite 5.4.0. However, this PR updates wretch from 2.11.1 to 3.0.2, not vite. The PR does not address any of the coding requirements listed in issue #277—there is no vite dependency update, no verification of vite 5.4.0 compatibility fixes (Windows build path, launch-editor deps, SSR conflicts, worker importScripts), and no mention of vite-related CI verification. The linked issue appears to be mismatched with the actual PR contents.
Out of Scope Changes Check ⚠️ Warning The PR updates the wretch devDependency from ^2.11.0 to ^3.0.2, but the linked issue #277 specifies objectives for bumping vite from 5.3.5 to 5.4.0. The wretch update is out of scope relative to the vite-focused requirements in the linked issue. The raw_summary confirms only wretch was modified; no vite-related changes are present. This change does not align with the stated objectives of verifying vite 5.4.0 compatibility or addressing vite-specific issues like Windows build output paths or SSR global name conflicts.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ⚠️ Warning The PR description does not follow the required template structure. While the description contains useful information about the wretch dependency update including release notes, changelog, and commit details, it is missing the required "## Changes" section and the entire "## Checklist" section. The template explicitly requires a checklist with three items: applying a release label (major, minor, patch, or skip-release), confirming documentation updates, and confirming test updates. Although labels have been applied to the PR itself (major, skip-release), the checklist items are not addressed within the description as required by the template. Add the missing template sections to the PR description. Include a "## Changes" section briefly describing the wretch upgrade from 2.11.1 to 3.0.2 and its implications (major version bump requiring Node.js 22+, API changes with .customError(), and bug fixes). Add the "## Checklist" section and check off the applicable items: confirm the major/skip-release label selection, and indicate whether documentation and test updates were necessary for this dependency bump.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Bump wretch from 2.11.1 to 3.0.2" directly and specifically describes the main change shown in the raw_summary, which confirms that the wretch devDependency was updated from ^2.11.0 to ^3.0.2 in packages/app/universal-testing-utils/package.json. The title is concise, clear, and specific enough that a teammate scanning the history would immediately understand the primary change without needing additional context.

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: CodeRabbit UI

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 7e4064e and 7814937.

📒 Files selected for processing (1)
  • packages/app/universal-testing-utils/package.json (1 hunks)

"typescript": "5.9.3",
"vitest": "^3.2.4",
"wretch": "^2.11.0",
"wretch": "^3.0.2",
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 Node.js 22+ compatibility and breaking API changes before merging.

Wretch 3.x requires Node.js >= 22, while wretch@^2 supports older Node.js versions. This major version bump introduces several breaking changes that require verification:

  1. Node.js version requirement: Confirm the project targets Node.js 22+. If the project supports earlier versions, this will break the build.
  2. API changes: Wretch 3.0.0 replaces .errorType() with .customError(). Any usage of the deprecated method in the codebase will fail at runtime.
  3. Native Web API dependency: Node.js 22+ includes native fetch and Web APIs out of the box with no polyfills needed.

Run the following scripts to verify compatibility:

Additionally, ensure that:

  • CI/tests pass with Node.js 22+ before merge
  • No deprecated .errorType() calls are present that need migration to .customError()
  • The project's deployment/infrastructure targets Node.js 22+

🏁 Script executed:

#!/bin/bash
# Description: Check Node.js version requirements and search for wretch usage.

# 1. Check if package.json or .nvmrc specifies Node.js version
echo "=== Checking Node.js version requirements ==="
if [ -f ".nvmrc" ]; then
  echo ".nvmrc content:"
  cat .nvmrc
fi

grep -A 2 '"engines"' package.json 2>/dev/null || echo "No engines field in root package.json"

# 2. Search for deprecated wretch.errorType() calls
echo ""
echo "=== Searching for deprecated wretch.errorType() usage ==="
rg -n --type=ts --type=js 'errorType\s*\(' --no-heading || echo "No errorType() calls found"

# 3. Search for any wretch imports/usage in the codebase to understand scope
echo ""
echo "=== Searching for wretch imports and usage ==="
rg -n 'from.*wretch|import.*wretch|require.*wretch' --type=ts --type=js -C 2 || echo "No wretch imports found"

Length of output: 3086


I need to verify the project's Node.js version requirements by checking CI configurations and sub-package configurations.

I need to check CI configurations and sub-package configurations to determine if the Node.js 22+ requirement is already satisfied by the project's setup.


🏁 Script executed:

#!/bin/bash
# Check for Node.js version specifications in various places

echo "=== Checking GitHub Actions workflows for Node.js version ==="
fd -t f 'workflow|\.yml|\.yaml' .github/workflows/ 2>/dev/null | head -20

echo ""
echo "=== Searching for node-version in GitHub Actions ==="
rg -n 'node-version|node_version' .github/ 2>/dev/null || echo "No node-version config found in .github"

echo ""
echo "=== Checking engines field in sub-package.json files ==="
fd -t f 'package.json' packages/ | xargs grep -l '"engines"' 2>/dev/null || echo "No engines field found in sub-packages"

echo ""
echo "=== Checking Dockerfile for Node.js version ==="
fd -t f 'Dockerfile|\.dockerfile' | head -10

echo ""
echo "=== Checking universal-testing-utils/package.json for engines ==="
cat packages/app/universal-testing-utils/package.json | grep -A 3 '"engines"' || echo "No engines field in universal-testing-utils/package.json"

Length of output: 824


🏁 Script executed:

#!/bin/bash
# Check for Node.js version specifications in various places

echo "=== Checking GitHub Actions workflows for Node.js version ==="
fd -t f '\.(yml|yaml)$' .github/workflows/ 2>/dev/null | head -20

echo ""
echo "=== Searching for node-version in workflow files ==="
rg -n 'node-version|node_version' .github/workflows/ 2>/dev/null || echo "No node-version config found in workflows"

echo ""
echo "=== Checking engines field in all package.json files ==="
fd -t f 'package.json' | xargs grep -l '"engines"' 2>/dev/null | head -20

echo ""
echo "=== Checking root .nvmrc alternatives (common patterns) ==="
ls -la | grep -E 'nvmrc|tool-versions|\.node-version' || echo "No version manager files found at root"

echo ""
echo "=== Listing GitHub workflows directory ==="
ls -la .github/workflows/ 2>/dev/null | head -20

Length of output: 1166


I need to check the CI workflow details to understand which tests will fail.


🏁 Script executed:

#!/bin/bash
# Get CI workflow details

echo "=== ci.yml content ==="
cat .github/workflows/ci.yml

echo ""
echo "=== Check if universal-testing-utils tests are included in CI ==="
grep -r "universal-testing-utils" .github/workflows/ || echo "No explicit universal-testing-utils reference in workflows"

Length of output: 1522


Tests will fail on Node.js 20.x — CI must be updated or wretch must be downgraded.

Wretch 3.x requires Node.js >= 22, but the CI workflow runs tests on Node.js [20.x, 22.x, 24.x]. Since wretch is imported directly in test files (MswHelper.spec.ts and MockttpHelper.spec.ts in universal-testing-utils), the npm run test:ci step will fail on the 20.x matrix run.

To resolve:

  • Update CI to remove Node.js 20.x from the test matrix if the project no longer supports it, OR
  • Revert wretch to ^2.x if Node.js 20.x support is required

No breaking API changes (.errorType() calls) were found in the codebase.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/wretch-3.0.2 branch from 7814937 to f8f8583 Compare October 30, 2025 12:34
Bumps [wretch](https://github.com/elbywan/wretch) from 2.11.1 to 3.0.2.
- [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.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/wretch-3.0.2 branch from f8f8583 to 588f4d9 Compare October 30, 2025 12:35
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 10, 2025

Superseded by #774.

@dependabot dependabot bot closed this Nov 10, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/wretch-3.0.2 branch November 10, 2025 14:38
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