WingLim
ddb1189b2d
fix(cli): bun pm cache rm command not work ( #4571 )
...
* fix(cli): rm arg is in positionals[1]
* chore(cli): add cache remove test
* chore: remvoe unnecessary join
* chore: run formatter
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-09-19 16:54:54 -07:00
Julian
1b949d4f5a
bun run fix missing script error on empty file (#5025 )
...
* Fix empty file not found bug
* Add tests
* fix test
---------
Co-authored-by: Jeremy Funk <jeremy@kombo.dev >
Co-authored-by: dave caruso <me@paperdave.net >
2023-09-18 20:14:32 -07:00
Cilooth
c6899940ab
Added .DS_Store to gitignore-for-init ( #5628 )
2023-09-17 17:34:35 -07:00
Jarred Sumner
56c471a005
Make bun run --silent omit "error: "..." exited with code 1 ( #5459 )
...
* Make --silent behave as expected
* Make the "tsconfig.json extends" error a debug level
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-15 04:21:43 -07:00
Jarred Sumner
92e95c86dd
Always get latest version when @tag is explicitly passed ( #5346 )
2023-09-14 00:48:18 -07:00
Jarred Sumner
9c9f4ed6ad
Make --watch instant ( #5236 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-13 17:31:59 -07:00
Colin McDonnell
473513db7e
Update tsconfig.json for bun init
2023-09-12 23:53:28 -07:00
Jarred Sumner
6e4f746ace
Fix some bugs blocking Turborepo from using bun run ( #5071 )
...
* Clean up some error handling when loading `tsconfig.json`
* [bun run] don't parse tsconfig.json for package.json scripts
* Make this error message better
* Bump
* Don't print build errors twice
* Handle quotes in error messages a little better
* Add a couple tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-12 03:35:29 -07:00
Ciro Spaciari
8615b8ad6b
add NODE_TLS_REJECT_UNAUTHORIZED ( #4829 )
2023-09-11 21:52:31 -07:00
Dylan Conway
ca461f9e83
fix loading env from .env.production and friends ( #4630 )
...
* reload conditional vars
* test
* change `get` and `put` methods
* dont clone empty env variables
2023-09-11 17:19:21 -07:00
Krystian Pracuk
2956ed4289
added .idea to .gitignore ( #4951 )
2023-09-11 08:48:26 -07:00
dave caruso
4b63ced72d
fix(cli): final touches for 1.0 ( #4538 )
...
* better
* cli
* remove submodule
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-09-07 09:04:21 -07:00
dave caruso
57a06745a4
Progress for Next.js ( #4468 )
...
* L
* ipc
* asdfghjkl
* dfghjk
* it works!
* types
* patches for next.js
* sdfghj
* wsdfgn,./
* this
* yolo
* okay loser
* asdfghjk
* add some more APIs
* MESS
* sdfghjkl
* remove native events from streams
* stuff
* remove lazy(primordials) test
* debugging
* okay
* less fake extensions object
* fix `Buffer.toString()` args logic
* fix deserialize
* make tests work
* add test for `Buffer.toString` args
* Update server.zig
* remove test
* update test
* Update spawn-streaming-stdin.test.ts
* fix linux build
* Update fs.test.ts
* cli message improvements
* dfshaj
* Fix fs.watch bug maybe?
* remove
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-09-07 04:58:44 -07:00
Dylan Conway
f73f77d0de
no need to chmod ( #4490 )
2023-09-04 17:16:37 -08:00
Jarred Sumner
c028b206bc
Fix assertion failure in spawn-related tests ( #4400 )
...
* Clean up some of the event loop code
* Support timeouts
* Defer freeing FilePoll
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-29 21:17:56 -07:00
Jarred Sumner
5d84ef7780
Rename uws_event_loop to event_loop_handle
2023-08-29 15:31:06 -07:00
Dylan Conway
07d8623976
fix #4356 ( #4386 )
2023-08-29 01:49:12 -07:00
Jarred Sumner
e2a17344dc
just kernel32 things ( #4354 )
...
* just kernel32 things
* more
* Update linux_c.zig
* Update windows_c.zig
* Add workaround
Workaround https://github.com/ziglang/zig/issues/16980
* Rename http.zig to bun_dev_http_server.zig
* Rename usages
* more
* more
* more
* thanks tigerbeetle
* Rename `JSC.Node.Syscall` -> `bun.sys`
* more
* woops
* more!
* hmm
* it says there are only 37 errors, but that's not true
* populate argv
* it says 32 errors!
* 24 errors
* fix regular build
* 12 left!
* Still 12 left!
* more
* 2 errors left...
* 1 more error
* Add link to Tigerbeetle
* Fix the remainign error
* Fix test timeout
* Update syscall.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-28 04:39:16 -07:00
Colin McDonnell
b70210a005
Use noEmit
2023-08-24 19:51:14 -07:00
Code Hz
b9c2309c8a
Remove conflict option in tsconfig-for-init.json ( #4284 )
...
fix https://github.com/oven-sh/bun/issues/4283
2023-08-24 19:41:23 -07:00
Jarred Sumner
c60385716b
Bunch of streams fixes ( #4251 )
...
* Update WebKit
* Don't do async hooks things when async hooks are not enabled
* Smarter scheduling of event loop tasks with the http server
* less exciting approach
* Bump WebKit
* Another approach
* Fix body-stream tests
* Fixes #1886
* Fix UAF in fetch body streaming
* Missing from commit
* Fix leak
* Fix the other leak
* Fix test
* Fix crash
* missing duperef
* Make this code clearer
* Ignore empty chunks
* Fixes #3969
* Delete flaky test
* Update bun-linux-build.yml
* Fix memory issue
* fix result body, and .done status before the last callback, dont touch headers after sent once
* refactor HTTPClientResult
* less flasky corrupted test
* oops
* fix mutex invalid state
* fix onProgressUpdate deinit/unlock
* fix onProgressUpdate deinit/unlock
* oops
* remove verbose
* fix posible null use
* avoid http null
* metadata can still be used onReject after toResponse
* dont leak task.http
* fix flask tests
* less flask close tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: cirospaciari <ciro.spaciari@gmail.com >
2023-08-23 14:05:05 -07:00
xxxhussein
b01764b31e
Fix more types. ( #4273 )
2023-08-23 10:35:51 -07:00
Ciro Spaciari
9027484ae1
fetch(stream) add stream support for compressed and uncompressed data ( #4127 )
...
* streams non compressed data in 64kb chunks (at least)
* fmt
* wip remove pause
* fix default streaming and buffering
* fix atomic lags
* fix size
* make chunked encoding work again (WIP streaming chunked)
* WIP: chunked encoding streaming
* fix end of streamings
* working streaming + compression
* add fixes + tests
* fmt + fix proxy
* fix oopsies
* codegen after merge
* fmt + fixes
* more fixes
* more fixes and logs
* avoid double free
* check empty before pop
* check empty on pop
* fix copy to real when complete
* remove unnecessary logs
* better has_schedule_callback swap, body locked size helper, remove isEmpty from unbounded_queue pop
* fix response ref, fix body_size
* add deflate support, fix error throw, add more tests
* codegen after merge
* remove logs, add connection close test
* fix macOS build
* fix redirect error option
* make body_size more clear
* support new Reponse(response)
* toString DOMWrapper objects properly instead of supporting response in Response constructor
* ignore headers with no name, add more tests
* oops
* handle transform with fetch
* add gz image stream test
* remove duplicate test
* fix missing chunk on macOS under pressure
* oops include all OS
* some fixes
* compare buffers instead of sizes
* refactor err.err and protect it
2023-08-21 20:30:34 -07:00
Jarred Sumner
3de9ce5f30
Implement --inspect-brk ( #4222 )
...
* Implement `--inspect-brk`
* Bump WebKit
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-20 19:34:33 -07:00
Jarred Sumner
0486cea35a
bun --inspect (#4158 )
...
* Let the debugger to pause/resume the event loop
* Add initial support for Debug Adapter Protocol
* Add progress
* Update Worker.cpp
* Fix require("console") #3820 (#4073 )
* Fix #3820
* Add Module (#4074 )
* Set exports to {} in user-constructed CommonJSModuleRecords (#4076 )
* feat(bun/test): Implement "toSatisfy" & "toIncludeRepeated" (fwup) (#3651 )
* Fix merge issues
* oop
* make codegen
* Fix build issues
---------
Co-authored-by: dave caruso <me@paperdave.net >
* worker tests (#4058 )
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* feat(bun:test) add support for test.each() and describe.each() (#4047 )
* rename callback to func
* update testscope to handle function arguments
* works
* big cleanup
* works in debug, not release
* fix memory issue & update tests
* catch & str test
* write types for each() & switch tests to ts
* rm & typo
* move some code around & support describe
* review changes
* Fix one of the astro segfaults, also fix bun init version (#4079 )
* 4->16
* add assertions
* fix version stuff
* Remove unintentional logs from #4043
* Run prettier
* Update main-worker-file.js
* Update SIMDUTF (#4078 )
* Fix constructing buffer from a UTF16 string with the Latin1 encoding. (#4086 )
Close : #3914
* Add support for `bun --revision` (#4027 )
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
* Updates
* Update __global.zig
* remove non-node node-fallbacks (#4082 )
* remove non-node node-fallbacks.
* organize the imports
* Fix test
* Sync bun-polyfills branch (#4081 )
* bun-polyfills: initial impl. & baseline refactor
* move @types/ws dep from root to /test/
* bun-types: remove ReadableStream.forEach method
(this does not exist, probably added by mistake)
* bun-polyfills: remove extraneous stream utils
* bun-polyfills: add types syncing file
* bun-polyfills: re-arrange global polyfills
* bun-polyfills: fix FileBlob streams types again
* bun-polyfills: sync all of @types/node
* bun-polyfills: typeguard all current polyfills
* bun-polyfills: fix import paths
* bun-polyfills: switch to wasm impl. of farmhash
* bun-polyfills: support default import of bun obj
* bun-polyfills: transpiler placeholder file
* bun-polyfills: loaderless import.meta polyfill
* bun-polyfills: refactor import.meta polyfill
* bun-polyfills: repl entrypoint & todo list index
* bun-types: Add null to return type of Bun.which
* bun-types: match Bun.sha with Bun.hash.SHA512_256
* bun-polyfills: new "repl" package.json script
* bun-polyfills: full refactor of toplevel hashes
* bun-polyfills: these are fixed
* bun-types: NODE_ENV is optional
* bun-polyfills: fix Bun.env types
* bun-types+polyfills: fix HeapSnapshot.version type
* bun-polyfills: fix some web streams type conflicts
* bun-polyfills: update internal FileBlob.slice
* bun-polyfills: fix subproc stdin conversions
* bun-polyfills: better internal fileblob types
* bun-polyfills: try to sync global performance type
* bun-polyfills: working zig wasm polyfills setup
* bun-polyfills: update scripts
* bun-polyfills: fix wasm file location resolution
* bun-polyfills: goodbye farmhash (replaced by zig)
* bun-polyfills: move all Bun.hash polyfills to zig
* bun-polyfills: reimpl. seeding of seeded hashes
* bun-polyfills: impl. undocumented murmur32v2
* bun-polyfills: switch zighash from jsdoc to .d.ts
* bun-types: partial fix of Hash types
* bun-polyfills: documented Hash.murmur32v2
* bun-polyfills: misc updates
* bun-polyfills: enable sourcemaps
* bun-polyfills: handle empty inputs to hash funcs
* bun-types: narrow down hash func types
* bun-polyfills: remove unnecessary bigint casts
* bun-polyfills: impl. Bun.isMainThread
* bun-polyfills: impl. Bun.sleep and fix sleepSync
* bun-polyfills: impl. indexOfLine
* bun-polyfills: impl. Bun.peek.status
* bun-types: fix hashing test
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* Add remix guide
* Fix title
* add util.formatWithOptions (#4090 )
* Add formatWithOptions
* tests and tweaks
* adjust
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* bun test: format description of test.each (#4092 )
* bun test: format description
* add tests for tests
* only
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* Fixes #4062 (#4106 )
* Fixes #4062
* Update encoding.zig
* Use faster C++ impl
* Update wtf-bindings.cpp
* undo
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* zig fmt
* Update remix guide
* fs.zig: create temp files with 0o700, not 0o007 (#4107 )
* Handle thundering herd of setInterval (#4109 )
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* Fix memory leak in base64url (#4111 )
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* run files without extensions (#4113 )
* run script without extension
* process stdio write fix
* don't check for trailing slash, var stream
* More lazily initialize these static strings
* Remove assertion
* wip
* Add --inspect flag
* Deprecate loading `node_modules.bun`
* realpath
* regenerate schema
* More
* more
* Update cli.zig
* Debugger JS loads
* have fun
* Most of the code
* Its starting to work.
* more progress
* win some, lose some
* Update dap.ts
* Async Context Tracking
* untested websocket
* Emit Console messages
* Error handling
* errors
* Make profiling work better
* [clap] CLI arguments with optional values ignore positional params
In `bun --inspect foo.js`, `foo.js` should not be the value of `--inspect`. It is a positional parameter. `--inspect=foo`
* Support multiple simultaneous clients, automatically unpause on disconnect
* regenerate
* Update Makefile
* Update WebKit
* Update cli.zig
* Update InternalModuleRegistry+createInternalModuleById.h
* BaseURL
* Update WebKit
* Add web-inspector-bun
* Update build.ts
* formatting, mostly
* Update debugger.ts
* Update InternalModuleRegistryConstants.h
* wrap
* Update test
* Update test
---------
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Tiramify (A.K. Daniel) <94789999+TiranexDev@users.noreply.github.com >
Co-authored-by: Jacques <25390037+jecquas@users.noreply.github.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Ai Hoshino <ambiguous404@gmail.com >
Co-authored-by: Yash Sharma <yashosharma@gmail.com >
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
Co-authored-by: jhmaster <32803471+jhmaster2000@users.noreply.github.com >
Co-authored-by: Adhityaa Chandrasekar <github@adtac.in >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2023-08-16 19:40:20 -07:00
Jarred Sumner
ca26780b27
Deprecate loading node_modules.bun ( #4131 )
...
* Deprecate loading `node_modules.bun`
* realpath
* regenerate schema
* More
* more
* Update cli.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-11 22:13:46 -07:00
Dylan Conway
a6ec7fe9b1
don't check for trailing slash, var stream
2023-08-10 19:06:51 -07:00
Dylan Conway
513a6d0df3
run files without extensions ( #4113 )
...
* run script without extension
* process stdio write fix
2023-08-10 19:00:06 -07:00
Alex Lam S.L
a32097aa9f
implement bun update ( #4046 )
...
- analogous to `npm update`
- `bun update <name>` to refresh specified package under `package.json`
- `bun update` to refresh all package to latest versions
2023-08-07 20:11:32 -07:00
Jarred Sumner
04925bb94c
Fixes #4020
2023-08-06 17:57:44 -07:00
Yash Sharma
3185ca2d95
Running missing scripts exits with non-0 ( #4026 )
...
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
2023-08-06 17:43:24 -07:00
Jarred Sumner
1462445419
Code coverage for bun test ( #3975 )
...
* WIP code coverage initial commit
* almost works
* one approach
* Code Coverage
* Update WebKit
* it works but is not yet accurate
* skip double ascii check
* wrapper
* it works but i'm not sure what to do about blocks
* hide blocks for now
* Update ZigSourceProvider.cpp
* Create coverage.md
* Update nav.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 06:30:23 -07:00
dave caruso
cd0774cd89
Implement --test-name-pattern ( #3998 )
...
* Fix end not being emitted all the time
* stuff
* Implement -t
* Undo js_printer changes
* Undo http changes
* Update InternalModuleRegistryConstants.h
* Delete unrelated test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 06:13:39 -07:00
Ai Hoshino
cf8650937a
Fix(cli/init): support subpath entrypoint. ( #4002 )
2023-08-05 04:48:22 -07:00
Alex Lam S.L
ff315a3bf2
[install] store resolved workspace path in lockfile ( #3974 )
...
- resolve cwd consistently
- speed up package diff
- update `test/bun.lockb`
fixes #3685
fixes #3958
2023-08-04 23:28:42 +03:00
Jarred Sumner
54a2d89bd2
Support bun . to run the entry point ( #3891 )
...
* Support `bun .`
* Fix tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-30 07:54:17 -07:00
Jarred Sumner
c6a3467625
Unified event loop ( #3741 )
...
* Unified event loop
* Update WebKit, add test for es-module-lexer
* Update README.md
* Use async wasm
* Explicitly set whether concurrenttask should be deinit'd
* Update package.json
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-22 04:31:58 -07:00
dave caruso
9b6dc49575
Implement AsyncLocalStorage ( #3089 )
...
* work to get async local storage working.
* a
* a
* everything but queueMicrotask
* sdfghj
* .
* finish
* tests
* test
* ok
* done
* im so stupid
* Upgrade WebKit
* refactor
* refactor
* changes requested
* oops
* cool
* fix runInAsyncScope
2023-07-19 17:20:00 -07:00
Dylan Conway
661355546a
zig upgrade ( #3667 )
...
* upgrade
* more fixes
* Bump Zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-18 01:20:20 -07:00
Jarred Sumner
dc766eb18a
Add --smol flag
2023-07-16 21:17:47 -07:00
Tiramify (A.K. Daniel)
044b09afc2
Impl. fix ( #3630 )
2023-07-13 14:29:24 -07:00
Tiramify (A.K. Daniel)
0631f87866
feat(bun/test): Implement "bail" option for "bun test" ( #3253 )
...
* Implement bun test --bail
* Fixes
* move printSummary() (more readable)
* Fixes 2
* idk why it got deleted
* Fixes 3
* fmt this better
* Update test_command.zig
* Fix "0 files"
* track number of files so bailing out early prints the right number
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-07-12 13:41:46 -07:00
Jarred Sumner
5846ad00ed
Add assertion
2023-07-07 22:01:58 -07:00
Peter Weinberg
7a0b1656c7
docs: add troubleshooting section to installation page ( #3389 )
...
* docs: add troubleshooting section to installation page
* Add note for unzip
* Update msg in install.sh
---------
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-06-26 18:25:33 -07:00
Jarred Sumner
fdfbb18531
Support reading embedded files in compiled executables ( #3405 )
...
* Support reading embedded files in compiled executables
* 💅
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 16:32:27 -07:00
Ashcon Partovi
217501e180
expect().resolves and expect().rejects (#3318 )
...
* Move expect and snapshots to their own files
* expect().resolves and expect().rejects
* Fix promise being added to unhandled rejection list
* Handle timeouts in expect(<promise>)
* wip merge
* Fix merge issue
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-22 22:27:00 -07:00
Dylan Conway
5fa13625a1
upgrade zig to v0.11.0-dev.3737+9eb008717 ( #3374 )
...
* progress
* finish `@memset/@memcpy` update
* Update build.zig
* change `@enumToInt` to `@intFromEnum` and friends
* update zig versions
* it was 1
* add link to issue
* add `compileError` reminder
* fix merge
* format
* upgrade to llvm 16
* Revert "upgrade to llvm 16"
This reverts commit cc930ceb1c .
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-21 23:38:18 -07:00
Colin McDonnell
a1bb79f440
mock type changes (#3305 )
...
* Update mock types and set bun-types@latest in bun init
* Remove mockfn methods from toplevel mock
* Remove comments
2023-06-13 22:28:31 -07:00
Alex Lam S.L
c8d06f04d3
workaround quote escape issues for bun run ( #3290 )
...
fixes #53
2023-06-13 05:38:10 -07:00
Keyhan Vakil
9a8d9b5e91
add --save argument to install ( #3277 )
2023-06-11 07:10:55 -07:00