bibliothecary 12.1.8 → 12.1.10
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 +4 -4
- data/CHANGELOG.md +23 -0
- data/lib/bibliothecary/parsers/pypi.rb +31 -16
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfc52a5290fe4f0518906698b7dc69cf16b2a7747a130796162d8b8c431b6d9b
|
4
|
+
data.tar.gz: a68f8983ff54598396bf82d02a844ca867bd29a62044bede38ba13354d0a3386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a5bd08b3864366e22eb1baf58b1a35bd819997fc59a51adf412b6e5090b3d7534f045f8793ac79315be49aa151bb1d18b5dba33d53b0a9c5cbe72c7909c190'
|
7
|
+
data.tar.gz: c0574ce28cb9bcb5b3e03bab3e69859eb0e679fb809a0750d5bf7c3ba3efcf2585f61c65dbebf0c2d94edf3cd9b86b14bfea153c242a91a4b057443887c965c2
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
13
13
|
|
14
14
|
### Removed
|
15
15
|
|
16
|
+
## [12.1.10] - 2025-05-23
|
17
|
+
|
18
|
+
### Added
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
- Normalize package names in Poetry manifests, storing the original in
|
23
|
+
Dependency#original_name if it differs. This is because Poetry normalizes/canoncalizes
|
24
|
+
names in its lockfile according to PyPa's rules, but doesn't provide the original name.
|
25
|
+
Storing the original_name will provide a connection from manifest to lockfile.
|
26
|
+
|
27
|
+
### Removed
|
28
|
+
|
29
|
+
## [12.1.9] - 2025-05-16
|
30
|
+
|
31
|
+
### Added
|
32
|
+
|
33
|
+
### Changed
|
34
|
+
|
35
|
+
- Fix 12.1.8 Poetry regression that ignored deps with no category or group.
|
36
|
+
|
37
|
+
### Removed
|
38
|
+
|
16
39
|
## [12.1.8] - 2025-05-16
|
17
40
|
|
18
41
|
### Added
|
@@ -119,13 +119,15 @@ module Bibliothecary
|
|
119
119
|
|
120
120
|
# We're combining both poetry+PEP621 deps instead of making them mutually exclusive, until we
|
121
121
|
# find a reason not to ingest them both.
|
122
|
-
deps.uniq
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
122
|
+
deps = deps.uniq
|
123
|
+
|
124
|
+
# Poetry normalizes names in lockfiles but doesn't provide the original, so we need to keep
|
125
|
+
# track of the original name so the dep is connected between manifest+lockfile.
|
126
|
+
deps.map do |dep|
|
127
|
+
normalized_name = normalize_name(dep.name)
|
128
|
+
Dependency.new(**dep.to_h, name: normalized_name,
|
129
|
+
original_name: normalized_name == dep.name ? nil : dep.name)
|
130
|
+
end
|
129
131
|
end
|
130
132
|
|
131
133
|
def self.parse_conda(file_contents, options: {})
|
@@ -204,7 +206,7 @@ module Bibliothecary
|
|
204
206
|
|
205
207
|
# Poetry <1.2.0 used singular "category" for kind
|
206
208
|
# Poetry >=1.2.0 uses plural "groups" field for kind(s)
|
207
|
-
package.values_at("category", "groups").flatten.compact
|
209
|
+
groups = package.values_at("category", "groups").flatten.compact
|
208
210
|
.map do |g|
|
209
211
|
if g == "dev"
|
210
212
|
"develop"
|
@@ -212,14 +214,21 @@ module Bibliothecary
|
|
212
214
|
(g == "main" ? "runtime" : g)
|
213
215
|
end
|
214
216
|
end
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
217
|
+
|
218
|
+
groups = ["runtime"] if groups.empty?
|
219
|
+
|
220
|
+
groups.each do |group|
|
221
|
+
# Poetry lockfiles should already contain normalizated names, but we'll
|
222
|
+
# apply it here as well just to be consistent with pyproject.toml parsing.
|
223
|
+
normalized_name = normalize_name(package["name"])
|
224
|
+
deps << Dependency.new(
|
225
|
+
name: normalized_name,
|
226
|
+
original_name: normalized_name == package["name"] ? nil : package["name"],
|
227
|
+
requirement: map_requirements(package),
|
228
|
+
type: group,
|
229
|
+
source: options.fetch(:filename, nil)
|
230
|
+
)
|
231
|
+
end
|
223
232
|
end
|
224
233
|
deps
|
225
234
|
end
|
@@ -335,6 +344,12 @@ module Bibliothecary
|
|
335
344
|
requirement = "*" if requirement == ""
|
336
345
|
[name, requirement]
|
337
346
|
end
|
347
|
+
|
348
|
+
# Apply PyPa's name normalization rules to the package name
|
349
|
+
# https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
|
350
|
+
def self.normalize_name(name)
|
351
|
+
name.downcase.gsub(/[-_.]+/, "-")
|
352
|
+
end
|
338
353
|
end
|
339
354
|
end
|
340
355
|
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: 12.1.
|
4
|
+
version: 12.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-23 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: commander
|