bundlebun 0.2.2.1.3.4-x86_64-darwin → 0.2.3.1.3.5-x86_64-darwin

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: 14c2c109f6469a34a71685ad562a7a0b5e8f3aa792fb38791f1b2ddc10b79de6
4
- data.tar.gz: b3121b0fd3f4cf7fb7c1cea258c8c4ea46ab20c238275ebf5aa1f77c2ac1246a
3
+ metadata.gz: a1a4e08be4fd7fd4ebd783deb9eb844925b8b724db52b2c3c0726acf5c3a73c2
4
+ data.tar.gz: d965a57e9077b5ea68f4475098980503fb10ecfdb8eaac9b953addf66afc1f47
5
5
  SHA512:
6
- metadata.gz: 0163d0eb2dfde65c9084532f29084c681da17ad494d6e7fa29925d476400ca33bc564478752995926bb045d7aec660449ef465154e5a2ae67eb5a8ab23f5894a
7
- data.tar.gz: 3686c203c62012ede29d79fe41714402e98eaa8a4892187dd3644632a6a7f892297f52603416dfd842bee71792a07a12a3459fa532351f78d5cdb04a886f0e38
6
+ metadata.gz: 359e9e9edb2318ba27f926603eee67221167a1663099deb00de8904d3e89cafdd6d8bc6be5d55f57b0ec56d59f1d32a8bf92632b27117e92eaf7f4e279707a97
7
+ data.tar.gz: c0fba334568b39c4d23727e9b621bc2fb17e8df55f3a3e3a0fd6be94aab01dc5d0b3cd6595327427c08b34a3253ea704ec510895bff9bfeefc022e38ba943434
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [0.2.3] - 2025-12-17
2
+
3
+ - Update dependencies
4
+ - Minor documentation changes
5
+
1
6
  ## [0.2.2] - 2025-12-07
2
7
 
3
8
  - Bundler 4.0 spec fixes
data/README.md CHANGED
@@ -9,6 +9,21 @@
9
9
  <img src="https://raw.githubusercontent.com/yaroslav/bundlebun/refs/heads/main/assets/mr-bundlebun-512.png" width="256" height="256" alt="Mr. Bundlebun">
10
10
  </div>
11
11
 
12
+ ## Rationale
13
+
14
+ **Modern frontend setup is needlessly complex** and may involve a lot of maintenance. Developers need _at the very least_ a JavaScript runtime (typically, Node.js), a package manager (could be npm, yarn, or pnpm), and a build tool (Vite, Webpack, esbuild, Parcel—dozens of them).
15
+
16
+ - One way forward is to dockerize development environments, creating unnecessary headaches for the development team—both frontend and backend engineers (especially if the team is not that large and the project is not that complex).
17
+ - Another approach is to declare front-ops bankruptcy and pursue the "no-build" route.
18
+
19
+ **What if we could simplify this?** **Bun** is a **JavaScript runtime**, optimized for speed and developer experience. Bun is _also_ a fast JavaScript **package manager**. Bun is _also_ a **build tool**. Bun is also distributed as a single executable file.
20
+
21
+ However, Bun still requires [some installation](https://bun.sh/docs/installation), and we need to make sure everyone on the team is using the same version.
22
+
23
+ So, how about we just pack it into a Ruby gem as a binary and allow developers to stay updated? Then, we'll be ready every time a new Bun version is out—or the user can freeze their desired version within their Ruby project. There are no setups, large READMEs with instructions, and no enforcing the Docker workflow.
24
+
25
+ **Enter bundlebun**. With a fast JavaScript runtime and a package manager included, you can even skip the build tool and use Bun itself.
26
+
12
27
  ## Quickstart
13
28
 
14
29
  Starting with your Ruby or Rails project, no Bun or anything like that required:
@@ -28,21 +43,6 @@ Usage: bun <command> [...flags] [...args]
28
43
  ...
29
44
  ```
30
45
 
31
- ## Rationale
32
-
33
- **Modern frontend setup is needlessly complex** and may involve a lot of maintenance. Developers need _at the very least_ a JavaScript runtime (typically, Node.js), a package manager (could be npm, yarn, or pnpm), and a build tool (Vite, Webpack, esbuild, Parcel—dozens of them).
34
-
35
- - One way forward is to dockerize development environments, creating unnecessary headaches for the development team—both frontend and backend engineers (especially if the team is not that large and the project is not that complex).
36
- - Another approach is to declare front-ops bankruptcy and pursue the "no-build" route.
37
-
38
- **What if we could simplify this?** **Bun** is a **JavaScript runtime**, optimized for speed and developer experience. Bun is _also_ a fast JavaScript **package manager**. Bun is _also_ a **build tool**. Bun is also distributed as a single executable file.
39
-
40
- However, Bun still requires [some installation](https://bun.sh/docs/installation), and we need to make sure everyone on the team is using the same version.
41
-
42
- So, how about we just pack it into a Ruby gem as a binary and allow developers to stay updated? Then, we'll be ready every time a new Bun version is out—or the user can freeze their desired version within their Ruby project. There are no setups, large READMEs with instructions, and no enforcing the Docker workflow.
43
-
44
- **Enter bundlebun**. With a fast JavaScript runtime and a package manager included, you can even skip the build tool and use Bun itself.
45
-
46
46
  ## Install
47
47
 
48
48
  bundlebun gem releases include a binary distribution of Bun for each supported Bun platform (macOS, Linux, Windows) and architecture. bundlebun is tested for Unix-like environments and Windows.
@@ -52,6 +52,10 @@ First, add it to your `Gemfile`. Make sure to add it _after_ your existing front
52
52
  ```ruby
53
53
  # ...
54
54
 
55
+ # Frontend-related gems go here
56
+ # For example, Vite integration
57
+ # gem "vite_rails"
58
+
55
59
  gem "bundlebun"
56
60
  ```
57
61
 
@@ -68,21 +72,7 @@ bundle add bundlebun
68
72
  ```
69
73
 
70
74
  If you're seeing a message like `Could not find gems matching 'bundlebun' valid for all resolution platforms
71
- (aarch64-linux, aarch64-linux-gnu <...> )`, this may be [a known issue with Bundler/`Gemfile.lock`](https://www.google.com/search?client=firefox-b-d&q=Could+not+find+gems+matching+all+resolution+platforms) which you can fix. Open `Gemfile.lock` in your text editor, find a section called `PLATFORMS`, and alter a list of platforms you need to support. This can be a good default for most if you're targeting Linux and macOS (for Windows, also leave entries with `x64_mingw`):
72
-
73
- ```
74
- (rest of the file here)
75
-
76
- PLATFORMS
77
- aarch64-linux
78
- arm64-darwin
79
- x86_64-darwin
80
- x86_64-linux
81
-
82
- (rest of the file here)
83
- ```
84
-
85
- ... and try `bundle install` again.
75
+ (aarch64-linux, aarch64-linux-gnu <...> )`, [check this article](https://github.com/yaroslav/bundlebun/wiki/Could-not-find-gems-matching-'bundlebun'-valid-for-all-resolution-platforms).
86
76
 
87
77
  Next, run:
88
78
 
@@ -107,7 +97,25 @@ Next, the Rake task will try to detect the integrations we need to install based
107
97
 
108
98
  Usually, if you've placed `gem 'bundlebun'` after your frontend-related gems in the `Gemfile`, and did `rake bun:install`, the integrations should all be working out of the box.
109
99
 
110
- Alternatively, you can ensure an integration is loaded and the necessary modules are patched by calling methods that look like `Bundlebun::Integration::IntegrationName.bun!`: more on that below.
100
+ Alternatively, you can ensure an integration is loaded and the necessary modules are patched by calling methods that look like `Bundlebun::Integration::IntegrationName.bun!`. See the API documentation for that.
101
+
102
+ #### vite-ruby and vite-rails
103
+
104
+ [vite-ruby](https://github.com/ElMassimo/vite_ruby) and [vite-rails](https://vite-ruby.netlify.app/) are gems that make Ruby and Rails integration with [Vite](https://vite.dev/), a great JavaScript build tool and platform, seamless and easy.
105
+
106
+ The bundlebun integration would be installed automatically with `rake bun:install`, or you can run:
107
+
108
+ ```sh
109
+ rake bun:install:vite
110
+ ```
111
+
112
+ That will make sure you have a `bin/bun` binstub. Next, we'll install a custom `bin/bun-vite` binstub to use in build scripts. The installer Rake task will create a new `vite.json` file if it does not exist yet, or force the existing one to use that binstub for building. See the [Vite Ruby configuration manual](https://vite-ruby.netlify.app/config/index.html) for details on `vite.json`.
113
+
114
+ Make sure you have `gem bundlebun` mentioned _after_ all the vite-related gems in your `Gemfile`. If you want to keep integrations to a minimum, and only enable them manually, use the following to manually turn on the bundlebun monkey-patching for vite-ruby:
115
+
116
+ ```ruby
117
+ Bundlebun::Integrations::ViteRuby.bun!
118
+ ```
111
119
 
112
120
  #### Ruby on Rails: cssbundling and jsbundling
113
121
 
@@ -138,24 +146,6 @@ rake bun:install:bundling-rails
138
146
 
139
147
  The task makes sure a `bin/bun` binstub exists and installs an Rake task hack of sorts to ensure both build-related gems use our bundled version of Bun.
140
148
 
141
- #### vite-ruby and vite-rails
142
-
143
- [vite-ruby](https://github.com/ElMassimo/vite_ruby) and [vite-rails](https://vite-ruby.netlify.app/) are gems that make Ruby and Rails integration with [Vite](https://vite.dev/), a great JavaScript build tool and platform, seamless and easy.
144
-
145
- The bundlebun integration would be installed automatically with `rake bun:install`, or you can run:
146
-
147
- ```sh
148
- rake bun:install:vite
149
- ```
150
-
151
- That will make sure you have a `bin/bun` binstub. Next, we'll install a custom `bin/bun-vite` binstub to use in build scripts. The installer Rake task will create a new `vite.json` file if it does not exist yet, or force the existing one to use that binstub for building. See the [Vite Ruby configuration manual](https://vite-ruby.netlify.app/config/index.html) for details on `vite.json`.
152
-
153
- Make sure you have `gem bundlebun` mentioned _after_ all the vite-related gems in your `Gemfile`. If you want to keep integrations to a minimum, and only enable them manually, use the following to manually turn on the bundlebun monkey-patching for vite-ruby:
154
-
155
- ```ruby
156
- Bundlebun::Integrations::ViteRuby.bun!
157
- ```
158
-
159
149
  #### ExecJS
160
150
 
161
151
  [ExecJS](https://github.com/rails/execjs) runs JavaScript code straight from Ruby. To do so, it supports a bunch of runtimes it can launch—and get a result. The Bun runtime support already exists for ExecJS; we just need to ensure it uses the bundled one.
@@ -168,14 +158,6 @@ Alternatively, you can load the monkey-patch manually:
168
158
  Bundlebun::Integrations::ExecJS.bun!
169
159
  ```
170
160
 
171
- ### Notes on `gem install`
172
-
173
- bundlebun is designed to be used with Bundler: installed in specific projects, and launched via `bin/bun` or integrations.
174
-
175
- If you install the gem globally, you _won't see the `bun` executable_ as a wrapper for a Ruby-bundled Bun runtime; instead, it would be called `bundlebun`.
176
-
177
- This naming discrepency is to avoid possible conflicts in your `$PATH` if you have an independent Bun runtime installed: if the directory with Ruby gem-generated binstubs is in your `$PATH` before the directory with your Bun runtime, running `bun` will launch the bundlebun's version, causing a lot of confusion. And that is why bundlebun is _not_ greedy with the `bun` executable name. If you wish to run Bun runtime globally using this gem, a simple symlink or a wrapper script will do, but the gem won't act destructively.
178
-
179
161
  ## Usage
180
162
 
181
163
  ### Binstub
@@ -191,10 +173,6 @@ Usage: bun <command> [...flags] [...args]
191
173
  ...
192
174
  ```
193
175
 
194
- ### Return codes
195
-
196
- Note that with this (or any other option to run Bun), bundlebun will return the error code `127` if the executable is not found.
197
-
198
176
  ### `PATH`
199
177
 
200
178
  The bundlebun gem adds the directory with a binary Bun distribution to your `PATH`: prepends it there, to be exact. That helps existing tools that can detect the presence of `bun` executable to find it and work with no further setup or monkey-patching.
@@ -224,12 +202,7 @@ Bundlebun.call("outdated") # => `bun outdated`
224
202
  Bundlebun.call(["add", "postcss"]) # => `bun add postcss`
225
203
  ```
226
204
 
227
- Check out the [API documentation](https://rubydoc.info/gems/bundlebun) on `Bundlebun::Runner` for helper methods. Some of the most useful ones:
228
-
229
- - `Bundlebun::Runner.binary_path`: returns the full path to the bundled Bun library.
230
- - `Bundlebun::Runner.binary_path_exist?`: checks if that binary even exists.
231
- - `Bundlebun::Runner.binstub_exist?`: checks if the binstub exists.
232
- - `Bundlebun::Runner.binstub_or_binary_path`: returns the optimal way to run bundled Bun: a full path to binstub or a full path to the binary.
205
+ Check out the [API documentation](https://rubydoc.info/gems/bundlebun) on `Bundlebun::Runner` for helper methods.
233
206
 
234
207
  ## Versioning
235
208
 
Binary file
@@ -8,5 +8,5 @@ module Bundlebun
8
8
  # a Bun runtime with version `1.1.38`.
9
9
  #
10
10
  # This constant always points to the "own" version of the gem.
11
- VERSION = '0.2.2'
11
+ VERSION = '0.2.3'
12
12
  end
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.2.2.1.3.4
4
+ version: 0.2.3.1.3.5
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Yaroslav Markin