Releases: duriantaco/jonq
Releases · duriantaco/jonq
Release list
v0.3.4 - query repair hardening
What's Changed
- Fixed query repair false positives for dotted string literals like
'Foo.Bar' - Validated sparse arrays using fields across sampled objects instead of only the first object
- Improved nested leaf and alias repair suggestions
- Quoted special-character keys in Smart Inspect suggestions and repair
Try:commands - Added repair validation for
fromquery row contexts and selected expressions
Verification
- Full test suite passed on Python 3.9, 3.10, and 3.11 in CI
- Local package build and twine checks passed
v0.3.3 - query repair suggestions
What's Changed
- Added query repair suggestions for unknown fields in selected fields, filters, sorting, grouping, and aggregations
- Error output now includes nearby field matches and a copy-paste
Try:command - Improved nested field discovery for repair suggestions
Verification
- Full test suite passed on Python 3.9, 3.10, and 3.11 in CI
- Local package build and twine checks passed
v0.3.2 - Smart Inspect mode
What's Changed
- Smart Inspect: running
jonq data.jsonnow shows root shape, readable field types, sample values, and suggested queries without adding new CLI flags - Suggested queries are generated from actual JSON fields for table output, raw scalar output, boolean filters, and group-by counts
- Improved inspect behavior for deeply nested JSON and mixed arrays
Verification
- Full test suite passed on Python 3.9, 3.10, and 3.11 in CI
- Local package build and twine checks passed
v0.3.1 - raw scalar output
What's Changed
- Added raw scalar output for shell pipelines:
jonq users.json "select name" -r - Single-field selections now print plain values one per line in raw mode
- Multi-field selections remain compact JSON objects per line for scriptable output
- Updated README, usage docs, API docs, completions, and changelog
Verification
- Full test suite passed on Python 3.9, 3.10, and 3.11 in CI
- Local package build and twine checks passed
v0.3.0 - CASE/WHEN, table output, COALESCE, follow mode, and 20+ new functions
Added
Output & Display
- Table output:
--format tableor-trenders results as aligned terminal tables with headers and separators - YAML output:
--format yamlrenders results as YAML (uses pyyaml if available, built-in fallback otherwise) --explainmode: shows parsed query breakdown (fields, conditions, grouping) and the generated jq filter--timeflag: prints parse/execute/format timing to stderr- Auto-detect stdin:
curl ... | jonq "select name"works without needing-as source
Query Language
- CASE/WHEN/THEN/ELSE/END: conditional expressions —
select case when age > 30 then "senior" else "junior" end as level - COALESCE: null fallback with nested function support —
select coalesce(nickname, name) as display ||operator: SQL-standard string concatenation —select first || ' ' || last as full_name- IS NULL / IS NOT NULL: null checks in conditions —
select * if email is not null - Type casting:
int(),float(),str()/string(),type() - Date/time functions:
todate(),fromdate(),date(),timestamp()with null-safe execution - Utility functions:
keys(),values(),trim(),ltrim(),rtrim(),tojson(),fromjson(),reverse(),sort(),unique(),flatten(),not_null(),to_entries(),from_entries()
Terminal UX
- Rich REPL: readline with persistent history (
~/.jonq_history) and tab completion for field names + keywords --followmode: stream NDJSON from stdin line-by-line —tail -f app.log | jonq --follow "select level, msg if level = 'error'"- Shell completions:
jonq --completions bash|zsh|fishgenerates completion scripts
Changed
- Version bump to 0.3.0
- Unified all function-name-to-jq-builtin mappings into a single
_FUNC_MAPconstant (eliminated 3 duplicate copies) - Expression-only queries now properly map over array elements instead of wrapping the whole input
- Path-explorer schema preview now shows nested JSON paths like
orders[].priceinstead of only shallow field listings - Reuse bounded sync and async jq worker pools for repeated identical filters
- Main streaming execution path now chunks root-array JSON in memory instead of splitting to temp files
- Repositioned README/package metadata around JSON exploration and extraction
Fixed
- Null-sensitive functions (
todate,tonumber) are now guarded against null input instead of crashing - Schema validator recognizes CASE expressions,
||operator, andcoalesce— no longer rejects them as unknown fields - Sync jq runtime errors that only write to
stderrno longer hang waiting onstdout - Async jq workers are cleaned up with their event loop, preventing leftover subprocess transport warnings
--followmode skips empty results instead of printing[]for non-matching lines
v0.2.0
[v0.2.0] - 2026-03-08
Added
- DISTINCT:
select distinct cityreturns unique rows - COUNT DISTINCT:
select count(distinct city) as n - Standalone LIMIT:
select * limit 10(independent of sort) - IN operator:
select * if city in ('New York', 'Chicago') - NOT operator:
select * if not age > 30 - LIKE operator:
select * if name like 'Al%'(supports%wildcard for startswith, endswith, contains) - String functions:
upper(),lower(),length() - Math functions:
round(),abs(),ceil(),floor() - Schema preview: run
jonq data.jsonwith no query to inspect fields and types - Interactive REPL:
jonq -i data.jsonfor interactive querying - Watch mode:
--watchflag to re-run query on file change - URL fetch:
jonq https://api.example.com/data "select id" - Multi-file glob:
jonq 'logs/*.json' "select *" - Auto-detect NDJSON: no flag needed for newline-delimited JSON
- Fuzzy field suggestions: typo correction with Levenshtein distance
- Colorized output: syntax-highlighted JSON when outputting to terminal
python -m jonq: added__main__.pyentry point- Constants module: centralized all magic numbers and ANSI codes
Fixed
- Dynamic HAVING field mappings instead of hardcoded alias dict
- Removed inline jq comments (
# sum) from generated filters fromclause now correctly iterates arrays (.path[]instead of.path)- Schema validator recognizes
sort,distinct,as, arithmetic operators - Schema validator skips validation when
fromclause is used - Logging level changed from INFO to WARNING (no more filter spam)
Changed
- Version bump to 0.2.0
- Replaced all star imports with explicit imports
- Replaced all hardcoded ANSI codes with
_Colorsclass - Replaced all magic numbers with named constants
- Removed dead code:
handle_error,extract_value_from_quotes,_AGG_FUNCTIONS,parse_condition(jq_filter.py),use_fastparameter - Executor raises
ValueErrorinstead ofRuntimeErrorfor jq errors - Updated all Sphinx docs, README, and SYNTAX.md