bibliothecary 14.0.2 → 14.1.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: bded2f923188e40707913d6539d5e876d2ff0334233985528a1b4caa3e686037
4
- data.tar.gz: 49f76a339d1141d4b8f0940ad4dc66eb3533773e37d288825c71685f8f78ca3e
3
+ metadata.gz: 8220f939e62ba68f9f9edebda8c1d5901d88f028c9caea6b173c2f9da14cb5b4
4
+ data.tar.gz: 2920b4cf85f4497bf1a2749e8c6c6b2cdfa5c0c0a9f3cb244bc86c7991041974
5
5
  SHA512:
6
- metadata.gz: 3f9e93bbf8341d3a27b22a2661a79225ae64721f3ea63348364d215ca4b73e19bbce6b3a8409cb590851f332fc9c404b1dd18bd0c621418cd139f216e9ed509c
7
- data.tar.gz: 8483dc5f0ff491a9259f909e1cc8734a2c159c408733736e50d11c71b07810e0632e00d75bc8f05b5ab342389bfa0f271b430a6ea2ab74e80b3e3fdb9f05a26c
6
+ metadata.gz: 768d17a2954b4ccb4cad09da85074ef4958193fc10aea00cf33cbc8f7a309dc4d2b287a9d71e6b509b1861ddad06b0ad0508818fcd093147214cd836edd5cdf2
7
+ data.tar.gz: 4d345a0068501420508694bd5491de0584517e60021ff16e216486bc8329a1c5c7655c40df33a631e280c9977f8721d4b9a572f84f60fd6cf9e449134762b768
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby: circleci/ruby@2.1.3
3
+ ruby: circleci/ruby@2.5.4
4
4
 
5
5
  executors:
6
6
  bibliothecary:
data/CHANGELOG.md CHANGED
@@ -13,6 +13,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Removed
15
15
 
16
+ ## [14.1.0] - 2025-10-01
17
+
18
+ ### Added
19
+
20
+ ### Changed
21
+
22
+ - Dependencies from pom.xml without a scope will not return a "type" of nil instead of guessing "runtime".
23
+
24
+ ### Removed
25
+
16
26
  ## [14.0.2] - 2025-07-29
17
27
 
18
28
  ### Added
@@ -9,7 +9,8 @@ module Bibliothecary
9
9
  # it's implicit in most parser results, and the analyzer returns the platform name itself. One
10
10
  # exception are multi-parsers like DependenciesCSV, because they may return deps from multiple platforms.
11
11
  # Bibliothecary could start returning this field for *all* deps in future, and make it required. (default: nil)
12
- # @attr_reader [String] type The type of dependency, e.g. "runtime" or "test"
12
+ # @attr_reader [String] type The type or scope of dependency, e.g. "runtime" or "test". In some ecosystems a
13
+ # default may be set and in other ecosystems it may make sense to return nil when not found.
13
14
  # @attr_reader [Boolean] direct Is this dependency a direct dependency (vs transitive dependency)? (default: nil)
14
15
  # @attr_reader [Boolean] deprecated Is this dependency deprecated? (default: nil)
15
16
  # @attr_reader [Boolean] local Is this dependency local? (default: nil)
@@ -7,7 +7,7 @@ module Bibliothecary
7
7
  class CRAN
8
8
  include Bibliothecary::Analyser
9
9
 
10
- REQUIRE_REGEXP = /([a-zA-Z0-9\-_\.]+)\s?\(?([><=\s\d\.,]+)?\)?/
10
+ REQUIRE_REGEXP = /([a-zA-Z0-9\-_.]+)\s?\(?([><=\s\d.,]+)?\)?/
11
11
 
12
12
  def self.mapping
13
13
  {
@@ -12,8 +12,8 @@ module Bibliothecary
12
12
  include Bibliothecary::Analyser
13
13
 
14
14
  # Matches digraph contents from the Maven dependency tree .dot file format.
15
- MAVEN_DOT_PROJECT_REGEXP = /digraph\s+"([^\"]+)"\s+{/
16
- MAVEN_DOT_RELATIONSHIP_REGEXP = /"([^\"]+)"\s+->\s+"([^\"]+)"/
15
+ MAVEN_DOT_PROJECT_REGEXP = /digraph\s+"([^"]+)"\s+{/
16
+ MAVEN_DOT_RELATIONSHIP_REGEXP = /"([^"]+)"\s+->\s+"([^"]+)"/
17
17
 
18
18
  # e.g. "annotationProcessor - Annotation processors and their dependencies for source set 'main'."
19
19
  GRADLE_TYPE_REGEXP = /^(\w+)/
@@ -286,7 +286,7 @@ module Bibliothecary
286
286
  .encode(universal_newline: true)
287
287
  # capture two groups; one is the ASCII art telling us the tree depth,
288
288
  # and two is the actual dependency
289
- .scan(/^\[INFO\]\s((?:[-+|\\]|\s)*)((?:[\w\.-]+:)+[\w\.\-${}]+)/)
289
+ .scan(/^\[INFO\]\s((?:[-+|\\]|\s)*)((?:[\w.-]+:)+[\w.\-${}]+)/)
290
290
  # lines that start with "-" aren't part of the tree, example: "[INFO] --- dependency:3.8.1:tree"
291
291
  .reject { |(tree_ascii_art, _dep_info)| tree_ascii_art.start_with?("-") }
292
292
  .map do |(tree_ascii_art, dep_info)|
@@ -491,7 +491,6 @@ module Bibliothecary
491
491
  dep_hash[:type] ||= dependency_management[:scope]
492
492
  end
493
493
 
494
- dep_hash[:type] ||= "runtime"
495
494
  dep_hash[:source] = source
496
495
  end
497
496
 
@@ -189,7 +189,7 @@ module Bibliothecary
189
189
 
190
190
  def self.parse_paket_lock(file_contents, options: {})
191
191
  lines = file_contents.split("\n")
192
- package_version_re = /\s+(?<name>\S+)\s\((?<version>\d+\.\d+[\.\d+[\.\d+]*]*)\)/
192
+ package_version_re = /\s+(?<name>\S+)\s\((?<version>\d+\.\d+[.\d+[.\d+]*]*)\)/
193
193
  packages = lines.select { |line| package_version_re.match(line) }.map { |line| package_version_re.match(line) }.map do |match|
194
194
  Dependency.new(
195
195
  name: match[:name].strip,
@@ -10,7 +10,7 @@ module Bibliothecary
10
10
  # Capture Group 1 is package.
11
11
  # Optional Group 2 is [extras].
12
12
  # Capture Group 3 is Version
13
- REQUIRE_REGEXP = /([a-zA-Z0-9]+[a-zA-Z0-9\-_\.]+)(?:\[.*?\])*([><=\w\.,]+)?/
13
+ REQUIRE_REGEXP = /([a-zA-Z0-9]+[a-zA-Z0-9\-_.]+)(?:\[.*?\])*([><=\w.,]+)?/
14
14
  REQUIREMENTS_REGEXP = /^#{REQUIRE_REGEXP}/
15
15
 
16
16
  MANIFEST_REGEXP = /.*require[^\/]*\.(txt|pip|in)$/
@@ -332,7 +332,7 @@ module Bibliothecary
332
332
  uri = URI.parse(url)
333
333
  raise NoEggSpecified, "No egg specified in #{url}" unless uri.fragment
334
334
 
335
- name = uri.fragment[/^egg=([^&]+)([&]|$)/, 1]
335
+ name = uri.fragment[/^egg=([^&]+)(&|$)/, 1]
336
336
  raise NoEggSpecified, "No egg specified in #{url}" unless name
337
337
 
338
338
  requirement = uri.path[/@(.+)$/, 1]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bibliothecary
4
- VERSION = "14.0.2"
4
+ VERSION = "14.1.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.0.2
4
+ version: 14.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-29 00:00:00.000000000 Z
10
+ date: 2025-10-01 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: commander