psych-pure 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8599351cebdf6abf0c3438762b7f56a0110fafda0a4c857618305085425805d9
4
- data.tar.gz: c9975fe7570058d7aae9a64a46601e8720d46679dfa538290ff45fecf3b3842e
3
+ metadata.gz: 0fb90297ca479adfe033c6d8db3544ec41c8e8083f23884e990de4ee2d8eb402
4
+ data.tar.gz: 8f895282ff5733903665ddcd0d1be2a28696dce0380242f8804ad42ce45123fe
5
5
  SHA512:
6
- metadata.gz: c964ce5739215506401fd0c7eca965932a54adb4f3c6e5d56f89a5bafe00d98b71b7fe9f8621adc8e5eb403a23a2b7813cee2bf5d88006929ff4d47c5ed5500d
7
- data.tar.gz: 55ead208f357b2f52267f505610815fc248ca8e8fbbc248d57ad8a6c7c40d56f7fadea28f7e1a13bbef18d47fe09783076c1d5ed73c87c4f2a36a50c5541bdc3
6
+ metadata.gz: 4ad4470231f6587e40da0fe271ef65a1ba441f70ecc87bd7900f4fcc17a2da4be63396b73d15a131359977b62e53cfbd9d333969dbd920e984c6647741bfab34
7
+ data.tar.gz: 17965e31133a24c3f14c9d452884665f0d40e0c2e3edbf573fc59db5888471fb934caed61b9bed836287253061e549e540e4b79085360f9ec7a9a8082f4b7107
data/CHANGELOG.md CHANGED
@@ -6,11 +6,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [0.1.0] - 2020-10-08
9
+ ## [0.1.2] - 2025-03-04
10
+
11
+ - Fix up comment dumping to not drift around objects.
12
+ - Rely on source formatting when possible for scalar values.
13
+ - Fix up multi-line literals with the "keep" flag (|+).
14
+ - Fix up aliasing hashes that have comments loaded.
15
+
16
+ ## [0.1.1] - 2025-02-13
17
+
18
+ - Fix up comment handling to preserve within hashes.
19
+ - Do not duplicate comments when the parser backtracks.
20
+ - Trim locations of sequences and mappings before trailing comments.
21
+
22
+ ## [0.1.0] - 2025-02-12
10
23
 
11
24
  ### Added
12
25
 
13
26
  - 🎉 Initial release. 🎉
14
27
 
15
- [unreleased]: https://github.com/kddnewton/psych-pure/compare/v0.1.0...HEAD
28
+ [unreleased]: https://github.com/kddnewton/psych-pure/compare/v0.1.2...HEAD
29
+ [0.1.2]: https://github.com/kddnewton/psych-pure/compare/v0.1.1...v0.1.2
30
+ [0.1.1]: https://github.com/kddnewton/psych-pure/compare/v0.1.0...v0.1.1
16
31
  [0.1.0]: https://github.com/kddnewton/psych-pure/compare/24de62...v0.1.0
data/README.md CHANGED
@@ -41,7 +41,7 @@ Or install it yourself as:
41
41
 
42
42
  All of the various `parse` APIs come with the additional `comments:` keyword option. This option tells the parser to parse out comments and attach them to the resulting tree. Nodes in the tree are then responsible for maintaining their own leading and trailing comments.
43
43
 
44
- All of the various `load` APIs also come with the additional `comments:` keyword option. This also gets fed into the parser. Because `load` is responsible for loading Ruby objects, the comments are then attached to the loaded objects via `Psych::Pure::YAMLCommentsDelegator`, which is a `SimpleDelegator` that wraps the objects and stores the leading and trailing comments. Those objects are then taken into account in the various `dump` APIs to dump out the comments as well. For example:
44
+ All of the various `load` APIs also come with the additional `comments:` keyword option. This also gets fed into the parser. Because `load` is responsible for loading Ruby objects, the comments are then attached to the loaded objects via delegators that wraps the objects and stores the leading and trailing comments. Those objects are then taken into account in the various `dump` APIs to dump out the comments as well. For example:
45
45
 
46
46
  ```ruby
47
47
  result = Psych::Pure.load("- a # comment1\n- c # comment2\n", comments: true)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Psych
4
4
  module Pure
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end