dependabot-pub 0.288.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/pub/file_parser.rb +46 -0
- data/lib/dependabot/pub/language.rb +21 -0
- data/lib/dependabot/pub/package_manager.rb +52 -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: e5906ac32fddf9c223367fba7adbdda9b66653849bc0a4e9c99e81959eb9c928
|
4
|
+
data.tar.gz: 71958a07bf3c23bf8300744cae048cea93dfacdfab3f8b1b7292ca61de163e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0605947adb53073967b0975c96cc1d354d37f56777029b96c9e9845072b32af41084c1ce5e406427676e1cf5fc3a25502544ef5769b931e60b52dcf8f5ecd0c6'
|
7
|
+
data.tar.gz: c6838c074f54bee3eeda3f10eab6ff843f7460dbcff24473c4cde447a6af124a4853d8a576b7ab1357b17f1ea53a5e8a426e4867bc5c719927e1767e61db4b3e
|
@@ -6,6 +6,8 @@ require "dependabot/file_parsers/base"
|
|
6
6
|
require "dependabot/dependency"
|
7
7
|
require "dependabot/pub/version"
|
8
8
|
require "dependabot/pub/helpers"
|
9
|
+
require "dependabot/pub/package_manager"
|
10
|
+
require "dependabot/pub/language"
|
9
11
|
require "sorbet-runtime"
|
10
12
|
|
11
13
|
module Dependabot
|
@@ -25,8 +27,52 @@ module Dependabot
|
|
25
27
|
dependency_set.dependencies.sort_by(&:name)
|
26
28
|
end
|
27
29
|
|
30
|
+
sig { returns(Ecosystem) }
|
31
|
+
def ecosystem
|
32
|
+
@ecosystem ||= T.let(
|
33
|
+
Ecosystem.new(
|
34
|
+
name: ECOSYSTEM,
|
35
|
+
package_manager: package_manager,
|
36
|
+
language: language
|
37
|
+
),
|
38
|
+
T.nilable(Ecosystem)
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
28
42
|
private
|
29
43
|
|
44
|
+
sig { returns(Ecosystem::VersionManager) }
|
45
|
+
def package_manager
|
46
|
+
detected_package_manager
|
47
|
+
end
|
48
|
+
|
49
|
+
sig { returns(T.nilable(Ecosystem::VersionManager)) }
|
50
|
+
def language
|
51
|
+
@language ||= T.let(begin
|
52
|
+
Language.new(T.must(dart_raw_version))
|
53
|
+
end, T.nilable(Dependabot::Pub::Language))
|
54
|
+
end
|
55
|
+
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
def dart_raw_version
|
58
|
+
version_info = SharedHelpers.run_shell_command("dart --version").split("version:")
|
59
|
+
.last&.split&.first&.strip
|
60
|
+
|
61
|
+
Dependabot.logger.info("Ecosystem #{ECOSYSTEM}, Info : #{version_info}")
|
62
|
+
|
63
|
+
version_info
|
64
|
+
rescue StandardError => e
|
65
|
+
Dependabot.logger.error(e.message)
|
66
|
+
nil
|
67
|
+
end
|
68
|
+
|
69
|
+
sig { returns(Ecosystem::VersionManager) }
|
70
|
+
def detected_package_manager
|
71
|
+
# pub package manager is shipped with Dart SDK and is no longer available
|
72
|
+
# as separate project, So versioning is no longer relevant for pub package manager
|
73
|
+
PubPackageManager.new(PubPackageManager::VERSION)
|
74
|
+
end
|
75
|
+
|
30
76
|
sig { override.void }
|
31
77
|
def check_required_files
|
32
78
|
raise "No pubspec.yaml!" unless get_original_file("pubspec.yaml")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/pub/version"
|
6
|
+
require "dependabot/ecosystem"
|
7
|
+
|
8
|
+
module Dependabot
|
9
|
+
module Pub
|
10
|
+
LANGUAGE = "dart"
|
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(LANGUAGE, Version.new(raw_version))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "sorbet-runtime"
|
5
|
+
require "dependabot/pub/version"
|
6
|
+
require "dependabot/ecosystem"
|
7
|
+
require "dependabot/pub/requirement"
|
8
|
+
|
9
|
+
module Dependabot
|
10
|
+
module Pub
|
11
|
+
ECOSYSTEM = "dart"
|
12
|
+
|
13
|
+
SUPPORTED_DART_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
14
|
+
|
15
|
+
DEPRECATED_DART_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
16
|
+
|
17
|
+
class PubPackageManager < Dependabot::Ecosystem::VersionManager
|
18
|
+
extend T::Sig
|
19
|
+
|
20
|
+
NAME = "pub"
|
21
|
+
VERSION = "0.0"
|
22
|
+
|
23
|
+
SUPPORTED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
24
|
+
|
25
|
+
DEPRECATED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(
|
29
|
+
raw_version: String
|
30
|
+
).void
|
31
|
+
end
|
32
|
+
def initialize(raw_version)
|
33
|
+
super(
|
34
|
+
NAME,
|
35
|
+
Version.new(raw_version),
|
36
|
+
SUPPORTED_VERSIONS,
|
37
|
+
DEPRECATED_VERSIONS
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
sig { override.returns(T::Boolean) }
|
42
|
+
def deprecated?
|
43
|
+
false
|
44
|
+
end
|
45
|
+
|
46
|
+
sig { override.returns(T::Boolean) }
|
47
|
+
def unsupported?
|
48
|
+
false
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-pub
|
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-
|
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
|
@@ -247,7 +247,9 @@ files:
|
|
247
247
|
- lib/dependabot/pub/file_parser.rb
|
248
248
|
- lib/dependabot/pub/file_updater.rb
|
249
249
|
- lib/dependabot/pub/helpers.rb
|
250
|
+
- lib/dependabot/pub/language.rb
|
250
251
|
- lib/dependabot/pub/metadata_finder.rb
|
252
|
+
- lib/dependabot/pub/package_manager.rb
|
251
253
|
- lib/dependabot/pub/requirement.rb
|
252
254
|
- lib/dependabot/pub/update_checker.rb
|
253
255
|
- lib/dependabot/pub/version.rb
|
@@ -256,8 +258,8 @@ licenses:
|
|
256
258
|
- MIT
|
257
259
|
metadata:
|
258
260
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
259
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
260
|
-
post_install_message:
|
261
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.290.0
|
262
|
+
post_install_message:
|
261
263
|
rdoc_options: []
|
262
264
|
require_paths:
|
263
265
|
- lib
|
@@ -273,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
275
|
version: 3.1.0
|
274
276
|
requirements: []
|
275
277
|
rubygems_version: 3.5.9
|
276
|
-
signing_key:
|
278
|
+
signing_key:
|
277
279
|
specification_version: 4
|
278
280
|
summary: Provides Dependabot support for Dart (pub)
|
279
281
|
test_files: []
|