Commit Graph
1363 Commits
Author SHA1 Message Date
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
Nicolas Williams d79fe7fd58 Update docs/Pipenv.lock 2021-10-24 16:23:26 -05:00
Nicolas Williams a9ce7244b4 Fix Windows build for 1.7 release (moar) 2021-09-06 22:17:57 -05:00
Nicolas Williams 34182cca7b Fix Windows build for 1.7 release (pthread stuff) 2021-09-03 14:18:18 -05:00
itchyny d18b2d078c Fix msys2 installation on AppVeyor
Ref: https://www.msys2.org/news/#2020-06-29-new-packagers
2021-05-01 14:34:26 -04:00
Mattias Wadman cc4efc49e1 Fix incorrect if empty string example 2021-05-01 14:33:01 -04:00
mjarosie e615bdc407 update the version available through Chocolatey 2021-05-01 14:32:38 -04:00
Aleksey Tsalolikhin 9600a5c781 Re-apply patch from ff8924ce16 to dev manual 2021-05-01 14:19:45 -04:00
Aleksey Tsalolikhin d57d9737d7 Remove decimal number text from v1.6 manual 2021-05-01 14:19:45 -04:00
Ciaran McNamara 2de3bc3732 Add large file support for 32-bit systems to fix issue 2167 2021-05-01 14:17:41 -04:00
William Langford 77417c1335 Clean up compile warnings on macOS 2020-12-19 15:18:29 -05:00
William Langford e660003abf Use AX_PTHREAD to properly detect pthread and flags 2020-12-19 15:18:29 -05:00
Alexandre Jasmin 80052e5275 Fix #2197 extended regex pattern example 2020-12-18 00:01:19 -05:00
Maximilian Roos a17dd3248a Add some missing code quoting to the manual 2020-06-08 12:35:13 -04:00
itchyny 6306ac8966 Reduce allocation on string multiplication 2020-05-26 12:30:27 -04:00
itchyny 9163e09605 Fix multiple string multiplication 2020-05-26 12:30:27 -04:00
itchyny 15fa1dec99 Fix error handling in strftime 2020-05-26 12:29:34 -04:00
Christopher Degawa ccc79e592c Makefile: prepend srcdir to jq.1.prebuilt to fix out of source compilation 2020-03-03 11:50:04 -05:00
William Langford 50a7022ea6 Rework pipenv requirement to be more relaxed
Keep a cached copy of the man tests that we can use when no manpage
changes are made. This allows automated systems that might not have
easy access to a pipenv to build and run tests.
2020-03-02 11:05:43 -05:00
William Langford 8c61ebad0a Minor fixes to website generation 2020-03-02 10:55:51 -05:00
Gustav d24c3d2263 Change Homebrew version in docs to 1.6 2020-03-02 10:10:08 -05:00
Alanscut 63b5c7b553 compatibiltiy->compatibility 2020-03-02 10:05:32 -05:00
Alanscut 5b9e63e4af fix typos 2020-01-14 10:18:22 -06:00