You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+9
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
8
8
## [Unreleased]
9
9
10
10
### Added
11
+
- New methods in JavaScript implementation to match Java ([#62](https://github.com/cucumber/query/pull/62))
11
12
- Update dependency @cucumber/messages to v26 ((#52)[https://github.com/cucumber/query/pull/52])
12
13
- Update dependency io.cucumber:messages up to v26 ((#53)[https://github.com/cucumber/query/pull/53])
13
14
15
+
### Changed
16
+
- BREAKING CHANGE: `countMostSevereTestStepResultStatus` now returns `EnumMap` with all statuses regardless of count ([#62](https://github.com/cucumber/query/pull/62))
17
+
- BREAKING CHANGE: `findAllTestCaseStarted` now omits `TestCaseStarted` messages where there is or will be another attempt ([#62](https://github.com/cucumber/query/pull/62))
18
+
- BREAKING CHANGE: Rename `findMostSevereTestStepResulBy` to `findMostSevereTestStepResultBy` ([#62](https://github.com/cucumber/query/pull/62))
19
+
20
+
### Removed
21
+
- BREAKING CHANGE: Remove support for Node.js 16.x and 17.x ([#62](https://github.com/cucumber/query/pull/62))
22
+
14
23
## [12.2.0] - 2024-06-22
15
24
### Changed
16
25
- Include pickle name if parameterized ((#44)[https://github.com/cucumber/query/pull/44])
For general guidance on contributing to Cucumber, see https://github.com/cucumber/.github/blob/main/CONTRIBUTING.md
4
+
5
+
## Adding or changing query methods
6
+
7
+
This is a polyglot repo with several languages adhering to a common suite of acceptance tests. A change should be made consistently across all languages. Currently, the list is:
8
+
9
+
- Java (reference)
10
+
- JavaScript
11
+
12
+
Java is the reference implementation in the sense that it is responsible for generating the fixtures that are used in the acceptance tests to verify all implementations.
13
+
14
+
So your playbook for adding a method would be something like:
15
+
16
+
1. Add the method in `Query.Java` with test(s) in `QueryTest.java`
17
+
2. Extend `QueryAcceptanceTest.java` to include verifications for the new method
18
+
3. Run `QueryAcceptanceTest::updateExpectedQueryResultFiles` to regenerate the fixtures
19
+
4. Implement other languages
20
+
21
+
## Types
22
+
23
+
Choosing which type to use in another language based on what we did in Java is an inexact science. This table defines all the decisions we've made so far:
24
+
25
+
| Java | JavaScript |
26
+
|---------------------|-------------------------|
27
+
|`Optional<T>`|`T \| undefined`[^1]|
28
+
|`List<T>`|`ReadonlyArray<T>`|
29
+
|`Map<K, V>`|`Map<K, V>`|
30
+
|`EnumMap<K, V>`|`Record<K, V>`|
31
+
|`List<Entry<T, V>>`|`ReadonlyArray<[T, V]>`|
32
+
33
+
[^1]: See <https://github.com/sindresorhus/meta/discussions/7>
0 commit comments