IPv6 grouping without node:net (the limiter also reaches non-Node bundles; webpack build); reference index entry; export order

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 10:52:25 +01:00
co-authored by Claude Opus 5.5
parent 0f67a6884c
commit 910fbd75cf
5 changed files with 27 additions and 16 deletions
+3
View File
@@ -32,6 +32,9 @@ describe('ipRateKey', () => {
expect(ipRateKey('::ffff:c633:6407')).toBe('198.51.100.7')
expect(ipRateKey('')).toBe('')
expect(ipRateKey('not-an-ip')).toBe('not-an-ip')
for (const bad of ['1::2::3', '2001:db8:1:2:3:4:5:6:7', '12345::1', '::ffff:300.1.1.1', 'to:abcdef', 'a:b']) {expect([bad, ipRateKey(bad)]).toEqual([bad, bad])}
expect(ipRateKey('::')).toBe('0:0:0:0:0:0:0:0/64')
expect(ipRateKey('256.1.1.1')).toBe('256.1.1.1')
})
test('setIpv6Grouping: per address again, another prefix; nonsense is refused', () => {