-
Notifications
You must be signed in to change notification settings - Fork 1
Bump wretch from 2.11.1 to 3.0.2 #765
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
📝 WalkthroughSummary by CodeRabbit
Note: This release contains no user-facing changes. WalkthroughA 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
Pre-merge checks❌ Failed checks (4 warnings)
✅ Passed checks (1 passed)
Comment |
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: 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.
📒 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", |
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 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:
- Node.js version requirement: Confirm the project targets Node.js 22+. If the project supports earlier versions, this will break the build.
- API changes: Wretch 3.0.0 replaces
.errorType()with.customError(). Any usage of the deprecated method in the codebase will fail at runtime. - 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 -20Length 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.
7814937 to
f8f8583
Compare
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]>
f8f8583 to
588f4d9
Compare
|
Superseded by #774. |
Bumps wretch from 2.11.1 to 3.0.2.
Release notes
Sourced from wretch's releases.
... (truncated)
Changelog
Sourced from wretch's changelog.
... (truncated)
Commits
1680ef7v3.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 transformer745b8a0🎨 Add automated npm publishing workflow299bd90🏁 Improve snippet testingaa8ef0a:feature: Add .toFetch methodMaintainer 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)