Jarred Sumner
73336bbc00
🔒
2022-01-01 19:30:48 -08:00
Jarred Sumner
e7fa50635f
Bump versions
2022-01-01 19:30:20 -08:00
Jarred Sumner
6a28cfd2ba
[bun dev] Automatically set origin - improve support for proxying Bun
...
Previously, when running Bun behind a reverse proxy, you had to pass an explicit `--origin` arg and it could only run behind one proxy at a time.
Now, Bun automatically determines the origin from the request if possible. It reads `Forwarded`, `X-Forwarded-Proto`, `X-Forwarded-Host`, `Origin`, and lastly `Host`. If none are available, it falls back to the `--origin` CLI arg.
This change is important for usecases like Replit which shows multiple iframes in different origins.
2022-01-01 18:12:57 -08:00
Jarred SUmner
e4693b8aaf
Clear the fd
2022-01-01 03:40:15 -08:00
Jarred SUmner
87e78e2a48
Handle more edgecases
2022-01-01 03:11:36 -08:00
Jarred SUmner
71449c8638
Detect fast refresh from .bun if possible
2022-01-01 02:37:08 -08:00
Jarred SUmner
a17088363f
[bun dev] Improve filesystem watcher & HMR reliability (Linux + a little macOS)
...
Text editors like Replit save through atomic file updates. In an inotify filesystem watcher (Linux), that appears to be a delete followed by moving the file to the directory. Now when known files are moved into a directory, the watcher sends the file change notification to the browser(s). From there, the browser looks at it's files to determine whether or not
Additionally, if an existing HMR connection does not know about a file ID passed to it, it asks the browser to reply with the file path and then starts watching that file. This improves HMR reliabiality if Bun had been restarted but the page hadn't been restarted.
2022-01-01 01:53:50 -08:00
Jarred Sumner
d068d80ab9
Attempt to fix watcher issue with repl.it
2021-12-31 17:52:38 -08:00
Jarred Sumner
eb142a6be5
little test
2021-12-31 15:30:57 -08:00
Jarred Sumner
9fde2b28e1
bump
2021-12-31 15:15:09 -08:00
Jarred Sumner
195723180b
[devserver] Log more errors when a websocket connection fails
2021-12-31 15:08:58 -08:00
Jarred Sumner
2e051cebaa
Update http.zig
2021-12-31 15:08:19 -08:00
Jarred Sumner
795d0b056c
[devserver] Case-insensitive request header comparison, which fixes issues with proxying Bun
2021-12-31 15:08:13 -08:00
Jarred Sumner
d7c69d3b78
Add unrolled case insensitive string comparison
2021-12-31 15:07:14 -08:00
Jarred Sumner
059aa425b7
Fix an edgecase that causes a crash in HTTP server
2021-12-31 15:06:06 -08:00
Jarred Sumner
aaf5c28c5b
[bun install] Slightly more reliable HTTP
2021-12-31 00:14:24 -08:00
Jarred Sumner
150ca5d686
woops
2021-12-30 23:57:06 -08:00
Jarred Sumner
2a7d8df4c5
Fix issue with headers
2021-12-30 23:20:19 -08:00
Jarred Sumner
ac6a2bf2e5
fix occasional HTTP bug
2021-12-30 23:20:07 -08:00
Jarred Sumner
3c1cb806d4
Update c.zig
2021-12-30 22:32:41 -08:00
Jarred Sumner
e5587c2b31
Update global.zig
2021-12-30 22:31:41 -08:00
Jarred Sumner
8128c79e81
linux
2021-12-30 22:28:22 -08:00
Jarred Sumner
ae5e2f5af2
Update io_linux.zig
2021-12-30 22:09:51 -08:00
Jarred Sumner
a8b7b2a6b9
Update io_linux.zig
2021-12-30 22:08:14 -08:00
Jarred Sumner
111bef7f06
_ => .
2021-12-30 22:06:45 -08:00
Jarred Sumner
6f1c6fbc1a
- => .
2021-12-30 22:05:44 -08:00
Jarred Sumner
ed71379aa1
linux
2021-12-30 22:04:26 -08:00
Jarred Sumner
b1c3fce49b
[internal] Move network_thread into http package
2021-12-30 21:27:27 -08:00
Jarred Sumner
e75c711c68
Upgrade to latest Zig, remove dependency on patched version of Zig ( #96 )
...
* Prepare to upgrade zig
* zig fmt
* AllocGate
* Update data_url.zig
* wip
* few files
* just headers now?
* I think everything works?
* Update mimalloc
* Update hash_map.zig
* Perf improvements to compensate for Allocgate
* Bump
* 📷
* Update bun.lockb
* Less branching
* [js parser] Slightly reduce memory usage
* Update js_parser.zig
* WIP remove unused
* [JS parser] WIP support for `with` keyword
* Remove more dead code
* Fix all the build errors!
* cleanup
* Move `network_thread` up
* Bump peechy
* Update README.md
2021-12-30 21:12:32 -08:00
Jarred Sumner
8d031f13c0
zig fmt
2021-12-29 02:49:25 -08:00
Jarred Sumner
0b640c785f
Update http_client_async.zig
2021-12-29 02:33:39 -08:00
Jarred Sumner
fe17d51b03
FIx bug in http client
2021-12-29 02:32:57 -08:00
Jarred Sumner
565cf23d92
More defensively search for shells to use if one is not found in the path
2021-12-28 04:04:29 -08:00
Jarred Sumner
f4870050e0
Update cli.zig
2021-12-28 03:43:19 -08:00
Jarred Sumner
f31e67b13d
woops
2021-12-28 03:42:44 -08:00
Jarred Sumner
6f4d48cc6c
[bun run] revert change
2021-12-28 03:35:03 -08:00
Jarred Sumner
fb34ebc674
Update create_command.zig
2021-12-28 03:16:29 -08:00
Jarred Sumner
6c867c34d7
Fix edgecase in bun create tasks
2021-12-28 03:15:53 -08:00
Jarred Sumner
70a56028b6
use c-like functions
2021-12-28 03:04:30 -08:00
Jarred Sumner
6d6b7f93f3
[bun run] Fix breaking bug
2021-12-28 02:59:50 -08:00
Jarred Sumner
0d95cf8f5b
[Bun.js] If you pass a js-like file path to bun with no subcommand, attempt to run it with Bun.js
2021-12-28 02:47:35 -08:00
Jarred Sumner
471f9aec19
[bun run] Fix bug with absolute paths to js-like files
2021-12-28 02:46:50 -08:00
Jarred Sumner
b5beb20e08
dead code
2021-12-28 02:44:32 -08:00
Jarred Sumner
c8b6e2d5cd
[bun install] Fix error message for no compatible binaries
2021-12-28 02:44:26 -08:00
Jarred Sumner
8ccb833421
[Bun.js] Add Bun.argv api, so you can get the arguments that started a script
2021-12-28 01:09:46 -08:00
Jarred Sumner
5a42b59e91
Update add_completions.zig
2021-12-27 22:29:36 -08:00
Jarred Sumner
266870fee8
add oom workaround
2021-12-27 22:19:47 -08:00
Jarred Sumner
336a4b6ac2
Prepare to run unit tests & remove some dead code ( #92 )
...
* Remove some dead code
* 💀 code
* Fix the zig tests
* [JS Printer] Print integers faster & less scientific notation on decimals
* 💀 dead code
* skip
* Run all the unit tests
2021-12-27 18:06:31 -08:00
Jarred Sumner
c9c7521f4f
Fix edgecase in bun run where it would choose a directory instead of a file
2021-12-27 04:27:15 -08:00
Jarred Sumner
b455bc467d
Fixes #90
2021-12-26 17:04:26 -08:00