Skip to content

Remove range_check dependency - #229

Merged
jetersen merged 2 commits into
masterfrom
remove-range-check
Mar 10, 2026
Merged

jetersen merged 2 commits into
masterfrom
remove-range-check

Conversation

@jetersen

@jetersen jetersen commented Mar 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace range_check with a custom CIDR check using neoip's toUInt8Array and byte-level prefix matching
  • This removes a dependency whose CJS build is broken (ip6 is ESM-only), which blocked upgrading to range_check v4 (Bump range_check from 2.0.4 to 4.1.0 #215)
  • The custom inCidr implementation supports both IPv4 and IPv6 CIDR blocks
  • Also adds @eslint/js and globals as missing devDependencies for eslint 10

Test plan

  • All 107 existing tests pass
  • CI passes on all Node versions (20, 22, 24)

Replace range_check with a custom CIDR check using neoip's toUInt8Array
and byte-level prefix matching. This removes a dependency with a broken
CJS build (ip6 is ESM-only) and adds IPv6 CIDR support.
Cover IPv4/IPv6 CIDR boundaries, /32 and /128 single address blocks,
and IPv4 vs IPv6 mismatch cases.
@jetersen
jetersen merged commit 322881a into master Mar 10, 2026
3 checks passed
@jetersen
jetersen deleted the remove-range-check branch March 10, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant