Skip to content

Commit 8c03ab9

Browse files
committed
Update CHANGELOG formatting
1 parent 24e6869 commit 8c03ab9

File tree

1 file changed

+27
-59
lines changed

1 file changed

+27
-59
lines changed

CHANGELOG.md

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
1111

1212
- Performance improvements for building a hash from Dry::Struct when it contains nested structs (found by @rpeng in #200)
1313

14+
[Unreleased]: https://github.com/dry-rb/dry-struct/compare/v1.8.0...main
1415

1516
## [1.8.0] - 2025-03-09
1617

17-
1818
### Added
1919

2020
- Added super_diff extension for improved struct diffing in RSpec tests (@flash-gordon in #197)
@@ -58,22 +58,18 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
5858
}>
5959
```
6060

61-
62-
[Compare v1.7.1...v1.8.0](https://github.com/dry-rb/dry-struct/compare/v1.7.1...v1.8.0)
61+
[1.8.0]: https://github.com/dry-rb/dry-struct/compare/v1.7.1...v1.8.0
6362

6463
## [1.7.1] - 2025-01-31
6564

66-
6765
### Fixed
6866

6967
- Syntax errors on 3.3.0 (@flash-gordon, see https://github.com/dry-rb/dry-types/issues/478)
7068

71-
72-
[Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-struct/compare/v1.7.0...v1.7.1)
69+
[1.7.1]: https://github.com/dry-rb/dry-struct/compare/v1.7.0...v1.7.1
7370

7471
## [1.7.0] - 2025-01-06
7572

76-
7773
### Fixed
7874

7975
- Fixed coercion errors for structs (issue #192 via #193) (@flash-gordon)
@@ -86,49 +82,42 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
8682
- `Dry::Struct::Error` is now a subclass of `Dry::Types::CoercionError` (in #193) (@flash-gordon)
8783
- `Dry::Struct#[]` now returns `nil` if an optional attribute is not set. This is consistent with calling accessor methods for optional attributes. (issue #171 via #194) (@ivleonov + @flash-gordon)
8884

89-
[Compare v1.6.0...v1.7.0](https://github.com/dry-rb/dry-struct/compare/v1.6.0...v1.7.0)
85+
[1.7.0]: https://github.com/dry-rb/dry-struct/compare/v1.6.0...v1.7.0
9086

9187
## [1.6.0] - 2022-11-04
9288

93-
9489
### Changed
9590

9691
- This version uses dry-core 1.0 (@flash-gordon + @solnic)
9792

98-
[Compare v1.5.2...v1.6.0](https://github.com/dry-rb/dry-struct/compare/v1.5.2...v1.6.0)
93+
[1.6.0]: https://github.com/dry-rb/dry-struct/compare/v1.5.2...v1.6.0
9994

10095
## [1.5.2] - 2022-10-19
10196

102-
10397
### Fixed
10498

10599
- Coercion failures keep the original error instead of just having a string (@flash-gordon + @newx)
106100

107-
108-
[Compare v1.5.1...v1.5.2](https://github.com/dry-rb/dry-struct/compare/v1.5.1...v1.5.2)
101+
[1.5.2]: https://github.com/dry-rb/dry-struct/compare/v1.5.1...v1.5.2
109102

110103
## [1.5.1] - 2022-10-17
111104

112-
113105
### Fixed
114106

115107
- Fixed issues with auto-loading `Extensions` module (issue #183 fixed via #184) (@solnic)
116108

117-
118-
[Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-struct/compare/v1.5.0...v1.5.1)
109+
[1.5.1]: https://github.com/dry-rb/dry-struct/compare/v1.5.0...v1.5.1
119110

120111
## [1.5.0] - 2022-10-15
121112

122-
123113
### Changed
124114

125115
- Use zeitwerk for auto-loading (@flash-gordon)
126116

127-
[Compare v1.4.0...v1.5.0](https://github.com/dry-rb/dry-struct/compare/v1.4.0...v1.5.0)
117+
[1.5.0]: https://github.com/dry-rb/dry-struct/compare/v1.4.0...v1.5.0
128118

129119
## [1.4.0] - 2021-01-21
130120

131-
132121
### Added
133122

134123
- Support for wrapping constructors and fallbacks, see release notes for dry-types 1.5.0 (@flash-gordon)
@@ -144,12 +133,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
144133
User.new(name: "John", address: nil) # => #<User name="John" address=nil>
145134
```
146135

147-
148-
[Compare v1.3.0...v1.4.0](https://github.com/dry-rb/dry-struct/compare/v1.3.0...v1.4.0)
136+
[1.4.0]: https://github.com/dry-rb/dry-struct/compare/v1.3.0...v1.4.0
149137

150138
## [1.3.0] - 2020-02-10
151139

152-
153140
### Added
154141

155142
- Nested structures will reuse type and key transformations from the enclosing struct (@flash-gordon)
@@ -198,21 +185,19 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
198185

199186
- [internal] metadata is now stored inside schema (@flash-gordon)
200187

201-
[Compare v1.2.0...v1.3.0](https://github.com/dry-rb/dry-struct/compare/v1.2.0...v1.3.0)
188+
[1.3.0]: https://github.com/dry-rb/dry-struct/compare/v1.2.0...v1.3.0
202189

203190
## [1.2.0] - 2019-12-20
204191

205-
206192
### Changed
207193

208194
- `Dry::Struct::Value` is deprecated. `Dry::Struct` instances were never meant to be mutable, we have no support for this. The only difference between `Dry::Struct` and `Dry::Struct::Value` is that the latter is deeply frozen. Freezing objects slows the code down and gives you very little benefit in return. If you have a use case for `Value`, it won't be hard to roll your own solution using [ice_nine](https://github.com/dkubb/ice_nine) (flash-gordon)
209195
- In the thread of the previous change, structs now use immutable equalizer. This means `Struct#hash` memoizes its value after the first invocation. Depending on the case, this may speed up your code significantly (flash-gordon)
210196

211-
[Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-struct/compare/v1.1.1...v1.2.0)
197+
[1.2.0]: https://github.com/dry-rb/dry-struct/compare/v1.1.1...v1.2.0
212198

213199
## [1.1.1] - 2019-10-13
214200

215-
216201
### Changed
217202

218203
- Pattern matching syntax is simplified with `deconstruct_keys` (k-tsj)
@@ -232,21 +217,18 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
232217

233218
See more examples in the [specs](https://github.com/dry-rb/dry-struct/blob/8112772eb08d22ff2cd3e6997514d79a9b124968/spec/dry/struct/pattern_matching_spec.rb).
234219

235-
[Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-struct/compare/v1.1.0...v1.1.1)
220+
[1.1.1]: https://github.com/dry-rb/dry-struct/compare/v1.1.0...v1.1.1
236221

237222
## [1.1.0] - 2019-10-07
238223

239-
240224
### Added
241225

242226
- Experimental support for pattern matching :tada: (flash-gordon)
243227

244-
245-
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-struct/compare/v1.0.0...v1.1.0)
228+
[1.1.0]: https://github.com/dry-rb/dry-struct/compare/v1.0.0...v1.1.0
246229

247230
## [1.0.0] - 2019-04-23
248231

249-
250232
### Added
251233

252234
- `Struct.call` now accepts an optional block that will be called on failed coercion. This behavior is consistent with dry-types 1.0. Note that `.new` doesn't take a block (flash-gordon)
@@ -260,11 +242,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
260242

261243
- `valid?` and `===` behave differently, `===` works the same way `Class#===` does and `valid?` checks if the value _can be_ coerced to the struct (flash-gordon)
262244

263-
[Compare v0.7.0...v1.0.0](https://github.com/dry-rb/dry-struct/compare/v0.7.0...v1.0.0)
245+
[1.0.0]: https://github.com/dry-rb/dry-struct/compare/v0.7.0...v1.0.0
264246

265247
## [0.7.0] - 2019-03-22
266248

267-
268249
### Changed
269250

270251
- [BREAKING] `Struct.input` was renamed `Struct.schema`, hence `Struct.schema` returns an instance of `Dry::Types::Hash::Schema` rather than a `Hash`. Schemas are also implementing `Enumerable` but they iterate over key types.
@@ -290,11 +271,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
290271
- `Dry::Stuct#new` is now more efficient for partial updates (flash-gordon)
291272
- Ruby 2.3 is EOL and not officially supported. It may work but we don't test it.
292273

293-
[Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-struct/compare/v0.6.0...v0.7.0)
274+
[0.7.0]: https://github.com/dry-rb/dry-struct/compare/v0.6.0...v0.7.0
294275

295276
## [0.6.0] - 2018-10-24
296277

297-
298278
### Added
299279

300280
- `Struct.attribute?` is an easy way to define omittable attributes (flash-gordon):
@@ -315,11 +295,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
315295

316296
- [BREAKING] `Struct.attribute?` in the old sense is deprecated, use `has_attribute?` as a replacement
317297

318-
[Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-struct/compare/v0.5.1...v0.6.0)
298+
[0.6.0]: https://github.com/dry-rb/dry-struct/compare/v0.5.1...v0.6.0
319299

320300
## [0.5.1] - 2018-08-11
321301

322-
323302
### Added
324303

325304
- Pretty print extension (ojab)
@@ -336,12 +315,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
336315

337316
- Constant resolution is now restricted to the current module when structs are automatically defined using the block syntax. This shouldn't break any existing code (piktur)
338317

339-
340-
[Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-struct/compare/v0.5.0...v0.5.1)
318+
[0.5.1]: https://github.com/dry-rb/dry-struct/compare/v0.5.0...v0.5.1
341319

342320
## [0.5.0] - 2018-05-03
343321

344-
345322
### Added
346323

347324
- `Dry::Struct.transform_types` accepts a block which is yielded on every type to add. Since types are `dry-types`' objects that come with a robust DSL it's rather simple to restore the behavior of `constructor_type`. See https://github.com/dry-rb/dry-struct/pull/64 for details (flash-gordon)
@@ -397,12 +374,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
397374
- Adding a new attribute invalidates `attribute_names` (flash-gordon)
398375
- Struct classes track subclasses and define attributes in them, now it doesn't matter whether you define attributes first and _then_ subclass or vice versa. Note this can lead to memory leaks in Rails environment when struct classes are reloaded (flash-gordon)
399376

400-
401-
[Compare v0.4.0...v0.5.0](https://github.com/dry-rb/dry-struct/compare/v0.4.0...v0.5.0)
377+
[0.5.0]: https://github.com/dry-rb/dry-struct/compare/v0.4.0...v0.5.0
402378

403379
## [0.4.0] - 2017-11-04
404380

405-
406381
### Fixed
407382

408383
- `Struct#new` doesn't call `.to_hash` recursively (flash-gordon)
@@ -413,23 +388,20 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
413388
- `Struct#new` uses raw attributes instead of method calls, this makes the behavior consistent with the change above (flash-gordon)
414389
- `constructor_type` now actively rejects `:weak` and `:symbolized` values (GustavoCaso)
415390

416-
[Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-struct/compare/v0.3.1...v0.4.0)
391+
[0.4.0]: https://github.com/dry-rb/dry-struct/compare/v0.3.1...v0.4.0
417392

418393
## [0.3.1] - 2017-06-30
419394

420-
421395
### Added
422396

423397
- `Struct.constructor` that makes dry-struct more aligned with dry-types; now you can have a struct with a custom constructor that will be called _before_ calling the `new` method (v-kolesnikov)
424398
- `Struct.attribute?` and `Struct.attribute_names` for introspecting struct attributes (flash-gordon)
425399
- `Struct#__new__` is a safe-to-use-in-gems alias for `Struct#new` (flash-gordon)
426400

427-
428-
[Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-struct/compare/v0.3.0...v0.3.1)
401+
[0.3.1]: https://github.com/dry-rb/dry-struct/compare/v0.3.0...v0.3.1
429402

430403
## [0.3.0] - 2017-05-05
431404

432-
433405
### Added
434406

435407
- `Dry::Struct#new` method to return new instance with applied changeset (Kukunin)
@@ -443,40 +415,34 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
443415

444416
- `.new` without arguments doesn't use nil as an input for non-default types anymore (flash-gordon)
445417

446-
[Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-struct/compare/v0.2.1...v0.3.0)
418+
[0.3.0]: https://github.com/dry-rb/dry-struct/compare/v0.2.1...v0.3.0
447419

448420
## [0.2.1] - 2017-02-27
449421

450-
451422
### Fixed
452423

453424
- Fixed `Dry::Struct::Value` which appeared to be broken in the last release (flash-gordon)
454425

455-
456-
[Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-struct/compare/v0.2.0...v0.2.1)
426+
[0.2.1]: https://github.com/dry-rb/dry-struct/compare/v0.2.0...v0.2.1
457427

458428
## [0.2.0] - 2016-02-26
459429

460-
461430
### Changed
462431

463432
- Struct attributes can be overridden in a subclass (flash-gordon)
464433

465-
[Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-struct/compare/v0.1.1...v0.2.0)
434+
[0.2.0]: https://github.com/dry-rb/dry-struct/compare/v0.1.1...v0.2.0
466435

467436
## [0.1.1] - 2016-11-13
468437

469-
470438
### Fixed
471439

472440
- Make `Dry::Struct` act as a constrained type. This fixes the behavior of sum types containing structs (flash-gordon)
473441

474-
475-
[Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-struct/compare/v0.1.0...v0.1.1)
442+
[0.1.1]: https://github.com/dry-rb/dry-struct/compare/v0.1.0...v0.1.1
476443

477444
## [0.1.0] - 2016-09-21
478445

479-
480446
### Added
481447

482448
- `:strict_with_defaults` constructor type (backus)
@@ -487,8 +453,10 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
487453
- [BREAKING] `:strict` now raises on unexpected keys (backus)
488454
- Structs no longer auto-register themselves in the types container as they implement `Type` interface and we don't have to wrap them in `Type::Definition` (flash-gordon)
489455

490-
[Compare v0.0.1...v0.1.0](https://github.com/dry-rb/dry-struct/compare/v0.0.1...v0.1.0)
456+
[0.1.0]: https://github.com/dry-rb/dry-struct/compare/v0.0.1...v0.1.0
491457

492458
## [0.0.1] - 2016-07-17
493459

494460
Initial release of code imported from dry-types
461+
462+
[0.0.1]: https://github.com/dry-rb/dry-struct/releases/tag/v0.0.1

0 commit comments

Comments
 (0)