dependabot-bun 0.391.0 → 0.392.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a26cc2bacba80d0257ab7818f69fbe7f5347e71eb1975a1558f5d49c145d0ebd
|
|
4
|
+
data.tar.gz: e472da36b4791b838a6e543f225f06b872a6f9d4966b76878f73043c99cb9db7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61c9f416d4fd133198b90bf7e6d2f30e00745422dd9eed1e8f23c27b47db97511c999e1983a4c358508e1eba720b2489ef13bf1f44efe96963646b6e53be207b
|
|
7
|
+
data.tar.gz: 15e81fb3532a1bd2126d1a5d01e33ceab4b37e9b872802dd59248b10ac6d0555782d5b6006bd9e44295272da7f9114967e68b9635b4d72454e38058467de621b
|
|
@@ -13,6 +13,11 @@ module Dependabot
|
|
|
13
13
|
# In Bun 1.1.39, the lockfile format was changed from a binary bun.lockb to a text-based bun.lock.
|
|
14
14
|
# https://bun.sh/blog/bun-lock-text-lockfile
|
|
15
15
|
MIN_SUPPORTED_VERSION = Version.new("1.1.39")
|
|
16
|
+
|
|
17
|
+
# The highest bun.lock `lockfileVersion` the bun binary bundled in `bun/Dockerfile` can parse.
|
|
18
|
+
# Bun 1.4 raised the default to 2 (https://github.com/oven-sh/bun/pull/31539), which the bundled
|
|
19
|
+
# bun rejects at parse time. Bump this in lockstep with `ARG BUN_VERSION` in `bun/Dockerfile`.
|
|
20
|
+
MAX_SUPPORTED_LOCKFILE_VERSION = 1
|
|
16
21
|
SUPPORTED_VERSIONS = T.let([MIN_SUPPORTED_VERSION].freeze, T::Array[Dependabot::Version])
|
|
17
22
|
DEPRECATED_VERSIONS = T.let([].freeze, T::Array[Dependabot::Version])
|
|
18
23
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
require "yaml"
|
|
5
5
|
require "dependabot/errors"
|
|
6
|
+
require "dependabot/bun/bun_package_manager"
|
|
6
7
|
require "dependabot/bun/helpers"
|
|
7
8
|
require "sorbet-runtime"
|
|
8
9
|
|
|
@@ -31,6 +32,8 @@ module Dependabot
|
|
|
31
32
|
version = content["lockfileVersion"]
|
|
32
33
|
raise_invalid!("expected 'lockfileVersion' to be an integer") unless version.is_a?(Integer)
|
|
33
34
|
raise_invalid!("expected 'lockfileVersion' to be >= 0") unless version >= 0
|
|
35
|
+
raise_unsupported_lockfile_version!(version) if
|
|
36
|
+
version > BunPackageManager::MAX_SUPPORTED_LOCKFILE_VERSION
|
|
34
37
|
|
|
35
38
|
# configVersion was introduced in Bun v1.3.2 to control install behavior.
|
|
36
39
|
# When present, it must be preserved or Bun will use different install defaults.
|
|
@@ -111,6 +114,17 @@ module Dependabot
|
|
|
111
114
|
raise Dependabot::DependencyFileNotParseable.new(@dependency_file.path, "Invalid bun.lock file: #{message}")
|
|
112
115
|
end
|
|
113
116
|
|
|
117
|
+
# The lockfile is well-formed and we can read it, but the bun binary we shell out to cannot.
|
|
118
|
+
# Without this, bun discards the lockfile it failed to parse, re-resolves from scratch and
|
|
119
|
+
# writes a downgraded lockfile back, all while exiting successfully.
|
|
120
|
+
sig { params(version: Integer).returns(T.noreturn) }
|
|
121
|
+
def raise_unsupported_lockfile_version!(version)
|
|
122
|
+
raise Dependabot::DependencyFileNotSupported,
|
|
123
|
+
"Unsupported bun.lock 'lockfileVersion' #{version} in #{@dependency_file.path}. " \
|
|
124
|
+
"The bun version Dependabot runs supports up to " \
|
|
125
|
+
"#{BunPackageManager::MAX_SUPPORTED_LOCKFILE_VERSION}."
|
|
126
|
+
end
|
|
127
|
+
|
|
114
128
|
sig do
|
|
115
129
|
params(entry: T.nilable(T::Array[T.untyped])).returns(T.nilable(T::Hash[String, T.untyped]))
|
|
116
130
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-bun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.392.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.392.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.392.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -354,7 +354,7 @@ licenses:
|
|
|
354
354
|
- MIT
|
|
355
355
|
metadata:
|
|
356
356
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
|
357
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
|
357
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.392.0
|
|
358
358
|
rdoc_options: []
|
|
359
359
|
require_paths:
|
|
360
360
|
- lib
|