bundlebun 0.5.0.1.4.0-aarch64-linux-gnu → 0.5.1.1.4.1-aarch64-linux-gnu
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/bundlebun/platform.rb +2 -2
- data/lib/bundlebun/runner.rb +23 -4
- data/lib/bundlebun/vendor/bun/bun +0 -0
- data/lib/bundlebun/version.rb +1 -1
- data/lib/bundlebun.rb +10 -15
- data/sig/bundlebun/runner.rbs +3 -0
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 217ea0838abefdf6e5a056228d838ef34c69d85051bab64674e6aef042339fd7
|
|
4
|
+
data.tar.gz: 997e6a6cdd7f21a28467751f2c38c0923e4d06736c0c2e4fdf48460d6897f055
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e45cd29e1974070bf6b33b95e0999d8dd2c6ff23dbf6691f67dc041b7d5667aade048df16e51389621dbc50951028f17621c2d38cf0419d7d9fff761b046be4
|
|
7
|
+
data.tar.gz: 692dec335969a8c6d8cc3f8fad20468a55affb1a323d0edd3430dd74625f79658cbfe710b29d7f487d30620a58a52fdcea3712c98e9a108afb5f155c380945e8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.5.1] - 2026-09-02
|
|
2
|
+
|
|
3
|
+
- bundlebun is now Ractor-ready.
|
|
4
|
+
- Zeitwerk is no longer a dependency.
|
|
5
|
+
- Bun binaries are now verified against the SHA256 checksums Bun publishes in `SHASUMS256.txt` while building the platform gems. A missing or mismatched checksum aborts the build, so a tampered or corrupted binary is never packaged into a released gem.
|
|
6
|
+
|
|
1
7
|
## [0.5.0] - 2026-04-30
|
|
2
8
|
|
|
3
9
|
- Now including Bun builds for `linux-musl` Linux variants [#16].
|
data/lib/bundlebun/platform.rb
CHANGED
|
@@ -11,8 +11,8 @@ module Bundlebun
|
|
|
11
11
|
def windows?
|
|
12
12
|
return @windows if defined?(@windows)
|
|
13
13
|
|
|
14
|
-
@windows = defined?(RbConfig) && defined?(RbConfig::CONFIG) &&
|
|
15
|
-
RbConfig::CONFIG['host_os'].match?(/mswin|mingw|cygwin/)
|
|
14
|
+
@windows = (defined?(RbConfig) && defined?(RbConfig::CONFIG) &&
|
|
15
|
+
RbConfig::CONFIG['host_os'].match?(/mswin|mingw|cygwin/)).freeze
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
end
|
data/lib/bundlebun/runner.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'shellwords'
|
|
4
|
+
require_relative 'platform'
|
|
4
5
|
|
|
5
6
|
module Bundlebun
|
|
6
7
|
# {Runner} is the class that bundlebun uses to run the bundled Bun executable.
|
|
@@ -101,7 +102,7 @@ module Bundlebun
|
|
|
101
102
|
def binstub_path
|
|
102
103
|
return @binstub_path if defined?(@binstub_path)
|
|
103
104
|
|
|
104
|
-
@binstub_path = Bundlebun::Platform.windows? ? "#{BINSTUB_PATH}.cmd" : BINSTUB_PATH
|
|
105
|
+
@binstub_path = (Bundlebun::Platform.windows? ? "#{BINSTUB_PATH}.cmd" : BINSTUB_PATH).freeze
|
|
105
106
|
end
|
|
106
107
|
|
|
107
108
|
# A full path to binstub that bundlebun usually generates with installation Rake tasks.
|
|
@@ -112,7 +113,7 @@ module Bundlebun
|
|
|
112
113
|
def full_binstub_path
|
|
113
114
|
return @full_binstub_path if defined?(@full_binstub_path)
|
|
114
115
|
|
|
115
|
-
@full_binstub_path = File.expand_path(binstub_path)
|
|
116
|
+
@full_binstub_path = File.expand_path(binstub_path).freeze
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
# A relative directory path to the bundled Bun executable from the root of the gem.
|
|
@@ -128,7 +129,7 @@ module Bundlebun
|
|
|
128
129
|
def full_directory
|
|
129
130
|
return @full_directory if defined?(@full_directory)
|
|
130
131
|
|
|
131
|
-
@full_directory = File.expand_path("../../#{relative_directory}", __dir__)
|
|
132
|
+
@full_directory = File.expand_path("../../#{relative_directory}", __dir__).freeze
|
|
132
133
|
end
|
|
133
134
|
|
|
134
135
|
# A full path to the bundled Bun binary we run
|
|
@@ -139,7 +140,7 @@ module Bundlebun
|
|
|
139
140
|
return @binary_path if defined?(@binary_path)
|
|
140
141
|
|
|
141
142
|
executable = "bun#{".exe" if Bundlebun::Platform.windows?}"
|
|
142
|
-
@binary_path = File.join(full_directory, executable)
|
|
143
|
+
@binary_path = File.join(full_directory, executable).freeze
|
|
143
144
|
end
|
|
144
145
|
|
|
145
146
|
# Does the bundled Bun binary exist?
|
|
@@ -159,6 +160,22 @@ module Bundlebun
|
|
|
159
160
|
binstub_exist? ? full_binstub_path : binary_path
|
|
160
161
|
end
|
|
161
162
|
|
|
163
|
+
# Makes the class-level state shareable between Ractors: computes and
|
|
164
|
+
# memoizes every path, and the platform check they depend on, as frozen
|
|
165
|
+
# values on the main Ractor.
|
|
166
|
+
#
|
|
167
|
+
# A non-main Ractor can read a frozen class-level memo, but it can never
|
|
168
|
+
# write one. So all of them have to be warm before any Ractor is spawned.
|
|
169
|
+
# This runs once, when the file is loaded, so you should not need to call it.
|
|
170
|
+
#
|
|
171
|
+
# @return [void]
|
|
172
|
+
def make_shareable
|
|
173
|
+
Bundlebun::Platform.windows?
|
|
174
|
+
binary_path
|
|
175
|
+
full_binstub_path
|
|
176
|
+
nil
|
|
177
|
+
end
|
|
178
|
+
|
|
162
179
|
# Does the binstub exist?
|
|
163
180
|
#
|
|
164
181
|
# @return [Boolean]
|
|
@@ -276,3 +293,5 @@ module Bundlebun
|
|
|
276
293
|
end
|
|
277
294
|
end
|
|
278
295
|
end
|
|
296
|
+
|
|
297
|
+
Bundlebun::Runner.make_shareable
|
|
Binary file
|
data/lib/bundlebun/version.rb
CHANGED
data/lib/bundlebun.rb
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require_relative 'bundlebun/version'
|
|
4
|
+
require_relative 'bundlebun/platform'
|
|
5
|
+
require_relative 'bundlebun/env_path'
|
|
6
|
+
require_relative 'bundlebun/runner'
|
|
7
|
+
require_relative 'bundlebun/integrations'
|
|
8
|
+
require_relative 'bundlebun/integrations/cssbundling'
|
|
9
|
+
require_relative 'bundlebun/integrations/execjs'
|
|
10
|
+
require_relative 'bundlebun/integrations/jsbundling'
|
|
11
|
+
require_relative 'bundlebun/integrations/vite_ruby'
|
|
4
12
|
|
|
5
13
|
# bundlebun bundles [Bun](https://bun.sh), a fast JavaScript runtime, package manager
|
|
6
14
|
# and builder, with your Ruby and Rails applications.
|
|
@@ -87,18 +95,6 @@ module Bundlebun
|
|
|
87
95
|
Runner.system(...)
|
|
88
96
|
end
|
|
89
97
|
|
|
90
|
-
def loader # @private
|
|
91
|
-
@loader ||= Zeitwerk::Loader.for_gem.tap do |loader|
|
|
92
|
-
loader.ignore("#{__dir__}/tasks")
|
|
93
|
-
loader.ignore("#{__dir__}/bundlebun/vendor")
|
|
94
|
-
loader.ignore("#{__dir__}/templates")
|
|
95
|
-
|
|
96
|
-
loader.inflector.inflect('execjs' => 'ExecJS')
|
|
97
|
-
|
|
98
|
-
loader.setup
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
|
|
102
98
|
# Prepend the path to the bundled Bun executable to `PATH`.
|
|
103
99
|
#
|
|
104
100
|
# @see Bundlebun::Runner.full_directory
|
|
@@ -108,7 +104,7 @@ module Bundlebun
|
|
|
108
104
|
|
|
109
105
|
# Load included Rake tasks (like `bun:install`).
|
|
110
106
|
def load_tasks
|
|
111
|
-
Dir[File.expand_path('tasks/*.rake', __dir__)].each { |task|
|
|
107
|
+
Dir[File.expand_path('tasks/*.rake', __dir__)].each { |task| Rake.load_rakefile(task) }
|
|
112
108
|
end
|
|
113
109
|
|
|
114
110
|
# Detect and load all integrations (monkey-patches).
|
|
@@ -124,7 +120,6 @@ module Bundlebun
|
|
|
124
120
|
end
|
|
125
121
|
end
|
|
126
122
|
|
|
127
|
-
Bundlebun.loader
|
|
128
123
|
Bundlebun.prepend_to_path
|
|
129
124
|
Bundlebun.load_tasks if defined?(Rake)
|
|
130
125
|
Bundlebun.load_integrations
|
data/sig/bundlebun/runner.rbs
CHANGED
|
@@ -21,6 +21,9 @@ module Bundlebun
|
|
|
21
21
|
def self.binstub_or_binary_path: () -> String
|
|
22
22
|
def self.binstub_exist?: () -> bool
|
|
23
23
|
|
|
24
|
+
# Memoizes every path as frozen values on the main Ractor. Runs when the file is loaded.
|
|
25
|
+
def self.make_shareable: () -> void
|
|
26
|
+
|
|
24
27
|
def initialize: (String | Array[String] arguments) -> void
|
|
25
28
|
|
|
26
29
|
# Replaces the current Ruby process with Bun. Never returns.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bundlebun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1.1.4.1
|
|
5
5
|
platform: aarch64-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- Yaroslav Markin
|
|
@@ -9,20 +9,6 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
name: zeitwerk
|
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
|
15
|
-
requirements:
|
|
16
|
-
- - "~>"
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '2.5'
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - "~>"
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '2.5'
|
|
26
12
|
- !ruby/object:Gem::Dependency
|
|
27
13
|
name: json
|
|
28
14
|
requirement: !ruby/object:Gem::Requirement
|