-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: mv urllib to peerDependencies #174
Conversation
WalkthroughThe changes in this pull request involve modifications to the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 (
|
commit: |
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
🧹 Outside diff range and nitpick comments (2)
package.json (2)
68-69
: Ensure devDependencies version aligns with CI/testing needsThe specific version
^4.6.3
in devDependencies is appropriate for testing against the latest major version while the peerDependencies remain flexible.However, consider adding a test matrix to verify compatibility with both urllib v3 and v4.
Would you like me to propose a CI configuration that tests against both urllib versions?
Breaking Change: urllib peer dependency requires documentation updates
- Add a note in README.md about the urllib peer dependency requirement
- Update CHANGELOG.md to document this breaking change in the next major version
- Bump major version from 5.x.x to 6.0.0 since this is a breaking change
Note: The verification confirms that:
- README.md has no mention of the urllib peer dependency requirement
- CHANGELOG.md shows recent changes but none documenting the urllib peer dependency change
- The current version is 5.12.5 and continues to follow semver versioning
- The package.json shows urllib as a peer dependency
"urllib": "^3 || ^4"
but this requirement isn't documented🔗 Analysis chain
Line range hint
1-89
: Breaking Change: Document the urllib peer dependency requirementThis change requires consumers to explicitly install urllib. Consider:
- Adding a note in the README about the urllib peer dependency requirement
- Updating the CHANGELOG to mark this as a breaking change
- Following semver by bumping the major version
Let's check the documentation:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if documentation mentions the urllib requirement # Check README for urllib mentions rg -i 'urllib' README.md || echo "No urllib mention in README.md" # Check CHANGELOG for breaking changes rg '^#+ \[?[0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md -A 5 || echo "No CHANGELOG.md found"Length of output: 8599
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
package.json
(2 hunks)
🔇 Additional comments (2)
package.json (2)
44-44
: LGTM: Dependencies cleanup
The removal of urllib from dependencies is correct as it's being moved to peerDependencies.
48-49
: Verify the version range compatibility with existing consumers
The version range ^3 || ^4
in peerDependencies is appropriate as it:
- Maintains compatibility with existing urllib v3 consumers
- Allows adoption of newer urllib v4 features
- Follows semver conventions
However, this change requires consumers to explicitly install urllib.
Let's verify the impact on existing consumers:
✅ Verification successful
Based on the search results, I can now provide a final response:
The urllib version range is appropriate and safe
The version range ^3 || ^4
in peerDependencies is well-justified because:
- The codebase itself uses urllib v4 (
"urllib": "^4.6.3"
in devDependencies) showing compatibility with v4 - No version-specific code or breaking changes between v3 and v4 were found in the implementation
- The range allows existing consumers on v3 to continue working while enabling adoption of v4
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for projects depending on egg-mock and their urllib versions
# Search for package.json files that depend on egg-mock
rg -l '"egg-mock":\s*"[^"]*"' -g 'package.json'
# Check urllib major version usage patterns in the codebase
rg 'urllib\.request\(' -A 5
Length of output: 77
Script:
#!/bin/bash
# Let's try a different approach to analyze urllib usage and version compatibility
# Check how urllib is used in the codebase
rg "require\(['\"](urllib|urllib-sync)" -B 1 -A 3
# Look for any urllib-related test cases or examples
rg "urllib" -g "test/**/*.{js,ts}"
# Check package.json history for urllib version changes
git log -p package.json | rg "urllib"
# Look for any urllib configuration or setup
rg "urllib" -g "*.{js,ts,json}" -v "test/" -v "package.json"
Length of output: 90977
Script:
#!/bin/bash
# Let's check for urllib version usage and compatibility patterns
# Check for urllib version requirements in dependencies
rg '"urllib":' -A 1 -B 1 package*.json
# Look for urllib imports and usage patterns
ast-grep --pattern 'require("urllib")'
# Check for any urllib version-specific code or comments
rg -i 'urllib.*v(3|4)' --type js
Length of output: 223
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #174 +/- ##
=======================================
Coverage 85.52% 85.52%
=======================================
Files 27 27
Lines 2626 2626
Branches 474 474
=======================================
Hits 2246 2246
Misses 380 380 ☔ View full report in Codecov by Sentry. |
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.
LGTM
[skip ci] ## [5.13.0](v5.12.5...v5.13.0) (2024-12-07) ### Features * mv urllib to peerDependencies ([#174](#174)) ([df7dc48](df7dc48))
Summary by CodeRabbit
urllib
dependency, moving it topeerDependencies
and adding it todevDependencies
with a specific version.