@boperators/plugin-bun 0.2.1 → 0.3.1
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.
- package/README.md +6 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Bun plugin for [boperators](https://www.npmjs.com/package/boperators) that ensures operator overloads work when running TypeScript files directly with Bun, instead of requiring an intermediate transform step.
|
|
6
6
|
|
|
7
|
+
> **Requires Bun ≥ 1.3.0.** Older versions have a known bug where preloaded plugins prevent TypeScript files from being transpiled correctly.
|
|
8
|
+
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
```sh
|
|
@@ -30,6 +32,10 @@ and reference that in your `bunfig.toml`:
|
|
|
30
32
|
preload = ["./preload.ts"]
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
## Source Maps
|
|
36
|
+
|
|
37
|
+
Bun's runtime plugin API (`OnLoadResult`) does not support returning a source map from `onLoad` callbacks. This means breakpoints will land on the **transformed** code (e.g. `Vec2["+"](a, b)`) rather than the original operator expression (e.g. `a + b`). The [webpack loader](../webpack/) and [Vite plugin](../vite/) do not have this limitation.
|
|
38
|
+
|
|
33
39
|
## Comparison with Other Approaches
|
|
34
40
|
|
|
35
41
|
| Approach | When it runs | Use case |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boperators/plugin-bun",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Bun plugin for boperators - transforms operator overloads at runtime.",
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,11 @@
|
|
|
32
32
|
"license.txt",
|
|
33
33
|
"index.ts"
|
|
34
34
|
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"bun": ">=1.3.0"
|
|
37
|
+
},
|
|
35
38
|
"peerDependencies": {
|
|
36
|
-
"boperators": "0.
|
|
39
|
+
"boperators": "0.3.1",
|
|
37
40
|
"typescript": ">=5.0.0 <5.10.0"
|
|
38
41
|
},
|
|
39
42
|
"devDependencies": {
|