Skip to content

Commit 4aeb080

Browse files
committed
Update JSON output files to be tab-indented
This shrinks `sources.json` from ~8.2M down to ~7M, and `builds.json` from ~54M down to 48M. While the hood was open, I also updated a lot of our "short" `jq` arguments to be their longer forms so they're more obvious at a glance / less cognitive overhead. Some places where I've added `--tab` probably don't need it and/or `--compact-output` might be more appropriate, but everything is so small that it probably doesn't make a huge difference and debugging is easier this way if we ever have to trace things.
1 parent af71643 commit 4aeb080

8 files changed

Lines changed: 10324 additions & 10324 deletions

File tree

.test/all-tags.json

Lines changed: 1245 additions & 1245 deletions
Large diffs are not rendered by default.

.test/builds.json

Lines changed: 6323 additions & 6323 deletions
Large diffs are not rendered by default.

.test/jq.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ for t in "$dir/"*"/test.jq"; do
1515
basename "$td"
1616
args=( --tab -L "$dir/.." )
1717
if [ -s "$td/in.jq" ]; then
18-
jq "${args[@]}" -n -f "$td/in.jq" > "$td/in.json"
18+
jq "${args[@]}" --null-input --from-file "$td/in.jq" > "$td/in.json"
1919
fi
2020
args+=( -f "$t" )
2121
if [ -s "$td/in.json" ]; then
2222
args+=( "$td/in.json" )
2323
else
24-
args+=( -n )
24+
args+=( --null-input )
2525
fi
2626
out="$td/out.json"
2727
outs=( "$td/out."* )
2828
if [ "${#outs[@]}" -eq 1 ]; then
2929
out="${outs[0]}"
3030
if [[ "$out" != *.json ]]; then
31-
args+=( -r )
31+
args+=( --raw-output )
3232
fi
3333
fi
3434
jq "${args[@]}" > "$out"

.test/lookup-test.json

Lines changed: 372 additions & 372 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)