bibliothecary 14.1.0 → 14.2.0

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: 8220f939e62ba68f9f9edebda8c1d5901d88f028c9caea6b173c2f9da14cb5b4
4
- data.tar.gz: 2920b4cf85f4497bf1a2749e8c6c6b2cdfa5c0c0a9f3cb244bc86c7991041974
3
+ metadata.gz: 548767337e8898f61951f3e458310fd5299d88c81549a3332750c62427b93a28
4
+ data.tar.gz: 660e80fcdce7b4fc1ed9d498b4a8e39856498e709b16fbd0f3ffcdc5671a8942
5
5
  SHA512:
6
- metadata.gz: 768d17a2954b4ccb4cad09da85074ef4958193fc10aea00cf33cbc8f7a309dc4d2b287a9d71e6b509b1861ddad06b0ad0508818fcd093147214cd836edd5cdf2
7
- data.tar.gz: 4d345a0068501420508694bd5491de0584517e60021ff16e216486bc8329a1c5c7655c40df33a631e280c9977f8721d4b9a572f84f60fd6cf9e449134762b768
6
+ metadata.gz: 67d3cf0c77840be64458f50dac795a8a782e192db0138e316e21ef65fb9dd625a32fde8e5ef92fa4e47ce66bb666d5fd97d751930ad6eea4bd7a404836c03698
7
+ data.tar.gz: 4490815f18aac91bfa307349272699c16500f3452d88b0681ce2c927e4b7f6acc55e41afbb33299cfaa5d4330306c34b30598a42b092a732097b617de1f378a9
data/CHANGELOG.md CHANGED
@@ -13,13 +13,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Removed
15
15
 
16
+ ## [14.2.0]
17
+
18
+ ### Added
19
+
20
+ ### Changed
21
+
22
+ - Dependencies from yarn.lock will return a nil "type" instead of assuming "runtime".
23
+ - In Nuget .csproj files, ignored <Reference> tags that don't have a version.
24
+
25
+ ### Removed
26
+
16
27
  ## [14.1.0] - 2025-10-01
17
28
 
18
29
  ### Added
19
30
 
20
31
  ### Changed
21
32
 
22
- - Dependencies from pom.xml without a scope will not return a "type" of nil instead of guessing "runtime".
33
+ - Dependencies from pom.xml without a scope will now return a "type" of nil instead of guessing "runtime".
23
34
 
24
35
  ### Removed
25
36
 
@@ -187,7 +187,7 @@ module Bibliothecary
187
187
  original_name: dep[:original_name],
188
188
  requirement: dep[:version],
189
189
  original_requirement: dep[:original_requirement],
190
- type: "runtime", # lockfile doesn't tell us more about the type of dep
190
+ type: nil, # yarn.lock doesn't report on the type of dependency
191
191
  local: dep[:requirements]&.first&.start_with?("file:"),
192
192
  source: options.fetch(:filename, nil),
193
193
  platform: platform_name
@@ -153,6 +153,17 @@ module Bibliothecary
153
153
  .select { |dep| dep.respond_to? "Include" }
154
154
  .map do |dependency|
155
155
  vals = *dependency.Include.split(",").map(&:strip)
156
+
157
+ # Skip <Reference> dependencies that only have the name value. Reasoning:
158
+ # Builtin assemblies like "System.Web" or "Microsoft.CSharp" can be required from the framework or by
159
+ # downloading via Nuget, and we only want to report on packages that are downloaded from Nuget. We are
160
+ # pretty sure that if they don't have a version in <Reference> then they're likely from the framework
161
+ # itself, which means they won't show up in the lockfile and we want to omit them.
162
+ # Note: if we omit a false positive here it should still show up in the lockfile, and it should be
163
+ # safer guess like this since <Reference> is an older standard.
164
+ # Note: this strategy could also skip on-disk 3rd-party packages with a <HintPath> but no version in <Reference>
165
+ next nil if vals.size == 1
166
+
156
167
  name = vals.shift
157
168
  vals = vals.to_h { |r| r.split("=", 2) }
158
169
 
@@ -164,6 +175,7 @@ module Bibliothecary
164
175
  platform: platform_name
165
176
  )
166
177
  end
178
+ .compact
167
179
 
168
180
  dependencies = packages.uniq(&:name)
169
181
  ParserResult.new(dependencies: dependencies)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bibliothecary
4
- VERSION = "14.1.0"
4
+ VERSION = "14.2.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.1.0
4
+ version: 14.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-10-01 00:00:00.000000000 Z
10
+ date: 2025-10-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: commander