Commit Graph
1385 Commits
Author SHA1 Message Date
itchyny 2e5c3f490c Fix regular expression section on PCRE (fix #2439), also improve example format (#2613) 2023-06-14 07:36:06 +09:00
itchyny 433b79dddf Fix version scripts for some shallow clone situations (fix #1549) (#2608) 2023-06-14 07:33:25 +09:00
Josh Soref 5cebe86a7b Fix misspellings (#2609) 2023-06-13 20:01:20 +09:00
Josh Soref bd86ca3002 scanbuild: use ubuntu-latest (#2610) 2023-06-13 13:53:01 +09:00
AJ Jordan 840dc55263 Link to the Onigurama docs (#2355) 2023-06-13 13:49:46 +09:00
Josh Soref 1d69ca636a Fix macOS build - drop python3 (#2612)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-06-12 21:29:47 -07:00
itchyny e5414e6828 docs: Fix coding style of Python scripts using YAPF (#2606) 2023-06-08 19:04:19 +09:00
itchyny fd9da6647c docs: Fix example outputs added in #2391 2023-06-07 21:05:03 +09:00
Benjamin Wuethrich e066172aa1 Add fixes for manual (#2391) 2023-06-07 20:59:07 +09:00
Timothy John Perisho Eccleston a87dca3c87 fix typos in manual.yml (#2102) 2023-06-07 20:58:48 +09:00
Anthony Sottile 6c5c8f2115 fix handling of -0 (#2235) 2023-06-06 20:19:43 +09:00
itchyny b8816caf0a docs: Fix a try-catch example (fix #1558, #1777) (#2605) 2023-06-06 09:03:25 +09:00
Henré Botha df8ee8dd79 docs: fix typo in halt_error example (#2336) 2023-06-06 08:36:46 +09:00
Lucas Trzesniewski b7f9587bb9 docs: clarify split behavior (#2462) 2023-06-06 08:28:57 +09:00
Stefan 90bfa96249 Fixed typo in errors on missing some mathematical filters (#2434) 2023-06-06 06:59:29 +09:00
nmulcaheyanditchyny d178ebdc94 [docs] Use yaml.safe_load() in build_*.py scripts (#2432)
Co-authored-by: itchyny <itchyny@cybozu.co.jp>
2023-06-06 06:47:42 +09:00
Matti Åstrand b7511b9b1f Key should be "foo" without spaces (#2212) 2023-06-06 06:17:35 +09:00
itchyny c815794e4b Replace find with select function as the example of jq-coded functions (#1962) 2023-06-06 06:09:03 +09:00
itchyny 4e9a1a8037 Show missing backslash in manual (#2492) 2023-06-06 06:03:58 +09:00
zstadler a5ba98a55c Show missing backslash in manual (#2492) 2023-06-06 06:03:07 +09:00
itchyny d57a96e3f7 Fix website generation workflow 2023-06-06 05:57:31 +09:00
eitsupi 360cd8dbe2 docs: install via winget (#2600) 2023-06-06 05:52:09 +09:00
itchyny cd4dc1e6d1 Add a GitHub Actions workflow to build and update website (#2603) 2023-06-06 05:51:33 +09:00
itchyny 527ea012f3 Remove TravisCI configuration file and fix GitHub actions badges (#2602)
* Remove TravisCI configuration file

* Update CI badges in README.md to refer to GitHub Actions
2023-06-06 05:51:08 +09:00
itchyny 019a9ffbee Improve docs of optional indexing syntax to make it clear (ref #2588) (#2604)
* Revert "Typo in basic filters manual (#2588)"

This reverts commit 908f5d54a7.

* Improve docs of optional indexing syntax to make it clear
2023-06-06 05:43:06 +09:00
Benoit de ChezellesandOwen Ou 908f5d54a7 Typo in basic filters manual (#2588)
Co-authored-by: Owen Ou <169064+owenthereal@users.noreply.github.com>
2023-06-04 22:29:55 -07:00
Tom WolfandOwen Ou 91d10c556b docs: Update Flex URL (#2582)
Co-authored-by: Owen Ou <169064+owenthereal@users.noreply.github.com>
2023-06-04 22:29:36 -07:00
Hanson CharandHanson Char 13d1930154 Update git submodule commit of oniguruma from 5a24a49 to 078f95e (#2561)
Co-authored-by: Hanson Char <hchar@amazon.com>
2023-06-01 17:59:18 -07:00
Owen OuandNicolas Williams 4975b01a21 Merge old jqlang/jq master to the latest (#2596)
* Try making some GitHub Actions

* GHA: Add OS X, Windows, and Linux w/ scan-build builds

* Add link to discord server

Add link to discord server

* Update Ubuntu to 22.04 for GitHub Actions

* Remove if condition for Ubuntu build

* Fix MacOS OS on GitHub Actions

* Fix python3 package on GitHub Actions

* Disalbe valgrind

Getting failed tests: https://github.com/jqlang/jq/actions/runs/5113866588/jobs/9193542140#step:9:341

* Format file

* Fix macos build

* Fix syntax errors of windows build

https://github.com/jqlang/jq/actions/runs/5114162556/workflow

* Install windows package with choco

* Pin oniguruma to 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c

MacOS build [fails](https://github.com/jqlang/jq/actions/runs/5114162555/jobs/9194126677#step:6:3160) due to

```
posix.c:94:3: error: implicit declaration of function 'onig_end' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  onig_end();
```

The current `oniguruma` revision
6fa38f4084b448592888ed9ee43c6e90a46b5f5c (15 Mar 2017) lacks the following explicit declaration in src/onigposix.h:

```
ONIG_EXTERN int onig_end P_((void));
```

This was added to oniguruma in revision 5a24a49d710a9e3bb8ff11d12e1eae5a9f9df40c (8 Sep 2017).

Ref: https://github.com/jqlang/jq/issues/2381

* Revert windows build to use pacman

* Don't zip jq.exe

* Fixing windows build

* Update .gitattriutes for eol on Windows

* Skip workflow_dispatch for windows build

* Clean up builds

* Use LF line endings for all text

Ref: https://github.com/actions/checkout/issues/135

* Fix test that has rounding error

https://github.com/jqlang/jq/pull/2596#issuecomment-1568498993

* Enable CI for all

---------

Co-authored-by: Nicolas Williams <nico@cryptonector.com>
2023-06-01 10:09:39 -07:00
Stephen Dolan 89caf46a5f Update URLs from stedolan to jqlang 2023-05-28 17:06:31 +01:00
Stephen Dolan eb610c0323 Fix website build by adding Loader parameter to yaml.load 2023-05-28 16:41:46 +01:00
Mattias Wadman cff5336ec7 docs: Document repeat(exp) 2022-05-26 16:04:32 -05:00
Mattias Wadman f2ad9517c7 Mention -n in IO-section and for input/inputs 2022-05-26 16:02:50 -05:00
Tomas Halman c4d39c4d22 Fix iterration problem for non decimal string
When the string transformation to number failed, all following
transformation failed too.

This happend because status in decNumberFromString function is
updated just in error case. Reusing the DEC_CONTEXT that failed
before results into error even if the string is valid number.
2022-05-26 16:02:10 -05:00
Naïm Favier 174db0f935 docs: point to Libera.Chat instead of Freenode 2022-05-26 16:01:25 -05:00
Lukas Lansky 29cf77977e Missing "va_end" call. This was found by running the cppcheck static analysis where it shows as error. 2022-05-26 15:53:59 -05:00
Sean Wei 55e6e2c218 Add --recursive to git clone 2022-05-26 15:47:24 -05:00
Zhaohui Mei 88116ba76d docs(manual): fix the typo errors in the manual 2022-05-26 15:47:02 -05:00
Mattias Wadman 3678822e7f docs: Fix some format inconsistencies in manual 2022-05-26 15:46:40 -05:00
Gijs Kunze 0171a9eb60 fixes incorrect example in man page 2022-05-26 15:45:52 -05:00
dak180 edacc8f70d jq is now available through fink. 2022-05-26 15:45:08 -05:00
Ikko Ashimine 2a3e4cf7b2 Fix typo in compile.c
alrady -> already
2022-05-26 15:44:12 -05:00
Stefan 94e87c9377 Fixed typos 2022-05-26 15:43:55 -05:00
Owen Ou f9afa950e2 Update AUTHORS 2022-04-04 12:04:12 -05:00
Owen Ou 6c24c71ddb Update my contributor info
My GitHub profile is at https://github.com/owenthereal
2022-04-04 12:04:12 -05:00
Nicolas Williams a9f97e9e61 Fix accidentally quadratic behavior in _modify
We need to be careful to not grab an extra reference when mutating data
structures because that means we make extra copies.  Doing that every
time in `_modify` is really painful, as that function implements `|=`
and all modify-assign operators.

`jv_setpath()` also grabs additional references, so this is not the only
fix needed for the modify-assign operators to not be accidentally
quadratic.

We have to use `LOADVN` in order to make this fix possible, so we should
really byte-code `_modify` rather than jq-code it.  However, as a
stop-gap to make this fix easier, I'm adding syntax for referring to a
`$binding` such that you get `LOADVN` instead of `LOADV`.

This syntax is not meant to be used outside jq's internals!  Therefore
it is not documented.  I promise to break it later, so don't use it!

TBD, but later:

 - Optimize `_modify` for the case where `update` outputs more than one
   value.

   This is trivial: add a `setpath($p; null)` in the middle of `_modify`
   before calling `update`.  But unfortunately the VM retains a
   reference to `value_at_path` for path expression checking, and fixing
   that will require more work.
2021-10-24 16:23:26 -05:00
Nicolas Williams 0c3455d329 Fix accidentally quadratic behavior in setpath
We need to be careful to not grab an extra reference when mutating
data structures because that means we make extra copies.  Doing that
every time in `jv_setpath()` is really painful, as that function is used
in `_modify/2`, which is used in `|=` and all modify-assign operators.

`_modify` also grabs additional references, so this is not the only fix
needed for the modify-assign operators to not be accidentally quadratic.
2021-10-24 16:23:26 -05:00
Nicolas Williams 1a1804afcb Fix LOADV/LOADVN refcount printing 2021-10-24 16:23:26 -05:00
Nicolas Williams 582717a7b4 Fix crash in LOADVN when stack grows
This `stack_push()` call in LOADVN invalidates `var`:

       jv* var = frame_local_var(jq, v, level);
       jv_free(stack_popn(jq));
------>stack_push(jq, *var);
       *var = jv_null();
       ^^^^^^

We have to re-compute `var`:

       jv* var = frame_local_var(jq, v, level);
       jv_free(stack_popn(jq));
       stack_push(jq, *var);
------>var = frame_local_var(jq, v, level);
       *var = jv_null();
2021-10-24 16:23:26 -05:00
Nicolas Williams 07dc653ae1 Appveyor: Get Appveyor building again 2021-10-24 16:23:26 -05:00