summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-07-17Make stream parser error when a non-empty object or array is used as keyEmanuele Torre
Fixes #2463
2023-07-16Initialise jq_state->input_cb{,_data} to NULL in jq_init()Emanuele Torre
To avoid causing segmentation faults when input/1 is called in a jq_state on which jq_set_input_cb() has not been called; e.g. the one used by jq --run-tests. That segfault could also be fixed in run_jq_tests() by calling: jq_set_input_cb(jq, NULL, NULL); But I think it makes sense to just make jq_init() initialise those values to NULL. Ref: https://github.com/jqlang/jq/pull/2717#discussion_r1264338841
2023-07-16Fix autoreconf warningsitchyny
2023-07-14Fix indices/1 and rindex/1 in case of overlapping matches in stringsEmanuele Torre
Fixes #2433
2023-07-15Add workflow that runs tests with valgrind on linuxEmanuele Torre
To hopefully detect when we introduce new memory leaks. :-)
2023-07-14Fix memory leak on halt_error/1itchyny
2023-07-14debug/1 (#2710)pkoppstein
* debug/1 This def ensures the output of debug(m1,m2) is kept together. Closes #2709 #2111 #2112
2023-07-14Parse nan in JSON as NaN instead of triggering a parse error (#2712)Emanuele Torre
* Fix memory leak for has(nan) jv_array_get() used to be responsible of freeing the input array, but since b5c4c3d67decec22d34f494a200af59bbcadcc80, it is no longer called if the key is nan. We need to free it manually to avoid leaking the array. * Parse nan in JSON as NaN instead of triggering a parse error Fixes #2021
2023-07-13Make sure distcheck passes and run dist job on Pull Requestitchyny
2023-07-14Update jinja2 to fix deprecation warnings on building website (#2711)itchyny
2023-07-13Fix uri format to follow RFC 3986 (#2157)itchyny
2023-07-13Also run manpage.yml workflow on pull requests that modify the manualEmanuele Torre
2023-07-12Mark src/decNumber/** as vendored filesEmanuele Torre
This excludes those files from the Languages statistics on github.
2023-07-12Fix has(nan) on arrays to output falseitchyny
2023-07-11Revert unexpected changes in decNumber code (ref #2031)itchyny
2023-07-11Update "tests/man.test" and remove superflous whitespace in manual.ymlEmanuele Torre
tests/man.test was generated incorrectly and had some duplicate tests, the new CI workflow didn't like that.
2023-07-11Fix build_manpage.py with newer markdown versionsEmanuele Torre
The markdown python changed its API for markdown extensions. Bumping the markdown package version in previous commits broke docs/build_manpage.py since it was using registering an extension with the old API.
2023-07-11Add CI workflow to make sure the man page and man.test can be builtEmanuele Torre
And that man.test is up to date.
2023-07-10Add checksums.txt for releaseOwen Ou
Add checksums.txt for release
2023-07-10Do not remove manpage prebuild file on build failureitchyny
2023-07-10Use jinja2 ==3.0.2 for nowEmanuele Torre
We are using some deprecated jinja2 features that have been removed in newer versions.
2023-07-10Revert "Update docs/Pipfile.lock"Nicolas Williams
This reverts commit 7fba85095b83659e121819b8f55c0a1b90befd13.
2023-07-10Update docs/Pipfile.lockEmanuele Torre
2023-07-10Mark generated manual files as linguist-generated=trueEmanuele Torre
2023-07-10Update docs/README.mdNicolas Williams
2023-07-10Update tests/man.testNicolas Williams
2023-07-10Update jq.1.prebuiltNicolas Williams
2023-07-10Add first fuzzer for integration with OSS-Fuzz.davkor
Signed-off-by: David Korczynski <david@adalogics.com>
2023-07-10Allow using { $__loc__ } as shorthand for { __loc__: $__loc__ }Emanuele Torre
n.b.: { $__loc__: "foo" } is still not allowed. $__loc__ cannot be overwritten, and it is always an object. Using { $x: "foo" } where $x is not a string is an error, so there is not much of a point in supporting that.
2023-07-10Build Docker image using pre-built executables (#2686)itchyny
2023-07-10manual.yml: further tweaks re map and map_valuespkoppstein
Further tweaks, e.g. i.f.o. explicitness: `map_values(f)` outputs an array if given an array, or an object if given an object.
2023-07-10manual.yml: further tweaks re map and map_valuespkoppstein
A more systematic exposition
2023-07-10manual.yml: clarify explanation of map_values, including description of new ↵pkoppstein
behavior #2466
2023-07-10Cross compile for Linux, MacOS and Windows on CI (#2665)Owen Ou
2023-07-09Lex $foo as a single token, instead of using '$' IDENTEmanuele Torre
Previously, bindings were parsed as the combination of two tokens: '$' IDENT This meant that using a keyword as variable name (e.g. $then, $label) did not work. Attempts were made to allow $keyword to work by adding some '$' Keyword rules in the parser, but this did not allow $keyword in all places: jq --arg label foo -n '$label' # ok jq -n '"foo" as $label | .' # error Treating $foo as a single token is much simpler, in my opinion. This patch also changes how LOC is lexed: "$__loc__" instead of as "__loc__" that gets combined with '$' in the parser. This patch also disallows having spaces after '$' when recalling a variable `$ foo' since that was probably just an unintentional side effect of the implementation, and it was not documented. Fixes #2675
2023-07-09Mark src/{parser,lexer}.{c,h} as generated files in .gitattributesEmanuele Torre
This should hide edit to those files in PR diffs making PRs easier to review.
2023-07-09Fix empty regular expression matches (fix #2565)itchyny
2023-07-09Fix manual on paths/1 to use boolean filter for its argumentitchyny
2023-07-09Support .a.[] and .a.[]? each syntaxMattias Wadman
Fixes #1699
2023-07-08Fix nth/2 to emit empty on index out of rangeitchyny
2023-07-08Fix the latest manual on string multiplication by zeroitchyny
2023-07-08Fix string multiplication by 0 (and less than 1) to emit empty stringitchyny
2023-07-08Fix string multiplication with a value between 0.0 and 1.0itchyny
This commit fixes a regression of 6306ac89667c.
2023-07-07Optimize appending deletion path in modifyitchyny
2023-07-07Fix deletion using assigning empty against arrays (fix #2051)itchyny
2023-07-07exit immediately after halt or halt_error is calledEmanuele Torre
Instead of continuing to the next input, and only exiting if there are no more inputs. Closes #2533
2023-07-07Remove deprecated filters: leaf_paths, recurse_downitchyny
2023-07-06Fix dumping large floating numbers (fix #2367) (#2661)itchyny
2023-07-05manual.yml: pick(pathexps)pkoppstein
Change formal parameter name
2023-07-05builtin.jq: def pick(pathexps):pkoppstein
Change the name of the formal parameter.