discharger 0.2.14 → 0.2.15

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: 1318e95cac939c76337bcccee4a9abc6403c854abab6fd9caac9854690f8eb66
4
- data.tar.gz: e55e2a6b87075e1a4a02d7ad9ffac6d5d84a4f11d3d7d7cebc14176f4ebd083f
3
+ metadata.gz: 6e92527599720c4eb9681913763e0d84c8c151b2cf93d96ec5dd5e8b6c3bc055
4
+ data.tar.gz: 7cc5f4c226faa5350703ba968bbe04df75aae75a087ca9cc9975bfbd30dd2eb9
5
5
  SHA512:
6
- metadata.gz: 9831c798d0e372384d783eafd50287913d99744d610bd93df67235a2ad7a916f0a2a5d31e8e6f44de961671092ee86630c970860ddbdc61d5fc77247ee170dc2
7
- data.tar.gz: 5774f102c2bbd0c1eadd4cc6511fc80e719a73f98f90a0447ab4696829eb576a0d3d9ab28fb764e44d6b2fb9448f96ffe0142237a0dd79f64a278a30b93de4d1
6
+ metadata.gz: 29e053cf5b57921975d1db1f0d063480b4df0b9b663dc21500f82ba7606760bd80df41eb293fc5831a037749a5453395550b4d4c7ef60b43f40327c18a8a7abe
7
+ data.tar.gz: 17802e2018819e350101312d5bee195eb8dae88ce2e19b5845ebf060d10bab3a0028fcee105b6ba88677671a75f37e92bca8d769f7039a8e16615e210735e576
data/CHANGELOG.md CHANGED
@@ -5,33 +5,8 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
- ## [0.2.14] - 2025-09-23
9
-
10
- ### Added
11
-
12
- - Documentation about setup features and custom commands.
13
- - Reissue deprecated fragment_directory and added fragment.
14
-
15
- ### Removed
16
-
17
- - Got rid of the prepare release yml and action, only the Release gem to RubyGems.org is needed now.
18
- - Got rid of the code climate action.
19
-
20
- ### Fixed
21
-
22
- - Updated release documentation.
23
-
24
- ## [0.2.13] - 2025-09-02
25
-
26
- ### Added
27
-
28
- - Added clean up fragment_directory task on Task.
29
- - Added trusted publisher flow to GitHub release action.
30
- - Adding commit step if needed after the finalize.
8
+ ## [0.2.15] - 2025-10-24
31
9
 
32
10
  ### Fixed
33
11
 
34
- - Fixed version on GitHub trusted publisher action.
35
- - Added debugging for OIDC.
36
- - Switching back to version 1.0.0 for trusted publisher
37
- - Now going for the official RubyGems GitHub action for the gem publishing.
12
+ - Respect packageManager version from package.json instead of forcing yarn@stable
data/README.md CHANGED
@@ -50,18 +50,35 @@ Discharger::Task.create do |task|
50
50
  end
51
51
  ```
52
52
 
53
- ### Changelog Fragments
53
+ ### Changelog Management
54
54
 
55
- Discharger supports changelog fragment management through the `fragment` setting from [Reissue](https://github.com/SOFware/reissue?tab=readme-ov-file#configuration-options).
55
+ Discharger supports changelog management through the `fragment` setting from [Reissue](https://github.com/SOFware/reissue?tab=readme-ov-file#configuration-options).
56
+
57
+ #### Git Commit Trailers
58
+
59
+ Document changes directly in your commit messages using git trailers. Set `task.fragment = :git` to enable this feature:
60
+
61
+ ```ruby
62
+ Discharger::Task.create do |task|
63
+ # ... other configuration ...
64
+ task.fragment = :git # Enable git commit trailers
65
+ end
66
+ ```
67
+
68
+ This keeps changelog data coupled with your code changes in the same commit. See [Git Trailers Guide](docs/git-trailers-guide.md) for detailed usage instructions.
69
+
70
+ #### File-Based Fragments
71
+
72
+ Alternatively, you can use file-based fragments by creating individual changelog files in a directory:
56
73
 
57
74
  ```ruby
58
75
  Discharger::Task.create do |task|
59
76
  # ... other configuration ...
60
- task.fragment = "changelog.d" # Default: nil (disabled), or use :git
77
+ task.fragment = "changelog.d" # Enable file-based fragments
61
78
  end
62
79
  ```
63
80
 
64
- With fragments enabled, you can create individual changelog files in the `changelog.d/` directory:
81
+ With this approach, create individual changelog files in the `changelog.d/` directory:
65
82
 
66
83
  ```
67
84
  changelog.d/
@@ -13,7 +13,27 @@ module Discharger
13
13
  if File.exist?(File.join(app_root, "yarn.lock"))
14
14
  if system_quiet("which corepack")
15
15
  system! "corepack enable"
16
- system! "corepack use yarn@stable"
16
+
17
+ package_json_path = File.join(app_root, "package.json")
18
+ if File.exist?(package_json_path)
19
+ begin
20
+ require "json"
21
+ package_json = JSON.parse(File.read(package_json_path))
22
+
23
+ if package_json["packageManager"]&.start_with?("yarn@")
24
+ yarn_spec = package_json["packageManager"].split("+").first
25
+ log "Using #{yarn_spec} from package.json"
26
+ system! "corepack use #{yarn_spec}"
27
+ else
28
+ system! "corepack use yarn@stable"
29
+ end
30
+ rescue JSON::ParserError => e
31
+ log "Warning: Could not parse package.json: #{e.message}"
32
+ system! "corepack use yarn@stable"
33
+ end
34
+ else
35
+ system! "corepack use yarn@stable"
36
+ end
17
37
  end
18
38
 
19
39
  # Install dependencies
@@ -1,3 +1,3 @@
1
1
  module Discharger
2
- VERSION = "0.2.14"
2
+ VERSION = "0.2.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discharger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay