Commit Graph
477 Commits
Author SHA1 Message Date
itchyny 0733fd3d58 Add a regression test for negative indices and fix a pick/1 test 2023-08-16 17:49:44 -05:00
Alex Wilson f31c180e8f Update documentation to reflect new defs field on modulemeta 2023-08-12 20:46:36 -05:00
Naïm Favier d1a6da2205 docs: fix delpaths description 2023-08-09 18:20:04 +02:00
itchyny a692060129 Change the default color of null to Bright Black 2023-08-05 23:21:12 -05:00
Emanuele Torre f94a9d463f Let error(null) throw null
This patch removes the weird behaviour of jv_invalid_with_msg(jv_null())
that returns jv_invalid() (i.e. empty), instead of a boxed jv_null().

The previous behaviour of  null|error  was obviously unintentional, and
allowing is jv_invalid_with_msg() to return values on which you can't
call jv_invalid_get_msg() is only error prone.
2023-08-04 17:38:52 -05:00
Nicolas Williams 71941a0d47 Clarify the // operator (fix typo) 2023-08-03 23:24:12 -05:00
Nicolas Williams d8327a90b8 Add a bit more text about generators 2023-08-03 14:41:53 -05:00
Nicolas Williams ddef804945 Clarify the // operator (close #2189) 2023-08-03 14:41:53 -05:00
Nicolas Williams 27a4d5757e Require a main program (fix #2785) 2023-08-01 23:06:01 -05:00
Nicolas Williams 29698118c5 Update download page with new release key 2023-07-31 23:59:09 -05:00
itchyny c8e28da129 Redesign website (#2628)
* Bump up Bootstrap to v5.3.1, Bootstrap Icon to v1.10.5.
* Use autoComplete.js to drop dependency on jQuery and typeahead.js.
* Support dark mode.
* New svg logo and icon with responsive color mode support.
* Normalize section ids to lower kebab-case for easiness of linking.
* Use relative paths for links for local development (--root /output).
* Various markup cleanups and accessibility improvements.
2023-07-31 09:52:52 +09:00
Owen Ou 4af3f99728 Update bug_report.md with Discord link 2023-07-30 04:28:38 +02:00
Owen Ou 82f7f772e6 Redirect questions to Discord
We now have an official Discord server and most maintainers are hanging
out there. It would be a good idea to redirect questions to Discord.
2023-07-30 04:28:38 +02:00
Emanuele Torre a6eb055c47 Fix typo in manual: "-seq" => "--seq" 2023-07-29 18:27:59 -05:00
Mattias Wadman 28af007518 Replace NEWS with NEWS.md with more details and examples
Changes mentioned based on picking user facing changes from:
git log --oneline -r master...jq-1.6 | grep -v Merge
2023-07-28 13:43:14 -05:00
itchyny a1e791acf8 Rename --nul-output to --raw-output0, abort on string containing NUL
The option naming --nul-output was confusing, especially when we have a
similar option for input stream in the future (--nul-input vs --null-input).
Based on the observation of other command line tools, we rename the option
to --raw-output0. We also drop the short option -0 to avoid confusion on
introducing the NUL-delimited input option.

Unlike the other command line tools outputting file names with NUL delimiter,
jq deals with JSON, and its strings may contain NUL character. To protect
users from the risk of injection attacks, we abort the program and print an
error message before outputting strings including NUL character. Closes #2683.
2023-07-26 23:55:00 -05:00
pkoppstein 13fbe98dff manual.yml: remove contingent tests
Also clarify non-prescriptive nature of some tests in jq.test
2023-07-25 23:43:57 -05:00
pkoppstein 7b725378b9 builtin.jq: naive abs/0
manual.yml explains that the def is naive, and mentions fabs, etc.
2023-07-25 23:43:57 -05:00
itchyny a29ac81de1 Remove deprecated --argfile option 2023-07-25 10:21:01 -05:00
itchyny 4705a22c7d Reorder the command line options in the manual (#2766) 2023-07-25 15:24:54 +09:00
Mattias Wadman 54fef09ac3 Make maintainer-mode default to disabled
This makes the standard build instructions a bit easier,
just ./configure, and also requires less tools installed (bison).

Also i think few people probably want to generate the lexer and paser code.
2023-07-24 11:26:17 -05:00
itchyny ed334b536f Improve manual in various ways (inputs, sort_by, foreach sections, etc.) (#2744)
- Add error/0 and mentions null input behavior (close #2231)
- Explain value iterator suffix syntax .foo[] (close #1047)
- Mention array slicing is also zero-based (close #2094)
- Add examples of input and inputs filters (close #2216, close #2470)
- Improve sort_by about multiple values (close #2103, close #2467, close #2474)
- Improve foreach section and simplify examples (close #1148, close #2169)
- Fix recurse/1 document on how it is identical using recurse/2 (close #2036, close #2412)
- Add non-string examples of index/1, rindex/1 (close #1422)
- Simplify the example of truncate_stream/1 (close #1736)
2023-07-24 20:24:44 +09:00
Nicolas Williams f64ef1a7d7 Fix --stream-errors w/o --stream, and doc+test (close #2748) 2023-07-23 03:33:28 -05:00
itchyny 99a381b5aa Improve --help to mention all the command options 2023-07-23 03:26:44 -05:00
itchyny 575372222a Add importlib_resources dependency for older Python (fix #2753) (#2754) 2023-07-23 15:01:16 +09:00
itchyny 34629ed223 Fix manual source code to follow the schema definition 2023-07-22 19:00:16 -05:00
itchyny 9044f540bb Validate manual schema 2023-07-22 19:00:16 -05:00
pkoppstein 3553a9d617 manual.yml: some clarifications plus fixes for markdown bloopers (#2737) 2023-07-21 21:33:03 +09:00
itchyny 7c2bf9bd17 Clarify the Docker image location (close #1864) (#2740) 2023-07-21 20:42:11 +09:00
pkoppstein 3ec66c858c manual.yml: revise section on identity, clarifying what is subject to change
Mostly clarifications w.r.t. numbers.

The anomalous behavior of leading minus signs is documented, with an explicit notice that this will probably change.
2023-07-19 22:32:24 -05:00
itchyny f0306405c1 Add notes on NO_COLOR environment variable to the manual 2023-07-19 09:56:01 -05:00
0b558f6ed4 Make object key color configurable (close #1739, #1791, #2638)
Co-authored-by: David Haguenauer <ml@kurokatta.org>
Co-authored-by: Eric Pruitt <eric.pruitt@gmail.com>
2023-07-18 17:53:29 -05:00
Emanuele Torre 15fd31de78 Define examples in the "examples" field instead of "example"
Only examples defined in the "examples" field are generated, if they are
defined in "example", they are just ignored.

Also fix a bunch of incorrect tests.
2023-07-18 12:12:50 -05:00
itchyny 9e4c71558a Split man.test to make tests pass without oniguruma (#2722) 2023-07-18 08:17:21 +09:00
pkoppstein 07ef97c414 debug/1 (#2710)
* debug/1

This def ensures the output of debug(m1,m2) is kept together.

Closes #2709 #2111 #2112
2023-07-14 00:17:42 +02:00
itchyny 481167c8f1 Update jinja2 to fix deprecation warnings on building website (#2711) 2023-07-14 00:06:53 +09:00
Emanuele Torre c99981c5b2 Update "tests/man.test" and remove superflous whitespace in manual.yml
tests/man.test was generated incorrectly and had some duplicate tests,
the new CI workflow didn't like that.
2023-07-11 00:24:50 -05:00
Emanuele Torre c049061084 Fix build_manpage.py with newer markdown versions
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-11 00:24:50 -05:00
Emanuele Torre 2377972dfe Use jinja2 ==3.0.2 for now
We are using some deprecated jinja2 features that have been removed in
newer versions.
2023-07-10 16:19:52 -05:00
Nicolas Williams 31280c3b50 Revert "Update docs/Pipfile.lock"
This reverts commit 7fba85095b.
2023-07-10 15:33:18 -05:00
Emanuele Torre 7fba85095b Update docs/Pipfile.lock 2023-07-10 15:23:00 -05:00
Nicolas Williams 295ff72dd0 Update docs/README.md 2023-07-10 14:35:11 -05:00
pkoppstein 8345a8a62b manual.yml: further tweaks re map and map_values
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-10 00:06:58 -05:00
pkoppstein 39cf2fb7a6 manual.yml: further tweaks re map and map_values
A more systematic exposition
2023-07-10 00:06:58 -05:00
pkoppstein d710324ef8 manual.yml: clarify explanation of map_values, including description of new behavior
#2466
2023-07-10 00:06:58 -05:00
itchyny cac216a39c Fix manual on paths/1 to use boolean filter for its argument 2023-07-09 10:54:13 -05:00
itchyny d8072564c2 Fix nth/2 to emit empty on index out of range 2023-07-08 23:13:15 -05:00
itchyny e2bc8de8bb Fix the latest manual on string multiplication by zero 2023-07-08 23:10:07 -05:00
itchyny 0ecededefa Remove deprecated filters: leaf_paths, recurse_down 2023-07-07 10:53:40 -05:00
pkoppstein c68ad08805 manual.yml: pick(pathexps)
Change formal parameter name
2023-07-05 23:48:31 -05:00