Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Upgrades jmespath_extensions from 0.3.5 to 0.6.2, enabling all 297 extension functions (up from ~100).

New Function Categories

Category Functions Use Cases
DURATION format_duration, parse_duration Display uptimes, format intervals
NETWORK cidr_contains, is_private_ip Validate cluster networking
COMPUTING format_bytes, parse_bytes Memory/storage display
DATETIME relative_time, time_ago, timezone_convert Human-readable timestamps
SEMVER semver_compare, semver_satisfies Version checking
REGEX regex_match, regex_replace Pattern matching
HASH sha256, md5 Checksums
FUZZY levenshtein, soundex Fuzzy name matching
JSONPATCH json_diff, json_patch Config comparison

Example Use Cases

# Format memory sizes
redisctl enterprise database list -q '[*].{name: name, memory: format_bytes(memory_size)}'

# Human-readable timestamps  
redisctl cloud task list -q '[*].{id: id, created: time_ago(created_time)}'

# Check CIDR ranges
redisctl enterprise node list -q '[?cidr_contains(`"10.0.0.0/8"`, addr)]'

# Compare versions
redisctl enterprise cluster get -q '{version: version, needs_upgrade: semver_compare(version, `"7.4.0"`) < `0`}'

Testing

  • All existing tests pass
  • No breaking changes to API

Upgrades from 0.3.5 to 0.6.2, enabling all 297 extension functions.

New function categories now available:
- DURATION: format_duration, parse_duration, duration_hours/minutes/seconds
- NETWORK: cidr_contains, is_private_ip, ip_to_int, cidr_network/broadcast
- COMPUTING: format_bytes, parse_bytes, bit operations
- SEMVER: semver_parse, semver_compare, semver_satisfies
- GEO: geo_distance, geo_bearing
- IDS: ulid, nanoid
- JSONPATCH: json_patch, json_diff, json_merge_patch
- MULTI-MATCH: match_all, match_any, extract_all
- TEXT: word_count, reading_time, ngrams
- COLOR: hex_to_rgb, rgb_to_hex, color_mix
- REGEX: regex_match, regex_replace, regex_extract
- HASH: sha256, md5, hmac_sha256
- FUZZY: levenshtein, jaro_winkler, soundex
- PHONETIC: metaphone, sounds_like

Enhanced DATETIME functions:
- relative_time, time_ago for human-readable dates
- timezone_convert for timezone handling
- business_days_between, is_weekend, is_weekday
- start_of_day/week/month/year, end_of_day
@joshrotenberg joshrotenberg merged commit 2f21596 into main Dec 13, 2025
18 checks passed
@joshrotenberg joshrotenberg deleted the feat/jmespath-extensions-upgrade branch December 13, 2025 20:58
@joshrotenberg joshrotenberg mentioned this pull request Dec 13, 2025
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.

2 participants