Skip to content

Releases: zafnz/jqweb

v1.0.0

Choose a tag to compare

@zafnz zafnz released this 19 Oct 20:46
73d19ba

JSON streams

JSON Lines (JSONL) and other streams of multiple JSON values are automatically
wrapped in an array; there is no need to pipe through jq -s . first.

Changed

  • -O now serves from the background and returns the prompt, exiting once the
    page's last tab closes, as -OC did. --close=false keeps it in the
    foreground.

Added

  • Tab in the search box takes the highlighted completion of a key or function
    name, or the first one, as clicking it would.
  • The filter button is on the lines of a query's results too, and adds a
    select step to that query, so filters can be chained.

Changelog

  • Take a completion with Tab in the search box (#121) (@zafnz)
  • Serve from the background with -O (#125) (@zafnz)
  • Chain filters from a query's results (#124) (@zafnz)
  • Automatically wrap JSONL streams before rendering (#126) (@zafnz)

v0.10.1

Choose a tag to compare

@github-actions github-actions released this 04 Oct 17:41
c93b814

Faster query editing

Typing a query is faster, and suggestions no longer flicker as you type. Results
stay on screen while you finish typing, and the address bar updates only when
the results change.

Changelog

  • Performance fix: avoid unnecessary query and hint redraws (#117) (@zafnz)
  • Prepare v0.10.1 release (#118) (@zafnz)

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 15:07
1e3660f

Search stays available on phones

At phone widths, the search box is available in automatic mode; the mode
selector, match count and per-line buttons remain hidden to save room.

Back and Forward step through searches

The browser's Back and Forward buttons step through the searches and queries
run in the search box, and the address shows the current one as ?q=. A ?q=
is read the way typing it would be, so ?q=keys searches for the word where it
used to run keys as a jq query.

Function names complete as they are typed

A half-typed builtin name drops down the names that start with it, each with
what it takes and does beside it, and a whole name that still needs an
argument, such as join, stays on the list instead of failing. Enter runs the
text as written.

Changed: install.sh checks the downloaded archive against the release's
checksums.txt and stops without installing if the checksum does not match or
cannot be checked.

Fixed: JSON nested beyond 128 arrays or objects is rejected with a clear
error instead of producing a broken page. Queries that create deeper values
also report an error.

Fixed: first, limit, any, all and isempty stop reading a stream
once they have their answer, so first(1, error("x")) is 1 and
limit(3; recurse(. + 1)) ends, and a trailing ? keeps the outputs produced
before the error. Builtins given an argument with several outputs (until,
walk, sub, pow, limit and others) produce results in the order jq
does, and // reports an error on its left-hand side as jq 1.7 does.

Fixed: Values behave as jq's do in the corners: a fractional index
truncates toward zero and a fractional slice bound rounds outward, 1000 | exp
prints as the largest double rather than null and still computes as infinity,
round takes halves away from zero,
tonumber refuses hex and other spellings jq refuses, strings sort and split
by code point, @uri encodes an emoji as one character, implode replaces an
invalid code point, and contains, join and from_entries fail or pass on
the inputs jq fails or passes on.

Fixed: A number with an exponent and no digits after it, such as 1e, is
a query error. Regex modifiers are jq's letters (g, i, x, n, s, m,
p), a non-string modifier is an error, and an empty match no longer loops on
an emoji. fromdate reads only %Y-%m-%dT%H:%M:%SZ, and mktime and
strftime take the eight-part broken-out time jq's gmtime produces and
refuse a shorter one.

Fixed: An unknown filter whose name is also an Object.prototype member
now reports that the filter is not supported instead of exposing JavaScript
source.

Fixed: -O now opens generated files whose paths contain spaces, #, ?
or Unicode characters, including paths on Windows.

Fixed: redirected character devices such as /dev/null are no longer
mistaken for terminals.

Fixed: an update check that has not finished when jqweb exits still counts
as the day's check, so repeated -o runs on a slow network no longer ask GitHub
every time.

Fixed: input that is not valid UTF-8 is rejected with the line and column
of the first bad byte, instead of rendering with replacement characters.

Fixed: arguments after -- are read as the query and input file, so
jqweb -- -dash.json reads a file whose name begins with a dash.

Fixed: -C, --close-delay and --host with -o but no -p, and -O
with -o -, are usage errors. Each flag used to be ignored.

Changelog

  • Detect terminals accurately (#94) (@zafnz)
  • Build valid file URLs for generated pages (#93) (@zafnz)
  • Reject JSON nesting beyond 128 levels (#95) (@zafnz)
  • Step through searches with Back and Forward, and write the box to ?q= (#92) (@zafnz)
  • Reject flags that -o leaves with nothing to do (#100) (@zafnz)
  • Pass the -- terminator on to the flag package (#99) (@zafnz)
  • Reject input that is not valid UTF-8 (#98) (@zafnz)
  • Record the update check before asking GitHub (#97) (@zafnz)
  • Verify the release checksum in install.sh (#101) (@zafnz)
  • Serve GitHub Pages at jqweb.io (#102) (@zafnz)
  • Read numbers, regex modifiers and dates as jq does (#105) (@zafnz)
  • Type-check browser tests and screenshot tooling (#108) (@zafnz)
  • Reject inherited query filter names (#109) (@zafnz)
  • Complete function names as they are typed (#112) (@zafnz)
  • Deploy jqweb.io with the example page from the latest release (#113) (@zafnz)
  • Replace the jqweb.io front page and move the site to website/ (#114) (@zafnz)
  • Fix README link to jqweb main site (#115) (@zafnz)
  • Restore search on phone-width pages (#110) (@zafnz)
  • v0.10.0 release (#116) (@zafnz)

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 13 Sep 20:31
98b3a7b

Dev container feature

ghcr.io/zafnz/devcontainer-features/jqweb:1 installs jqweb in a dev
container; the README shows the devcontainer.json line.

apt and dnf packages

jqweb installs from an apt or dnf repository on Debian, Ubuntu, Fedora and
RHEL; the commands are under Install in the README. A packaged jqweb names the
apt or dnf command in its update notice.

-C serves from the background until the last tab closes

-C and -OC return the prompt straight away and keep serving while any tab
has the page open, so reloading it works. The server exits once the last tab
is closed, or after 5 minutes if the page is never opened.

Windows installs with winget or Scoop

winget install zafnz.jqweb, or scoop install jqweb after adding the
zafnz bucket, installs jqweb and keeps it upgradeable. The update notice
names the matching upgrade command on Windows.

Almost all of the code is rewritten

The Go code and the page scripts have been rewritten to be more readable, with
no intended change to what the command or the page does. Anything that behaves
differently from 0.8.0 is a bug; please report it.

Fixed: pressing Escape to dismiss query suggestions no longer clears the
search box.

Changelog

  • Compile page scripts into committed bundles (#53) (@zafnz)
  • Clarify the one-pipe workflow and add a social preview (#60) (@zafnz)
  • Replace the custom Chrome protocol with Playwright (#62) (@zafnz)
  • Keep query when dismissing suggestions (#63) (@zafnz)
  • Bundle the page scripts from ES module entry points (#65) (@zafnz)
  • Social preview and markdown banner (#66) (@zafnz)
  • Split core.js into typed model modules (#67) (@zafnz)
  • Move workflow actions to their Node 24 majors (#68) (@zafnz)
  • Split page.js into typed page modules (#69) (@zafnz)
  • Serve -C from a background process until the last tab closes (#70) (@zafnz)
  • Convert the query UI and the jq engine to TypeScript (#71) (@zafnz)
  • Finish the TypeScript migration layout and remove allowJs (#74) (@zafnz)
  • Target ES2022 for the page scripts and the type check (#75) (@zafnz)
  • Move the Go code into internal packages (#76) (@zafnz)
  • Add .deb and .rpm packages published to Gemfury (#77) (@zafnz)
  • Publish Windows packages to winget and Scoop (#78) (@zafnz)
  • Tidy the code after the package and TypeScript moves (#79) (@zafnz)
  • Document the dev container feature (#80) (@zafnz)
  • Update descriptions in .goreleaser.yaml (#81) (@zafnz)
  • 0.9.0 release (#82) (@zafnz)

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 17:49
47d3bd3

A query on the command line

jqweb '.items[] | .metadata.name' file.json opens the page with that query
already run. With only one argument supplied it auto-detects if it's a file
or query.

Changelog

  • Automate the README screenshot (#51) (@zafnz)
  • Block merging a pull request held open on purpose (#54) (@zafnz)
  • Add Claude Code GitHub Workflow (#56) (@zafnz)
  • Remove the automatic Claude code review workflow (#57) (@zafnz)
  • Accept a jq query on the command line (#52) (@zafnz)
  • v0.8.0 release (#59) (@zafnz)

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 12 Sep 09:57
4aff268

Update checker

jqweb now tells you when a newer release is available. It checks at most once a
day, and does not mention a release until a day after first seeing it.

Changelog

  • Limit release changelog to PR merge commits (#44) (@zafnz)
  • Require release tags to point at main (#43) (@zafnz)
  • Document branch and PR workflow reminders (#45) (@zafnz)
  • Tell the user when a newer release is out (#47) (@zafnz)
  • Hold a new tag back for a day, and record failed checks (#48) (@zafnz)
  • Polish README introduction and examples (#49) (@zafnz)
  • Prepare 0.7.1 release (#50) (@zafnz)

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 01:35
ccc4bd8

Phone-width pages keep the tree in view

At 600px wide and below, the page hides the search box, mode selector, match
count and per-line copy and filter buttons. The tree, its toggles, Collapse all
and the theme button stay visible, so a phone in portrait gets the document
rather than a toolbar wrapped over it.

Opening a page follows $BROWSER

-O and -OC now use $BROWSER when it is set, before falling back to the
platform opener. Remote development environments such as Codespaces and VS
Code containers set that to a helper which opens the page on the local machine,
so jqweb -O file.json works there without needing xdg-open inside the
container.

A half-typed key completes instead of running as nulls

jq reads a missing key as null, so .items[].ki on the way to .items[].kind
replaced the results with one null per item. The page holds that run back: it
runs the query up to the trailing name, and while that name is a prefix of keys
the output really has, the suggestion list offers those keys and the view stays
where it was.

An exact key runs as it always did, a name no key starts with runs as written,
Enter runs the half-typed text, and a bare trailing dot offers every key
instead of a syntax error. .items[] | .na completes against what flows into
the pipe. Only the default build carries this; --simple is unchanged.

Changelog

  • Complete a half-typed key instead of running it as nulls (@zafnz)
  • Lower the minimum Go version to 1.24 (@zafnz)
  • Lower the minimum Go version to 1.24 (#29) (@zafnz)
  • Show only the tree on a phone (@zafnz)
  • Complete a half-typed key instead of running it as nulls (#28) (@zafnz)
  • Take the release notes from CHANGELOG.md (@zafnz)
  • Drop the Go floor from the changelog (@zafnz)
  • Require a label on a pull request, and an entry when it wants one (@zafnz)
  • Compare the Unreleased section rather than count added lines (@zafnz)
  • Take the release notes from CHANGELOG.md (#37) (@zafnz)
  • Prefer BROWSER when opening pages (@zafnz)
  • Prefer $BROWSER when opening pages (#39) (@zafnz)
  • Add phone layout changelog entry (@zafnz)
  • Show only the tree on a phone (#31) (@zafnz)
  • Document tidying PR history before merge (@zafnz)
  • Add timing slack to flaky tests (@zafnz)
  • Add timing slack to flaky tests (#41) (@zafnz)
  • Document tidying PR history before merge (#40) (@zafnz)
  • Prepare 0.7.0 release (@zafnz)
  • Prepare 0.7.0 release (#42) (@zafnz)

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 16:05
090853f

Stop serving once the page has been fetched

-C (or --close) serves the page and exits once a browser has fetched
it, instead of holding the terminal until Ctrl-C. -OC does that and
opens the browser:

jqweb -OC deploy.json

The wait is --close-delay, 1 second by default.

Fixed: the one-dash spellings of the long flags -- -theme, -host,
-port and -output -- could take the wrong value once the arguments
were reordered, and now behave as their two-dash forms do.

Changelog

  • Write the release notes for 0.6.0 (#27)
  • Write the release notes for 0.6.0
  • Document the worktree workflow in CLAUDE.md
  • Split main.go into check.go, serve.go and page.go (#26)
  • Split main.go into check.go, serve.go and page.go
  • Keep the browser drivers and run them from CI (#24)
  • Read the dump from a file, not a pipe, and drop the retry
  • Line up the command list in CONTRIBUTING.md
  • Move the driver documentation out of CONTRIBUTING, and retry a Chrome that hangs
  • Keep the browser drivers and run them from CI
  • Add -C|--close to stop serving once the page has been fetched (#20)
  • Add -C|--close to stop serving once the page has been fetched
  • ignore worktrees
  • Take the notary retry delays from a workflow_dispatch input (#18)
  • Take the notary retry delays from a workflow_dispatch input
  • Change all the examples to use k8s.json (#17)
  • Change all the examples to use k8s.json
  • Add a sample k8s.json and point the docs at the issue tracker (#16)
  • Added sample k8s.json
  • Wait out Apple's notary service instead of failing the release (#15)
  • Wait out Apple's notary service instead of failing the release

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 20:35
1086384

More of jq

The search box understands about 105 filters, up from 62. The ones worth
knowing about:

Regular expressions -- match, capture, scan, splits, sub and
gsub, alongside the test that was already there. A replacement is a
filter run against the match's named captures, so jq's own example works:
gsub("(?<c>l)"; "[" + .c + "]").

Format strings, written with an @ as jq writes them: @text,
@json, @csv, @tsv, @uri, @html, @sh, @base64 and @base64d.
@base64d is the one that makes a Kubernetes secret readable.

any(gen; cond) and all(gen; cond), which take a stream rather than
the input's own members, so a test can reach anywhere in a subtree:
.items[] | select(any(.. | objects; .containerPort? == 80)).

paths, paths(f) and getpath for looking at the shape of a
document, and walk, while, until, isempty, error and
recurse(f; cond).

Dates -- now, todate, fromdate, gmtime, mktime and
strftime, which is what a Kubernetes timestamp wants.

Also explode, implode, and pow, log, log2, log10, exp,
exp2, exp10 and trunc.

Nothing here edits a document. del, setpath and the assignment
operators need path expressions, and the page is for reading a document
rather than changing one. Variables, def, reduce, foreach,
try/catch and string interpolation are still out, and a query using one
says so by name.

Page size

The engine is about 70KB in a page, up from about 53KB in 0.4.1. --simple
is unchanged, since none of this ships in one.

Changelog

  • Write the 0.5.0 release notes
  • Add the regex, format, path and date filters
  • Note the missing browser drivers and the size of main.go
  • Add notes for Claude
  • badges are cool

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 10 Sep 19:40
856adce

A bug fix and a small addition, on top of 0.4.0.

Typing "." no longer jumps into the middle of the document

"." is jq's identity, so it resolved to the whole document, and revealing
that scrolled the middle of it to the middle of the window -- half way
down the file, whatever the file. Anything taller than the window did the
same, so a match on a large subtree opened at its midpoint rather than at
its top.

A match that does not fit on screen now opens at its top, under the
toolbar. One already on screen is left where it is, so typing a path one
character at a time no longer drags the page about.

The name in the toolbar links to the project

jqweb carries the GitHub mark and the full text colour, next to the file
name, which stays muted. It opens in a new tab, because a page holds a
filter, a collapsed tree and whatever query has been built up in it.

Changelog

  • Refuse to publish a release whose notes are for another version
  • Write the 0.4.1 release notes
  • Update the screenshot to a page with the query engine in it
  • Link the jqweb in the toolbar to the project
  • Stop a resolved path from scrolling into the middle of the document