dependabot-swift 0.289.0 → 0.290.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.rb +51 -0
- data/lib/dependabot/swift/language.rb +24 -0
- data/lib/dependabot/swift/package_manager.rb +41 -0
- data/lib/dependabot/swift/version.rb +3 -0
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82458f6ac18ef023ca4c8bfec5dff832fb8eac19dd91fc90bc29f4c70efc4ed4
|
4
|
+
data.tar.gz: 85a5d5bfe493320e788e0ddb4f1e76a533e8c902476addbd46641059a7200406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9ae925621715edc66b18afbb36ae118d8cca5582992914bbb5181a4baace01c4a7ea134bfe21ff62ac9bec59e18af44669ba64c0c8adfe446f571643d27c1b
|
7
|
+
data.tar.gz: 516188e496c71bde4524972db66e965d65c93b04e9342b56033089d97009ec3a4d8d1d39720430f0b7dbd80ff346f170452368024fe5dc87adbc1c2572c88030
|
@@ -6,6 +6,8 @@ require "dependabot/file_parsers"
|
|
6
6
|
require "dependabot/file_parsers/base"
|
7
7
|
require "dependabot/swift/file_parser/dependency_parser"
|
8
8
|
require "dependabot/swift/file_parser/manifest_parser"
|
9
|
+
require "dependabot/swift/package_manager"
|
10
|
+
require "dependabot/swift/language"
|
9
11
|
|
10
12
|
module Dependabot
|
11
13
|
module Swift
|
@@ -36,6 +38,17 @@ module Dependabot
|
|
36
38
|
dependency_set.dependencies
|
37
39
|
end
|
38
40
|
|
41
|
+
sig { returns(Ecosystem) }
|
42
|
+
def ecosystem
|
43
|
+
@ecosystem ||= T.let(begin
|
44
|
+
Ecosystem.new(
|
45
|
+
name: ECOSYSTEM,
|
46
|
+
language: language,
|
47
|
+
package_manager: package_manager
|
48
|
+
)
|
49
|
+
end, T.nilable(Dependabot::Ecosystem))
|
50
|
+
end
|
51
|
+
|
39
52
|
private
|
40
53
|
|
41
54
|
def dependency_parser
|
@@ -54,6 +67,44 @@ module Dependabot
|
|
54
67
|
# TODO: Select version-specific manifest
|
55
68
|
@package_manifest_file ||= get_original_file("Package.swift")
|
56
69
|
end
|
70
|
+
|
71
|
+
sig { returns(Ecosystem::VersionManager) }
|
72
|
+
def package_manager
|
73
|
+
@package_manager ||= T.let(
|
74
|
+
PackageManager.new(T.must(package_manager_version)),
|
75
|
+
T.nilable(Dependabot::Swift::PackageManager)
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
sig { returns(T.nilable(String)) }
|
80
|
+
def package_manager_version
|
81
|
+
@package_manager_version ||= T.let(
|
82
|
+
begin
|
83
|
+
version = SharedHelpers.run_shell_command("swift package --version")
|
84
|
+
version.strip.gsub(/Swift Package Manager - Swift \s*/, "")
|
85
|
+
end,
|
86
|
+
T.nilable(String)
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
sig { returns(T.nilable(Ecosystem::VersionManager)) }
|
91
|
+
def language
|
92
|
+
@language ||= T.let(begin
|
93
|
+
Language.new(T.must(swift_version))
|
94
|
+
end, T.nilable(Dependabot::Swift::Language))
|
95
|
+
end
|
96
|
+
|
97
|
+
sig { returns(T.nilable(String)) }
|
98
|
+
def swift_version
|
99
|
+
@swift_version ||= T.let(
|
100
|
+
begin
|
101
|
+
version = SharedHelpers.run_shell_command("swift --version")
|
102
|
+
pattern = Dependabot::Ecosystem::VersionManager::DEFAULT_VERSION_PATTERN
|
103
|
+
version.match(/Swift version\s*#{pattern}/)&.captures&.first
|
104
|
+
end,
|
105
|
+
T.nilable(String)
|
106
|
+
)
|
107
|
+
end
|
57
108
|
end
|
58
109
|
end
|
59
110
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/ecosystem"
|
6
|
+
require "dependabot/swift/version"
|
7
|
+
|
8
|
+
module Dependabot
|
9
|
+
module Swift
|
10
|
+
LANGUAGE = "swift"
|
11
|
+
|
12
|
+
class Language < Dependabot::Ecosystem::VersionManager
|
13
|
+
extend T::Sig
|
14
|
+
|
15
|
+
sig { params(raw_version: String).void }
|
16
|
+
def initialize(raw_version)
|
17
|
+
super(
|
18
|
+
LANGUAGE,
|
19
|
+
Version.new(raw_version)
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/ecosystem"
|
6
|
+
require "dependabot/swift/version"
|
7
|
+
|
8
|
+
module Dependabot
|
9
|
+
module Swift
|
10
|
+
ECOSYSTEM = "swift"
|
11
|
+
PACKAGE_MANAGER = "swift"
|
12
|
+
SUPPORTED_SWIFT_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
13
|
+
|
14
|
+
# When a version is going to be unsupported, it will be added here
|
15
|
+
DEPRECATED_SWIFT_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
16
|
+
|
17
|
+
class PackageManager < Dependabot::Ecosystem::VersionManager
|
18
|
+
extend T::Sig
|
19
|
+
|
20
|
+
sig { params(raw_version: String).void }
|
21
|
+
def initialize(raw_version)
|
22
|
+
super(
|
23
|
+
PACKAGE_MANAGER,
|
24
|
+
Version.new(raw_version),
|
25
|
+
DEPRECATED_SWIFT_VERSIONS,
|
26
|
+
SUPPORTED_SWIFT_VERSIONS
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { returns(T::Boolean) }
|
31
|
+
def deprecated?
|
32
|
+
false
|
33
|
+
end
|
34
|
+
|
35
|
+
sig { returns(T::Boolean) }
|
36
|
+
def unsupported?
|
37
|
+
false
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
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.290.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-12 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.290.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.290.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -251,8 +251,10 @@ files:
|
|
251
251
|
- lib/dependabot/swift/file_updater/lockfile_updater.rb
|
252
252
|
- lib/dependabot/swift/file_updater/manifest_updater.rb
|
253
253
|
- lib/dependabot/swift/file_updater/requirement_replacer.rb
|
254
|
+
- lib/dependabot/swift/language.rb
|
254
255
|
- lib/dependabot/swift/metadata_finder.rb
|
255
256
|
- lib/dependabot/swift/native_requirement.rb
|
257
|
+
- lib/dependabot/swift/package_manager.rb
|
256
258
|
- lib/dependabot/swift/requirement.rb
|
257
259
|
- lib/dependabot/swift/update_checker.rb
|
258
260
|
- lib/dependabot/swift/update_checker/requirements_updater.rb
|
@@ -263,8 +265,8 @@ licenses:
|
|
263
265
|
- MIT
|
264
266
|
metadata:
|
265
267
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
266
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
267
|
-
post_install_message:
|
268
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.290.0
|
269
|
+
post_install_message:
|
268
270
|
rdoc_options: []
|
269
271
|
require_paths:
|
270
272
|
- lib
|
@@ -280,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
282
|
version: 3.1.0
|
281
283
|
requirements: []
|
282
284
|
rubygems_version: 3.5.9
|
283
|
-
signing_key:
|
285
|
+
signing_key:
|
284
286
|
specification_version: 4
|
285
287
|
summary: Provides Dependabot support for Swift
|
286
288
|
test_files: []
|