From: Alexandru Ardelean Date: Tue, 28 Jul 2026 12:33:03 +0000 (+0300) Subject: jq: update to 1.8.2 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=45049610637fb2241d1338f62f475b5b81ce7fd1;p=openwrt-packages.git jq: update to 1.8.2 Update to the latest upstream stable release. Signed-off-by: Alexandru Ardelean --- diff --git a/utils/jq/Makefile b/utils/jq/Makefile index dc7dc1fa3..01d92dcd5 100644 --- a/utils/jq/Makefile +++ b/utils/jq/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=jq -PKG_VERSION:=1.8.1 -PKG_RELEASE:=2 +PKG_VERSION:=1.8.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/jqlang/jq/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_HASH:=2be64e7129cecb11d5906290eba10af694fb9e3e7f9fc208a311dc33ca837eb0 +PKG_HASH:=71b8d6e8f5fe81f6c6d0d110e3892251f6ce76ed095abd315e26e6e1193af3af PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=MIT diff --git a/utils/jq/test.sh b/utils/jq/test.sh new file mode 100644 index 000000000..dd7b13774 --- /dev/null +++ b/utils/jq/test.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Exercise jq's core JSON filtering (CI's generic probe covers --version). + +[ -x /usr/bin/jq ] || { echo "FAIL: /usr/bin/jq not installed"; exit 1; } + +check() { # label expected actual + [ "$2" = "$3" ] || { echo "FAIL: $1 (want '$2' got '$3')"; exit 1; } +} + +check "object field" "1" "$(echo '{"a":1,"b":2}' | jq '.a')" +check "arithmetic" "5" "$(jq -n '2+3')" +check "array map" "[2,4,6]" "$(echo '[1,2,3]' | jq -c 'map(.*2)')" +check "reduce add" "6" "$(echo '[1,2,3]' | jq 'add')" +check "sorted keys" '["a","b"]' "$(echo '{"b":2,"a":1}' | jq -c 'keys')" +check "string builtin" "HELLO" "$(echo '"hello"' | jq -r 'ascii_upcase')" +check "select + pipe" '[{"n":5}]' "$(echo '[{"n":1},{"n":5}]' | jq -c '[.[]|select(.n>2)]')" + +echo "jq: all filters OK"