Skip to content

Commit 346353a

Browse files
authored
Implement dedicated (de)serializer for messages (#1)
This extracts the common Jackson settings copy-pasted across various Cucumber modules into its own module for reuse.
1 parent 210b25c commit 346353a

98 files changed

Lines changed: 6737 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/renovate.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>cucumber/renovate-config",
5+
"github>cucumber/renovate-config:messages-range-strategy-widen"
6+
]
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release GitHub
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-github-release:
9+
name: Create GitHub Release and Git tag
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v6
16+
- uses: cucumber/action-create-github-release@v1.1.1
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-mvn.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Maven
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-mvn:
9+
name: Publish Maven Package
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
steps:
13+
- uses: actions/checkout@v6
14+
- uses: actions/setup-java@v5
15+
with:
16+
distribution: 'temurin'
17+
java-version: '17'
18+
cache: 'maven'
19+
- uses: cucumber/action-publish-mvn@v3.0.0
20+
with:
21+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
22+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
23+
nexus-username: ${{ secrets.SONATYPE_USERNAME }}
24+
nexus-password: ${{ secrets.SONATYPE_PASSWORD }}
25+
working-directory: java

.github/workflows/test-java.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: test-java
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
paths:
9+
- java/**
10+
- testdata/**
11+
- .github/**
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- java/**
17+
- testdata/**
18+
- .github/**
19+
workflow_call:
20+
21+
jobs:
22+
test-java:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
os:
28+
- ubuntu-latest
29+
java: ['17', '21']
30+
31+
steps:
32+
- uses: actions/checkout@v6
33+
- uses: actions/setup-java@v5
34+
with:
35+
distribution: 'temurin'
36+
java-version: ${{ matrix.java }}
37+
cache: 'maven'
38+
39+
- run: mvn verify
40+
working-directory: java
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: test-testdata
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- testdata/**
9+
- .github/**
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- testdata/**
15+
- .github/**
16+
17+
jobs:
18+
test-testdata:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-node@v6
23+
with:
24+
cache: 'npm'
25+
cache-dependency-path: testdata/package-lock.json
26+
27+
- run: npm ci
28+
working-directory: testdata
29+
30+
- name: check repository is not dirty
31+
run: "[[ -z $(git status --porcelain) ]]"
32+
33+
- name: show diff
34+
if: ${{ failure() }}
35+
run: git status --porcelain

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
*.iml

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
### Added
10+
- Java implementation ([#1](https://github.com/cucumber/cucumber-json-formatter/pull/1))
11+
12+
[Unreleased]: https://github.com/cucumber/cucumber-json-formatter/compare/210b25cf78776dc9e08a073d3e289e75402db885...HEAD

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
⚠️ This is an internal package; you don't need to install it in order to use the JSON Formatter.
2+
3+
[![Maven Central](https://img.shields.io/maven-central/v/io.cucumber/messages-json.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:io.cucumber%20AND%20a:messages-json)
4+
5+
# Messages JSON
6+
7+
Serialize and deserialize [Cucumber Messages](https://github.com/cucumber/messages/)
8+
to and from JSON.
9+
10+
This functionality is intentionally kept separate from Cucumber messages. The
11+
backing (de-)serialisation is provided by [Jackson](https://github.com/FasterXML/jackson)
12+
which gets frequent updates. As messages is used by every other project in the
13+
Cucumber ecosystem including could result a cascade of releases.
14+
15+
This limits the release cascade to only those projects that use Jackson in
16+
production code.

RELEASING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See https://github.com/cucumber/.github/blob/main/RELEASING.md.

java/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
*.iml
3+
target/
4+
pom.xml.versionsBackup
5+
dependency-reduced-pom.xml

0 commit comments

Comments
 (0)