summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-07-09Add --strip-comments optionpull/2548/headliquidaty
2023-07-09Allow, and strip, JSON comments (#, // or /*)liquidaty
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.
2023-07-05builtin: add pick(stream)pkoppstein
pick(stream) works on both arrays and objects Restrictions on the dot-paths are specified in manual.yml See #2578
2023-07-06Fix exit code on JSON parse error (#2654)itchyny
2023-07-05Validate JSON for --jsonargMattias Wadman
Fixes #2572
2023-07-05Remove outdated CI badges from README.md (#2653)itchyny
2023-07-05Release Docker image to GitHub Container Registry (#2652)itchyny
2023-07-05Make 0 divided by 0 results in NaN consistently (#2253)itchyny
2023-07-05Setup path correctly after stream parsing a key:value object pair (#2642)Mattias Wadman
2023-07-04Fix release workflow tag trigger pattern (#2651)itchyny
2023-07-04Improve Dockerfile: update base image and optimize image size (#2649)itchyny
Also, drop ineffectual flags from configure.
2023-07-04Support optional else-branch for if-then-elif-end (#2598)Mattias Wadman
2023-07-04Implement scan/2 filter (#1961)itchyny
2023-07-04Revamp sub/3 to resolve most issues with gsub (and sub with "g") (#2641)pkoppstein
The primary purpose of this commit is to rectify most problems with `gsub` (and also `sub` with the `g` option), in particular fix #1425 ('\b'), fix #2354 (lookahead), and fix #2532 (regex == `"^(?!cd ).*$|^cd "`). This commit also partly resolves #2148 and resolves #1206 in that `gsub` no longer loops infinitely; however, because the new `gsub` depends critically on `match/2`, the behavior when regex == `""` is sometimes non-standard. The documentation has been updated to reflect the fact that `sub` and `gsub` are intended to be regular in the second argument. Also, `_nwise/1` has been tweaked to take advantage of TCO.
2023-07-03Fix duplicate entry in .gitignoreitchyny
2023-07-03Create dist and upload on release also disable docs on build (#2648)itchyny
2023-07-03manual.yml: fix references to javascript, and clarify semantics of == (#2645)pkoppstein
remove inaccurate and confusing references to javascript; clarify semantics of ==
2023-07-03Fix the default search paths and documentation (#2093)itchyny
2023-07-03Strip debug information from executables (fix #1221) (#2647)itchyny
2023-07-02Release pipeline (#2620)Owen Ou
* Release pipeline * Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for https://github.com/jqlang/jq/pull/2618. * Locate bison for Windows build * Also install flex for Windows build * Add matrix to test all available GH Actions images * Enable all tests for Windows * Run `brew update-reset` when `brew update` fails `brew update` can fail for "Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!" Ref: https://github.com/owenthereal/jq/actions/runs/5432314910/jobs/9879266028#step:3:19 * Select gcc binaries to release * Only enable CI when push to master & tag * Try out statick build * No need to enforce the same `AM_INIT_AUTOMAKE` version for MacOS * Disable static build for ubuntu-20.04 See https://github.com/jqlang/jq/pull/2620#discussion_r1248936822
2023-06-30Move an example to the manual and regenerate man.test (#2639)itchyny
2023-06-28Remove unused function: jv_mem_invalidate, jv_mem_uninit_setup (#2636)itchyny
2023-06-28fix: tarball fails distcheck: add files missing from manifest (#2538)Allan Clark
2023-06-28Remove deleted README file from jq.spec (#2637)itchyny
2023-06-28Validate module metadata to be an object (#2357)itchyny
2023-06-28Fix bison warnings on incompatibilities with POSIX Yacc (#2634)itchyny
2023-06-28Fix "writing output failed" error of non ASCII output on Windows (#2633)itchyny
2023-06-28Update oniguruma submodule (June 2023) (#2635)itchyny
2023-06-27Fix halt_error to print message without prefix in raw mode (fix #1902) (#2632)itchyny
2023-06-27Fix glibc warning about _BSD_SOURCE and redefined _GNU_SOURCE (fix #1978) ↵itchyny
(#2631)
2023-06-27Ignore error of outdated manual test when docs disabled (fix #2310) (#2630)itchyny
2023-06-27Fix number lexer to avoid conflict with object indexing (#2254)itchyny
2023-06-27Fix overflow exception of the modulo operator (fix #1176) (#2629)itchyny