Revert "fix: jq-web -> jq-wasm, includes jq version 1.8.1 (#2223)"

This reverts commit 0c6454e10cea224f48d263bd4c22fb2d83db714d.
This commit is contained in:
GCHQDeveloper581 2026-03-13 16:07:00 +00:00
parent aa9befce15
commit f4ca59dcdc
No known key found for this signature in database
GPG Key ID: 6222E059A3DF595C
3 changed files with 11 additions and 17 deletions

6
package-lock.json generated
View File

@ -54,7 +54,6 @@
"ieee754": "^1.2.1", "ieee754": "^1.2.1",
"jimp": "^1.6.0", "jimp": "^1.6.0",
"jq-web": "^0.5.1", "jq-web": "^0.5.1",
"jq-wasm": "^1.1.0-jq-1.8.1",
"jquery": "3.7.1", "jquery": "3.7.1",
"js-sha3": "^0.9.3", "js-sha3": "^0.9.3",
"jsesc": "^3.1.0", "jsesc": "^3.1.0",
@ -12164,11 +12163,6 @@
"resolved": "https://registry.npmjs.org/jq-web/-/jq-web-0.5.1.tgz", "resolved": "https://registry.npmjs.org/jq-web/-/jq-web-0.5.1.tgz",
"integrity": "sha512-3Fa3E6g3U1O1j46ljy0EM10yRr4txzILga8J7bqOG8F89gZ6Lilz82WG9z6TItWpYEO0YGa4W8yFGj+NMM1xqQ==", "integrity": "sha512-3Fa3E6g3U1O1j46ljy0EM10yRr4txzILga8J7bqOG8F89gZ6Lilz82WG9z6TItWpYEO0YGa4W8yFGj+NMM1xqQ==",
"license": "ISC" "license": "ISC"
"node_modules/jq-wasm": {
"version": "1.1.0-jq-1.8.1",
"resolved": "https://registry.npmjs.org/jq-wasm/-/jq-wasm-1.1.0-jq-1.8.1.tgz",
"integrity": "sha512-lWfu34lpDFIygOYcL5TzxhZIApDR9iR5XywcVoyUAZ6jlQrj8HKHOKeCcHgUm2dE9RVdbP3eqNAKGLuj+k4seQ==",
"license": "MIT"
}, },
"node_modules/jquery": { "node_modules/jquery": {
"version": "3.7.1", "version": "3.7.1",

View File

@ -137,7 +137,6 @@
"ieee754": "^1.2.1", "ieee754": "^1.2.1",
"jimp": "^1.6.0", "jimp": "^1.6.0",
"jq-web": "^0.5.1", "jq-web": "^0.5.1",
"jq-wasm": "^1.1.0-jq-1.8.1",
"jquery": "3.7.1", "jquery": "3.7.1",
"js-sha3": "^0.9.3", "js-sha3": "^0.9.3",
"jsesc": "^3.1.0", "jsesc": "^3.1.0",

View File

@ -6,7 +6,7 @@
import Operation from "../Operation.mjs"; import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs"; import OperationError from "../errors/OperationError.mjs";
import * as jq from "jq-wasm"; import jq from "jq-web";
/** /**
* jq operation * jq operation
@ -40,15 +40,16 @@ class Jq extends Operation {
* @returns {string} * @returns {string}
*/ */
run(input, args) { run(input, args) {
return (async () => { const [query] = args;
const [query] = args; let result;
try {
const result = await jq.json(input, query); try {
return JSON.stringify(result); result = jq.json(input, query);
} catch (err) { } catch (err) {
throw new OperationError(`Invalid jq expression: ${err.message}`); throw new OperationError(`Invalid jq expression: ${err.message}`);
} }
})();
return JSON.stringify(result);
} }
} }