Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Namespace Structure and Fix Abstractions for Lockfile and Fetcher #11528

Merged
merged 17 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.updater-core
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ COPY --chown=dependabot:dependabot github_actions/.bundle github_actions/dependa
COPY --chown=dependabot:dependabot go_modules/.bundle go_modules/dependabot-go_modules.gemspec go_modules/
COPY --chown=dependabot:dependabot gradle/.bundle gradle/dependabot-gradle.gemspec gradle/
COPY --chown=dependabot:dependabot hex/.bundle hex/dependabot-hex.gemspec hex/
COPY --chown=dependabot:dependabot javascript/.bundle javascript/dependabot-bun.gemspec javascript/
COPY --chown=dependabot:dependabot javascript/.bundle javascript/dependabot-javascript.gemspec javascript/
COPY --chown=dependabot:dependabot maven/.bundle maven/dependabot-maven.gemspec maven/
COPY --chown=dependabot:dependabot npm_and_yarn/.bundle npm_and_yarn/dependabot-npm_and_yarn.gemspec npm_and_yarn/
COPY --chown=dependabot:dependabot nuget/.bundle nuget/dependabot-nuget.gemspec nuget/
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gem "dependabot-git_submodules", path: "git_submodules"
gem "dependabot-go_modules", path: "go_modules"
gem "dependabot-gradle", path: "gradle"
gem "dependabot-hex", path: "hex"
gem "dependabot-javascript", path: "javascript"
gem "dependabot-maven", path: "maven"
gem "dependabot-npm_and_yarn", path: "npm_and_yarn"
gem "dependabot-nuget", path: "nuget"
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ PATH
dependabot-hex (0.296.0)
dependabot-common (= 0.296.0)

PATH
remote: javascript
specs:
dependabot-javascript (0.296.0)
dependabot-common (= 0.296.0)
zeitwerk (~> 2.7)

PATH
remote: maven
specs:
Expand Down Expand Up @@ -391,6 +398,7 @@ DEPENDENCIES
dependabot-go_modules!
dependabot-gradle!
dependabot-hex!
dependabot-javascript!
dependabot-maven!
dependabot-npm_and_yarn!
dependabot-nuget!
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GEMSPECS = %w(
swift/dependabot-swift.gemspec
devcontainers/dependabot-devcontainers.gemspec
dotnet_sdk/dependabot-dotnet_sdk.gemspec
javascript/dependabot-bun.gemspec
javascript/dependabot-javascript.gemspec
).freeze

def run_command(command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Gem::Specification.new do |spec|
common_gemspec =
Bundler.load_gemspec_uncached("../common/dependabot-common.gemspec")

spec.name = "dependabot-bun"
spec.summary = "Provides Dependabot support for Bun"
spec.description = "Dependabot-bun provides support for bumping Javascript libraries using bun via " \
spec.name = "dependabot-javascript"
spec.summary = "Provides Dependabot support for javascript"
spec.description = "Dependabot-javascript provides support for bumping Javascript libraries using javascript via " \
"Dependabot. " \
"If you want support for multiple package managers, you probably want the meta-gem " \
"dependabot-omnibus."
Expand Down
18 changes: 11 additions & 7 deletions javascript/lib/dependabot/bun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
loader.ignore(File.join(__dir__, "../../../common/lib/dependabot/clients/codecommit.rb"))

loader.push_dir(File.join(__dir__, ".."))
loader.ignore("#{__dir__}/../script", "#{__dir__}/../spec", "#{__dir__}/../dependabot-bun.gemspec")
loader.ignore("#{__dir__}/../script", "#{__dir__}/../spec", "#{__dir__}/../dependabot-javascript.gemspec")

loader.on_load do |_file|
require "json"
Expand All @@ -33,12 +33,16 @@
Dependabot::Dependency.register_production_check("bun", ->(_) { true })

module Dependabot
module Bun
ECOSYSTEM = "bun"
module Javascript
module Bun
ECOSYSTEM = "bun"
end
end
end

Dependabot::FileFetchers.register("bun", Dependabot::Bun::FileFetcher)
Dependabot::FileParsers.register("bun", Dependabot::Bun::FileParser)
Dependabot::FileUpdaters.register("bun", Dependabot::Bun::FileUpdater)
Dependabot::UpdateCheckers.register("bun", Dependabot::Bun::UpdateChecker)
Dependabot::FileFetchers.register("bun", Dependabot::Javascript::Bun::FileFetcher)
Dependabot::FileParsers.register("bun", Dependabot::Javascript::Bun::FileParser)
Dependabot::FileUpdaters.register("bun", Dependabot::Javascript::Bun::FileUpdater)
Dependabot::UpdateCheckers.register("bun", Dependabot::Javascript::Bun::UpdateChecker)
Dependabot::Utils.register_requirement_class("bun", Dependabot::Javascript::Bun::Requirement)
Dependabot::Utils.register_version_class("bun", Dependabot::Javascript::Bun::Version)
94 changes: 0 additions & 94 deletions javascript/lib/dependabot/bun/file_fetcher.rb

This file was deleted.

72 changes: 0 additions & 72 deletions javascript/lib/dependabot/bun/file_parser.rb

This file was deleted.

Loading
Loading