Skip to content

Commit 59539c6

Browse files
committed
Merge branch 'release/1.0.0-preview.20220704' into master/1.x
2 parents b6fc733 + d8dc602 commit 59539c6

11 files changed

Lines changed: 174 additions & 91 deletions

File tree

.github/workflows/deploy-snapshot.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
build:
99
runs-on: ubuntu-18.04
1010
steps:
11-
- uses: actions/checkout@v2.3.4
11+
- uses: actions/checkout@v3.0.2
1212
- name: Set up JDK 1.8
13-
uses: actions/setup-java@v2.3.0
13+
uses: actions/setup-java@v3.4.0
1414
with:
1515
java-version: '8'
16-
distribution: 'zulu'
16+
distribution: 'temurin'
1717

1818
- name: Download jq-1.5 and jq-1.6
1919
run: |

.github/workflows/test-pull-requests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
build:
88
runs-on: ubuntu-18.04
99
steps:
10-
- uses: actions/checkout@v2.3.4
10+
- uses: actions/checkout@v3.0.2
1111
- name: Set up JDK 1.8
12-
uses: actions/setup-java@v2.3.0
12+
uses: actions/setup-java@v3.4.0
1313
with:
1414
java-version: '8'
15-
distribution: 'zulu'
15+
distribution: 'temurin'
1616

1717
- name: Download jq-1.5 and jq-1.6
1818
run: |

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Usage
1212

1313
First, you need Java 8 or later.
1414

15-
If you use Maven, add the following snippet to the `<dependencies>` section of your POM. For instructions for other build tools (Gradle, etc.), visit [jackson-jq](https://search.maven.org/artifact/net.thisptr/jackson-jq/1.0.0-preview.20210928/jar) on search.maven.org.
15+
If you use Maven, add the following snippet to the `<dependencies>` section of your POM. For instructions for other build tools (Gradle, etc.), visit [jackson-jq](https://search.maven.org/artifact/net.thisptr/jackson-jq/1.0.0-preview.20220704/jar) on search.maven.org.
1616

1717
```xml
1818
<dependency>
1919
<groupId>net.thisptr</groupId>
2020
<artifactId>jackson-jq</artifactId>
21-
<version>1.0.0-preview.20210928</version>
21+
<version>1.0.0-preview.20220704</version>
2222
</dependency>
2323
```
2424

@@ -32,29 +32,29 @@ To test a query quickly, we provide jackson-jq CLI.
3232
*Please note that jackson-jq is a Java library and the CLI is provided solely for debugging/testing purpose (and not for production). The command-line options might change without notice.*
3333

3434
```sh
35-
$ curl -LO https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/1.0.0-preview.20210928/jackson-jq-cli-1.0.0-preview.20210928.jar
35+
$ curl -LO https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/1.0.0-preview.20220704/jackson-jq-cli-1.0.0-preview.20220704.jar
3636

37-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --help
37+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --help
3838
usage: jackson-jq [OPTIONS...] QUERY
3939
-c,--compact compact instead of pretty-printed output
4040
-h,--help print this message
4141
--jq <arg> specify jq version
4242
-n,--null-input use `null` as the single input value
4343
-r,--raw output raw strings, not JSON texts
4444

45-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar '.foo'
45+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar '.foo'
4646
{"foo": 42}
4747
42
4848
```
4949

5050
To test a query with a specific jq version,
5151

5252
```sh
53-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.5 'join("-")'
53+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.5 'join("-")'
5454
["1", 2]
5555
jq: error: string ("-") and number (2) cannot be added
5656

57-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.6 'join("-")' # jq-1.6 can join any values, not only strings
57+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.6 'join("-")' # jq-1.6 can join any values, not only strings
5858
["1", 2]
5959
"1-2"
6060
```
@@ -66,7 +66,7 @@ Branches and versioning
6666

6767
There are currently two development branches.
6868

69-
* `develop/1.x`: This branch (you are viewing), which is currently under development for the future 1.0 release. The API is **not** stable yet. You can find preview releases (not stable, not recommended for production) at [Releases](https://github.com/eiiches/jackson-jq/releases) page (tags: `1.0.0-preview.yyyyMMdd`).
69+
* `develop/1.x`: This branch (you are viewing), which is currently under development for the future 1.0 release. You can find preview releases at [Releases](https://github.com/eiiches/jackson-jq/releases) page (tags: `1.0.0-preview.yyyyMMdd`). Although the API is not stable yet, I recommend new users to use these releases insetad of 0.x versions, because these releases have more features, better compatibility, and better performance.
7070
* `develop/0.x`: The development branch for 0.x versions. Features that need breaking API changes will no longer be added. Go to [Releases](https://github.com/eiiches/jackson-jq/releases) and find the latest 0.x.y version.
7171

7272
PRs can be sent to any of the develop/\* branches. The patch will be ported to the other branch(es) if necessary.
@@ -207,10 +207,10 @@ This table illustrates which features (picked from jq-1.5 manual) are supported
207207
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`+=`, `-=`, `*=`, `/=`, `%=`, `//=`](https://stedolan.github.io/jq/manual/v1.5/#&#43;&#61;&#44;&#45;&#61;&#44;&#42;&#61;&#44;&#47;&#61;&#44;&#37;&#61;&#44;&#47;&#47;&#61;) ||
208208
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [Complex assignments](https://stedolan.github.io/jq/manual/v1.5/#Complexassignments) ||
209209
| [Modules](https://stedolan.github.io/jq/manual/v1.5/#Modules) ||
210-
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`import RelativePathString as NAME [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#importRelativePathStringasNAME&#91;&#60;metadata&#62;&#93;&#59;) | × |
211-
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`include RelativePathString [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#includeRelativePathString&#91;&#60;metadata&#62;&#93;&#59;) | × |
212-
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`import RelativePathString as $NAME [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#importRelativePathStringas&#36;NAME&#91;&#60;metadata&#62;&#93;&#59;) | × |
213-
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`module <metadata>;`](https://stedolan.github.io/jq/manual/v1.5/#module&#60;metadata&#62;&#59;) | × |
210+
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`import RelativePathString as NAME [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#importRelativePathStringasNAME&#91;&#60;metadata&#62;&#93;&#59;) | |
211+
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`include RelativePathString [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#includeRelativePathString&#91;&#60;metadata&#62;&#93;&#59;) | |
212+
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`import RelativePathString as $NAME [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#importRelativePathStringas&#36;NAME&#91;&#60;metadata&#62;&#93;&#59;) | |
213+
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`module <metadata>;`](https://stedolan.github.io/jq/manual/v1.5/#module&#60;metadata&#62;&#59;) | |
214214
| &nbsp;&nbsp;&nbsp;&nbsp;&bull; [`modulemeta`](https://stedolan.github.io/jq/manual/v1.5/#modulemeta) | × |
215215

216216
</details>
@@ -236,9 +236,9 @@ $ jq -n '1 + 3 as $a | ($a * 2)' # interpreted as 1 + (3 as $a | ($a * 2))
236236
whereas jackson-jq consistently interprets them as `(1 + 3)` whether `as $a` is used or not:
237237

238238
```console
239-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '1 + 3 | (. * 2)' # interpreted as (1 + 3) | (. * 2)
239+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n '1 + 3 | (. * 2)' # interpreted as (1 + 3) | (. * 2)
240240
8
241-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '1 + 3 as $a | ($a * 2)' # interpreted as (1 + 3) as $a | ($a * 2)
241+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n '1 + 3 as $a | ($a * 2)' # interpreted as (1 + 3) as $a | ($a * 2)
242242
8
243243
```
244244

@@ -247,7 +247,7 @@ $ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '1 + 3 as $a | ($a * 2)
247247
```console
248248
$ jq -n '1 + 3 as $a | ($a * 2)' # interpreted as 1 + (3 as $a | ($a * 2))
249249
7
250-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '1 + 3 as $a | ($a * 2)' # interpreted as (1 + 3) as $a | ($a * 2)
250+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n '1 + 3 as $a | ($a * 2)' # interpreted as (1 + 3) as $a | ($a * 2)
251251
8
252252
```
253253

@@ -274,7 +274,7 @@ If the function with the same is defined more than once at the same scope, jacks
274274
```console
275275
$ jq -n 'def f: 1; def g: f; def f: 2; g'
276276
1
277-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n 'def f: 1; def g: f; def f: 2; g'
277+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n 'def f: 1; def g: f; def f: 2; g'
278278
2
279279
```
280280

@@ -283,7 +283,7 @@ $ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n 'def f: 1; def g: f; de
283283
Avoid using the duplicate function name.
284284

285285
```console
286-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n 'def f1: 1; def g: f1; def f2: 2; g'
286+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n 'def f1: 1; def g: f1; def f2: 2; g'
287287
1
288288
```
289289

@@ -353,7 +353,7 @@ jq: error: Division by zero? at <top-level>, line 1:
353353
jq: 1 compile error
354354
$ jq '. / 0' <<< 0
355355
jq: error (at <stdin>:1): number (0) and number (0) cannot be divided because the divisor is zero
356-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '0 / 0'
356+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n '0 / 0'
357357
jq: error: number (0) and number (0) cannot be divided because the divisor is zero
358358
```
359359

@@ -386,9 +386,9 @@ $ jq-1.2 -n '[1,2,3] | ((.[] | select(. > 1)) |= empty)'
386386
2,
387387
3
388388
]
389-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.6 -n '[1,2,3] | ((.[] | select(. > 1)) |= empty)'
389+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.6 -n '[1,2,3] | ((.[] | select(. > 1)) |= empty)'
390390
jq: error: `|= empty` is undefined. See https://github.com/stedolan/jq/issues/897
391-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.5 -n '[1,2,3] | ((.[] | select(. > 1)) |= empty)'
391+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.5 -n '[1,2,3] | ((.[] | select(. > 1)) |= empty)'
392392
jq: error: `|= empty` is undefined. See https://github.com/stedolan/jq/issues/897
393393
```
394394

@@ -397,9 +397,9 @@ jq: error: `|= empty` is undefined. See https://github.com/stedolan/jq/issues/89
397397
You can use `_modify/2` if you really want to the original behavior.
398398

399399
```console
400-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.6 -n '[1,2,3] | _modify((.[] | select(. > 1)); empty)'
400+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.6 -n '[1,2,3] | _modify((.[] | select(. > 1)); empty)'
401401
[ 1, 3 ]
402-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.5 -n '[1,2,3] | _modify((.[] | select(. > 1)); empty)'
402+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.5 -n '[1,2,3] | _modify((.[] | select(. > 1)); empty)'
403403
null
404404
```
405405

@@ -419,7 +419,7 @@ jq 1.5
419419
```console
420420
$ jq-1.5 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
421421
["foo"]
422-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.5 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
422+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.5 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
423423
jq: error: Invalid path expression with result 1
424424
```
425425

@@ -428,7 +428,7 @@ jq 1.6
428428
```console
429429
$ jq-1.6 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
430430
jq: error (at <stdin>:1): Invalid path expression with result 1
431-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar --jq 1.6 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
431+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar --jq 1.6 -c 'path(.foo as $a | $a)' <<< '{"foo": 1}'
432432
jq: error: Invalid path expression with result 1
433433
```
434434

@@ -452,7 +452,7 @@ $ jq -n 'label $a | label $b | try (break $b) catch .'
452452
{
453453
"__jq": 1
454454
}
455-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n 'label $a | label $b | try (break $b) catch .'
455+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n 'label $a | label $b | try (break $b) catch .'
456456
{
457457
"__jq" : 0
458458
}
@@ -482,7 +482,7 @@ $ jq-1.6 -n '"x" | indices("")' # stuck in infinite loop
482482
^C
483483
$ jq-1.6-83-gb52fc10 -n '"x" | indices("")'
484484
[]
485-
$ java -jar jackson-jq-cli-1.0.0-preview.20210928.jar -n '"x" | indices("")'
485+
$ java -jar jackson-jq-cli-1.0.0-preview.20220704.jar -n '"x" | indices("")'
486486
[ ]
487487
```
488488

@@ -499,7 +499,7 @@ To use this module, you need to add the following Maven dependency and set `Buil
499499
<dependency>
500500
<groupId>net.thisptr</groupId>
501501
<artifactId>jackson-jq-extra</artifactId>
502-
<version>1.0.0-preview.20210928</version>
502+
<version>1.0.0-preview.20220704</version>
503503
</dependency>
504504
```
505505

jackson-jq-cli/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>1.0.0-preview.20210928</version>
11+
<version>1.0.0-preview.20220704</version>
1212
</parent>
1313

1414
<dependencies>
1515
<dependency>
1616
<groupId>net.thisptr</groupId>
1717
<artifactId>jackson-jq-extra</artifactId>
18-
<version>1.0.0-preview.20210928</version>
18+
<version>1.0.0-preview.20220704</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>commons-cli</groupId>
2222
<artifactId>commons-cli</artifactId>
23-
<version>1.4</version>
23+
<version>1.5.0</version>
2424
</dependency>
2525
</dependencies>
2626

jackson-jq-extra/pom.xml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>1.0.0-preview.20210928</version>
11+
<version>1.0.0-preview.20220704</version>
1212
</parent>
1313

1414
<dependencies>
1515
<dependency>
1616
<groupId>net.thisptr</groupId>
1717
<artifactId>jackson-jq</artifactId>
18-
<version>1.0.0-preview.20210928</version>
18+
<version>1.0.0-preview.20220704</version>
1919
</dependency>
2020
</dependencies>
2121

@@ -30,6 +30,30 @@
3030
</instructions>
3131
</configuration>
3232
</plugin>
33+
<plugin>
34+
<groupId>org.jboss.jandex</groupId>
35+
<artifactId>jandex-maven-plugin</artifactId>
36+
<executions>
37+
<execution>
38+
<id>make-index</id>
39+
<goals>
40+
<goal>jandex</goal>
41+
</goals>
42+
<configuration>
43+
<verbose>true</verbose>
44+
<processDefaultFileSet>false</processDefaultFileSet>
45+
<fileSets>
46+
<fileSet>
47+
<directory>${project.build.outputDirectory}</directory>
48+
<includes>
49+
<include>net/thisptr/jackson/jq/extra/functions/**/*.class</include>
50+
</includes>
51+
</fileSet>
52+
</fileSets>
53+
</configuration>
54+
</execution>
55+
</executions>
56+
</plugin>
3357
</plugins>
3458
</build>
3559
</project>

jackson-jq/pom.xml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>1.0.0-preview.20210928</version>
11+
<version>1.0.0-preview.20220704</version>
1212
</parent>
1313

1414
<dependencies>
1515
<dependency>
1616
<groupId>org.jruby.joni</groupId>
1717
<artifactId>joni</artifactId>
18-
<version>2.1.41</version>
18+
<version>2.1.43</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>com.google.guava</groupId>
2222
<artifactId>guava</artifactId>
23-
<version>31.0.1-jre</version>
23+
<version>31.1-jre</version>
2424
<scope>test</scope>
2525
</dependency>
2626
<dependency>
@@ -67,6 +67,36 @@
6767
</instructions>
6868
</configuration>
6969
</plugin>
70+
<plugin>
71+
<groupId>org.jboss.jandex</groupId>
72+
<artifactId>jandex-maven-plugin</artifactId>
73+
<executions>
74+
<execution>
75+
<id>make-index</id>
76+
<goals>
77+
<goal>jandex</goal>
78+
</goals>
79+
<configuration>
80+
<verbose>true</verbose>
81+
<processDefaultFileSet>false</processDefaultFileSet>
82+
<fileSets>
83+
<fileSet>
84+
<directory>${project.build.outputDirectory}</directory>
85+
<includes>
86+
<include>net/thisptr/jackson/jq/internal/filters/**/*.class</include>
87+
<include>net/thisptr/jackson/jq/internal/functions/**/*.class</include>
88+
<include>net/thisptr/jackson/jq/BuiltinFunction.class</include>
89+
<include>net/thisptr/jackson/jq/Function.class</include>
90+
</includes>
91+
<excludes>
92+
<exclude>net/thisptr/jackson/jq/internal/functions/EnvFunction.class</exclude>
93+
</excludes>
94+
</fileSet>
95+
</fileSets>
96+
</configuration>
97+
</execution>
98+
</executions>
99+
</plugin>
70100
</plugins>
71101
</build>
72102
</project>

0 commit comments

Comments
 (0)