opsx-gherkin 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.0.2](https://github.com/aquine-kujaruk/opsx-gherkin/compare/v2.0.1...v2.0.2) (2026-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **skill:** update SKILL.md to clarify Gherkin table formatting and conversion requirements ([377026d](https://github.com/aquine-kujaruk/opsx-gherkin/commit/377026dea6a581beeba23cdbebded59e505555db))
|
|
7
|
+
|
|
8
|
+
## [2.0.1](https://github.com/aquine-kujaruk/opsx-gherkin/compare/v2.0.0...v2.0.1) (2026-10-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **skill:** state that inline step comments are preserved step text ([7e49eae](https://github.com/aquine-kujaruk/opsx-gherkin/commit/7e49eae1fe3beb7049f7817ce84309e216ea1745))
|
|
14
|
+
|
|
1
15
|
# [2.0.0](https://github.com/aquine-kujaruk/opsx-gherkin/compare/v1.0.1...v2.0.0) (2026-10-20)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -69,6 +69,8 @@ These examples apply the canonical contract to their own domains.
|
|
|
69
69
|
and none is required: a new document may omit them, but conversion preserves
|
|
70
70
|
every supplied tag unchanged. Authoring conventions do not narrow syntax
|
|
71
71
|
acceptance.
|
|
72
|
+
- An HTML comment at the end of a step is step text: every conversion
|
|
73
|
+
preserves it verbatim, and it has no meaning to the converter.
|
|
72
74
|
- In MDG, put each tag in its own backtick span immediately above the tagged
|
|
73
75
|
heading. In native Gherkin, use bare tags. Reserve `@openspec-*` and `@mdg-*`
|
|
74
76
|
names for the structural roles defined by the contract.
|
|
@@ -88,6 +90,12 @@ Examples cases or Data Table values. Use `\|` for a literal pipe, `\\` for a
|
|
|
88
90
|
literal backslash, and `\n` for a newline inside a cell. Do not apply cell
|
|
89
91
|
escaping to Doc Strings.
|
|
90
92
|
|
|
93
|
+
A Markdown table is a Gherkin table only while every row keeps its two-space
|
|
94
|
+
indentation. A project Markdown formatter, such as oxfmt or prettier, removes it,
|
|
95
|
+
and conversion then fails with `Examples "<heading>" has no table`, while
|
|
96
|
+
`validate-spec --format openspec` can still accept the file. Exclude
|
|
97
|
+
`openspec/**` from formatting before the first conversion.
|
|
98
|
+
|
|
91
99
|
Keep a Markdown Doc String in a triple-backtick block indented by two spaces
|
|
92
100
|
under its step; put its optional media type immediately after the opening fence.
|
|
93
101
|
Preserve the content's indentation relative to the fence. In an outline, each
|
|
@@ -96,16 +104,26 @@ verify the expanded cases.
|
|
|
96
104
|
|
|
97
105
|
## Convert and verify
|
|
98
106
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
When an OpenSpec spec exists, it is the source. A Gherkin rendering of it
|
|
108
|
+
(`.feature`, `.feature.md`) is derived and exists only as a stream: convert to
|
|
109
|
+
stdout and pipe the result into its consumer. Never write the rendering next to
|
|
110
|
+
the spec or anywhere else in the working tree; a copy drifts as soon as the spec
|
|
111
|
+
changes. Use `-o <destination>` only to author a spec from Markdown with Gherkin
|
|
112
|
+
the user supplied (`mdg-to-opsx`), or for a rendering the user explicitly asked
|
|
113
|
+
for by name and destination. Existing outputs require `--force`. Respect the
|
|
114
|
+
user's destination and overwrite intent.
|
|
102
115
|
|
|
103
116
|
```sh
|
|
117
|
+
opsx-gherkin opsx-to-feature spec.md | <consumer> --stdin
|
|
118
|
+
opsx-gherkin opsx-to-mdg spec.md | <consumer> --stdin
|
|
104
119
|
opsx-gherkin mdg-to-opsx input.feature.md -o spec.md
|
|
105
|
-
opsx-gherkin opsx-to-mdg spec.md -o output.feature.md
|
|
106
|
-
opsx-gherkin opsx-to-feature spec.md -o output.feature
|
|
107
120
|
```
|
|
108
121
|
|
|
122
|
+
Each converter accepts one path, `--text`, or stdin. Read the consumer's own
|
|
123
|
+
help for how it takes standard input. If conversion reports that an Examples
|
|
124
|
+
group has no table, see the formatter caveat under "Keep table and argument
|
|
125
|
+
values intact".
|
|
126
|
+
|
|
109
127
|
Use `--name` when OpenSpec text has no title or usable source-path context.
|
|
110
128
|
`--project-root` supplies existing main-spec context for delta validation when
|
|
111
129
|
needed. Consult a converter's `--help` for its exact options.
|
|
@@ -122,7 +140,7 @@ checks model preservation.
|
|
|
122
140
|
```sh
|
|
123
141
|
validate-spec --format openspec spec.md
|
|
124
142
|
validate-spec --format mdg input.feature.md
|
|
125
|
-
validate-spec --format feature
|
|
143
|
+
opsx-gherkin opsx-to-feature spec.md | validate-spec --format feature /dev/stdin
|
|
126
144
|
```
|
|
127
145
|
|
|
128
146
|
Passing these checks establishes example syntax and conversion preservation.
|
|
@@ -165,7 +165,7 @@ The converter SHALL map a Gherkin Feature to an OpenSpec title and Purpose, and
|
|
|
165
165
|
|
|
166
166
|
## Rule: Preserve behavioral Gherkin constructs
|
|
167
167
|
|
|
168
|
-
The converter SHALL preserve Scenario and Scenario Outline structure, typed steps, tags, Examples, Data Tables, and Doc Strings without treating them as opaque prose.
|
|
168
|
+
The converter SHALL preserve Scenario and Scenario Outline structure, typed steps, tags, Examples, Data Tables, and Doc Strings without treating them as opaque prose. An inline HTML comment inside a step's text is step text and SHALL be preserved verbatim.
|
|
169
169
|
|
|
170
170
|
Canonical MDG and OpenSpec tables SHALL carry one Markdown separator row directly after their indented header; canonical plain Gherkin tables SHALL omit it. Compatible MDG inputs with or without separators SHALL preserve the same interpreted rows and values.
|
|
171
171
|
|
|
@@ -230,6 +230,21 @@ Canonical MDG and OpenSpec tables SHALL carry one Markdown separator row directl
|
|
|
230
230
|
| MDG | OpenSpec |
|
|
231
231
|
| OpenSpec | MDG |
|
|
232
232
|
|
|
233
|
+
### Scenario Outline: Preserve an inline step comment in `<target_format>`
|
|
234
|
+
|
|
235
|
+
* Given a compatible `<source_format>` main spec or delta whose step text ends with an inline HTML comment such as `<!-- addUnits -->`
|
|
236
|
+
* When it is converted to `<target_format>`
|
|
237
|
+
* Then the step text, including the comment, is unchanged
|
|
238
|
+
* And the converter attaches no meaning to the comment
|
|
239
|
+
|
|
240
|
+
#### Examples: Comment conversion directions
|
|
241
|
+
|
|
242
|
+
| source_format | target_format |
|
|
243
|
+
| --- | --- |
|
|
244
|
+
| OpenSpec | MDG |
|
|
245
|
+
| MDG | OpenSpec |
|
|
246
|
+
| OpenSpec | plain Gherkin |
|
|
247
|
+
|
|
233
248
|
## Rule: Project OpenSpec to a plain Gherkin feature
|
|
234
249
|
|
|
235
250
|
The `opsx-to-feature` command SHALL preserve the same normalized behavioral model as `opsx-to-mdg` and MUST emit plain-text Gherkin accepted by the official parser.
|