bibliothecary 8.3.6 → 8.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17f26c778e80bae98b90c9329deee84531373bd632522cafeaa6fd373625875d
4
- data.tar.gz: 414e573a0fff88a2352fec3393ba4067fc96e483ee6f73752c23ed9578739d9f
3
+ metadata.gz: 5447f8ff7067f7eb7c0f1bfbd13f0ba6da33335dd31cee7b319587a09260308a
4
+ data.tar.gz: b23abc3e66340a26345db527803dcb7d7d8a3f9418297bff161deb72dd778aa5
5
5
  SHA512:
6
- metadata.gz: fac3dbf50483860ae351fc198a884ec8e1b1f54f0e7f89da36cacd78dbac84800a4c75cf118b5af27529e1ca068d664dcbb63775aec4940c78023d867fb2e675
7
- data.tar.gz: 389d6f67d33980bda05d35fd22c1533e2727f79734e40a0371fda3edee4ddbae81f22e276807b0c0898c5cf5d22575e1d221b9a967331af725cea937b81e3731
6
+ metadata.gz: 79159794155d5ea5c18978f4e6a57eba72bd78699fcee008e66fbf0bb83a5c737893ee369d7cb4d3f8afe2758b1029c4a87a526344ea8d7a2aa2ba38a2ab3729
7
+ data.tar.gz: 01ec2a377345cc804c1fac8149f27fc40a7e34c45db27ae0f9b6eb0cea1ebdece6b64b23c5da6f96354d1440102bc3854dcf2b4297d9cf915e89c920d3de3f25
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 2.7.6
@@ -167,6 +167,15 @@ module Bibliothecary
167
167
  requirement: dep[-1],
168
168
  type: type
169
169
  }
170
+ elsif dep.count == 5
171
+ # get name from renamed package resolution "org:name -> renamed_org:name:version"
172
+ {
173
+ original_name: dep[0,2].join(":"),
174
+ original_requirement: "*",
175
+ name: dep[-3..-2].join(":"),
176
+ requirement: dep[-1],
177
+ type: type
178
+ }
170
179
  else
171
180
  # get name from version conflict resolution ("org:name:version -> version") and no-resolution ("org:name:version")
172
181
  {
@@ -179,7 +188,7 @@ module Bibliothecary
179
188
  .compact
180
189
  # Prefer duplicate deps with the aliased ones first, so we don't lose the aliases in the next uniq step.
181
190
  .sort_by { |dep| dep.key?(:original_name) || dep.key?(:original_requirement) ? 0 : 1 }
182
- .uniq { |item| [item[:name], item[:requirement], item[:type]] }
191
+ .uniq { |item| item.values_at(:name, :requirement, :type, :original_name, :original_requirement) }
183
192
  end
184
193
 
185
194
  def self.parse_maven_resolved(file_contents, options: {})
@@ -68,8 +68,12 @@ module Bibliothecary
68
68
  def self.parse_manifest(file_contents, options: {})
69
69
  manifest = JSON.parse(file_contents)
70
70
  raise "appears to be a lockfile rather than manifest format" if manifest.key?('lockfileVersion')
71
- map_dependencies(manifest, 'dependencies', 'runtime') +
72
- map_dependencies(manifest, 'devDependencies', 'development')
71
+
72
+ (
73
+ map_dependencies(manifest, 'dependencies', 'runtime') +
74
+ map_dependencies(manifest, 'devDependencies', 'development')
75
+ )
76
+ .reject { |dep| dep[:name].start_with?("//") } # Omit comment keys. They are valid in package.json: https://groups.google.com/g/nodejs/c/NmL7jdeuw0M/m/yTqI05DRQrIJ
73
77
  end
74
78
 
75
79
  def self.parse_yarn_lock(file_contents, options: {})
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "8.3.6"
2
+ VERSION = "8.3.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.3.6
4
+ version: 8.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-18 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb
@@ -339,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  - !ruby/object:Gem::Version
340
340
  version: '0'
341
341
  requirements: []
342
- rubygems_version: 3.1.2
342
+ rubygems_version: 3.1.6
343
343
  signing_key:
344
344
  specification_version: 4
345
345
  summary: Find and parse manifests