Skip to content

Commit

Permalink
feat: support bun
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Oct 20, 2023
1 parent 9c5ad43 commit 2057fd3
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
installer: yarn
- name: pnpm
installer: pnpm
- name: bun
installer: bun
ruby: [2.7]
gemfile:
# These have shakapacker:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ source "http://rubygems.org"

gemspec

gem "package_json", github: "G-Rath/package_json"
gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support"

# This is an optional dev-dependency, required whenever sprockets is required
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/G-Rath/package_json.git
revision: d48f2c0db14bb1305f249fffb52fd2e0065678ee
revision: 72e742afb7ea8c19369fa9a4ce0d74ce098e2678
branch: add-bun-support
specs:
package_json (0.1.0)

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Bundler::GemHelper.install_tasks
def require_package_json_gem
require "bundler/inline"

gemfile { gem "package_json", github: "G-Rath/package_json" }
gemfile { gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support" }

puts "using package_json v#{PackageJson::VERSION}"
end
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/base.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "http://rubygems.org"

gem "package_json", github: "G-Rath/package_json"
gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support"
gem "rails", "~> 7.0.x"

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/base.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/G-Rath/package_json.git
revision: d48f2c0db14bb1305f249fffb52fd2e0065678ee
revision: 72e742afb7ea8c19369fa9a4ce0d74ce098e2678
branch: add-bun-support
specs:
package_json (0.1.0)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/shakapacker.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "http://rubygems.org"

gem "package_json", github: "G-Rath/package_json"
gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support"
gem "rails", "~> 7.0.x"
gem "shakapacker", github: "G-Rath/shakapacker", branch: "use-package_json"

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/shakapacker.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/G-Rath/package_json.git
revision: d48f2c0db14bb1305f249fffb52fd2e0065678ee
revision: 72e742afb7ea8c19369fa9a4ce0d74ce098e2678
branch: add-bun-support
specs:
package_json (0.1.0)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/sprockets_3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "http://rubygems.org"

gem "package_json", github: "G-Rath/package_json"
gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support"
gem "rails", "~> 7.0.x"
gem "sprockets", "~> 3.5"
gem "sprockets-rails"
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/sprockets_3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/G-Rath/package_json.git
revision: d48f2c0db14bb1305f249fffb52fd2e0065678ee
revision: 72e742afb7ea8c19369fa9a4ce0d74ce098e2678
branch: add-bun-support
specs:
package_json (0.1.0)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/sprockets_4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "http://rubygems.org"

gem "package_json", github: "G-Rath/package_json"
gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support"
gem "rails", "~> 7.0.x"
gem "sprockets", "~> 4.0.x"
gem "sprockets-rails"
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/sprockets_4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/G-Rath/package_json.git
revision: d48f2c0db14bb1305f249fffb52fd2e0065678ee
revision: 72e742afb7ea8c19369fa9a4ce0d74ce098e2678
branch: add-bun-support
specs:
package_json (0.1.0)

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/react/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def setup_react_sprockets
def require_package_json_gem
require "bundler/inline"

gemfile { gem "package_json", github: "G-Rath/package_json" }
gemfile { gem "package_json", github: "G-Rath/package_json", branch: "add-bun-support" }

puts "using package_json v#{PackageJson::VERSION}"
end
Expand Down
2 changes: 1 addition & 1 deletion test/bin/create-fake-js-package-managers
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if ENV["GITHUB_ACTIONS"]
File.write(ENV.fetch("GITHUB_PATH"), "#{bin_dir}\n", mode: "a+")
end

managers = %w[npm yarn pnpm]
managers = %w[npm yarn pnpm bun]
manager_in_use = ARGV[0]

Dir.chdir(bin_dir) do
Expand Down

0 comments on commit 2057fd3

Please sign in to comment.