]> git.99rst.org Git - openwrt-packages.git/commitdiff
jq: update to 1.8.2
authorAlexandru Ardelean <redacted>
Tue, 28 Jul 2026 12:33:03 +0000 (15:33 +0300)
committerAlexandru Ardelean <redacted>
Fri, 31 Jul 2026 09:52:31 +0000 (12:52 +0300)
Update to the latest upstream stable release.

Signed-off-by: Alexandru Ardelean <redacted>
utils/jq/Makefile
utils/jq/test.sh [new file with mode: 0644]

index dc7dc1fa33dbdb15cc55b66da8e144166edca813..01d92dcd503ad5994952b751a4f7c71191aa5460 100644 (file)
@@ -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 <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
diff --git a/utils/jq/test.sh b/utils/jq/test.sh
new file mode 100644 (file)
index 0000000..dd7b137
--- /dev/null
@@ -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"
git clone https://git.99rst.org/PROJECT