From 03a6218b78e506450ebbc91559c42421b74ff4f3 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Wed, 25 Sep 2019 02:34:41 +0900 Subject: [PATCH 1/7] [maven-release-plugin] prepare for next development iteration --- jackson-jq-cli/pom.xml | 4 ++-- jackson-jq-extra/pom.xml | 4 ++-- jackson-jq/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jackson-jq-cli/pom.xml b/jackson-jq-cli/pom.xml index 00f5f477..d27ba242 100644 --- a/jackson-jq-cli/pom.xml +++ b/jackson-jq-cli/pom.xml @@ -8,14 +8,14 @@ net.thisptr jackson-jq-parent - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT net.thisptr jackson-jq-extra - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT commons-cli diff --git a/jackson-jq-extra/pom.xml b/jackson-jq-extra/pom.xml index bb6e730a..8296a01f 100644 --- a/jackson-jq-extra/pom.xml +++ b/jackson-jq-extra/pom.xml @@ -8,14 +8,14 @@ net.thisptr jackson-jq-parent - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT net.thisptr jackson-jq - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT diff --git a/jackson-jq/pom.xml b/jackson-jq/pom.xml index 2473e76f..1d500b93 100644 --- a/jackson-jq/pom.xml +++ b/jackson-jq/pom.xml @@ -8,7 +8,7 @@ net.thisptr jackson-jq-parent - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 48e1ab45..d6fb9e3d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.thisptr jackson-jq-parent pom - 1.0.0-preview.20190925 + 1.0.0-SNAPSHOT ${project.groupId}:${project.artifactId} jq for Jackson JSON Processor https://github.com/eiiches/jackson-jq @@ -28,7 +28,7 @@ scm:git:git@github.com:eiiches/jackson-jq.git scm:git:git@github.com:eiiches/jackson-jq.git git@github.com:juven/git-demo.git - 1.0.0-preview.20190925 + HEAD From 93225ae391be4e52529001116422a75c44c16d64 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Wed, 25 Sep 2019 02:51:36 +0900 Subject: [PATCH 2/7] README: fix link --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88d3b5f6..16329302 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ jackson-jq [jq](http://stedolan.github.io/jq/) for Jackson JSON Processor -[![GitHub Actions](/eiiches/jackson-jq/workflows/test/badge.svg)](/eiiches/jackson-jq/actions) +[![GitHub Actions](https://github.com/eiiches/jackson-jq/workflows/test/badge.svg)](https://github.com/eiiches/jackson-jq/actions) *You are currently viewing the develop/1.x branch. Some of the features may not be released yet.* @@ -64,14 +64,14 @@ Branches and versioning There are currently two development branches. -* `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](/eiiches/jackson-jq/releases) page (tags: `1.0.0-preview.yyyyMMdd`). -* `develop/0.x`: The development branch for 0.x versions. Features that need breaking API changes will no longer be added. Go to [Releases](/eiiches/jackson-jq/releases) and find the latest 0.x.y version. +* `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`). +* `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. PRs can be sent to any of the develop/\* branches. The patch will be ported to the other branch(es) if necessary. We use [Semantic Versioning 2.0.0](https://semver.org/) for Java API versioning, 1.0.0 onwards. A jq behavior fix (even if it may possibly affect users) will not be considered a major change if the fix is to make the bahavior compatible with ./jq; these kind of incompatible changes are documented in the release note. -If you get different results between ./jq and jackson-jq, please [file an issue](/eiiches/jackson-jq/issues). That is a bug on jackson-jq side. +If you get different results between ./jq and jackson-jq, please [file an issue](https://github.com/eiiches/jackson-jq/issues). That is a bug on jackson-jq side. Implementation status and current limitations --------------------------------------------- From 8ca688edb889b2d76e608137d6757ac423aab41d Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Wed, 25 Sep 2019 05:18:57 +0900 Subject: [PATCH 3/7] scripts: remove develop-branch-only message when merging to master --- scripts/update-version-refs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-version-refs.sh b/scripts/update-version-refs.sh index 7df8b42a..b68aefab 100755 --- a/scripts/update-version-refs.sh +++ b/scripts/update-version-refs.sh @@ -16,3 +16,4 @@ sed -i "s;[0-9a-z.-]*;$version;" README.md sed -i "s;https://search.maven.org/artifact/net.thisptr/jackson-jq/[0-9a-z.-]*/;https://search.maven.org/artifact/net.thisptr/jackson-jq/$version/;" README.md sed -i "s;jackson-jq-cli-[0-9a-z.-]*.jar;jackson-jq-cli-$version.jar;" README.md sed -i "s;https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/[0-9a-z.-]*/;https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/$version/;" README.md +sed -i "s;*You are currently viewing the .* branch. Some of the features may not be released yet.*;;" README.md From 9d9b60a0e4539c4ef79ba0871bb82bd38ba86be6 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Wed, 25 Sep 2019 14:59:46 +0900 Subject: [PATCH 4/7] README: add Destructuring Alternative Operator to the feature table --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 16329302..fe0b2b77 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ This table illustrates which features (picked from jq-1.5 manual) are supported |     • [`gsub(regex; string)`, `gsub(regex; string; flags)`](https://stedolan.github.io/jq/manual/v1.5/#gsub(regex;string),gsub(regex;string;flags)) | ○ | | [Advanced features](https://stedolan.github.io/jq/manual/v1.5/#Advancedfeatures) | ○ | |     • [Variables](https://stedolan.github.io/jq/manual/v1.5/#Variables) | ○ | +|     • [Destructuring Alternative Operator: ?//](https://stedolan.github.io/jq/manual/v1.6/#DestructuringAlternativeOperator:?//) | ✕ (#44) | |     • [Defining Functions](https://stedolan.github.io/jq/manual/v1.5/#DefiningFunctions) | ○*3 | |     • [Reduce](https://stedolan.github.io/jq/manual/v1.5/#Reduce) | ○ | |     • [`limit(n; exp)`](https://stedolan.github.io/jq/manual/v1.5/#limit(n;exp)) | ○ | From cfbc78c9b0bf1ea62651285110a81efe4e49c890 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Thu, 31 Oct 2019 23:13:28 +0900 Subject: [PATCH 5/7] pom: update jackson-databind to 2.9.10.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6fb9e3d..806d0976 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 1.7.28 2.9.10 - 2.9.10 + 2.9.10.1 1.0-rc6 UTF-8 From cc280917d862004d5d4e469336ccc0a80b06a7de Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Sun, 1 Dec 2019 16:35:49 +0900 Subject: [PATCH 6/7] core: allow escaped forward slashes (`\/`) in strings ref #51 --- jackson-jq/src/main/javacc/json-query.jj | 1 + .../test/resources/tests/constructs/string_interpolation.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/jackson-jq/src/main/javacc/json-query.jj b/jackson-jq/src/main/javacc/json-query.jj index b133e279..dfc8f1be 100644 --- a/jackson-jq/src/main/javacc/json-query.jj +++ b/jackson-jq/src/main/javacc/json-query.jj @@ -1017,6 +1017,7 @@ Expression StringInterpolation(): case 'r': builder.append((char) 0x0d); break; case 't': builder.append((char) 0x09); break; case 'n': builder.append((char) 0x0a); break; + case '/': builder.append('/'); break; default: { throw new IllegalStateException("Unexpected escape char: " + c); } diff --git a/jackson-jq/src/test/resources/tests/constructs/string_interpolation.yaml b/jackson-jq/src/test/resources/tests/constructs/string_interpolation.yaml index 23398470..797d63b6 100644 --- a/jackson-jq/src/test/resources/tests/constructs/string_interpolation.yaml +++ b/jackson-jq/src/test/resources/tests/constructs/string_interpolation.yaml @@ -4,3 +4,6 @@ - q: 'try (path("path: \([1,2][])")) catch .' out: - "Invalid path expression with result \"path: 1\"" +- q: '"\/"' + out: + - "/" From 87640b814a5f0f1315ffca91fc8efe4c775807d7 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Sun, 8 Dec 2019 14:16:19 +0900 Subject: [PATCH 7/7] [maven-release-plugin] prepare release 1.0.0-preview.20191208 --- README.md | 18 +++++++++--------- jackson-jq-cli/pom.xml | 4 ++-- jackson-jq-extra/pom.xml | 4 ++-- jackson-jq/pom.xml | 2 +- pom.xml | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index fe0b2b77..bee71fb5 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,20 @@ jackson-jq [![GitHub Actions](https://github.com/eiiches/jackson-jq/workflows/test/badge.svg)](https://github.com/eiiches/jackson-jq/actions) -*You are currently viewing the develop/1.x branch. Some of the features may not be released yet.* + Usage ----- First, you need Java 8 or later. -If you use Maven, add the following snippet to the `` 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.20190925/jar) on search.maven.org. +If you use Maven, add the following snippet to the `` 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.20191208/jar) on search.maven.org. ```xml net.thisptr jackson-jq - 1.0.0-preview.20190925 + 1.0.0-preview.20191208 ``` @@ -30,9 +30,9 @@ Using a jackson-jq command line tool To test a query quickly, we provide jackson-jq CLI. ```sh -$ curl -LO https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/1.0.0-preview.20190925/jackson-jq-cli-1.0.0-preview.20190925.jar +$ curl -LO https://repo1.maven.org/maven2/net/thisptr/jackson-jq-cli/1.0.0-preview.20191208/jackson-jq-cli-1.0.0-preview.20191208.jar -$ java -jar jackson-jq-cli-1.0.0-preview.20190925.jar --help +$ java -jar jackson-jq-cli-1.0.0-preview.20191208.jar --help usage: jackson-jq [OPTIONS...] QUERY -c,--compact compact instead of pretty-printed output -h,--help print this message @@ -40,7 +40,7 @@ usage: jackson-jq [OPTIONS...] QUERY -n,--null-input use `null` as the single input value -r,--raw output raw strings, not JSON texts -$ java -jar jackson-jq-cli-1.0.0-preview.20190925.jar '.foo' +$ java -jar jackson-jq-cli-1.0.0-preview.20191208.jar '.foo' {"foo": 42} 42 ``` @@ -48,11 +48,11 @@ $ java -jar jackson-jq-cli-1.0.0-preview.20190925.jar '.foo' To test a query with a specific jq version, ```sh -$ java -jar jackson-jq-cli-1.0.0-preview.20190925.jar --jq 1.5 'join("-")' +$ java -jar jackson-jq-cli-1.0.0-preview.20191208.jar --jq 1.5 'join("-")' ["1", 2] jq: error: string ("-") and number (2) cannot be added -$ java -jar jackson-jq-cli-1.0.0-preview.20190925.jar --jq 1.6 'join("-")' # jq-1.6 can join any values, not only strings +$ java -jar jackson-jq-cli-1.0.0-preview.20191208.jar --jq 1.6 'join("-")' # jq-1.6 can join any values, not only strings ["1", 2] "1-2" ``` @@ -233,7 +233,7 @@ Using jackson-jq-extra module net.thisptr jackson-jq-extra - 1.0.0-preview.20190925 + 1.0.0-preview.20191208 ``` diff --git a/jackson-jq-cli/pom.xml b/jackson-jq-cli/pom.xml index d27ba242..68f3c144 100644 --- a/jackson-jq-cli/pom.xml +++ b/jackson-jq-cli/pom.xml @@ -8,14 +8,14 @@ net.thisptr jackson-jq-parent - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 net.thisptr jackson-jq-extra - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 commons-cli diff --git a/jackson-jq-extra/pom.xml b/jackson-jq-extra/pom.xml index 8296a01f..b97f03e5 100644 --- a/jackson-jq-extra/pom.xml +++ b/jackson-jq-extra/pom.xml @@ -8,14 +8,14 @@ net.thisptr jackson-jq-parent - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 net.thisptr jackson-jq - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 diff --git a/jackson-jq/pom.xml b/jackson-jq/pom.xml index 1d500b93..85f34729 100644 --- a/jackson-jq/pom.xml +++ b/jackson-jq/pom.xml @@ -8,7 +8,7 @@ net.thisptr jackson-jq-parent - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 diff --git a/pom.xml b/pom.xml index 806d0976..7757df1b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.thisptr jackson-jq-parent pom - 1.0.0-SNAPSHOT + 1.0.0-preview.20191208 ${project.groupId}:${project.artifactId} jq for Jackson JSON Processor https://github.com/eiiches/jackson-jq @@ -28,7 +28,7 @@ scm:git:git@github.com:eiiches/jackson-jq.git scm:git:git@github.com:eiiches/jackson-jq.git git@github.com:juven/git-demo.git - HEAD + 1.0.0-preview.20191208