bibliothecary 12.3.0 → 12.3.1

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: 2789d542e6457ea4e069d4dc2ff4237d8cccc9c8ea018d9418a943188e461316
4
- data.tar.gz: 0f5ba9b30929a30690d7d68f41106b1bb36bc41e5703243279de828ee5d0987e
3
+ metadata.gz: 8405e79b9449b0f4e1f1dc7940b54870ab0aafe7adb511a7d4876ecfca2798ed
4
+ data.tar.gz: 15ef48279642088fdbb57291c44a1faaf74c4c2a47e0ac4258e215dfe40e8197
5
5
  SHA512:
6
- metadata.gz: d889c20a78d617d51f10206e826a7bfcc17ba7723e78c867708fc28e7c8e4592c9c8633187eadb151f9418896cc29705bc2f361d2d26ba71450af0480f4b85b2
7
- data.tar.gz: 1b327cb0a9c53b6b711600defd2f6c43bb7740beaa7f381b7e67dcecc17da9effbedc85511685e69f08be4140b35887886a0d01a52f60f8731c5265fe96dd4f4
6
+ metadata.gz: 7710e394463856a89913e95d49b525966a4b394c6be84c403d97a17bc0c8964df2293ab995164c65fdd9fb3f96d5b9cd1be114f03464d4fc9c1dd2fe269b0a48
7
+ data.tar.gz: 1a9e5a61ad6904934c85e324ffc66a5e7d8bdff592b5b0b63040db5431e6dd153e40b70f0d75c1d1a7a9652e3e8ef12fd9b4325b0b8acf31c9c128d4c61bea56
data/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Removed
15
15
 
16
+ ## [12.3.1] - 2025-06-06
17
+
18
+ ### Changed
19
+
20
+ - Handle .csproj files that begin with an <?xml> tag
21
+
16
22
  ## [12.3.0] - 2025-06-06
17
23
 
18
24
  ### Added
@@ -109,7 +109,17 @@ module Bibliothecary
109
109
 
110
110
  def self.parse_csproj(file_contents, options: {})
111
111
  manifest = Ox.parse file_contents
112
- packages = manifest
112
+
113
+ # The dotnet samples repo has examples with both of these cases, so both need to be handled:
114
+ project = if manifest.locate("Project").any?
115
+ # 1) If there's an <?xml> tag, we need to pick out the "Project" element
116
+ manifest.locate("Project").first
117
+ else
118
+ # 2) If there's no <?xml> tag, the root element is "Project"
119
+ manifest
120
+ end
121
+
122
+ packages = project
113
123
  .locate("ItemGroup/PackageReference")
114
124
  .select { |dep| dep.respond_to? "Include" }
115
125
  .map do |dependency|
@@ -132,7 +142,7 @@ module Bibliothecary
132
142
  )
133
143
  end
134
144
 
135
- packages += manifest
145
+ packages += project
136
146
  .locate("ItemGroup/Reference")
137
147
  .select { |dep| dep.respond_to? "Include" }
138
148
  .map do |dependency|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bibliothecary
4
- VERSION = "12.3.0"
4
+ VERSION = "12.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.0
4
+ version: 12.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt