dependabot-composer 0.260.0 → 0.261.1

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: 873f9afebcc550b78f5c7ab6f50e647485cc06fdb29ad532a6aa805c728fb5ab
4
- data.tar.gz: 8c3149a9c3b2ef056b62dfb0d05f8c857fcd0f129234850cbf1a6550dd56f887
3
+ metadata.gz: efb142c3437b34406ab4ffaa5160178455517f3e5a61fb5a28a5816d7482a3ea
4
+ data.tar.gz: 74eebf7e4709322b4d552de107976f16940fb45d9b433335af16ab0f7790b505
5
5
  SHA512:
6
- metadata.gz: d681c95cca34030dbe704d06495d05cb3ce81f5e2b4ee2ea3bbbde3c6d3ee81dcd5d7d6a9241aabe05c2b5641a7ef059b208fbe55f3ceab5cd9b05637106e352
7
- data.tar.gz: 04e9cdd22c411dba09ddf2b0fbd7fc9a15b138e336d662d7019463d8f0fa695f27e6e42d52704de8d8366ef19dadd7148f4a1c52a10d087914b6d48e34d793b5
6
+ metadata.gz: 67ab56fadc1dc462a6c339cc0228045ba148f298b7537b37dbced79657f8e92bbcbfb3c82846517f6d4af9104d909ac66008622b2bb123664e2555711e63414d
7
+ data.tar.gz: 412ccd7fa638feaf8604abb83e7fe268b4814de76975ecad03d0d5c33e5446cc7d23039a8f0ea0c9499154fdc2de666a8911303d3b34427457ecc7ff6b0bd0be
@@ -8,13 +8,15 @@ use Composer\DependencyResolver\Request;
8
8
  use Composer\Factory;
9
9
  use Composer\Filter\PlatformRequirementFilter\PlatformRequirementFilterFactory;
10
10
  use Composer\Installer;
11
+ use Composer\Package\Link;
11
12
  use Composer\Package\PackageInterface;
13
+ use Composer\Package\Version\VersionParser;
12
14
 
13
15
  final class UpdateChecker
14
16
  {
15
17
  public static function getLatestResolvableVersion(array $args): ?string
16
18
  {
17
- [$workingDirectory, $dependencyName, $gitCredentials, $registryCredentials] = $args;
19
+ [$workingDirectory, $dependencyName, $gitCredentials, $registryCredentials, $latestAllowableVersion] = $args;
18
20
 
19
21
  $httpBasicCredentials = [];
20
22
 
@@ -48,10 +50,22 @@ final class UpdateChecker
48
50
  $io->loadConfiguration($config);
49
51
  }
50
52
 
53
+ $package = $composer->getPackage();
54
+
55
+ $versionParser = new VersionParser();
56
+
57
+ $constraint = $versionParser->parseConstraints($latestAllowableVersion); // your version constraint
58
+ $packageLink = new Link($package->getName(), $dependencyName, $constraint);
59
+
60
+ $requires = $package->getRequires();
61
+ $requires[$dependencyName] = $packageLink;
62
+
63
+ $package->setRequires($requires);
64
+
51
65
  $install = new Installer(
52
66
  $io,
53
67
  $config,
54
- $composer->getPackage(), // @phpstan-ignore-line
68
+ $package, // @phpstan-ignore-line
55
69
  $composer->getDownloadManager(),
56
70
  $composer->getRepositoryManager(),
57
71
  $composer->getLocker(),
@@ -148,7 +148,8 @@ module Dependabot
148
148
  Dir.pwd,
149
149
  dependency.name.downcase,
150
150
  git_credentials,
151
- registry_credentials
151
+ registry_credentials,
152
+ @latest_allowable_version.to_s
152
153
  ]
153
154
  )
154
155
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.260.0
4
+ version: 0.261.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
11
+ date: 2024-06-17 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.260.0
19
+ version: 0.261.1
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.260.0
26
+ version: 0.261.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -286,7 +286,7 @@ licenses:
286
286
  - MIT
287
287
  metadata:
288
288
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
289
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.260.0
289
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.261.1
290
290
  post_install_message:
291
291
  rdoc_options: []
292
292
  require_paths: