Skip to content
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

fix: Handle valid CIDR ranges for IPv4 and IPv6 #394

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

acul71
Copy link
Contributor

@acul71 acul71 commented Nov 29, 2024

@SgtPooki @achingbrain @MarcoPolo

Add missing case 43 (ipcidr) to convert.ts to properly handle CIDR ranges
Add two new test cases
Issue: Unexpected SyntaxError for valid ipcidr ranges

@SgtPooki SgtPooki changed the title fix: Handle valid CIDR ranges for IPv4 and IPv6 #393 fix: Handle valid CIDR ranges for IPv4 and IPv6 #394 Dec 2, 2024
@SgtPooki SgtPooki changed the title fix: Handle valid CIDR ranges for IPv4 and IPv6 #394 fix: Handle valid CIDR ranges for IPv4 and IPv6 Dec 2, 2024
src/convert.ts Outdated Show resolved Hide resolved
src/convert.ts Outdated Show resolved Hide resolved
@SgtPooki SgtPooki requested a review from achingbrain December 2, 2024 16:10
acul71 and others added 2 commits December 2, 2024 18:58
Co-authored-by: Russell Dempsey <[email protected]>
Co-authored-by: Russell Dempsey <[email protected]>
Copy link
Contributor

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

not sure if we want more resilient tests here, but they don't break current tests and pass with the /128 which fixes #393

approving, lgtm..

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

LGTM. Would be better to have more comprehensive tests but it fixes the case that's currently broken.

@achingbrain achingbrain merged commit 1513768 into multiformats:main Dec 3, 2024
19 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
## [12.3.4](v12.3.3...v12.3.4) (2024-12-03)

### Bug Fixes

* handle valid CIDR ranges for IPv4 and IPv6 ([#394](#394)) ([1513768](1513768))
Copy link

github-actions bot commented Dec 3, 2024

🎉 This PR is included in version 12.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants