]>
granicus.if.org Git - jq/log
Nicolas Williams [Tue, 30 Dec 2014 07:02:56 +0000 (01:02 -0600)]
Allow resetting of jq err callback
This will be useful for the upcoming test-erroneous-programs improvement
to --run-tests, so we can switch between the default error reporting
method (print to stderr) to a method internal to --run-tests, and back.
The idea is that when testing programs that are expected to compile (and
link), it'd be nice if errors continue going to stderr, while when
testing programs that must fail to compile (or link), the error has to
be captured so it can be compared to the error expected by the test.
Nicolas Williams [Tue, 30 Dec 2014 07:33:45 +0000 (01:33 -0600)]
Fix streaming bug (fuzzing)
pkoppstein [Mon, 6 Oct 2014 23:31:08 +0000 (19:31 -0400)]
transpose/0 for possibly jagged matrices
pkoppstein [Tue, 7 Oct 2014 13:43:11 +0000 (09:43 -0400)]
bsearch(x) (binary search): builtin.c (tested), with documentation and test case. Always yields an integer (even if input is unsorted); returns (-1 - ix) if x is not in input array.
pkoppstein [Tue, 7 Oct 2014 02:51:13 +0000 (22:51 -0400)]
ascii_upcase/0 and ascii_downcase/0
Nicolas Williams [Sat, 27 Dec 2014 23:15:56 +0000 (17:15 -0600)]
Add `debug` builtin
And refactor setup of jv dump flags.
Nicolas Williams [Sat, 27 Dec 2014 22:51:39 +0000 (16:51 -0600)]
Don't force C API users to set input cb
Nicolas Williams [Sat, 27 Dec 2014 05:39:05 +0000 (23:39 -0600)]
Make jq --run-tests show test line numbers
Nicolas Williams [Sun, 28 Dec 2014 00:09:28 +0000 (18:09 -0600)]
Fix uninitialized struct field
Nicolas Williams [Sat, 27 Dec 2014 03:28:31 +0000 (21:28 -0600)]
Streaming parser torture tests
Nicolas Williams [Sat, 27 Dec 2014 01:31:47 +0000 (19:31 -0600)]
Fuzz JSON parser
Nicolas Williams [Sat, 27 Dec 2014 01:31:17 +0000 (19:31 -0600)]
Better quoting in tests/run
Nicolas Williams [Tue, 23 Dec 2014 05:06:27 +0000 (23:06 -0600)]
Add Streaming parser (--stream)
Streaming means that outputs are produced as soon as possible. With the
`foreach` syntax one can write programs which reduce portions of the
streaming parse of a large input (reduce into proper JSON values, for
example), and discard the rest, processing incrementally.
This:
$ jq -c --stream .
should produce the same output as this:
$ jq -c '. as $dot | path(..) as $p | $dot | getpath($p) | [$p,.]'
The output of `jq --stream .` should be a sequence of`[[<path>],<leaf>]`
and `[[<path>]]` values. The latter indicate that the array/object at
that path ended.
Scalars and empty arrays and objects are leaf values for this purpose.
For example, a truncated input produces a path as soon as possible, then
later the error:
$ printf '[0,\n'|./jq -c --stream .
[[0],0]
parse error: Unfinished JSON term at EOF at line 3, column 0
$
Nicolas Williams [Fri, 26 Dec 2014 20:37:38 +0000 (14:37 -0600)]
Allow C-coded functions to `empty`
Just return a jv_invalid() without a message.
Nicolas Williams [Fri, 26 Dec 2014 09:31:54 +0000 (03:31 -0600)]
Add BLOCK_8() macro
Nicolas Williams [Fri, 26 Dec 2014 09:31:01 +0000 (03:31 -0600)]
Fix `foreach` non-progation of errors
Errors were being re-propagated as "break".
Also add `error/0` builtin, which made this fix easier.
Nicolas Williams [Sat, 27 Dec 2014 00:29:56 +0000 (18:29 -0600)]
Allow zero-length buffers in jv_parser_set_buf()
If the caller is at EOF and has no more bytes to feed the parser, how is
the parser to be told about the EOF condition? A small fix to allow
zero-length buffers in jv_parser_set_buf() fixes this problem (it also
makes it easier to deal with async I/O: feed the parser whatever is
available, including nothing).
Nicolas Williams [Sat, 27 Dec 2014 04:49:32 +0000 (22:49 -0600)]
Fix in and inside
Nico Williams [Sat, 27 Dec 2014 04:14:17 +0000 (22:14 -0600)]
Merge pull request #624 from Janrain-Colin/patch-1
Doc correction
Nico Williams [Sat, 27 Dec 2014 04:00:41 +0000 (22:00 -0600)]
Merge pull request #366 from slapresta/inversed-contains
Added `in` command
Nico Williams [Sat, 27 Dec 2014 03:50:11 +0000 (21:50 -0600)]
Merge pull request #628 from slapresta/map-on-objects
Modify map\1 so that it works on objects
Nicolas Williams [Wed, 24 Dec 2014 22:48:39 +0000 (16:48 -0600)]
Fix infinite loop in read_more() (fix #656)
Nicolas Williams [Wed, 24 Dec 2014 22:07:36 +0000 (16:07 -0600)]
Fix EOF handling; fix #656
Nico Williams [Wed, 24 Dec 2014 17:29:29 +0000 (11:29 -0600)]
Merge pull request #651 from eiiches/fix-examples
Fix several errors in the manual
Nicolas Williams [Wed, 24 Dec 2014 17:18:53 +0000 (11:18 -0600)]
Add @tsv; fix #645
Nico Williams [Wed, 24 Dec 2014 17:20:47 +0000 (11:20 -0600)]
Merge pull request #653 from msabramo/patch-1
.travis.yml: Set sudo false; use containers
Nicolas Williams [Mon, 24 Nov 2014 23:58:34 +0000 (17:58 -0600)]
Module search revamp for pkg managers
The search path listed in an import directive can now be an array. The
top-level search path is appended. Null and empty strings in the path
terminate any search. The "." in "." and "./*" is replaced with the
directory containing the file doing the import (for command-line
programs this is the current directory, though that may be a bad idea).
No version numbers or anything of the sort are gratuitously added to the
search paths.
All this makes external package managers possible by allowing
dependencies to be installed local to dependents.
Nicolas Williams [Wed, 24 Dec 2014 08:24:53 +0000 (02:24 -0600)]
Fix bug caused by
8ca07a0
Nicolas Williams [Wed, 24 Dec 2014 06:01:43 +0000 (00:01 -0600)]
Fix #348: reject unescaped control chars
Nico Williams [Wed, 24 Dec 2014 05:37:25 +0000 (23:37 -0600)]
Merge pull request #601 from slapresta/redefine-any-all
Define {any,all}/0,1 in terms of {any,all}/2
Nicolas Williams [Wed, 24 Dec 2014 03:52:03 +0000 (21:52 -0600)]
Use __attribute__ __printf__ with GCC
Nicolas Williams [Wed, 24 Dec 2014 05:22:43 +0000 (23:22 -0600)]
Make `values` faster (fix #652)
Nicolas Williams [Wed, 24 Dec 2014 00:15:56 +0000 (18:15 -0600)]
Fix #649
Marc Abramowitz [Tue, 23 Dec 2014 05:37:23 +0000 (21:37 -0800)]
.travis.yml: Set sudo false; use containers
This is the way to enable Travis's fancy new containers, which should result in faster builds.
Santiago Lapresta [Mon, 22 Dec 2014 22:05:35 +0000 (23:05 +0100)]
Define `map_values`
Santiago Lapresta [Wed, 21 May 2014 21:28:27 +0000 (23:28 +0200)]
`in` is now `inside`, added `in` as inverse of `has`
Santiago Lapresta [Tue, 20 May 2014 14:54:50 +0000 (16:54 +0200)]
Added `in` command
Eiichi Sato [Sat, 20 Dec 2014 18:22:38 +0000 (03:22 +0900)]
Fix examples in manual
Eiichi Sato [Sat, 20 Dec 2014 18:16:32 +0000 (03:16 +0900)]
Fix indents in manual.yml
Eiichi Sato [Sat, 20 Dec 2014 17:20:28 +0000 (02:20 +0900)]
HTML-escape jq programs in manual
Eiichi Sato [Sat, 20 Dec 2014 16:45:50 +0000 (01:45 +0900)]
Fix examples in manual
Nico Williams [Fri, 12 Dec 2014 23:46:17 +0000 (17:46 -0600)]
Merge pull request #611 from StevenMaude/tutorial-typo-fixes
Fix typos in tutorial
Nico Williams [Fri, 12 Dec 2014 23:45:17 +0000 (17:45 -0600)]
Merge pull request #616 from ianmiell/ianmiell_requirements
Requirements made slightly more complete
Nicolas Williams [Fri, 12 Dec 2014 23:35:59 +0000 (17:35 -0600)]
Add until(cond; next); fix #639
Nicolas Williams [Fri, 12 Dec 2014 22:58:23 +0000 (16:58 -0600)]
Fix #647, but caused by
89791a0
Nicolas Williams [Fri, 12 Dec 2014 22:40:07 +0000 (16:40 -0600)]
Add --argjson, fix #648
Nico Williams [Fri, 12 Dec 2014 22:03:18 +0000 (16:03 -0600)]
Merge pull request #642 from Janrain-Colin/patch-3
fix typo in manual
Colin von Heuring [Sun, 7 Dec 2014 00:27:43 +0000 (16:27 -0800)]
fix typo in manual
Nicolas Williams [Sat, 29 Nov 2014 21:24:43 +0000 (15:24 -0600)]
Fix refcount leak, fix #618
Nicolas Williams [Sat, 29 Nov 2014 02:52:08 +0000 (20:52 -0600)]
STOREV/LOADV* should also print refcnts
Nicolas Williams [Sat, 29 Nov 2014 01:35:29 +0000 (19:35 -0600)]
Enable printing of stack val refcnts
Nicolas Williams [Sat, 29 Nov 2014 00:56:06 +0000 (18:56 -0600)]
Print stack value refcounts when tracing (#636)
Colin von Heuring [Sun, 23 Nov 2014 19:37:50 +0000 (11:37 -0800)]
Doc correction
William Langford [Thu, 13 Nov 2014 01:46:34 +0000 (20:46 -0500)]
Fix #600. Add regression test
Ian Miell [Tue, 11 Nov 2014 23:02:31 +0000 (23:02 +0000)]
Requirements made slightly more complete: cf https://github.com/ianmiell/shutit/blob/master/library/jq/jq.py
Steven Maude [Wed, 5 Nov 2014 10:47:37 +0000 (10:47 +0000)]
Fix typos in tutorial
parrent > parent, url > URL
Santiago Lapresta [Tue, 21 Oct 2014 11:00:38 +0000 (13:00 +0200)]
Define {any,all}/2 independently from {any,all}/0
Santiago Lapresta [Mon, 20 Oct 2014 16:16:03 +0000 (18:16 +0200)]
Define {any,all}/{0,1} in terms of {any,all}/2
Nicolas Williams [Sat, 11 Oct 2014 03:19:38 +0000 (22:19 -0500)]
Add support for JSON sequence MIME type
Per draft-ietf-json-text-sequence-07 (which soon will be published as an
RFC).
William Langford [Tue, 7 Oct 2014 01:48:17 +0000 (21:48 -0400)]
Properly call onig_error_code_to_str
Fix #585
pkoppstein [Mon, 6 Oct 2014 18:37:57 +0000 (14:37 -0400)]
fix sub (#586); add gsub/3; add transpose/0.
Signed-off-by: William Langford <wlangfor@gmail.com>
Nicolas Williams [Fri, 3 Oct 2014 22:52:11 +0000 (17:52 -0500)]
Restore `split/1`; don't use regexp (fix #576)
Nicolas Williams [Fri, 3 Oct 2014 22:56:39 +0000 (17:56 -0500)]
Update docs about sort/group/min/max/unique
Nicolas Williams [Fri, 3 Oct 2014 22:35:01 +0000 (17:35 -0500)]
from-entries should work with EC2 (fix #592)
Nicolas Williams [Fri, 3 Oct 2014 22:14:30 +0000 (17:14 -0500)]
Remove sort/1 and group/1
Reserve these for sorting with jq-coded comparators.
Nicolas Williams [Wed, 1 Oct 2014 02:49:37 +0000 (21:49 -0500)]
to_entries should not sort keys (fix #561)
William Langford [Tue, 23 Sep 2014 00:11:07 +0000 (20:11 -0400)]
Properly handle when objects cannot be folded
Fix #579.
Nicolas Williams [Sat, 30 Aug 2014 05:58:24 +0000 (00:58 -0500)]
Drop the jq version directory from search path
Nicolas Williams [Sat, 30 Aug 2014 05:28:41 +0000 (00:28 -0500)]
Never close stdin; allow multiple `-` arguments
Nicolas Williams [Sat, 30 Aug 2014 05:27:26 +0000 (00:27 -0500)]
Handle invalid inputs in argument files (fix #562)
William Langford [Fri, 29 Aug 2014 01:51:33 +0000 (21:51 -0400)]
Properly handle incomplete json when input is file
Fix #562
Nicolas Williams [Thu, 21 Aug 2014 05:04:38 +0000 (00:04 -0500)]
C-coded builtins should not assert (fix #553)
Nicolas Williams [Thu, 21 Aug 2014 01:49:30 +0000 (20:49 -0500)]
Quiet warning about freopen() of stdout
Nicolas Williams [Thu, 21 Aug 2014 01:48:48 +0000 (20:48 -0500)]
Drop "any/" in module search; use 1.x-master
Nicolas Williams [Thu, 14 Aug 2014 08:31:25 +0000 (03:31 -0500)]
BSD sed lacks -r; fix #551
Nicolas Williams [Tue, 12 Aug 2014 05:51:51 +0000 (00:51 -0500)]
Document module system
Fix #511.
Nicolas Williams [Sun, 10 Aug 2014 21:52:03 +0000 (16:52 -0500)]
Add `module` directive, `modulemeta` builtin
Fix #425.
Nicolas Williams [Thu, 14 Aug 2014 08:03:59 +0000 (03:03 -0500)]
Add JV_OBJECT() macro
Nicolas Williams [Thu, 14 Aug 2014 08:07:20 +0000 (03:07 -0500)]
Add JV_ARRAY() macro
Nicolas Williams [Mon, 11 Aug 2014 22:25:09 +0000 (17:25 -0500)]
Add jq_report_error() function; use it
Put a stop to fprintf(stderr, ...) where we shouldn't.
Nicolas Williams [Mon, 11 Aug 2014 19:58:01 +0000 (14:58 -0500)]
Fix #549
Nicolas Williams [Sun, 10 Aug 2014 01:47:03 +0000 (20:47 -0500)]
Constant fold objects
Nicolas Williams [Sun, 10 Aug 2014 01:27:08 +0000 (20:27 -0500)]
Fold constant arrays
Nicolas Williams [Sun, 10 Aug 2014 00:05:15 +0000 (19:05 -0500)]
More constant folding: null, true, and false
A step towards doing constant folding for arrays and objects.
Nicolas Williams [Sun, 10 Aug 2014 00:04:34 +0000 (19:04 -0500)]
Out of bounds negative array indices should raise
Nicolas Williams [Sat, 9 Aug 2014 18:10:41 +0000 (13:10 -0500)]
`.foo[-1] = ...` trips assertion (fix #490)
Nicolas Williams [Sat, 9 Aug 2014 17:42:39 +0000 (12:42 -0500)]
Allow any number of jq-coded function arguments
Nicolas Williams [Sat, 9 Aug 2014 00:36:43 +0000 (19:36 -0500)]
Make `nwise` private
Nicolas Williams [Sat, 9 Aug 2014 00:31:11 +0000 (19:31 -0500)]
Make regexp builtins and range/3 use #524 too
Nicolas Williams [Sat, 9 Aug 2014 00:23:46 +0000 (19:23 -0500)]
Use `def f($a): ...;` syntax for builtins
Nicolas Williams [Fri, 8 Aug 2014 23:00:47 +0000 (18:00 -0500)]
Add `def f($arg):` syntax (fix #524)
Nicolas Williams [Fri, 8 Aug 2014 23:00:01 +0000 (18:00 -0500)]
Fix tests for #432
Nicolas Williams [Fri, 8 Aug 2014 22:46:47 +0000 (17:46 -0500)]
Fix docs YAML (introduced in #432)
pkoppstein [Fri, 1 Aug 2014 00:32:44 +0000 (20:32 -0400)]
regex filters (#432): scan, splits, split, sub, gsub
Nicolas Williams [Wed, 6 Aug 2014 22:50:28 +0000 (17:50 -0500)]
Better error msg for bad shell quoting (fix #538)
William Langford [Tue, 5 Aug 2014 03:54:30 +0000 (23:54 -0400)]
Actually check version for bison.
Clean up oniguruma checks.
William Langford [Tue, 5 Aug 2014 17:41:59 +0000 (13:41 -0400)]
Merge pull request #532 from wtlangford/top-removal
Remove duplicate TOP insertions, drop unused defs.
Nicolas Williams [Tue, 5 Aug 2014 06:14:23 +0000 (01:14 -0500)]
Document TCO a bit more
Nicolas Williams [Tue, 5 Aug 2014 06:14:04 +0000 (01:14 -0500)]
Fix docs (missing backquotes)
William Langford [Tue, 5 Aug 2014 04:50:21 +0000 (00:50 -0400)]
Merge pull request #523 from eproxus/patch-1
Add example of selecting object with keys