dependabot-swift 0.293.0 → 0.294.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/swift/file_parser/manifest_parser.rb +18 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 030d3f9255d770e7b983ac6539608ba45317b7fc3ff8319494ca6f6bb65f0206
|
4
|
+
data.tar.gz: 9318fe70f279434466963c21e14d696ea15e4321508de1cac618eb22061e724e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02a176d7ec78e4eeab9166ed0b2293fd8d851477d27f7d21722334a57205758cd7cb24151472d256099e859ebb4d4a2aa1a30d5048ab5d4213fd3f9d7724c827
|
7
|
+
data.tar.gz: 7db9f1634b43520157285b646e40931bc87fb61bfa40fc15b8360c1940176450cb96252d2c7b96a3015978c74d62e94b1a84b851fca05a2c7599b41c7c166e46
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strong
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require "dependabot/file_parsers/base"
|
@@ -8,25 +8,35 @@ module Dependabot
|
|
8
8
|
module Swift
|
9
9
|
class FileParser < Dependabot::FileParsers::Base
|
10
10
|
class ManifestParser
|
11
|
+
extend T::Sig
|
12
|
+
extend T::Helpers
|
13
|
+
|
11
14
|
DEPENDENCY =
|
12
15
|
/(?<declaration>\.package\(\s*
|
13
16
|
(?:name:\s+"[^"]+",\s*)?url:\s+"(?<url>[^"]+)",\s*(?<requirement>#{NativeRequirement::REGEXP})\s*
|
14
17
|
\))/x
|
15
18
|
|
19
|
+
sig do
|
20
|
+
params(
|
21
|
+
manifest: Dependabot::DependencyFile,
|
22
|
+
source: T::Hash[Symbol, String]
|
23
|
+
).void
|
24
|
+
end
|
16
25
|
def initialize(manifest, source:)
|
17
26
|
@manifest = manifest
|
18
27
|
@source = source
|
19
28
|
end
|
20
29
|
|
30
|
+
sig { returns(T::Array[T::Hash[Symbol, T.untyped]]) }
|
21
31
|
def requirements
|
22
|
-
found = manifest.content
|
23
|
-
SharedHelpers.scp_to_standard(url) == source[:url]
|
32
|
+
found = manifest.content&.scan(DEPENDENCY)&.find do |_declaration, url, _requirement|
|
33
|
+
SharedHelpers.scp_to_standard(url.to_s) == source[:url]
|
24
34
|
end
|
25
35
|
|
26
36
|
return [] unless found
|
27
37
|
|
28
|
-
declaration = found.first
|
29
|
-
requirement = NativeRequirement.new(found.last)
|
38
|
+
declaration = T.cast(found, T::Array[String]).first
|
39
|
+
requirement = NativeRequirement.new(T.cast(found, T::Array[String]).last)
|
30
40
|
|
31
41
|
[
|
32
42
|
{
|
@@ -41,7 +51,10 @@ module Dependabot
|
|
41
51
|
|
42
52
|
private
|
43
53
|
|
54
|
+
sig { returns(Dependabot::DependencyFile) }
|
44
55
|
attr_reader :manifest
|
56
|
+
|
57
|
+
sig { returns(T::Hash[Symbol, String]) }
|
45
58
|
attr_reader :source
|
46
59
|
end
|
47
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-swift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.294.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.294.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.294.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -265,7 +265,7 @@ licenses:
|
|
265
265
|
- MIT
|
266
266
|
metadata:
|
267
267
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
268
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
268
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.294.0
|
269
269
|
post_install_message:
|
270
270
|
rdoc_options: []
|
271
271
|
require_paths:
|