Class: Dependabot::Bun::BunPackageManager

Inherits:
Ecosystem::VersionManager
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/bun/bun_package_manager.rb

Constant Summary collapse

NAME =
"bun"
LOCKFILE_NAME =
"bun.lock"
RC_FILENAME =
".npmrc"
MIN_SUPPORTED_VERSION =

In Bun 1.1.39, the lockfile format was changed from a binary bun.lockb to a text-based bun.lock. https://bun.sh/blog/bun-lock-text-lockfile

Version.new("1.1.39")
MAX_SUPPORTED_LOCKFILE_VERSION =

The highest bun.lock lockfileVersion the bun binary bundled in bun/Dockerfile can parse. Bun 1.4 raised the default to 2 (https://github.com/oven-sh/bun/pull/31539), which the bundled bun rejects at parse time. Bump this in lockstep with ARG BUN_VERSION in bun/Dockerfile.

1
SUPPORTED_VERSIONS =
T.let([MIN_SUPPORTED_VERSION].freeze, T::Array[Dependabot::Version])
DEPRECATED_VERSIONS =
T.let([].freeze, T::Array[Dependabot::Version])

Instance Method Summary collapse

Constructor Details

#initialize(detected_version: nil, raw_version: nil, requirement: nil) ⇒ BunPackageManager

Returns a new instance of BunPackageManager.



31
32
33
34
35
36
37
38
39
40
# File 'lib/dependabot/bun/bun_package_manager.rb', line 31

def initialize(detected_version: nil, raw_version: nil, requirement: nil)
  super(
    name: NAME,
    detected_version: detected_version ? Version.new(detected_version) : nil,
    version: raw_version ? Version.new(raw_version) : nil,
    deprecated_versions: DEPRECATED_VERSIONS,
    supported_versions: SUPPORTED_VERSIONS,
    requirement: requirement
  )
end

Instance Method Details

#deprecated?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/dependabot/bun/bun_package_manager.rb', line 43

def deprecated?
  false
end

#unsupported?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/dependabot/bun/bun_package_manager.rb', line 48

def unsupported?
  false
end