-
Notifications
You must be signed in to change notification settings - Fork 1
Bump wretch from 2.11.1 to 3.0.3 #774
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
Conversation
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]>
|
Note
|
| 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 | 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 | 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.
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: 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.
📒 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", |
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.
🧩 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:
- All code in this package that uses wretch is compatible with v3.0.3 API.
- CI tests pass with the updated version.
- 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=fLength 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 -20Length 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 -B1Length 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 15Length 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:
- Update
.github/workflows/release.package.ymlto usenode-version: 22.xor higher - Add
"engines": { "node": ">=22.0.0" }topackages/app/universal-testing-utils/package.jsonto 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.
|
Superseded by #792. |
Bumps wretch from 2.11.1 to 3.0.3.
Release notes
Sourced from wretch's releases.
... (truncated)
Changelog
Sourced from wretch's changelog.
... (truncated)
Commits
77a2d94v3.0.3df84f73✅ Migrate documentation examples from httpbun.org to httpbin...27c0443🐛 Use body size when available to compute upload total bytes1680ef7v3.0.25379037🐛 Clone the body before assigning to WretchError message66c0f09v3.0.1ddf3b4c🐛 Fix malformed package.json key831598a📝 Fix typescript API links5528b73v3.0.04347e4b🏭 Add request parameter to .customError transformerMaintainer 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 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill 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