Skip to content

Commit 4ccddf6

Browse files
committed
Update changelog.
1 parent 0d00194 commit 4ccddf6

File tree

1 file changed

+77
-4
lines changed

1 file changed

+77
-4
lines changed

jvm/CHANGELOG.md

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changelog
2+
23
Changelog for the selfie JVM libraries.
34

45
- [`com.diffplug.selfie:selfie-lib:VERSION`](https://central.sonatype.com/artifact/com.diffplug.selfie/selfie-lib)
@@ -7,130 +8,202 @@ Changelog for the selfie JVM libraries.
78
- works with Kotest JVM
89
- [`com.diffplug.selfie:selfie-runner-kotest:VERSION`](https://central.sonatype.com/artifact/com.diffplug.selfie/selfie-runner-kotest)
910
- written in Kotlin Multiplatform
10-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
11-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
12+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1213

1314
## [Unreleased]
1415

16+
### Added
17+
18+
- Snapshot mismatch error messages now show a diff of the first mismatched line. ([#477](https://github.com/diffplug/selfie/pull/477))
19+
- before
20+
```
21+
Snapshot mismatch
22+
- update this snapshot by adding `_TODO` to the function name
23+
- update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`
24+
```
25+
- after
26+
```
27+
Snapshot mismatch at L7:C9
28+
-Testing 123
29+
+Testing ABC
30+
‣ update this snapshot by adding `_TODO` to the function name
31+
‣ update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`
32+
```
33+
1534
## [2.3.0] - 2024-07-11
35+
1636
### Added
37+
1738
- `DiskSelfie` now makes the `Snapshot actual` value public, so that other testing infrastructure can read from snapshotted values. ([#467](https://github.com/diffplug/selfie/pull/467))
39+
1840
### Fixed
41+
1942
- `cacheSelfie` was missing `@JvmOverloads` on the methods with default arguments. ([#425](https://github.com/diffplug/selfie/pull/425))
2043
2144
## [2.2.1] - 2024-06-05
45+
2246
### Fixed
47+
2348
- Added `Selfie.expectSelfies(Iterable<T> items, Function<T, String> toString)` for doing easy "multi-asserts" in `suspend fun` also. ([#421](https://github.com/diffplug/selfie/pull/421))
2449
2550
## [2.2.0] - 2024-06-04
51+
2652
### Added
53+
2754
- `SelfieSettingsAPI` now has a field `javaDontUseTripleQuoteLiterals` which ensures that multiline strings are always encoded as `"` strings. ([#417](https://github.com/diffplug/selfie/pull/417))
2855
2956
## [2.1.0] - 2024-06-03
57+
3058
### Added
59+
3160
- Added `Selfie.expectSelfies(Iterable<T> items, Function<T, String> toString)` for doing easy "multi-asserts". ([#416](https://github.com/diffplug/selfie/pull/416))
3261
- For java versions which don't support multiline string literals, we now encode multiline strings like so: ([#406](https://github.com/diffplug/selfie/pull/406))
3362
- ```java
3463
toBe("line1",
3564
"line2",
3665
"line3");
3766
```
67+
3868
### Changed
69+
3970
- Bump Kotlin to 2.0.0. ([#405](https://github.com/diffplug/selfie/pull/405))
71+
4072
### Fixed
73+
4174
- Do not remove stale snapshot files when readonly is true. ([#367](https://github.com/diffplug/selfie/pull/367))
4275
- Provide more debugging info when a snapshot gets set multiple times. (helps with [#370](https://github.com/diffplug/selfie/issues/370))
4376
4477
## [2.0.2] - 2024-03-20
78+
4579
### Fixed
80+
4681
- `toBeFile` now checks for duplicate writes and throws a more helpful error message if the file doesn't exist. ([#277](https://github.com/diffplug/selfie/pull/277))
4782
4883
## [2.0.1] - 2024-02-24
84+
4985
### Fixed
86+
5087
- The `coroutines` methods used to eagerly throw an exception if they were ever called from anywhere besides a Kotest method. Now they wait until `toMatchDisk()` is called, because they can work just fine anywhere if you use `toBe`. ([#247](https://github.com/diffplug/selfie/pull/247))
5188
5289
## [2.0.0] - 2024-02-21
90+
5391
### Added
92+
5493
- **Memoization** ([#219](https://github.com/diffplug/selfie/pull/219) implements [#215](https://github.com/diffplug/selfie/issues/215))
55-
- like `expectSelfie`, all are available as `Selfie.cacheSelfie` or as `suspend fun` in `com.diffplug.selfie.coroutines`.
94+
- like `expectSelfie`, all are available as `Selfie.cacheSelfie` or as `suspend fun` in `com.diffplug.selfie.coroutines`.
95+
5696
```kotlin
5797
val cachedResult: ByteArray = Selfie.cacheSelfieBinary { dalleJpeg() }.toBeFile("example.jpg")
5898
val cachedResult: String = Selfie.cacheSelfie { someString() }.toBe("what it was earlier")
5999
val cachedResult: T = Selfie.cacheSelfieJson { anyKotlinxSerializable() }.toBe("""{"key": "value"}""")
60100
val cachedResult: T = Selfie.cacheSelfieBinarySerializable { anyJavaIoSerializable() }.toMatchDisk()
61101
```
102+
62103
- `toBeBase64` and `toBeFile` for true binary comparison of binary snapshots and facets. ([#224](https://github.com/diffplug/selfie/pull/224))
63104
- spaces in multiline string literals aren't always escaped. ([#220](https://github.com/diffplug/selfie/issues/220))
64105
- if the leading spaces in the string literal match the file's existing indentation
106+
65107
### Changed
108+
66109
- **BREAKING** reordered a class hierarchy for better binary support. ([#221](https://github.com/diffplug/selfie/issues/221))
67110
- most users won't need to make any changes at all
68111
- only exception is that `expectSelfie(byte[]).toBe` is now a compile error, must do `toBeBase64`
69112

70113
## [1.2.0] - 2024-02-12
114+
71115
### Added
116+
72117
- **Kotest support**.
73118
- Add `SelfieExtension` to your `AbstractProjectConfig`.
74119
- Instead of calling `Selfie.expectSelfie`, call `com.diffplug.selfie.coroutines.expectSelfie`.
75120
- `selfie-runner-junit5` supports snapshots in regular JUnit tests and Kotest tests in the same project.
76121
- `selfie-runner-kotest` is a new selfie implemented in Kotlin Multiplatform, but doesn't support snapshots within regular JUnit tests.
77122
- Full docs at https://selfie.dev/jvm/kotest.
123+
78124
### Fixed
125+
79126
- Swap thread-local cache for thread-ignorant LRU to improve performance when used with coroutines. ([#191](https://github.com/diffplug/selfie/pull/191))
127+
80128
### Changes
129+
81130
- (no user-facing changes) replaced terrible platform-specific `Path` with `TypedPath`. ([#184](https://github.com/diffplug/selfie/pull/184))
82131
- (no user-facing changes) replaced `SnapshotStorage` with `SnapshotSystem` + `DiskStorage`. ([#198](https://github.com/diffplug/selfie/pull/198))
83132
- (no user-facing changes) replaced most `synchronized` with CAS. ([#199](https://github.com/diffplug/selfie/pull/199))
84133

85134
## [1.1.2] - 2024-01-30
135+
86136
### Fixed
137+
87138
- `@ParameterizedTest` no longer has. ([#140](https://github.com/diffplug/selfie/issues/140))
88139
- If a test class contained package-private methods and a single test method was run without the others, selfie would erroneously garbage collect disk snapshots for the other methods, now fixed. ([#175](https://github.com/diffplug/selfie/pull/175) fixes [#174](https://github.com/diffplug/selfie/issues/174))
89140

90141
## [1.1.1] - 2024-01-25
142+
91143
### Fixed
144+
92145
- Selfie was erroneously garbage collecting snapshots when a test class contained no `@Test public` methods. ([#124](https://github.com/diffplug/selfie/pull/124) fixes [#123](https://github.com/diffplug/selfie/issues/123))
93146

94147
## [1.1.0] - 2024-01-21
148+
95149
### Added
150+
96151
- Support for `@ParameterizedTest`. ([#118](https://github.com/diffplug/selfie/pull/118))
97152
- `ArraySet<K>` has been added to the standard library alongside `ArrayMap<K, V>`. ([#119](https://github.com/diffplug/selfie/pull/119))
98153
- These have the strange property that if the key is `String`, then `/` characters are sorted to be the lowest possible character.
154+
99155
### Fixed
156+
100157
- We already [smuggle errors from initialization](https://github.com/diffplug/selfie/pull/94) to help debug them, and now we also smuggle errors that happen during test execution. ([#117](https://github.com/diffplug/selfie/pull/117))
101158
- Fix a garbage collection bug which occurred when a test method's name was a prefix of another test method's name. ([#119](https://github.com/diffplug/selfie/pull/119))
102159

103160
## [1.0.1] - 2024-01-19
161+
104162
### Fixed
163+
105164
- Fix `CompoundLens` for Java users.
106165

107166
## [1.0.0] - 2024-01-18
167+
108168
### Added
169+
109170
- Full support for binary snapshots. ([#108](https://github.com/diffplug/selfie/pull/108))
171+
110172
### Fixed
173+
111174
- Groovy multiline string values just go into `"` strings instead of `"""` until we have a chance to implement them properly. ([#107](https://github.com/diffplug/selfie/pull/107))
112175

113176
## [0.3.0] - 2024-01-17
177+
114178
### Added
179+
115180
- `toBe("mismatched")` now gets rewritten in write mode
116181
- fully implemented the new control scheme ([#74](https://github.com/diffplug/selfie/issues/74))
117182
- integers get `_` separators for thousands, millions, etc
183+
118184
### Known broken
185+
119186
- Groovy multiline strings
120187
- Binary
121188

122189
## [0.2.0] - 2023-12-27
190+
123191
### Added
192+
124193
- `DiskSelfie.toMatchDisk` now returns `DiskSelfie` so that we can fluently chain inline assertions on facets.
125194

126195
## [0.1.3] - 2023-12-26
127-
- Publish `selfie-lib-jvm` *and* `selfie-lib` to Maven Central.
196+
197+
- Publish `selfie-lib-jvm` _and_ `selfie-lib` to Maven Central.
128198

129199
## [0.1.2] - 2023-12-26
200+
130201
- Publish `selfie-lib-jvm` instead of just `selfie-lib` to Maven Central.
131202

132203
## [0.1.1] - 2023-12-24
204+
133205
- Initial release, take 2.
134206

135207
## [0.1.0] - 2023-12-24
208+
136209
- Initial release.

0 commit comments

Comments
 (0)