dependabot-devcontainers 0.288.0 → 0.289.0

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: 957efe111348577c1b5930dad3e963e919b757084004386277dcbaee79fb0db8
4
- data.tar.gz: bec6ad592b3305ac080812960135e43d1f8b2419bfc5c28d65c5b959df1288f5
3
+ metadata.gz: 2642a9aaf4c8f8bbdde6e6aa11b06ebcbb96441ba9db9aea3ea916f568281162
4
+ data.tar.gz: 35f9a4a9230a1f38d69066b86b10415be9efc5d9f53b71f249b5bfb93293bb24
5
5
  SHA512:
6
- metadata.gz: 5f6072d74f430ab3f0038fadaf5835c95c75483d9df8ad5b1ef6be67b17ef1df48d395709377bddb50edc802d1fc862b15074107f048fac04fbd3424442a0d08
7
- data.tar.gz: d5b7998746b95ab9a919725e449c5ca75efb33c824fa06f081271ebbd8f0f1c5a65c7a66a4c2a34af5adeecd550ecc02671e1aad2528e6e7745779cdf687342e
6
+ metadata.gz: 44f7fcea86cbe798c493b9b724a51b44e4bf51864fbf8ca002b50f757795dfd5f0ed1d974e83a6288b156254a3ecd4e87483825c52ff722b940dc280e9096dc5
7
+ data.tar.gz: 12038e513733a1063f85a9764f3ab9920a29f1fe8b96bba4442f65edf0f6b601c5ed3b1291da6144bb4197c96e993e36a575cb3158267bacf60a71ce3d3817f6
@@ -6,6 +6,8 @@ require "sorbet-runtime"
6
6
  require "dependabot/file_parsers"
7
7
  require "dependabot/file_parsers/base"
8
8
  require "dependabot/devcontainers/version"
9
+ require "dependabot/devcontainers/language"
10
+ require "dependabot/devcontainers/package_manager"
9
11
  require "dependabot/devcontainers/file_parser/feature_dependency_parser"
10
12
 
11
13
  module Dependabot
@@ -28,6 +30,17 @@ module Dependabot
28
30
  dependency_set.dependencies
29
31
  end
30
32
 
33
+ sig { returns(Ecosystem) }
34
+ def ecosystem
35
+ @ecosystem ||= T.let(begin
36
+ Ecosystem.new(
37
+ name: ECOSYSTEM,
38
+ package_manager: package_manager,
39
+ language: language
40
+ )
41
+ end, T.nilable(Dependabot::Ecosystem))
42
+ end
43
+
31
44
  private
32
45
 
33
46
  sig { override.void }
@@ -55,6 +68,44 @@ module Dependabot
55
68
  T.nilable(T::Array[Dependabot::DependencyFile])
56
69
  )
57
70
  end
71
+
72
+ sig { returns(Ecosystem::VersionManager) }
73
+ def package_manager
74
+ @package_manager ||= T.let(
75
+ PackageManager.new(T.must(devcontainer_version)),
76
+ T.nilable(Dependabot::Devcontainers::PackageManager)
77
+ )
78
+ end
79
+
80
+ sig { returns(T.nilable(Ecosystem::VersionManager)) }
81
+ def language
82
+ @language ||= T.let(
83
+ Language.new(T.must(node_version)),
84
+ T.nilable(Dependabot::Devcontainers::Language)
85
+ )
86
+ end
87
+
88
+ sig { returns(T.nilable(String)) }
89
+ def devcontainer_version
90
+ @devcontainer_version ||= T.let(
91
+ begin
92
+ version = SharedHelpers.run_shell_command("devcontainer --version")
93
+ version.match(Dependabot::Ecosystem::VersionManager::DEFAULT_VERSION_PATTERN)&.captures&.first
94
+ end,
95
+ T.nilable(String)
96
+ )
97
+ end
98
+
99
+ sig { returns(T.nilable(String)) }
100
+ def node_version
101
+ @node_version ||= T.let(
102
+ begin
103
+ version = SharedHelpers.run_shell_command("node --version")
104
+ version.match(Dependabot::Ecosystem::VersionManager::DEFAULT_VERSION_PATTERN)&.captures&.first
105
+ end,
106
+ T.nilable(String)
107
+ )
108
+ end
58
109
  end
59
110
  end
60
111
  end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/ecosystem"
6
+ require "dependabot/devcontainers/version"
7
+
8
+ module Dependabot
9
+ module Devcontainers
10
+ LANGUAGE = "node"
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,41 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+ require "dependabot/ecosystem"
6
+ require "dependabot/devcontainers/version"
7
+
8
+ module Dependabot
9
+ module Devcontainers
10
+ ECOSYSTEM = "devcontainers"
11
+ PACKAGE_MANAGER = "devcontainers"
12
+ SUPPORTED_DEVCONTAINER_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_DEVCONTAINER_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_DEVCONTAINER_VERSIONS,
26
+ SUPPORTED_DEVCONTAINER_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-devcontainers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.288.0
4
+ version: 0.289.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2024-12-05 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.288.0
19
+ version: 0.289.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.288.0
26
+ version: 0.289.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/devcontainers/file_parser/feature_dependency_parser.rb
248
248
  - lib/dependabot/devcontainers/file_updater.rb
249
249
  - lib/dependabot/devcontainers/file_updater/config_updater.rb
250
+ - lib/dependabot/devcontainers/language.rb
250
251
  - lib/dependabot/devcontainers/metadata_finder.rb
252
+ - lib/dependabot/devcontainers/package_manager.rb
251
253
  - lib/dependabot/devcontainers/requirement.rb
252
254
  - lib/dependabot/devcontainers/update_checker.rb
253
255
  - lib/dependabot/devcontainers/utils.rb
@@ -257,7 +259,7 @@ licenses:
257
259
  - MIT
258
260
  metadata:
259
261
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
260
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.288.0
262
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.289.0
261
263
  post_install_message:
262
264
  rdoc_options: []
263
265
  require_paths: