Ashcon Partovi
2c68e26d8d
Fix double quotes in console.log messages
2023-08-25 11:53:21 -07:00
Ashcon Partovi
0731dfa0a4
Fix build
2023-08-25 11:31:47 -07:00
Ashcon Partovi
9e2ddb936e
Prepare for extension 2
2023-08-24 22:24:28 -07:00
Ashcon Partovi
dacd00d708
Improve preview code
2023-08-24 20:11:20 -07:00
Ashcon Partovi
a068e9c8db
watch mode with dap
2023-08-24 20:11:20 -07:00
Ashcon Partovi
936f112b6a
Prepare for extension
2023-08-24 20:11:20 -07:00
Ashcon Partovi
627de5b29d
More source map fixes
2023-08-24 20:11:20 -07:00
Ashcon Partovi
526f7d8541
Fix source maps partly
2023-08-24 20:11:20 -07:00
Ashcon Partovi
df6cca0fc2
Fix console.log formatting
2023-08-24 20:11:20 -07:00
Ashcon Partovi
e1c00ebaaf
Check bun version if it fails
2023-08-24 20:11:20 -07:00
Ashcon Partovi
6313655c8e
Make source maps safer if exception occurs
2023-08-24 20:11:20 -07:00
Ashcon Partovi
f0ebdfff74
More fixes
2023-08-24 20:11:20 -07:00
Jarred Sumner
c4a2209841
Update package.json
2023-08-24 20:11:20 -07:00
Jarred Sumner
cc6065583e
wip
2023-08-24 20:11:20 -07:00
Jarred Sumner
87636ca02a
add some package.jsons
2023-08-24 20:11:20 -07:00
Ashcon Partovi
40aa26ad7e
Source map support
2023-08-24 20:11:20 -07:00
Ashcon Partovi
1881c51509
Start of source map support, breakpoints work
2023-08-24 20:11:20 -07:00
Ashcon Partovi
1cddf16076
Prepare for source maps
2023-08-24 20:11:20 -07:00
Ashcon Partovi
eb27f18c2e
Fix attaching
2023-08-24 20:11:20 -07:00
Ashcon Partovi
26f5869cdb
More improvements, fix formatting in debug console
2023-08-24 20:11:20 -07:00
Ashcon Partovi
5dc79f1924
Improve support for \debug-adapter-protocol\
2023-08-24 20:11:19 -07:00
Ashcon Partovi
2bcbafe7d3
Fix debugger not updating after reload with --hot
2023-08-24 20:09:32 -07:00
Colin McDonnell
f7f734788c
Update tsconfig.base.json
2023-08-24 19:54:03 -07:00
Colin McDonnell
2cd1d59387
Update toml import type test
2023-08-24 19:52:53 -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
43c4da8c9a
Update build-id
2023-08-24 19:39:54 -07:00
Jarred Sumner
8a48e8bb0b
Report extra memory more ( #4289 )
...
* Report memory allocated in fetch
* Memory size reporting to `Headers`
* Fixup memory reporting allocator
* Make these tests do more
* cleanup some of this
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-24 19:39:00 -07:00
Dylan Conway
097ae4e982
fix build
2023-08-24 19:05:40 -07:00
Alex Lam S.L
213f5bef9d
[install] fix stale life-cycle scripts from lockfile ( #4307 )
...
fixes #4269
2023-08-24 17:18:51 -07:00
Alex Lam S.L
e115638cba
[install] fix crash when installing package that uses loose semver pre-release ( #4302 )
...
- also fix parsing of `1.2.3pre+build`
fixes #4266
2023-08-24 17:17:48 -07:00
Ai Hoshino
6e57556fad
Fix(node:http): fix URL formatting when using a proxy. ( #4297 )
...
Close : #4295
2023-08-24 17:17:18 -07:00
Ai Hoshino
339d2c7f19
Make the server not crash if an error occurs in dev build. ( #4300 )
...
Close : #4298
2023-08-24 17:16:51 -07:00
Jarred Sumner
d2bef4fbea
Don't inline require/import errors at runtime ( #4306 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-24 17:03:05 -07:00
Jason
19aa9d93de
update zig to 0.11.0 ( #4233 )
...
* WIP
* backup
* more change
* json related error sovled
* number related issue solved
* revert WriterType changed before
* destroy -> free
* jsonStringify related issues solved
* fix mem.free expected []T or *[_]T, passed [*]const u8
* fix expected []T or *[_]T, passed [*:0]const u8
* fix build script
* fix build script, for real
* replace 0.11.0-dev.4006+bf827d0b5 to 0.12.0-dev.161+6a5463951
* fix build on macOS, COPYFILE.DATA -> COPYFILE_DATA
* fix the last destroy on [*]ptr issue
---------
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2023-08-24 16:13:14 -07:00
jhmaster
55eb4ffe8f
Update bun-polyfills & bun-wasm ( #4246 )
...
* automate Bun.version & revision polyfills
* polyfill Bun.gc
* bun:jsc module initial polyfills
* update peechy schema
* bun-polyfills: fix some project configs
* bun-wasm: lots of fixes
* bun-polyfills: Bun.Transpiler impl.
* revision hash update
2023-08-24 14:39:28 -07:00
Jarred Sumner
a051a6f620
Fix performance regression in reading from the request body ( #4291 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-24 14:36:39 -07:00
Jarred Sumner
9c68abdb8d
wip ( #4282 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-24 01:32:22 -07:00
Jarred Sumner
ad326b7734
[Inspector] Fix bug with sourcemaps including internal metadata bytes
2023-08-23 22:22:55 -07:00
Colin McDonnell
aa08c35c06
Add Debugger docs and a couple guides ( #4281 )
...
* Add debugger docs. Add guides.
* Add files
2023-08-23 18:15:21 -07:00
dave caruso
20d42dfaa3
Fix <const T>() => ( #4278 )
2023-08-23 17:22:54 -07:00
VietnamecDevelopment
3556fa3b1e
Update globals.d.ts ( #4276 )
2023-08-23 16:25:05 -07:00
Code Hz
5e07fd4fbc
Fix ffi type ( #4265 )
...
* add readonly so it works with as const
* split ffi type infer to args and returns
* add JSCallback to FFITypeToArgsType
* add read functions
* simplify FFITypeOrString
* fix cstring type
* fix pointer type test
* fix readonly
* add unknown handling
* trigger action
* use Parameters
* add read type test
* add other read function to tests
2023-08-23 15:56:46 -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
Quentin
f3266ff436
docs: remove broken DNS link which is also not present in the official docs ( #4268 )
2023-08-23 10:36:26 -07:00
xxxhussein
b01764b31e
Fix more types. ( #4273 )
2023-08-23 10:35:51 -07:00
Jozef Steinhübl
851763174e
ask for bun --revision instead bun -v ( #4256 )
2023-08-23 00:42:33 -07:00
dave caruso
8518fbb573
fix yield ( #4264 )
2023-08-22 21:54:59 -07:00
Colin McDonnell
d86084dd8e
Fix Bun.inspect types
2023-08-22 14:28:01 -07:00
dave caruso
52802a4c55
fix fsevents and stub for qwikcity ( #4247 )
...
* fix test
* ok
* cm
* EE
* remove the hack we didnt need
2023-08-21 23:39:56 -07:00
Dylan Conway
44e4d5852a
fix stdin stream unref and resuming ( #4250 )
...
* fix stream unref and resuming stream
* fix `child-process-stdio` test
2023-08-21 23:39:41 -07:00
Colin McDonnell
3a45f2c71b
Docs and types for v0.8.0 ( #4199 )
...
* Improve test documentation
* Update nodejs compat docs with tty
* Add debugger guide
* Document Bun.inspect.custom, improve bun test nav
* Address reviews
* Update Bun.file types
* Add Nuxt guide
* Add tty types
2023-08-21 21:34:03 -07:00
Jarred Sumner
9eeb7bdbff
Bun v0.8
2023-08-21 21:26:45 -07:00
Jarred Sumner
ed14b64e65
Make the code generator less duplicative
2023-08-21 21:24:49 -07:00
Jarred Sumner
bca1bcf29c
import errors have code set to ERR_MODULE_NOT_FOUND and require errors have code set to MODULE_NOT_FOUND ( #4244 )
...
* ResolveMessage
* Fix it
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-21 21:11:27 -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
dave caruso
91eacade97
Fix inquirer ( #4245 )
2023-08-21 19:32:41 -07:00
Jarred Sumner
6a02edef5d
Update module_loader.zig
2023-08-21 19:04:18 -07:00
Ai Hoshino
a61953bbfd
Fix(bundler): allow generating exe file in nested path. ( #4226 )
...
* Fix(bundler): allow generating binary file in nested path.
Close : #4195
* Add read flag for fd.
* refactor
2023-08-21 18:22:37 -07:00
Colin McDonnell
f629365cb7
Fix typo
2023-08-21 17:48:48 -07:00
dave caruso
cdace9bffb
Fix crypto.EC constructor ( #4242 )
...
* Fix EC constructor
* make js
2023-08-21 16:40:25 -07:00
dave caruso
664119841a
Implement napi_ref_threadsafe_function ( #4156 )
...
* Implement napi_ref_threadsafe_function
* work on this
* i hate event loops
* little better
* clean
2023-08-21 16:26:07 -07:00
dave caruso
397182b400
feat: Implement Bun.inspect.custom ( #4243 )
...
* add Bun.inspect.custom
* test
* Add Types
2023-08-21 16:25:37 -07:00
Jarred Sumner
752e59f23c
Fixes #4089 ( #4105 )
...
* Fixes #4089
* Update bindings.cpp
* address PR feedback
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-21 16:25:23 -07:00
Jarred Sumner
def5a85d90
40x faster .toString('hex') ( #4237 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-21 08:31:17 -07:00
Jarred Sumner
1b8f569792
Fix memory leak in buffer.toString("hex") ( #4235 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-21 03:31:33 -07:00
xxxhussein
183b818462
Update README.md ( #4232 )
...
Fix typo in README.md
2023-08-21 01:32:08 -07:00
Jarred Sumner
9cf868fef4
Add missing header change
2023-08-21 01:30:45 -07:00
Jarred Sumner
ed803f7d1c
Add LazyProperty
2023-08-21 01:30:13 -07:00
Jarred Sumner
c13a27121c
Fix BigIntStats generated class
...
cc @paperdave, code generator script misses a constructor decl when this isn't true
2023-08-21 01:30:01 -07:00
Jarred Sumner
8c23e77e99
Regenerate
2023-08-21 01:29:15 -07:00
Jarred Sumner
c99a9ba33a
Implement File
2023-08-21 01:29:06 -07:00
Jarred Sumner
f75b949524
Fixes #1675 ( #4230 )
...
* Fixes https://github.com/oven-sh/bun/issues/1675
* Add fallback for Bun.write
* Update blob.zig
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-20 21:29:09 -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
65280853ac
Fix test failures from 3a9a6c63a ( #4231 )
...
cc @Hanaasagi
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-20 19:22:55 -07:00
Ai Hoshino
3a9a6c63ac
Fix(bundler): use different alias mappings based on the target. ( #4163 )
...
* Fix(bundler): use different alias mappings based on the target.
Close : #3844
* chore: reduce duplicated code.
* chore: split to two separate ComptimeStringMap.
2023-08-20 01:52:17 -07:00
Jarred Sumner
360acf5a80
Update BunDebugger.cpp
2023-08-19 22:11:48 -07:00
Jarred Sumner
d432dad666
Introduce bun --inspect-wait
...
This waits for the inspector to connect before beginning execution
2023-08-19 22:07:35 -07:00
Jarred Sumner
eec5bfb23a
misc non-posix fixes
2023-08-19 20:14:29 -07:00
Jarred Sumner
53c755467b
Update lockfile.md
2023-08-19 19:10:20 -07:00
Jarred Sumner
039404800f
Update lockfile.md
2023-08-19 19:09:10 -07:00
Jarred Sumner
3c4b689050
Update lockfile.md
2023-08-19 19:08:17 -07:00
Omar
394dd86797
Update Dockerfile-distroless ( #4210 )
2023-08-19 18:48:59 -07:00
Jarred Sumner
62bde005b2
Fix symbol visibility
2023-08-19 18:48:07 -07:00
Jarred Sumner
19054ebc35
[napi] Implement node_api_create_syntax_error, node_api_symbol_for, node_api_throw_syntax_error
...
These were marked as experimental
2023-08-19 18:34:56 -07:00
Jarred Sumner
507761b463
Fix crash impacting sharp & resvg ( #4221 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-19 18:17:16 -07:00
Jarred Sumner
196620183f
Fixes #172 ( #4220 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-19 17:46:59 -07:00
Jarred Sumner
86ad015147
Add inline sourcemaps when --inspect is enabled ( #4213 )
...
* Add inline sourcemaps when --inspect is enabled
* Add some assertions
* Update javascript.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-19 00:20:23 -07:00
Dylan Conway
db09ed15fd
tty ReadStream, WriteStream, and readline rawmode ( #4179 )
...
* tty `WriteStream`, `ReadStream`, and rawmode
* tests
* refactor prototypes
* fix failing test
* fix test and library usage
* more merge
* fix child_process test
* create pseudo terminal for tty tests
* match node logic
* handle invalid tty
* close descriptors
* move tests to another process
* fix test again
* fix test on linux
2023-08-19 00:11:24 -07:00
Jarred Sumner
bf517d9f8e
Fix make headers (again)
2023-08-18 22:14:38 -07:00
Jarred Sumner
e9b684c972
Add HTMLRewriter microbnechmark
2023-08-18 22:14:24 -07:00
Jarred Sumner
e8f0ed3beb
Fix make headers
2023-08-18 22:09:27 -07:00
Jarred Sumner
3ca7fde363
prettier
2023-08-18 20:41:54 -07:00
Brúnó Salomon
c2ec47ff32
feat: add self-closing & can-have-content ( #4206 )
2023-08-18 19:59:23 -07:00
dave caruso
26036a390b
Implement BigIntStats ( #4208 )
...
* Implement BigIntStats
* changes
* rename test
* comment
* test changes?
2023-08-18 19:59:03 -07:00
Jarred Sumner
943a664224
Remove most C API usages, add debugger pretty printers for Headers, URLSearchParams, FormData, Worker, EventTarget ( #4187 )
...
* Add pretty printers for `Headers`, `URLSearchParams`, and `FormData`
* [untested] Add way to code generate getInternalProperties
* bump
* Bump Webkit
* Ref the event loop while loaded
* wip
* checkpoint
* another checkpoint
* The code has been written
* Fixup exports
* Fix all the errors
* Fix bug
* [console.log] Fix bug when printing non-reified types missing values
* Fix loading hash table
* fix plugin
* Fix ref & unref
* auto-unref
* various fixes
* Update bun.zig
* Set toStringTag
* Delete code for macro JSX
* Delete code for `bun dev` HTTP JS
* Move Bun.serve to C++ API
* Delete JSC C API code
* ✂️ 💀 code
* Use JSC C++ for `confirm`, `Crypto`, `prompt`, `alert`
* more dead code
* Update exports.zig
* Use JSC C++ API for FFI
* Remove remaining usages
* Remove remaining usages
* Update ffi.ts
* Update InternalModuleRegistryConstants.h
* draw the rest of the owl
* Update webcore.zig
* bind it
* Fix performance regression in crypto.randomUIUD()
* Update js_parser.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-18 19:58:03 -07:00
Dylan Conway
d0664f8377
fix --bail test
2023-08-18 14:51:55 -07:00
dave caruso
6fd0043f6b
Add util.inspect.custom support to util.inspect/Bun.inspect/console.log ( #4194 )
...
* start work on util.inspect.custom
* asdf
* finish util inspect custom inspect
* inspect
* fix tests
* revert
* tidy
* revert
* oops
* test
* fix issues
2023-08-17 20:56:52 -07:00
dave caruso
0424fd8f6e
Support Nitro ( #4098 )
...
* Add formatWithOptions
* tests and tweaks
* adjust
* changes
* hi
* add mark/measure stubs
* stuff
* allow unix absolute paths here
* typo
* rebase
* fix stats
2023-08-17 19:34:05 -07:00
Colin McDonnell
cfbd1373e2
Update Astro guide
2023-08-17 18:38:10 -07:00
dave caruso
f74585ff01
Allow IncomingRequest.req to be overwritten. ( #4154 )
...
* Allow IncomingRequest.req to be overwritten.
* add test
* fix test
* yoo
2023-08-17 14:57:43 -07:00
Ai Hoshino
b2f8ef4dff
Fix(node:fs): add buffer parameter in fs.read callback. ( #4191 )
...
Close : #4178
2023-08-17 14:27:33 -07:00
Brúnó Salomon
b0e76a965d
refactor: move HTMLRewriter to c++ bindings ( #4193 )
2023-08-17 14:25:09 -07:00
Colin McDonnell
cfce38858f
Fix description for executables page
2023-08-17 14:07:36 -07:00
Colin McDonnell
540740c129
Add Astro guide ( #4110 )
2023-08-17 12:51:45 -07:00
xxxhussein
b1356718ad
correct guide's bunfig example option ( #4192 )
2023-08-17 12:13:16 -07:00
Colin McDonnell
b9b50e39d6
Fix broken link
2023-08-16 22:58:36 -07:00
Jarred Sumner
6c3dabd84e
Fix leaking .ptr ( #4181 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-16 22:10:01 -07:00
Colin McDonnell
d4438e9496
Add solidstart guide ( #4182 )
2023-08-16 21:30:37 -07:00
Colin McDonnell
56d591b903
Add sveltekit guide ( #4180 )
2023-08-16 20:52:49 -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
Ciro Spaciari
2634c64aa3
Fix prisma linux generation ( #4150 )
...
* check
* fmt + fix
* fmt
* ops
* add more targets
* more targets
* oops
* update bun lock and prisma
* manually add openssl
* targets on sqlite
2023-08-16 16:12:02 -07:00
Dylan Conway
af23dab833
Create domjit.test.ts ( #4173 )
2023-08-15 22:13:13 -07:00
Dylan Conway
9efeef2e24
res.then
2023-08-15 21:51:43 -07:00
dave caruso
67a8b75183
fix this page ( #4172 )
2023-08-15 19:02:46 -07:00
Dylan Conway
bdaa712357
disable domjit for Buffer.alloc
2023-08-15 19:00:02 -07:00
dave caruso
b682e5bf59
Fix event loop issue with Bun.connect ( #4157 )
...
* Fix event loop issue with Bun.connect
* sorry
* add test and fix another edge case
2023-08-15 18:09:11 -07:00
Dylan Conway
17c348ed0a
fix make headers
2023-08-15 14:56:21 -07:00
Dylan Conway
f05a38757a
fix build
2023-08-15 14:33:45 -07:00
Ai Hoshino
553a471cdf
chore: fix method name typo ( #4162 )
2023-08-15 08:11:11 -07:00
dave caruso
1a6a52314f
fix importing too long of strings ( #4155 )
2023-08-15 01:56:37 -07:00
dave caruso
47450ed12c
Make builtins' source origin use a valid url ( #4152 )
...
* Make source origin use a valid url
* disable minifyWhiteSpace
* the change
2023-08-14 20:28:18 -07:00
Colin McDonnell
eab7b4c3ea
Small docs change
2023-08-14 12:08:33 -07:00
dave caruso
0329061f15
fix makefile ( #4148 )
2023-08-13 20:43:44 -07:00
Revenity
1e96cbfb02
Update Stric guides ( #4137 )
2023-08-12 20:03:41 -07:00
dave caruso
78defe7a87
Fix worker event loop ref/unref + leak ( #4114 )
...
* make more tests pass
* worker changes
* fix some bugs
* remove this
* progress
* uh
* okay
* remove console log
* a
* comment assert for later
* mergable state
* remove test
* remove test
2023-08-12 13:51:03 -07:00
Ai Hoshino
b94433ce86
Fix using uninitialized variable when formatting config_path. ( #4129 )
...
Close : #4128
2023-08-11 22:14:08 -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
jhmaster
117cee5ca5
bun-wasm fixes & improvements (#4126 )
...
* automate Bun.version & revision polyfills
* polyfill Bun.gc
* bun:jsc module initial polyfills
* fixes & improvements to bun-wasm
2023-08-11 18:20:21 -07:00
Jarred Sumner
43ebffedcd
Support TypeScript's export type * as Foo from 'bar' ( #4125 )
...
* [TypeScript] Support `export type * as Foo from 'bar'`
* Update js_parser.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-11 18:06:48 -07:00
Jarred Sumner
ccb9daf7a4
Fix wasm build
2023-08-11 16:24:29 -07:00
Jarred Sumner
c6d3b375b8
async realpath ( #4117 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-10 22:15:07 -07:00
Jarred Sumner
4731a460a2
Remove assertion
2023-08-10 19:58:59 -07:00
Jarred Sumner
99af827f25
More lazily initialize these static strings
2023-08-10 19:56:02 -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
Jarred Sumner
115704b27b
Fix memory leak in base64url ( #4111 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-10 16:43:19 -07:00
Jarred Sumner
85b81624dc
Handle thundering herd of setInterval ( #4109 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-10 15:25:52 -07:00
Adhityaa Chandrasekar
cf12d80f5e
fs.zig: create temp files with 0o700, not 0o007 ( #4107 )
2023-08-10 14:00:13 -07:00
Colin McDonnell
58e74eadb5
Update remix guide
2023-08-10 13:54:17 -07:00
Jarred Sumner
be05b93f39
zig fmt
2023-08-10 13:32:37 -07:00
Jarred Sumner
e25833d009
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 >
2023-08-10 13:32:04 -07:00
Jacques
e65535cc05
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 >
2023-08-10 13:29:53 -07:00
dave caruso
74f9fabd01
add util.formatWithOptions ( #4090 )
...
* Add formatWithOptions
* tests and tweaks
* adjust
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-10 13:09:03 -07:00
Colin McDonnell
8d207925d7
Fix title
2023-08-10 12:37:14 -07:00
Colin McDonnell
e0569ac47a
Add remix guide
2023-08-10 12:36:54 -07:00
jhmaster
40befd8770
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 >
2023-08-10 12:17:39 -07:00
Jarred Sumner
6718950a39
Fix test
2023-08-10 12:08:05 -07:00
dave caruso
68ac8c12c2
remove non-node node-fallbacks ( #4082 )
...
* remove non-node node-fallbacks.
* organize the imports
2023-08-10 11:57:37 -07:00
Jarred Sumner
28d1676d50
Update __global.zig
2023-08-09 16:50:00 -07:00
Colin McDonnell
883c4d8778
Updates
2023-08-09 13:47:32 -07:00
Yash Sharma
8717303a80
Add support for bun --revision ( #4027 )
...
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
2023-08-09 10:43:04 -07:00
Ai Hoshino
385d440694
Fix constructing buffer from a UTF16 string with the Latin1 encoding. ( #4086 )
...
Close : #3914
2023-08-09 09:45:50 -07:00
Jarred Sumner
b3019270c9
Update SIMDUTF ( #4078 )
2023-08-09 09:14:51 -07:00
Jarred Sumner
5d7c77aab0
Update main-worker-file.js
2023-08-08 23:02:45 -07:00
Jarred Sumner
2c70837ae7
Run prettier
2023-08-08 23:01:03 -07:00
Jarred Sumner
bed7ff7dd0
Remove unintentional logs from #4043
2023-08-08 22:59:40 -07:00
dave caruso
450b066cb8
Fix one of the astro segfaults, also fix bun init version ( #4079 )
...
* 4->16
* add assertions
* fix version stuff
2023-08-08 22:27:18 -07:00
Jacques
63f58f4026
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
2023-08-08 22:25:32 -07:00
dave caruso
009fe18fa2
worker tests ( #4058 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-08 22:19:46 -07:00
Tiramify (A.K. Daniel)
40d00a961e
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 >
2023-08-08 22:14:30 -07:00
dave caruso
1941dbbd71
Set exports to {} in user-constructed CommonJSModuleRecords ( #4076 )
2023-08-08 19:37:36 -07:00
dave caruso
320cdcf97e
Fix require("console") #3820 ( #4073 )
...
* Fix #3820
* Add Module (#4074 )
2023-08-08 18:23:33 -07:00
Dylan Conway
454407003e
Update Worker.cpp
2023-08-08 15:08:16 -07:00
Ai Hoshino
511f6bdf79
1. Check if the argument is an empty string in path.format. ( #4064 )
...
2. Avoid duplicating '/' at the beginning of the path.
Close : #4005
2023-08-08 07:03:18 -07:00
Jarred Sumner
320ee6b6b7
import bun ( #4055 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-08 01:42:44 -07:00
Jarred Sumner
38df5b146f
Enable Headers.prototype.getSetCookie
...
Fixes #4057
2023-08-08 01:18:36 -07:00
Jarred Sumner
25c91aecab
Remove printf
2023-08-08 00:31:46 -07:00
dave caruso
5497accbdb
Add env option for node:worker_threads ( #4052 )
...
* almost works
* env stuff
* test fixes
* wtfmove
* ok
* ok
* ref by default
* it now does the ref stuff by default
* cool
2023-08-07 23:58:38 -07:00
jhmaster
182e600eb7
Fix Bun.hash functions ( #4054 )
...
* fix `Bun.hash` functions to behave as expected
* update Bun.hash tests
* properly test the returned hash
* include murmur32v2
* update Bun.hash docs
* run fmt
2023-08-07 23:30:05 -07:00
Dylan Conway
cb873cc081
fix worker.ref()
2023-08-07 22:40:32 -07:00
Jarred Sumner
330d19e344
add bun update to help menu
2023-08-07 21:14:42 -07:00
Dylan Conway
2fe6a965af
implement fetching data urls ( #4000 )
...
* fetch data urls
* `byteSlice`
* deinit slice
* allocate `mime_type` string if needed
* `content_type_allocated` and uncomment tests
* `str_`
* createAtom and slice decode result
2023-08-07 20:15:53 -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
Dylan Conway
1239c9460a
fix iterating headers with set-cookie ( #4048 )
...
* fix iterating headers with `set-cookie`
* a test
* move work to `HTTPHeaderMap::set`
* append set-cookie after sort
* remove compare function
2023-08-07 19:32:23 -07:00
Jarred Sumner
f2f227720b
WASM test analyzer ( #4043 )
...
* wasm
* WASM test scanner
* Update Makefile
* Update Makefile
* Configurable heap limit
* slightly better error
* Update js_parser.zig
* Update path.test.js
* Update node.mjs
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-07 18:51:16 -07:00
Colin McDonnell
0b183beb51
Improve plugin docs
2023-08-07 14:02:43 -07:00
Ai Hoshino
5ce393aab8
Fix path.normalize edge case. ( #4042 )
...
Close : #4041
2023-08-07 06:44:04 -07:00
Jarred Sumner
00a907c7de
Fixes #4001 ( #4034 )
...
* Avoid a utf8 conversion in isDetached
* Fixes #4001
* hit the long url codepath
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 22:49:10 -07:00
Jarred Sumner
0665733b03
Fixes #4029 and fixes #4022 ( #4032 )
...
* Fixes #4029 and Fixes #4022
Fixes #4029
Fixes #4022
* Add test for all the fetches
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 20:39:40 -07:00
Jarred Sumner
70c3371b14
Fixes #4010 ( #4031 )
...
* Fixes #4010
* Update websocket_http_client.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 19:30:06 -07:00
Jarred Sumner
0b2be88bac
Update build-id
2023-08-06 18:07:15 -07:00
Jarred Sumner
8297fb0d2f
Bind require.resolve() ( #4030 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 18:06:18 -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
Alex Lam S.L
b93f304c06
[install] handle bun add of existing peerDependencies correctly ( #4028 )
2023-08-06 17:42:08 -07:00
Jarred Sumner
a9b3d58353
fix nan
2023-08-06 07:55:22 -07:00
Jarred Sumner
cf48379921
Update coverage.md
2023-08-06 07:48:06 -07:00
Jarred Sumner
f8026df821
Update lol-html
2023-08-06 07:35:29 -07:00
Jarred Sumner
fa4e5d033e
Fixes #3129 ( #4018 )
...
* Fixes #3129
* add CloseEvent
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 07:35:07 -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
Ai Hoshino
ecdf2ffa6c
feat: impl dns.getServers ( #3982 )
...
* feat: impl `dns.getServers`
Close : #3981
* check return value of `ares_inet_ntop`
2023-08-06 06:16:54 -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
dave caruso
3803d39840
Remove Bun.plugin transpiler hook, encourage usage of --preload instead ( #3987 )
...
* Remove Bun.plugin transpiler hook
* one missing case
2023-08-05 04:42:30 -07:00
Colin McDonnell
78081cbb40
Support --dev/-D and support more flags on bun install ( #3989 )
2023-08-04 20:41:16 -07:00
Dylan Conway
6bdee80cfc
fix macro string escaping ( #3967 )
...
* handle macro escaping
* remove printer
* use `js_lexer.decodeEscapeSequences`
2023-08-04 19:34:09 -07:00
Jarred Sumner
637a38f394
Fixes #3991
...
Fixes #3991
2023-08-04 18:54:08 -07:00
Alex Lam S.L
190ba6b743
[install] handle workspace:* correctly ( #3994 )
...
- parse as path so it works on unversioned workspaces
- fix missed storage of workspace version
fixes #3985
2023-08-04 18:21:13 -07:00
Jarred Sumner
e2c526708a
Update import-meta.md
2023-08-04 17:40:11 -07:00
Jarred Sumner
f06f178862
Fix incorrect docs
2023-08-04 17:38:17 -07:00
Alex Lam S.L
8275b8ccd2
[types] fix blob.json() ( #3995 )
2023-08-04 17:30:38 -07:00
dave caruso
d196aa2de6
FFI typo ( #3973 )
...
* FFI typo
* add tests
* it was a newline
2023-08-04 16:08:50 -07:00
Yifei Wang
bdbc21ff7b
Buffer.copy should ignore out-of-range sourceEnd ( #3971 )
2023-08-04 16:08:25 -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
Colin McDonnell
63d265780f
Fix types ( #3963 )
...
* Fix types
* Add ws module
* Add *.toml module declaration
* Clean up
2023-08-04 12:56:34 -07:00
simylein
18a2e18ae1
feat(hot-clear-screen): clear terminal on hot reload ( #3976 )
...
* feat(hot-clear-screen): clear terminal on hot reload
* fix(hot-clear-screen): is now I n the correct place
* fix(hot-clear-screen): enable buffering after terminal clear
2023-08-04 04:01:10 -07:00
Jarred Sumner
76dee9312b
Add microbenchmark for private properties
2023-08-03 20:14:17 -07:00
Jarred Sumner
9beccc3305
Fix thread safety issue in async fs functions file paths ( #3964 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 20:09:05 -07:00
Jarred Sumner
717f0a2f42
Make the test better
2023-08-03 18:23:57 -07:00
Jarred Sumner
c2ebdf812b
Test for Module.wrap()
2023-08-03 18:22:45 -07:00
Jarred Sumner
9ab2acced6
Implement Module.wrap()
2023-08-03 18:22:45 -07:00
Jarred Sumner
944fcebc2b
Update build-id ( #3940 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 18:15:55 -07:00
Colin McDonnell
9222316101
Update Node.js compat docs
2023-08-03 17:48:18 -07:00
Colin McDonnell
d10860d272
Add type tests
2023-08-03 17:44:18 -07:00
Colin McDonnell
76fa3076cd
Add type tests, update modules.md
2023-08-03 17:41:47 -07:00
Colin McDonnell
112030481f
More guides and fixing links ( #3960 )
...
* More guides
* WIP
* Updates
* Fix
2023-08-03 16:31:05 -07:00
Dylan Conway
9574db355f
allow bundling builtins for browser ( #3959 )
...
* Update resolver.zig
* bundle resolve error for non-existent builtins
* tests
2023-08-03 16:27:45 -07:00
Ai Hoshino
a4d996c337
Fix edge case in path.relative. ( #3952 )
...
Close : #3924
2023-08-03 15:40:37 -07:00
Ashcon Partovi
08cf0d562a
Bunch of fixes ( #3516 )
...
* Fix #3497
* Fix #3497
* Run prettier
* Fix package.json
* remove this too
* yeah
* Fix missing tests
* Use native for utf-8-validate
* Add module ID names to builtins
* Defer evaluation of ESM & CJS modules until link time
* Use builtin name for exports in plugins
* Add module IDs to builtins
* Update JSC build with new flag
* WebKit upgrade fixes
* Update WebKit
* prettier
* Upgrade WebKit
* bump
* Update once again
* Add visitAdditionalChildren, remove .fill() usage
* Update process.test.js
* Update fs.test.ts
---------
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 15:31:55 -07:00
Alex Lam S.L
9a2c3dea88
[install] fix stale bun.lockb on workspaces ( #3945 )
...
- handle workspaces under `--production` correctly
- fix `Makefile`
2023-08-03 12:37:29 -07:00
Ai Hoshino
2c9ff9584a
Minor optimization: Avoid extra copying when the chunk has only one element. ( #3946 )
...
* Optimize the case where there is only one chunk.
* add generated code
2023-08-03 12:35:04 -07:00
Ai Hoshino
30dde62521
Fix the string encoding in path.extname. ( #3949 )
...
Close : #3948
2023-08-03 12:34:41 -07:00
Jarred Sumner
928816bef0
SvelteKit compatibility hack
2023-08-02 21:07:39 -07:00
dave caruso
f17655b2eb
typo ( #3941 )
2023-08-02 20:43:39 -07:00
Ashcon Partovi
9f2dcb064d
Fix formatting
2023-08-02 19:02:54 -07:00
dave caruso
6c176cb243
Dave/removedeprecation ( #3938 )
...
* hide deprecated stuff
* this edit
* hi
2023-08-02 18:57:11 -07:00
dave caruso
e83058cfe7
Fix http write ( #3939 )
...
* Fix encoding problem when uploading a binary file.
Close : #3116
* use BufferList
* Finish rebase
---------
Co-authored-by: Hanaasagi <ambiguous404@gmail.com >
2023-08-02 18:56:41 -07:00
dave caruso
aaaaf744a8
Remove module and browser conditions ( #3935 )
...
* fix astro compiler
* clean this up
* Update options.zig
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-08-02 18:46:57 -07:00
Jarred Sumner
207c7eb509
Implement node:worker_threads ( #3923 )
...
* Start to implement `worker_threads`
* more
* more!!
* more
* Update bundle_v2.zig
* delete outdated tests
* `receiveMessageOnPort`
* props test and export default
* fix merge
* not implemented tests
* individual imports
* `receiveMessageOnPort` tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-08-02 18:12:12 -07:00
Ashcon Partovi
505e77c2d0
Implement node:diagnostics_channel ( #3934 )
...
* Add types for `node:async_hooks`
* Implement \`node:diagnostics_channel\`
2023-08-02 18:04:24 -07:00
Jarred Sumner
ef6d25a48f
Fix
2023-08-02 17:55:42 -07:00
dave caruso
c2a77cf7ec
Rewrite built-in modules to use CommonJS over ESM ( #3814 )
...
* stfdsafsd
sadffdsa
stuff
finish commonjs stuff
asdf
not done but work
not done but work
not done yet but this is how far i am
remove files
lol
update built files
uncomment everything in events lol
export default
stuff
* afdsafsd
* its not perfect but almost done
* okay
* cool
* remove temp file
* finish rebase
* revert settings.json
* a
* ch-ch-ch-ch-changes
* okay
* remove this check in release for now
* sxdcfghnjm,
* lkjhgf
* fmt
* filename can be null
* Update NodeModuleModule.h
* weee
* fmt
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-02 16:27:36 -07:00
Jarred Sumner
7656b4b17e
Fixes #3931 ( #3933 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-02 16:16:22 -07:00
Ciro Spaciari
25553e62c1
Fix path_watcher ( #3920 )
...
* fix callback and onError
* fix main watcher error return
* fixup
* rename to be more clear
2023-08-02 13:00:01 -07:00
Vaughan Rouesnel
4f39d5b54a
Update streams.md ( #3926 )
2023-08-02 12:59:21 -07:00
Ciro Spaciari
d9f162ff95
clean declare structs ( #3929 )
2023-08-02 12:58:44 -07:00
Dylan Conway
9bbac35fd0
close BroadcastChannel in tests
2023-08-01 19:12:30 -07:00
Ciro Spaciari
eba27540b0
Fix some flaky tests ( #3919 )
...
* fix some flask tests
* fix condition on prisma test
* oops
2023-08-01 19:06:08 -07:00
Ciro Spaciari
9cb3f3386e
Fix expanding on .env files ( #3918 )
...
* fix expanding
* refactor locks
* bound checks
* fix comment
* one more test
* oops
2023-08-01 19:04:05 -07:00
Dylan Conway
6c40d6f2f5
add BroadcastChannel ( #3922 )
...
* copy and format
* update `SerializedScriptValue.cpp`
* use `expect().fail()` in message channel tests
* rename `BroadcastChannelIdentifier.h`
* copy registries
* progress and tests
* cleanup
* worker and broadcast channel test
* `BroadcastChannel` ref and unref
* `MessagePort` ref, unref, and hasRef
* remove `SecurityContext.cpp/h`
* add types
2023-08-01 18:40:02 -07:00
Dylan Conway
0ced5520e6
Update worker.test.ts
2023-08-01 18:05:11 -07:00
Jarred Sumner
8aa5892f70
Update types
2023-08-01 16:44:16 -07:00
Jarred Sumner
bd2563ef4c
Update JSWorker.cpp
2023-08-01 16:43:48 -07:00
Jarred Sumner
214dc039e0
Implement Worker.prototype.threadId
2023-08-01 16:42:49 -07:00
Emilio Sánchez
e2b39d0807
Fix prisma.md typo ( #3921 )
2023-08-01 12:03:53 -07:00
Vlad Sirenko
7a8f57c4e5
throw error if node module does not exist ( #3913 )
2023-07-31 19:41:41 -07:00
Colin McDonnell
8589ba2f17
Update stricjs
2023-07-31 17:07:01 -07:00
Colin McDonnell
dd8fdd87dc
Switch table to headings in Nodejs compat page
2023-07-31 16:39:09 -07:00
Colin McDonnell
7b8df184b3
Add env guides
2023-07-31 14:24:08 -07:00
Colin McDonnell
90991da908
Update titles, add Workspaces guide
2023-07-31 13:57:17 -07:00
Colin McDonnell
404b90badc
Add ecosystem guides ( #3847 )
...
* Add ecosystem guides
* Update titles
* Rename stric
* Add unlink and fetch guides
* Add formdata guide
* Tweak title
* Moar
2023-07-31 12:20:23 -07:00
Jarred Sumner
67599f97ad
More logging
2023-07-31 06:50:55 -07:00
Jarred Sumner
8b715dee5b
Fixes #1669
2023-07-31 06:39:19 -07:00
Jarred Sumner
f2983e50b7
Add a test for TransformStream
2023-07-31 06:17:56 -07:00
Jarred Sumner
e47a448434
Fixes #2935
2023-07-31 06:03:31 -07:00
xxxhussein
de5890ff20
Update arraybuffer-to-buffer.md ( #3906 )
...
Fix title. This page shows how to convert an ArrayBuffer to a Buffer, not a Uint8Array
2023-07-31 04:00:21 -07:00
Jarred Sumner
aae92c76a6
Fix incorrect function
2023-07-31 01:33:39 -07:00
Jarred Sumner
9ecae59bbb
Fix memory leak in response.clone(), further reduce memory usage of Request & Response ( #3902 )
...
* Atomize respsone.url & response.statusText
* Fix warning
* Atomize Request & Response URLs when possible
* Fix memory leak in response.clone()
bun/bench/snippets on jarred/atomize
❯ mem bun --smol request-response-clone.mjs
cpu: Apple M1 Max
runtime: bun 0.7.2 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
-------------------------------------------------------- -----------------------------
req.clone().url 77.3 ns/iter (40.35 ns … 222.64 ns) 91.53 ns 128.11 ns 172.78 ns
resp.clone().url 162.43 ns/iter (116 ns … 337.77 ns) 177.4 ns 232.38 ns 262.65 ns
Peak memory usage: 60 MB
bun/bench/snippets on jarred/atomize
❯ mem bun-0.7.1 --smol request-response-clone.mjs
cpu: Apple M1 Max
runtime: bun 0.7.1 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
-------------------------------------------------------- -----------------------------
req.clone().url 115.85 ns/iter (80.35 ns … 247.39 ns) 128.19 ns 181.93 ns 207.23 ns
resp.clone().url 252.32 ns/iter (202.6 ns … 351.07 ns) 266.56 ns 325.88 ns 334.73 ns
Peak memory usage: 1179 MB
* Update tests
* Update js_ast.zig
* Update test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-30 23:51:43 -07:00
audothomas
2ea7290172
FIx Uint8Array to a ReadableStream code snippet ( #3895 )
2023-07-30 17:53:22 -07:00
Jarred Sumner
092ada6d2f
Micro-optimize LineOffsetTable.generate
...
5.00 ms 100.0% 0 s bun (81023)
2.00 ms 40.0% 2.00 ms WTF::HashTableAddResult<WTF::HashTableIterator<WTF::HashTable<WTF::Packed<WTF::StringImpl*>, WTF::Packed<WTF::StringImpl*>, WTF::IdentityExtractor, WTF::DefaultHash<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>>, WTF::Packed<WTF::StringImpl*>, WTF::Packed<WTF::StringImpl*>, WTF::IdentityExtractor, WTF::DefaultHash<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>>> WTF::HashTable<WTF::Packed<WTF::StringImpl*>, WTF::Packed<WTF::StringImpl*>, WTF::IdentityExtractor, WTF::DefaultHash<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>, WTF::HashTraits<WTF::Packed<WTF::StringImpl*>>>::addPassingHashCode<WTF::HashSetTranslatorAdapter<WTF::BufferFromStaticDataTranslator<unsigned char>>, WTF::HashTranslatorCharBuffer<unsigned char> const&, WTF::HashTranslatorCharBuffer<unsigned char> const&>(WTF::HashTranslatorCharBuffer<unsigned char> const&, WTF::HashTranslatorCharBuffer<unsigned char> const&)
2.00 ms 40.0% 2.00 ms heap.StackFallbackAllocator(1024).free
2.00 ms 40.0% 0 s em.Allocator.rawFree
2.00 ms 40.0% 0 s em.Allocator.log2a
2.00 ms 40.0% 0 s em.Allocator.free__anon_1330765
2.00 ms 40.0% 0 s em.Allocator.resize__anon_1069235
2.00 ms 40.0% 0 s array_list.ArrayListAligned(i32,null).toOwnedSlice
2023-07-30 08:27:31 -07:00
Jarred Sumner
e636f1b026
skip flay test
2023-07-30 08:26:41 -07: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
Tiramify (A.K. Daniel)
0ea59b4c93
Update install.md ( #3890 )
2023-07-30 06:41:51 -07:00
Jarred Sumner
b0d3ea5a43
Fix issue with file loader ( #3889 )
...
* Fix issue with file loader
* Update jest-extended.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-30 05:59:54 -07:00
Jarred Sumner
a9dc5d51e3
Fixes #3884
2023-07-30 04:04:06 -07:00
Jarred Sumner
749194378a
Bump
2023-07-30 04:04:06 -07:00
Jarred Sumner
794e657eb2
remove unnecessary move
2023-07-30 04:04:06 -07:00
Jarred Sumner
1db119ec11
Fix memory leak ( #3887 )
...
* Fix memory leak
* Remove an extra copy
* Further fixes
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-30 02:03:32 -07:00
Ai Hoshino
413fd28120
Fix coredump when reading an empty file(node:stream:createReadStream) ( #3882 )
...
* Fix coredump when reading an empty file.
Close : #3607
* It seems that the fd is closed when `auto_close` is true.
2023-07-30 01:18:13 -07:00
Tiramify (A.K. Daniel)
40a9ba6340
Improv. ( #3885 )
2023-07-30 01:17:02 -07:00
Jarred Sumner
681be10294
Make bun:jsc memoryUsage more accurate ( #3876 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-29 06:18:51 -07:00
0xflotus
dccf82b1c6
docs: fixed small errors ( #3879 )
...
* Update cache.md
* Update index.md
* Update macros.md
* Update writing.md
2023-07-29 03:58:45 -07:00
0xflotus
5563be99d3
fix: small error ( #3878 )
2023-07-29 03:32:24 -07:00
Jhorman Tito
bcb6dc7806
typo spawn.md ( #3875 )
2023-07-29 00:35:13 -07:00
Jarred Sumner
dae2928620
Update nodejs-apis.md
2023-07-28 23:58:59 -07:00
Jarred Sumner
05ef9ec141
Update nodejs-apis.md
2023-07-28 23:57:02 -07:00
Jarred Sumner
53cc4df191
Defer task destruction
2023-07-28 20:34:57 -07:00
Jarred Sumner
05716ff39b
Stat largefile test ( #3870 )
...
* Add test for stat on a large file
* Update fs.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 18:55:04 -07:00
Jarred Sumner
4f914cbfe8
Ignore when printing to stdout errors ( #3869 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 18:53:44 -07:00
Jarred Sumner
da7c1d84e9
Fix bug with /path/to/absolute/bun.lockb
2023-07-28 18:52:04 -07:00
Dylan Conway
aebec5b329
markBinding
2023-07-28 18:07:28 -07:00
Dylan Conway
c68d9ae634
optional parameter
2023-07-28 18:04:00 -07:00
Jarred Sumner
bd66a9a94c
Fixes #3868
...
Fixes #3868
Fixes #849
2023-07-28 17:53:12 -07:00
Jarred Sumner
1490cdc4ff
Fix assertion failure and possible infinite loop when printing as yarn lock files
2023-07-28 17:40:05 -07:00
Jarred Sumner
97009a49bd
Mark broken test as todo
2023-07-28 16:59:46 -07:00
Dylan Conway
d432448ac8
fix types and add message channel/port gc test
2023-07-28 16:55:49 -07:00
Dylan Conway
d614fdfaac
MessageChannel and MessagePort (#3860 )
...
* copy and format
* copy
* copy
* cleanup
* some tests
* spellcheck
* add types
* don't lock getting contextId
* array buffer test
2023-07-28 16:44:28 -07:00
Jarred Sumner
0a4e476a7c
mark tests as todo
2023-07-28 16:24:22 -07:00
Vlad Sirenko
9078b1286d
add fork to child_process ( #3851 )
...
* add fork to child_process
* fix export
* add test to child_process method `fork`
* fmt fork
* remove only from test
2023-07-28 16:00:43 -07:00
Tiramify (A.K. Daniel)
242d8655d8
feat(bun/test): Impl. expect().pass() & expect().fail() ( #3843 )
...
* Impl. pass & fail
* fix
* fix 2
* smol
2023-07-28 15:46:44 -07:00
Ai Hoshino
9b91e3c1a2
fix the chunk boundary (node:stream:createReadStream) ( #3853 )
...
* fix the slice boundary.
Close : #3668
* Add more boundary test case.
* fix end is 0.
2023-07-28 15:44:33 -07:00
Jarred Sumner
7a1ebec26f
Support file: URLs in fetch ( #3858 )
...
* Support file: URLs in `fetch`
* Update url.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 15:44:05 -07:00
Ciro Spaciari
e7c80b90b8
fix(tls) exposes native canonicalizeIP and fix rootCertificates ( #3866 )
...
* exposes native canonicalizeIP
* remove unintended duplicate
* add tests
* add tests for debug builds
* add rootCertificates test and fix len
* just randomize test ids on prisma
* remove work around and bump usockets with the actual fix
* fix case
* bump uws
2023-07-28 15:43:15 -07:00
Jarred Sumner
e110ccf84d
Fixes #3795 ( #3856 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 01:33:00 -07:00
Jarred Sumner
c2a744f0cc
Add todo
...
cc @cirospaciari
2023-07-28 00:34:54 -07:00
Jarred Sumner
38168f3c85
Update pull_request_template.md
2023-07-28 00:17:47 -07:00
Jarred Sumner
cbaab23f6d
Update pull_request_template.md
2023-07-28 00:17:26 -07:00
Jarred Sumner
3e5beb1279
Fix bug with // @bun annotation in main thread ( #3855 )
...
* Uncomment test
* Fix bug with // @bun + async transpiler
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 22:30:10 -07:00
Jarred Sumner
70b9bf743c
Add Bun.isMainThread
2023-07-27 22:28:28 -07:00
Jarred Sumner
f3153fbee9
Uncomment test
2023-07-27 20:46:25 -07:00
Ciro Spaciari
7fa71dd032
Resolve watch directories outside main thread + async iterator and symlink fixes ( #3846 )
...
* linux working pending tests with FSEvents
* add more tests, fix async iterator
* remove unnecessary check
* fix macos symlink on directories
* remove indirection layer
* todos
* fixes and some permission test
* fix opsie and make prisma test more reliable
* rebase with main
* add comptime check for macOS
* oops
* oops2
* fix symlinks cascade on FSEvents
* use JSC.WorkPool
* use withResolver, createFIFO and fix close event on async iterator
* remove unused events
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-27 19:23:54 -07:00
Jarred Sumner
52f39d728f
Update pull_request_template.md
2023-07-27 18:12:11 -07:00
Jarred Sumner
73eb59019a
Update pull_request_template.md
2023-07-27 18:11:28 -07:00
Jarred Sumner
3b24305b7c
Update pull_request_template.md
2023-07-27 18:10:49 -07:00
Jarred Sumner
1304779826
Update pull_request_template.md
2023-07-27 18:03:44 -07:00
Jarred Sumner
65d0884361
Update pull_request_template.md
2023-07-27 18:01:01 -07:00
Jarred Sumner
16fdc074ca
Update pull_request_template.md
2023-07-27 18:00:03 -07:00
Jarred Sumner
6b35fd847f
Create pull_request_template.md
2023-07-27 17:56:11 -07:00
Jarred Sumner
007f357495
Make readFile() async ( #3850 )
...
* less leaky
* async readfile
* Update types.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 16:55:49 -07:00
Jarred Sumner
16a7224ce5
Fix hot reloading in canary ( #3848 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 15:52:52 -07:00
Jarred Sumner
7c44773f38
Outdated copy
2023-07-27 15:22:53 -07:00
Jarred Sumner
85895bd248
Use putDirectIndex instead of initializeIndex ( #3839 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 14:45:32 -07:00
Luigi Pinca
6c2ec2868f
Remove no longer needed flag from benchmark documentation ( #3845 )
...
`Deno.serve()` was stabilized in version 1.35.0.
2023-07-27 13:27:54 -07:00
Jarred Sumner
704ee13392
Make readdir() async, fix crash in large directory trees ( #3838 )
...
* Fix unsafe GC behavior on large arrays returned by fs
* Fix crash in large arrays of strings
* async readdir
* Add tests for large number of files returned by readdir
* Move this down
* Fix encoding edgecase in path.join
* Async stat & lstat
* add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 04:27:09 -07:00
Jarred Sumner
d7aebc2222
Remove lstat call in fs.watch ( #3836 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 03:34:18 -07:00
Jarred Sumner
dc0d767f27
Enable Promise.withResolvers()
...
https://github.com/tc39/proposal-promise-with-resolvers
Thanks @dcrousso
2023-07-26 23:52:57 -07:00
Jarred Sumner
86633e0af4
Start time performance improvements to build tools ( #3797 )
...
* Make os.cpus() faster on Linux
* Fix crash
See https://github.com/ziglang/zig/issues/16540
* Handle watcher_count == 0
* Add assertion
* Clean up lifetimes of fs watcher a little
* ✂️
* Use `errdefer`
* Make the error better
* Make os.cpus() more lazy
* Please don't translate-c on the entire C standard library
* immediately closing works correctly is still bug
* ops
* fmt+fixeup
* add back verbose
* free instead of destroy
* remove destroy option for watcher tasks
* flush verbose and add debug log
* fixup files
* use log for debug
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: cirospaciari <ciro.spaciari@gmail.com >
2023-07-26 21:35:49 -07:00
Jarred Sumner
ec2cf38ad8
[fetch] Ignore invalid Content-Encoding header ( #3834 )
...
Fixes #3802
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-26 20:24:36 -07:00
Colin McDonnell
34fd4df646
Fix broken anchors
2023-07-26 17:11:15 -07:00
Jarred Sumner
a6d54e5949
Update macro-test.test.ts
2023-07-26 16:56:26 -07:00
Jarred Sumner
664ccec7d3
Disable concurrent transpiler in macros
2023-07-26 16:54:36 -07:00
Dylan Conway
1a558ef753
fix decorator and declare ( #3828 )
...
* return the prop if there are decorators
* test and comment
2023-07-26 16:31:08 -07:00
Jarred Sumner
f3200ac0ca
Don't hoist bun plugin in concurrent transpiler
2023-07-26 16:06:04 -07:00
Jarred Sumner
011b50589c
Concurrent Transpiler ( #3816 )
...
* Concurrent Transpiler
* Fix bug with some improts and add jsc alias
* Some comments
* Fix crash
* Update module_loader.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-26 15:36:05 -07:00
Alex Lam S.L
06503663b1
[install] handle workspace:[alias@]range ( #3819 )
2023-07-26 15:35:47 -07:00
Colin McDonnell
4c89c60867
Add files ( #3826 )
2023-07-26 14:59:39 -07:00
Colin McDonnell
6bfee02301
Fix typo
2023-07-25 12:27:27 -07:00
Ai Hoshino
0297cb1527
fix the encoding of dirname's return value. ( #3799 )
2023-07-25 05:49:48 -07:00
Jarred Sumner
4209703b35
Make this other name better
2023-07-25 02:08:51 -07:00
Jarred Sumner
8edeb617a8
Make this name better
2023-07-25 02:08:23 -07:00
Ai Hoshino
130079b558
fix some cases in the dirname function. ( #3785 )
...
Close : #3782
2023-07-25 00:41:22 -07:00
Jarred Sumner
8356830727
Trace printing at runtime
2023-07-24 22:00:43 -07:00
Jarred Sumner
5edb756533
Trace module resolution
2023-07-24 21:59:50 -07:00
Jarred Sumner
e402159df1
test gardening
2023-07-24 19:36:53 -07:00
dave caruso
8a0152e129
Merge import.meta.require and require to be the same thing ( #3732 )
...
* Merge import.meta.require and require to be the same thing
* support `require` and BunPlugin (runtime plugin)
* plugins
* unused code
* revert launch.json
2023-07-24 19:32:04 -07:00
Jarred Sumner
1f1d0bfcfb
Make this test less flaky
2023-07-24 19:18:07 -07:00
Jarred Sumner
4ebf858f43
Less flaky
2023-07-24 19:14:41 -07:00
Jarred Sumner
90ce74a43e
Skip test
2023-07-24 19:13:25 -07:00
Jarred Sumner
e1a59d355a
slow test is allowed to be slow
2023-07-24 19:11:53 -07:00
Dylan Conway
e154763e4d
fix rope string push ( #3796 )
...
* push to next next
* couple more tests
* end
2023-07-24 19:08:56 -07:00
Jarred Sumner
ac10a1b633
move this to troubleshooting
2023-07-24 17:16:34 -07:00
Alex Lam S.L
961312eab0
[install] fix workspace override of aliased npm dependency ( #3784 )
2023-07-24 17:01:43 -07:00
Jarred Sumner
6ca50526d7
bun:sqlite gets 10% faster ( #3780 )
...
* bun:sqlite gets 10% faster
❯ bun-debug bun.js # After
[0.03ms] ".env"
cpu: Apple M1 Max
runtime: bun 0.7.1_debug (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
------------------------------------------------------------------- -----------------------------
SELECT * FROM "Order" 13.65 ms/iter (12.79 ms … 15.41 ms) 13.69 ms 15.41 ms 15.41 ms
SELECT * FROM "Product" 31.02 µs/iter (27.08 µs … 1.33 ms) 30.33 µs 42.33 µs 45.25 µs
SELECT * FROM "OrderDetail" 140.2 ms/iter (127.97 ms … 172.31 ms) 144.02 ms 172.31 ms 172.31 ms
bun/bench/sqlite on jarred/faster-sqlite took 5s
❯ bun bun.js # Before
[0.52ms] ".env"
cpu: Apple M1 Max
runtime: bun 0.7.1 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
------------------------------------------------------------------- -----------------------------
SELECT * FROM "Order" 15.44 ms/iter (14.36 ms … 17.94 ms) 15.59 ms 17.94 ms 17.94 ms
SELECT * FROM "Product" 36.89 µs/iter (31.54 µs … 3.18 ms) 37.25 µs 49.75 µs 54.88 µs
SELECT * FROM "OrderDetail" 156.63 ms/iter (151.68 ms … 175.93 ms) 157.63 ms 175.93 ms 175.93 ms
* Handle empty just incase
* GCDeferral scope is unnecessary
* Make this code more careful
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-24 17:01:21 -07:00
Colin McDonnell
31976f6af1
Update install method order
2023-07-24 14:40:13 -07:00
Jarred Sumner
967ccb5d50
Upgrade WebKit ( #3777 )
...
* Upgrade to latest WebKit
* Upgrade WebKit
* hm
* Fix failing tests
* Delete utf8-encoding-fixture.bin.cmp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-23 22:37:48 -07:00
Alex Lam S.L
d8135e85ca
more tests for #3754 ( #3774 )
2023-07-23 21:19:10 -07:00
Jarred Sumner
b02f097f4d
Fix bugs with connecting to localhost ( #3758 )
...
* Fix bugs with connecting to localhost
* Update uws
* More logs
* Allow not setting a hostname
* Make server.hostname & server.protocol faster
* Fixup
* normalize listening host
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-23 05:13:48 -07:00
Jarred Sumner
4e852918a3
Raise redirect limit in bundler
2023-07-23 03:59:43 -07:00
Jarred Sumner
c76516fa38
Fixes #3764
2023-07-23 03:58:10 -07:00
Alexander Trefz
ce77266cc5
Update nodejs-apis.md ( #3762 )
...
`structuredClone` is implemented as of v0.7
2023-07-23 03:40:46 -07:00
Artur Androsovych
ce9bba9dd5
Update development.md ( #3718 )
...
* Update `development.md`
* Update `development.md`
2023-07-22 22:24:59 -07:00
Jarred Sumner
e2e44661c2
Explicitly ref/unref blobs before extracting the value ( #3755 )
...
* Explicitly ref/unref blobs before extracting the value
* ✂️
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-22 22:20:10 -07:00
Jarred Sumner
601fd3ead5
in Bun.write(), defer creating the Promise until we're just about to schedule the task
2023-07-22 20:49:35 -07:00
Alex Lam S.L
07e08b086a
[install] improve workspace substitution of npm dependencies ( #3754 )
...
- respect semver ranges
2023-07-22 20:05:24 -07:00
Jarred Sumner
53eb126898
ref() before creating the JSPromise
2023-07-22 19:56:39 -07:00
Jarred Sumner
6809d08a90
Make zig build obj fail a little later when src/runtime.out.js or src/fallback/out.js doesn't exist
2023-07-22 19:35:00 -07:00
Jarred Sumner
6402967b6d
bump!
2023-07-22 17:08:31 -07:00
Jarred Sumner
bfaf095c2e
Fixes https://discord.com/channels/876711213126520882/1131175053409656833/1131175053409656833
...
@tr1ckydev this fixes the issue you ran into, see the diff for an example usage of a Bun.plugin that makes a network request on import.
2023-07-22 16:59:54 -07:00
dave caruso
b17b61b8c6
fix path.format for vite build ( #3734 )
...
* fix path.format for vite
* Update path.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-22 16:45:45 -07:00
Jarred Sumner
27c88c8046
Fixes #3753
2023-07-22 16:42:17 -07:00
Ai Hoshino
04d19d6f6a
Fix writeFileSync when the mode is greater than 0o777. ( #3747 )
...
Close : #3740
2023-07-22 07:10:36 -07:00
Jarred Sumner
3418feb2e9
Fixes #3744
2023-07-22 04:33:54 -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
Jarred Sumner
636cec03e1
Use WebKit's URL parser in fetch() and bun install ( #3730 )
...
* Use WebKit's URL parser in fetch() and `bun install`
* Allocate less memory
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-21 23:27:28 -07:00
Ai Hoshino
1ecd9f8a18
handle latin1 in Bun__encoding__toString. ( #3739 )
...
Close : #3738
2023-07-21 22:01:26 -07:00
Dylan Conway
2323f5d08d
fix #3716 ( #3733 )
...
* don't break on comments for process env variables
* break for `\r` and `\n`
* don't parse process env vars
2023-07-21 20:33:15 -07:00
Alex Lam S.L
311dffc690
improve test ( #3731 )
...
- minor build diffs
2023-07-22 02:42:30 +03:00
Ciro Spaciari
c4f062dbf4
clean tables before testing ( #3721 )
...
* clean tables before testing
* typo
2023-07-21 16:13:04 -07:00
Vaughan Rouesnel
7ac94e5b4c
Typo in loaders.md ( #3728 )
2023-07-21 15:43:34 -07:00
Dylan Conway
aa1ad7f009
string escape edgecase ( #3717 )
...
* fix edgecase when joining rope strings with backtick
* bonus bugfix in ts decorator
* Update transpiler.test.js
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-21 01:35:06 -07:00
Dylan Conway
21bb3b2bdd
fix isFIFO ( #3715 )
...
* check poll ref flags
* Update WebCoreJSBuiltins.cpp
2023-07-21 00:18:15 -07:00
Jarred Sumner
cd49615e2c
fix flaky test
...
@paperdave we must always use `bunEnv` in the `env` to ensure that the color settings and other stuff doesn't cause bun to produce extraneous stdout input when using console.log
Additionally, the console.log was left in (which is okay)
2023-07-20 21:45:05 -07:00
Jarred Sumner
eb37794a3b
Bump
2023-07-20 21:34:42 -07:00
Jarred Sumner
da298635ef
Bump
2023-07-20 21:22:49 -07:00
Dylan Conway
218958dbd1
Update async_hooks.node.test.ts
2023-07-20 21:13:11 -07:00
Jarred Sumner
1c6e464a68
bump
2023-07-20 21:08:42 -07:00
dave caruso
9c85465a58
fix process.exit status code handling ( #3714 )
2023-07-20 19:16:56 -07:00
Jarred Sumner
2eb79afb2a
Update sqlite.md
2023-07-20 18:14:34 -07:00
dave caruso
020cf46346
Fix builtins again ( #3713 )
2023-07-20 17:33:40 -07:00
dave caruso
134c97a282
fix directory caching with workaround ( #3710 )
...
* ok
* test
2023-07-20 16:44:43 -07:00
dave caruso
e2c11c4856
fix process.binding ( #3711 )
2023-07-20 16:25:02 -07:00
Dylan Conway
9ad330d917
Update process.test.js
2023-07-20 15:32:20 -07:00
Jarred Sumner
ef89f03de6
Update text-decoder.test.js
2023-07-20 15:26:06 -07:00
Julian
c383c6cd81
Pass constructor arguments to TextDecoder ( #3692 )
...
* Make TextDecoder constructor use options parameter
The constructor now actually sets TextDecoder properties using the
options parameter.
* Defer decoder allocation to end of constructor
* Verify types of TextDecoder options
* TextDecoder throw TypeError on failure
* Tidying
2023-07-20 14:50:54 -07:00
Dylan Conway
68b4a64569
resolveRopeIfNeeded (#3708 )
2023-07-20 14:50:23 -07:00
Dylan Conway
8e12999917
set _preload_modules to empty array ( #3709 )
2023-07-20 14:50:13 -07:00
Jarred Sumner
73e44e16ea
Update Dockerfile
2023-07-20 14:49:57 -07:00
Ciro Spaciari
99da0ae54b
fix start delay on Worker ( #3707 )
...
* fix start delay on Worker
* fmt
* add delay test
2023-07-20 14:49:10 -07:00
Colin McDonnell
4686f5395e
Add number types for FFI ( #3706 )
2023-07-20 11:52:45 -07:00
Jarred Sumner
2dc90f3908
Update worker.test-d.ts
2023-07-19 23:59:37 -07:00
Colin McDonnell
53ad9b922f
Docs & types for 0.7 ( #3665 )
...
* Docs & types for 0.7
* Tweak
* Update
* Tweaks
* Tweak
* Tweaks
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-19 23:59:15 -07:00
Jarred Sumner
0b365781a8
Bump version to Bun v0.7.0
2023-07-19 23:57:41 -07:00
Jarred Sumner
dd46c11273
Support streams in response.formData() & request.formData, introduce Bun.readableStreamToFormData() ( #3697 )
...
* codegen
* FormData.from
* Fixes #3225
* Introduce `Bun.readableStreamToFormData`
* Update bun.d.ts
* Add examples
* add
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-19 23:12:06 -07:00
Jarred Sumner
8a13e02473
Fixes #3670 ( #3698 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-19 23:04:07 -07:00
Jarred Sumner
ed8be46a7b
Inlinebun object from workers
2023-07-19 22:53:28 -07:00
dave caruso
36866c4d79
Fix vite ( #3694 )
...
* Fix ServerWebSocket.readyState
* Add create_hash_table to our repo
* Fix #3216
2023-07-19 19:28:53 -07:00
dave caruso
dd58508684
Fix browser bundled string_decoder ( #3693 )
...
* Fix #3660
* doc fix
2023-07-19 17:37:20 -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
Jarred Sumner
723e9d1ea7
Fix make headers
2023-07-19 16:05:43 -07:00
Ciro Spaciari
f63398ffe4
update root certificates and add tls.rootCertificates ( #3688 )
...
* implement tls.rootCertificates
* add test
* bump uws/usockets
* bump uws + .len on certs
2023-07-19 16:02:29 -07:00
Ciro Spaciari
2fbf73535c
fix createDecipheriv ( #3680 )
...
* fix createDecipheriv
* fix createDecipheriv iv and password validations
2023-07-19 16:01:36 -07:00
dave caruso
ebbbd63ed6
fix #3681 ( #3690 )
2023-07-19 15:58:07 -07:00
Dylan Conway
bc28ec39cf
set did_panic flag ( #3687 )
2023-07-19 15:39:15 -07:00
Ciro Spaciari
568cadb51e
move constants module to cpp ( #3683 )
2023-07-19 15:39:02 -07:00
Dylan Conway
0dbcb84cbe
fix make headers
2023-07-19 15:26:14 -07:00
Jarred Sumner
d74d95d9ab
Better error for workspace dependency not found ( #3678 )
2023-07-20 00:08:52 +03:00
Jarred Sumner
a59ddb131e
Fix crash in postMessage that repro'd after ~100,000 messages
2023-07-18 23:09:39 -07:00
Jarred Sumner
8bd2b784a2
more progress on fixing gc issue
2023-07-18 20:49:11 -07:00
Dylan Conway
f494e1b50d
add padding bytes
2023-07-18 16:30:58 -07:00
Ciro Spaciari
112f01ca61
feature(constants) add constants/node:constants module and tests(prisma) use prima 5.0.0 + use same connection for postgres, add prisma mssql (disabled for now) ( #3672 )
...
* use prima 5.0.0 + use same connection for postgres
* change mongodb test URL
* constants module + mssql prisma test (disabled)
2023-07-18 16:09:18 -07:00
Ciro Spaciari
49231b2cb9
patch checkServerIdentity ( #3671 )
2023-07-18 16:03:05 -07:00
Jarred Sumner
0179ebcb8c
Update workers.md
2023-07-18 05:00:09 -07:00
Alex Lam S.L
1790357021
[jest] execute lifecycle hooks on empty blocks ( #3663 )
...
fixes #3494
2023-07-18 04:54:24 -07:00
Jarred Sumner
105919d7ae
Clarify
2023-07-18 04:51:29 -07:00
Jarred Sumner
777ee4ecec
Fixes #3669
2023-07-18 04:35:04 -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
71f1aa1802
Enable postgres prisma test
2023-07-17 23:17:06 -07:00
Jarred Sumner
eaff66b098
Emit writeBarrier in napi_module_register
2023-07-17 23:07:09 -07:00
Jarred Sumner
b760d1da30
Fix potential crash in process.dlopen()
2023-07-17 23:02:33 -07:00
Jarred Sumner
728c8fdcdb
Implement process.{stdout, stderr}.{columns, rows, getWindowSize}
2023-07-17 21:21:43 -07:00
Ciro Spaciari
13b54fbdb8
[tls] General compatibility improvements ( #3596 )
...
* wip
* subjectaltname
* more progress
* bindings
* fmt
* getCert/getPeerCertificate
* fix checkServerIdentity
* fix checkServerIdentity
* add a lot of TLSSocket functions
* getEphemeralKeyInfo fix and comment
* add alternative for getEphemeralKeyInfo
* add get session and set session
* fix isSessionReused
* get back the raw data for MSSQL
* fixeup
* fixup getSession + tests
* fix doc + fmt
* getFinished/getPeerFinished
* codegen
* fixup
* revert webkit
* more fixes
* ssl helper + revert test oops
* asserts
2023-07-17 19:39:09 -07:00
Dylan Conway
9273e29f0e
package json main field extension order ( #3664 )
2023-07-17 19:26:33 -07:00
Alex Lam S.L
9f031b3642
[install] handle duplicated workspace declarations gracefully ( #3662 )
...
fixes #3644
2023-07-17 16:06:31 -07:00
Colin McDonnell
ca3b7fa3c9
Clean up worker docs
2023-07-17 13:10:22 -07:00
Colin McDonnell
8a176913d8
Tweak test docs
2023-07-17 11:42:13 -07:00
Alex Lam S.L
570a44d73a
workaround readable-stream compatibility ( #3626 )
...
- update `bun link` tests
- update `tests/bun.lockb`
- drop unused import in test
2023-07-17 20:05:01 +03:00
Jarred SUmner
5218a33fb6
Fix flaky process test
2023-07-17 04:51:26 -07:00
Jarred Sumner
58824ea743
Fix test with incorrect text
2023-07-17 04:44:56 -07:00
Jarred Sumner
99de971359
Fix incorrect name
2023-07-17 04:21:00 -07:00
Jarred Sumner
55b5aa3571
Fix speculative crashes in console.log(formData) and console.log(headers)
2023-07-17 04:18:43 -07:00
Jarred Sumner
6ca20424d6
Fix crash in console.log(urlSearchParams) on a URLSearchParams object with a lot of keys
2023-07-17 04:18:43 -07:00
Jarred Sumner
36a25c3580
Fix memory leak in await new Response(latin1String).arrayBuffer() and await Response.json(obj).json() ( #3656 )
...
❯ mem bun --smol response-arrayBuffer.mjs
cpu: Apple M1 Max
runtime: bun 0.6.15 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
--------------------------------------------------------------------------------------------------- -----------------------------
new Response().arrayBuffer() (new string each call, latin1) 12.9 µs/iter (625 ns … 4.18 ms) 1 µs 567.17 µs 711.79 µs
new Response().arrayBuffer() (new string each call, utf16) 12.85 µs/iter (1.67 µs … 1.56 ms) 2.17 µs 462.75 µs 621.13 µs
new Response().arrayBuffer() (existing string, latin1) 6.53 µs/iter (6.21 µs … 7.07 µs) 6.64 µs 7.07 µs 7.07 µs
Peak memory usage: 49 MB
bun on jarred/memory-leak-fix took 2s
❯ mem bun response-arrayBuffer.mjs
cpu: Apple M1 Max
runtime: bun 0.6.15 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
--------------------------------------------------------------------------------------------------- -----------------------------
new Response().arrayBuffer() (new string each call, latin1) 1.2 µs/iter (1.04 µs … 1.42 µs) 1.22 µs 1.42 µs 1.42 µs
new Response().arrayBuffer() (new string each call, utf16) 2.74 µs/iter (2.42 µs … 6.37 µs) 2.68 µs 6.37 µs 6.37 µs
new Response().arrayBuffer() (existing string, latin1) 746.37 ns/iter (643.82 ns … 1.04 µs) 776.11 ns 1.04 µs 1.04 µs
Peak memory usage: 104 MB
bun on jarred/memory-leak-fix took 2s
❯ mem ~/.bun/bin/bun response-arrayBuffer.mjs
cpu: Apple M1 Max
runtime: bun 0.6.15 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
--------------------------------------------------------------------------------------------------- -----------------------------
new Response().arrayBuffer() (new string each call, latin1) 1.69 µs/iter (1.56 µs … 2.1 µs) 1.73 µs 2.1 µs 2.1 µs
new Response().arrayBuffer() (new string each call, utf16) 2.65 µs/iter (2.47 µs … 3.17 µs) 2.69 µs 3.17 µs 3.17 µs
new Response().arrayBuffer() (existing string, latin1) 667.67 ns/iter (547.67 ns … 1.28 µs) 694.21 ns 1.28 µs 1.28 µs
Peak memory usage: 2735 MB
bun on jarred/memory-leak-fix took 2s
❯ mem ~/.bun/bin/bun --smol response-arrayBuffer.mjs
cpu: Apple M1 Max
runtime: bun 0.6.15 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p995
--------------------------------------------------------------------------------------------------- -----------------------------
new Response().arrayBuffer() (new string each call, latin1) 13.51 µs/iter (541 ns … 3.2 ms) 1.92 µs 553.42 µs 709.92 µs
new Response().arrayBuffer() (new string each call, utf16) 13.07 µs/iter (1.71 µs … 3.43 ms) 2.13 µs 451.21 µs 651.67 µs
new Response().arrayBuffer() (existing string, latin1) 6.25 µs/iter (5.79 µs … 6.81 µs) 6.4 µs 6.81 µs 6.81 µs
Peak memory usage: 292 MB
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-17 04:15:13 -07:00
Jarred Sumner
13b5d9d4de
20% faster deserialize ( #3655 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-17 02:22:00 -07:00
Jarred Sumner
fa4db1de42
Document --smol
2023-07-16 23:24:00 -07:00
Jarred Sumner
2a02f3d669
Add --smol to bunfig
2023-07-16 23:23:33 -07:00
Jarred Sumner
75213aad37
Document serialize/deserialize
2023-07-16 23:16:54 -07:00
Jarred Sumner
5856639833
Add serialize snippet
2023-07-16 23:16:38 -07:00
Jarred Sumner
edeb3b48e8
Fix test
2023-07-16 22:46:06 -07:00
Jarred Sumner
3613429dc3
Update workers.md
2023-07-16 22:43:38 -07:00
Jarred Sumner
7917ebd58f
Fixes base64url encoding for crypto ( #3654 )
...
* Fixes base64url encoding for crypto
* 🍏
* Update nodejs-apis.md
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 22:42:19 -07:00
Jarred Sumner
a86d00c672
Update nav.ts
2023-07-16 21:43:22 -07:00
Jarred Sumner
d5c51092c8
rename
2023-07-16 21:40:07 -07:00
Jarred Sumner
6a234e6fce
Add structuredClone microbenchmark
2023-07-16 21:17:55 -07:00
Jarred Sumner
dc766eb18a
Add --smol flag
2023-07-16 21:17:47 -07:00
Jarred Sumner
209dc981c0
Implement Workers ( #3645 )
...
* copy files
* format
* options
* Introduce `Worker`, `onmessage`, `onerror`, and `postMessage` globals
* Stub `Worker.prototype.ref` & `Worker.prototype.unref`
* Update web_worker.zig
* Worker works
* Add "mini" mode
* add wakeup
* Partially fix the keep-alive issue
* clean up refer behavior
* Implement `serialize` & `deserialize` in `bun:jsc` & add polyfill for `node:v8`
* Types & docs
* Update globals.d.ts
* Add mutex
* Fixes
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 21:15:24 -07:00
Jarred Sumner
7fc392b182
Support napi_wrap in constructors ( #3614 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 20:32:33 -07:00
Jarred Sumner
6baa08313c
Fixes #3641 ( #3643 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 20:32:18 -07:00
Jiri Spac
131ed06020
docs: add one missing line in typescript.md ( #3650 )
2023-07-16 20:31:54 -07:00
Dylan Conway
e546e4064c
structuredClone types
2023-07-14 19:49:15 -07:00
Dylan Conway
c39c11e101
structured clone ( #3637 )
...
* copy `SerializedScriptValue`
* format
* make `SerializedScriptValue` compile
* add `transfer` option
* tests
* serialize/deserialize blobs
* tests for blobs
* serialize/deserialize file blobs
* more tests
* small cleanup
* format
* small changes + serialize offset
* slice helper
* map and set test
2023-07-14 19:37:22 -07:00
Colin McDonnell
2551210426
Update docs
2023-07-14 11:33:07 -07:00
Colin McDonnell
43abf2629f
Remove fdatasync from types
2023-07-13 17:48:46 -07:00
Colin McDonnell
325147261f
Update docs/types for process ( #3631 )
...
* Update docs/types for process
* Tweaks
* Tweaks
* Fix types
2023-07-13 17:40:46 -07:00
Tiramify (A.K. Daniel)
044b09afc2
Impl. fix ( #3630 )
2023-07-13 14:29:24 -07:00
Ashcon Partovi
9eb8eea2a8
Implement ping(), pong(), terminate() for WebSocket client and server ( #3257 )
2023-07-13 09:39:43 -07:00
Jarred Sumner
04b4157232
Fixes #3629
2023-07-13 02:57:25 -07:00
Jarred Sumner
a02a79e26c
Bump WebKit
2023-07-12 20:48:52 -07:00
dave caruso
ae0a724981
Improve our internal typedefs ( #3608 )
...
* types
* some more
* yeah
* i think that fixes it
* oop
2023-07-12 15:21:55 -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
4e1a81231c
Update build-id
2023-07-12 01:37:08 -07:00
Jarred Sumner
b566573977
Fix another crash in Error.captureStackTrace ( #3611 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-11 21:01:35 -07:00
Jarred SUmner
666feb3b7e
Fix crash on linux when throwing SystemError from C++
2023-07-11 20:52:10 -07:00
Jarred Sumner
5ea32a976e
Update process.test.js
2023-07-11 19:49:41 -07:00
Jarred Sumner
34b0e7a2bb
Update ZigGlobalObject.cpp
2023-07-11 19:06:49 -07:00
Jarred Sumner
c5f2280489
Implement process.kill and process._kill
2023-07-11 19:06:01 -07:00
Jarred Sumner
a686b3bfc1
Fixes #3595
2023-07-11 19:00:51 -07:00
dave caruso
a1fb289c96
typo ( #3610 )
2023-07-11 18:50:34 -07:00
Dylan Conway
8ca2194a37
fix #3597 ( #3609 )
...
* fix #3597
* Update http.ts
* initialize to true
2023-07-11 18:49:35 -07:00
Jarred Sumner
03904f73cc
Merge branch 'jarred/throw-if'
2023-07-11 17:48:52 -07:00
Jarred Sumner
2106e1d7f6
Tests
2023-07-11 17:48:13 -07:00
Jarred Sumner
854ddaa909
Implement throwIfNoEntry
2023-07-11 17:44:29 -07:00
Colin McDonnell
609f81a746
Add npmrc note
2023-07-11 15:32:52 -07:00
Jarred Sumner
fd4c8fb871
Merge branch 'jarred/fix-http-compression'
2023-07-11 13:09:37 -07:00
Jarred Sumner
bab58b7541
Avoid Object.getPrototypeOf
2023-07-11 13:07:03 -07:00
Dylan Conway
5c8726d602
process signal events ( #3569 )
...
* signal events
* simple tests
* ignore SIGSTOP
* better tests
* use `EventEmitter`
* use `Bun__getDefaultGlobal`
* progress
* don't use 'Bun__getDefaultGlobal`
* fix tests
* remove signals from map
* update tests
* don't overwrite event emitter methods
* avoid two lookups
* use `std::once`
* releaseEarly()
* Remove signal handler after use
* Update call-raise.js
* Create process-signal-handler.fixture.js
* Don't register duplicates
* Add missing lock
* another test
* update test
* revert some changes
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-11 12:48:46 -07:00
Dylan Conway
ae7bc37e94
fix iterating stack trace ( #3600 )
...
* `i + 1` and remove `defer`
* a test
* fix test
2023-07-11 12:48:32 -07:00
dave caruso
31ab56d362
Fix: console.log with class constructors ( #3602 )
...
* Fix console.log with class constructors
* oops
* fix it
* lol
* fix test
2023-07-11 12:48:19 -07:00
simylein
4b333b2d35
docs(sqlite): database prepare types reflect runtime ( #3599 )
...
* docs(sqlite): database prepare types reflect runtime
* Update sqlite.d.ts
---------
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
2023-07-11 09:09:06 -07:00
Hanaasagi
c4c5eb2d32
use Object.getPrototypeOf
2023-07-11 21:31:49 +09:00
Ai Hoshino
e7afae305c
Merge branch 'main' into fix-http
2023-07-11 19:35:11 +08:00
Hanaasagi
17031936c8
small fix, check if the method has been reassigned.
2023-07-11 20:32:09 +09:00
dave caruso
b2c576bba2
fix "readable" event being emitted incorrectly ( #3475 )
...
* fix "readable" event being emitted incorrectly
* fix impl and add test
* changes
* asdfghj
* esm
2023-07-10 18:25:20 -07:00
Ciro Spaciari
4af4b508a1
feat(crypto) add getCurves ( #3598 )
...
* add getCurves
* add nodefallbacks
* update docs
* oops
2023-07-10 17:14:37 -07:00
Hanaasagi
0c2df4ae01
ignore check
2023-07-10 22:33:07 +09:00
Ai Hoshino
cc0d920018
Merge branch 'main' into fix-http
2023-07-10 21:12:00 +08:00
Hanaasagi
438d54f186
add tests
2023-07-10 22:04:39 +09:00
Hanaasagi
c6e1135548
call writeHead before send headers
...
Close : #3585
2023-07-10 21:35:10 +09:00
Jarred Sumner
ec11170311
Fixes #3588 ( #3590 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-10 02:21:03 -07:00
Jarred Sumner
538bcef731
Update globals.d.ts
2023-07-10 01:33:46 -07:00
Jarred Sumner
93b0e94410
trim node:stream a little
2023-07-10 01:26:02 -07:00
Jarred Sumner
963d4311e6
Fixes #3530 ( #3587 )
...
* Fixes #3530
* Handle OOM
* Add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-09 22:36:24 -07:00
Jarred Sumner
2f5e4fffe9
Implement process.memoryUsage() and process.cpuUsage() ( #3586 )
...
* Implement process.memoryUsage() and process.cpuUsage()
* Avoid mi_process_info
* Update bench
* Update Process.cpp
* fixup
* More tests + linux fixup
* Skip it for now since it seems less accurate
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-09 21:50:19 -07:00
Jarred Sumner
ca42c820d2
Implement nearly all of process object methods and properties ( #3581 )
...
* Add special case
* Make process object load faster
* Fix openStdin
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-09 16:33:49 -07:00
Ai Hoshino
565d1689e9
fix metadata bits of uuid (randomUUID()) ( #3583 )
...
* fix uuid version
Close: https://github.com/oven-sh/bun/issues/3575
* add unittest
* small fix
* avoid unnecessary copying
2023-07-09 07:20:52 -07:00
Jarred Sumner
59570fe237
Handle case with TS decorators and export default anonymous class ( #3578 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 17:41:24 -07:00
Jarred Sumner
aa8b832ef6
Implement process.on("beforeExit", cb) and process.on("exit", cb) ( #3576 )
...
* Support `process.on('beforeExit')` and `process.on('exit')`
* [bun:sqlite] Always call sqlite3_close on exit
* Update process.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 14:26:19 -07:00
Jarred Sumner
fa632c3331
Fix bug with decorators not being generated in export default class ( #3577 )
...
* Fix bug with decorators not being generated in `export default class`
* Update decorator-export-default-class-fixture.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 04:00:55 -07:00
Jarred Sumner
5846ad00ed
Add assertion
2023-07-07 22:01:58 -07:00
Jarred Sumner
e26d3821ce
Update settings.json
2023-07-07 22:01:43 -07:00
Jarred Sumner
fceacea37c
Unmark as TODO
2023-07-07 22:01:02 -07:00
Jarred Sumner
52b7962dae
Use BunString in JSBundlerPlugin ( #3557 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-07 21:20:30 -07:00
Jarred Sumner
386d8b7836
Update test
2023-07-07 21:20:16 -07:00
Jarred Sumner
67ee498861
Fix potential coercion issue ( #3558 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-07 20:12:39 -07:00
Artur Androsovych
42eacaf3a9
Update installation guide in development.md ( #3532 )
...
* Update installation guide in `development.md`
* Updates
---------
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-07-07 16:24:07 -07:00
Ai Hoshino
c0cf7b4501
fix decoding invalid UTF-8 input ( #3563 )
...
* fix decoding invalid UTF-8 input
Close: https://github.com/oven-sh/bun/issues/3562
* add unittest
2023-07-07 15:10:49 -07:00
Colin McDonnell
affd06d05c
Update types, partially fix typecheck ( #3551 )
...
* Update types
* Remove caret
2023-07-07 15:10:33 -07:00
Jarred Sumner
7ab8d832fb
Add obscure HTTP methods ( #3553 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-07 00:38:18 -07:00
Jarred Sumner
0ecdbf4793
[node:fs] read, write - support large numbers and BigInt ( #3556 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-07 00:33:43 -07:00
Jarred Sumner
284aaec3cd
Remove unnecessary @setRuntimeSafety(false)
2023-07-06 23:50:32 -07:00
Dylan Conway
9bebb7f03d
add [dir] to default
2023-07-06 20:51:41 -07:00
Jarred Sumner
5c0a5646cd
Update list
2023-07-06 17:11:01 -07:00
Jarred Sumner
4d2c86fd5c
Add util.toUSVString
2023-07-06 17:08:01 -07:00
Jarred Sumner
d905dbe214
Minify zlib because its huge
2023-07-06 16:50:03 -07:00
Jarred Sumner
038ca83004
Add missing export in url
2023-07-06 16:49:41 -07:00
Colin McDonnell
d377265b67
Update trustedDeps doc
2023-07-06 15:44:48 -07:00
Colin McDonnell
a415f482db
Update trustedDeps doc
2023-07-06 15:33:49 -07:00
Ciro Spaciari
954b6fcaf3
refactor ( #3543 )
2023-07-06 13:55:27 -07:00
Dylan Conway
abe095dd1e
fixes #3544 ( #3549 )
2023-07-06 13:55:00 -07:00
Colin McDonnell
109ebc14fd
Various docs updates ( #3437 )
...
* Various docs updates
* Add mocks page
* Fix make
* WebKit instructions
* Update instructions
* Updates
* Update nodejs compat table
* Document trusted deps
* Tweak trustedDependencies docs
* Document --exact
* Update test docs
* Tweaks
* Boring
* Remove redundant j
* Undo makefile changes
* Undo makefile changes
* Update page title
* Regen
* Undo changes
2023-07-06 13:02:29 -07:00
Ciro Spaciari
95ddfcc437
fix query without slash ( #3547 )
2023-07-06 12:01:16 -07:00
Jarred Sumner
ee57935260
Fixes #3537 ( #3539 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-06 00:06:43 -07:00
Dylan Conway
6bf8f6f9f2
don't unwrap react below version 18.0.0 ( #3538 )
...
* don't unwrap react below version 18
* empty string
* also `react-dom`
2023-07-05 22:23:32 -07:00
Ciro Spaciari
8869bac411
fix callbacks on release version ( #3531 )
2023-07-05 22:22:56 -07:00
Dylan Conway
f61d9ef476
Update websocket_http_client.zig
2023-07-05 12:45:20 -07:00
Jarred Sumner
3aaec120e7
Fixes #3512 ( #3526 )
...
* Fixes #3512
* Fix `clearTimeout` and `clearInterval` not cancelling jobs same-tick
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-05 03:46:10 -07:00
Jarred Sumner
c864976da6
Fixes #3515 ( #3523 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-05 01:21:35 -07:00
Jarred Sumner
a7f5a91cfb
Fixes #3520 ( #3522 )
...
* Fixes #3520
* Update html_rewriter.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-05 00:08:59 -07:00
Ciro Spaciari
75816aa3ab
add envs on tests ( #3518 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-05 00:08:49 -07:00
Jarred Sumner
cac7dcdc76
Update build-id
2023-07-04 16:59:33 -07:00
Jarred Sumner
9c374eac96
Fix build determinism issue (thanks to @alexlamsl)
...
cc @dylan-conway this was the cause
2023-07-04 16:59:03 -07:00
Jarred Sumner
b2e28f133e
boop
2023-07-04 16:57:46 -07:00
Ciro Spaciari
3a93ddfab3
use sengrid account on nodemailer test ( #3517 )
2023-07-04 15:41:37 -07:00
Ciro Spaciari
979e999403
[tls] fix servername ( #3513 )
...
* fix servername
* add postgres tls tests
* update test packages
* add basic CRUD test
2023-07-04 15:40:26 -07:00
Ai Hoshino
c2755f770c
Add alias for readBigUInt64BE ... ( #3514 )
...
* Add alias for `readBigUInt64BE` ...
Close: https://github.com/oven-sh/bun/issues/3338
* add some tests for `readBigUint64BE` alias
* format code
2023-07-04 15:38:44 -07:00
Jarred Sumner
31f7f9e2dc
reduce count
2023-07-04 04:15:22 -07:00
Jarred Sumner
491e8f7e00
bump
2023-07-04 04:14:06 -07:00
Jarred Sumner
bb96aa5156
Fix crash
2023-07-04 04:07:35 -07:00
Jarred Sumner
f49a308d2c
Create readfile-not-found.mjs
2023-07-04 03:48:10 -07:00
Alex Lam S.L
3d0ffc48cb
[install] fix run-time module loading ( #3510 )
...
- fix version buffer confusion
- improve workaround to handle cached modules
fixes #3507
2023-07-04 02:09:58 -07:00
Jarred Sumner
bc7b5165be
less flaky
2023-07-04 01:51:09 -07:00
Jarred Sumner
a76b07a802
cleanup
2023-07-04 01:18:13 -07:00
Jarred SUmner
33bc507f74
Fix napi
2023-07-04 01:04:18 -07:00
Jarred Sumner
3345a7fc3c
Allow zero length WebSocket client & server messages ( #3488 )
...
* Allow zero length WebSocket client & server messages
* Add test
* Clean this up a little
* Clean up these tests a little
* Hopefully fix the test failure in release build
* Don't copy into the receive buffer
* Less flaky
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-03 20:53:41 -07:00
Jarred Sumner
b26b0d886c
Fix napi bug
2023-07-03 15:57:10 -07:00
Ciro Spaciari
034577c9da
[fix] patch fs.watch sym link ( #3481 )
...
* oopsie
* add tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-03 14:08:49 -07:00
Jarred Sumner
424717a973
Fixes #3317
2023-07-03 13:47:37 -07:00
Jarred Sumner
e5f93ddf55
Update lifecycle.md
2023-07-03 13:46:20 -07:00
Jarred Sumner
983039a18a
Fixes #3508
2023-07-03 13:16:57 -07:00
Ciro Spaciari
a7a01bd52f
[tls] add socket parameter, setServername and ALPNprotocols support ( #3457 )
...
* add socket parameter support
* refactor #socket
* add test and more fixs
* some fixes
* bump uws
* handlers fix
* more fixes
* fix node net and node tls tests
* fix duplicate port
* fix deinit on CallbackJobs
* cleanup
* add setImmediate repro
* add test to setImmediate
* this is necessary?
* fix prependOnce on native listener
* try to findout the error on nodemailer CI
* show error message
* Update bun.lockb
* prettier
* Use exact versions of packages
* add alpnProtocol support
* update
* emit error when connect fails on net.Socket
* format
* fix _write and cleanup
* fixup
* fix connect, add alpn test
* fix socket.io
* add socket parameter to TLSSocket
* add TLSSocket socket first parameter
* fixup and _start
* remove flask tests
* fmt
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-03 12:19:50 -07:00
Jarred Sumner
48d726bfd0
Update time.md
2023-07-02 23:48:31 -07:00
Jarred Sumner
12a342b6c0
Update time.md
2023-07-02 23:47:48 -07:00
Jarred Sumner
1206352b4a
Update time.md
2023-07-02 23:46:08 -07:00
Jarred Sumner
9da9bac30c
Update time.md
2023-07-02 23:18:58 -07:00
Jarred Sumner
cd243f40ee
Update time.md
2023-07-02 23:10:50 -07:00
Jarred Sumner
000417731b
Add time doc
2023-07-02 23:07:33 -07:00
Jarred Sumner
c77518ff93
Update writing.md
2023-07-02 22:57:24 -07:00
Jarred Sumner
f0a795b568
Stub out useFakeTimers and useRealTimers
2023-07-02 22:42:13 -07:00
Jarred Sumner
aa38e51afb
Support mocking new Date() & Date.now() in bun:test ( #3501 )
...
* Support changing the time
* Bump WebKit
* Update bun.lockb
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 22:09:50 -07:00
dave caruso
c21fadf9bc
set content-length 0 in some cases ( #3503 )
2023-07-02 20:24:15 -07:00
Jarred Sumner
0db31c2b43
Fixes #3499
2023-07-02 20:18:21 -07:00
Jarred Sumner
3a0a423bce
Add comment
2023-07-02 20:17:25 -07:00
Jarred Sumner
eb90ce50c3
Use fast path for Base64 in btoa ( #3504 )
...
* Use fast path for Base64 in `atob`
* Fix utf16, crash on linux
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 20:16:52 -07:00
Jarred Sumner
c3f8593f8c
[node:buffer] Implement isUtf8 and isAscii ( #3498 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 18:06:21 -07:00
dave caruso
4cbda049e9
fix zero length env var ( #3496 )
2023-07-02 10:12:31 -07:00
Jarred Sumner
69396aae01
Fixes #3495
2023-07-02 10:09:52 -07:00
Jarred Sumner
b05879e9e2
Fixes #3489 ( #3490 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 01:06:40 -07:00
Jarred Sumner
8001038376
Use exact versions in tests
2023-07-01 22:43:59 -07:00
Jarred Sumner
c7cc618376
Fix leak in fd ( #3487 )
...
* Fix file descriptor leak
* Skip unnecessary clone
* Don't break --hot
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-01 21:58:06 -07:00
Jarred Sumner
9fecb3dfb9
Bump
2023-07-01 21:10:55 -07:00
Jarred Sumner
617226e584
Make this test less flaky
2023-07-01 21:10:43 -07:00
Jarred Sumner
c72c82b970
Make this test less flaky
2023-07-01 21:08:26 -07:00
Jarred Sumner
6cae6ebafe
Make buffer.toString("base64") 4x faster ( #3486 )
...
* Add libbase64
* Add bench
* Update licensing.md
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-01 20:02:50 -07:00
Jarred Sumner
a2cca6e292
Update WebCoreJSBuiltins.cpp
2023-07-01 18:31:38 -07:00
Jarred Sumner
01d3b130a9
Update build-id
2023-07-01 17:44:40 -07:00
Jarred Sumner
af46a8ded1
Make this test less flaky
2023-07-01 17:38:19 -07:00
Jarred Sumner
f00e2be548
Use BunString in SystemError ( #3485 )
...
* Use `BunString` in SystemError
* Use Bun::toStringRef when we will de-ref strings
* Move `napi_create_error` to C++ to support `code` being a Symbol potentially
* Update blob.zig
* Make this test less flaky
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-01 17:37:44 -07:00
Jarred Sumner
a4fe433db7
Slight fixup
2023-07-01 17:09:59 -07:00
Jarred Sumner
f3833376e7
small cleanup
2023-07-01 17:07:37 -07:00
Ai Hoshino
4720fa1207
[WIP]Fix calling Buffer.toString with (offset, length, encoding) ( #3467 )
...
* Allow `toString` to be called with `(offset, length, encoding)`.
Close : #3085
* handle undefined value
* add tests for buffer.xxxSlice
* fix parameters
* fix offset and length
2023-07-01 17:01:52 -07:00
Jarred Sumner
df10252979
Make HTTP Request struct use 8 bytes less memory ( #3483 )
...
* Make HTTP Request struct use 8 bytes less memory
* Update server.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-01 14:40:05 -07:00
Dylan Conway
c033d55c47
skip private class fields ( #3484 )
2023-07-01 14:38:38 -07:00
Jarred Sumner
c794ea7ea7
Add test
2023-07-01 13:31:12 -07:00
Alex Lam S.L
02f707f231
[jest] fix lifecycle hook execution order ( #3461 )
...
* [jest] fix lifecycle hook execution order
* strip `std.debug.assert()` from release build
2023-07-01 11:44:04 -07:00
dave caruso
d356cd5d48
implement perf_hooks.constants ( #3476 )
2023-06-30 14:58:38 -07:00
Stijn Van Hulle
b83faf8018
fix: export ClientRequest and OutgoingMessage as part of the node:http package ( #3470 )
2023-06-30 10:04:46 -07:00
Alex Lam S.L
2a73d3c793
[install] handle workspace: specifier correctly ( #3474 )
...
fixes #3430
2023-06-30 10:03:53 -07:00
Jarred Sumner
039bbc68ad
Add missing "prependListener" function
2023-06-29 21:24:55 -07:00
dave caruso
b9460087e3
Fixes node:http and node:stream so ytdl-core works. ( #3452 )
...
* fix crash in readablestate
* make node:https request+get actually use https
* use a native readablestream in IncomingMessage
* tweaks
* fix abort crash
* emit close by default
* remove abort. this isnt a real function
* add validate functions, fixup some other requested changes. not done yet
* Update WebCoreJSBuiltins.cpp
* Update JSReadableState.cpp
* Add some missing exports
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-29 20:36:18 -07:00
Jarred Sumner
c42a00f9df
Fixes #3462 ( #3465 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-29 20:14:12 -07:00
Dylan Conway
76b9cae259
handle multiple redirects
2023-06-29 17:19:16 -07:00
Jarred Sumner
70a87e1181
Make node:os tmpdir more consistent with Node.js
2023-06-29 16:37:38 -07:00
Dylan Conway
7af757d104
add setters for Agent properties ( #3460 )
...
* make `Agent` properties public
* back to private, added setters
* change properties to public
2023-06-29 15:47:00 -07:00
Dylan Conway
9c66fdc703
[bundler] avoid printing unnecessary declarations ( #3456 )
...
* skip declarations without values
* tests
* deoptimize cjs when decls are needed
2023-06-29 14:51:24 -07:00
dave caruso
fec0d15c4f
cant believe i missed this ( #3453 )
2023-06-29 08:53:44 -07:00
Jarred Sumner
853e377159
Revert "[jest] fix lifecycle hook execution order ( #3447 )" ( #3455 )
...
This reverts commit 182e8aa139 .
2023-06-29 08:30:21 -07:00
Jarred Sumner
8984c81961
Prevent integer overflow
2023-06-28 21:57:31 -07:00
Jarred Sumner
c6f6db95ff
Ref the strings
2023-06-28 21:56:45 -07:00
Jarred Sumner
8b2c72300c
Another test
2023-06-28 21:56:26 -07:00
Jarred Sumner
8481f2922f
Add GC test for errors
2023-06-28 21:45:16 -07:00
Jarred Sumner
68e6fe00a4
Use bun.String for ZigException ( #3451 )
...
* Use `bun.String` for `ZigException`
* woopsie
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-28 21:11:06 -07:00
Dylan Conway
3258bed1c0
use main field over module for runtime ( #3448 )
...
* use main field over module for runtime
* move flag to `Resolver`
* set `prefer_module_field` in `initWithModuleGraph`
2023-06-28 19:28:53 -07:00
Jarred Sumner
32d9abcc03
Fix bad test
2023-06-28 19:20:41 -07:00
dave caruso
0cee640199
export resolve6 from dns/promises ( #3450 )
2023-06-28 17:45:18 -07:00
Alex Lam S.L
182e8aa139
[jest] fix lifecycle hook execution order ( #3447 )
2023-06-28 16:27:15 -07:00
Jarred Sumner
945093ee7e
bump!
2023-06-28 16:22:46 -07:00
Jarred Sumner
086ca176be
Make these tests do more
2023-06-28 16:19:58 -07:00
Jarred Sumner
292647bd53
Introduce await Bun.file(path).exists() ( #3446 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-28 16:09:08 -07:00
Jarred Sumner
42ded70336
[node:http] Stub _implicitHeader fn
2023-06-28 13:55:58 -07:00
Jarred Sumner
3d5573921e
Error.prototype.stack gets sourcemapped stacktraces and introduce Error.appendStackTrace ( #3441 )
...
* Fix potential crash when reading sourcemapped stack traces
* Format & sourcemap Error.prototype.stack
* prevent double sourcemapping
* Introduce Error.appendStackTrace
* Fix source url
* hide private stack traces in non-debug builds
* fixes #3443
* Bump WebKit
* Fix test failure in vm.test
* Support new() & add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-28 13:53:09 -07:00
Jarred Sumner
43752ec3f0
Fix assertion failure in escapeHTML with UTF-16 text ( #3436 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-28 11:27:31 -07:00
Silas Rech
e6e3d9e368
Fix .randomInt() export ( #3438 )
2023-06-28 11:27:02 -07:00
Alex Lam S.L
0de5bb22af
[install] workaround run-time module loading issue ( #3432 )
2023-06-28 01:20:59 -07:00
Dylan Conway
f670c0fc18
don't overwrite __esModule
2023-06-27 18:23:56 -07:00
Dylan Conway
09994d6067
add __esModule
2023-06-27 17:34:31 -07:00
Benjamin Ryan
f81d084f5c
[bun:sqlite] enable FTS5 on linux build ( #3431 )
...
* [bun:sqlite] enable FTS5 on linux build
* prettier
2023-06-27 17:27:06 -07:00
Jarred Sumner
940c9a8185
Fix some checks
2023-06-27 16:16:47 -07:00
Dylan Conway
28d7507a5d
add todo comment
2023-06-27 14:55:13 -07:00
Jarred Sumner
4f34d48029
getIfPropertyExists is safer than getDirect ( #3391 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-27 13:42:25 -07:00
Dylan Conway
c78aa5a60f
fix macros
2023-06-27 13:23:01 -07:00
Revenity
7ba4ae11c9
Update Stric page in Ecosystem ( #3399 )
2023-06-27 12:37:57 -07:00
Jarred Sumner
5376b5b5d6
Add builtin exports list
2023-06-27 10:29:22 -07:00
Ashcon Partovi
3ec6c9e4fb
Fix docker tag on release
2023-06-27 09:10:43 -07:00
Jarred Sumner
2eb885c1d8
Regenerate
2023-06-27 08:24:35 -07:00
Ai Hoshino
1c46d88728
Fix node:util.callbackify ( #3428 )
...
* remove the incorrect parameters
Close: https://github.com/oven-sh/bun/issues/3424
* fix error code
* add callbackify tests
* fix function type
* ensure `done` is called when error occurred
2023-06-27 08:23:25 -07:00
Jarred Sumner
d220d9ee5a
Update NodeModuleModule.cpp
2023-06-27 08:21:04 -07:00
Jarred Sumner
e77f593b76
Update build-id
2023-06-27 08:14:34 -07:00
Alex Lam S.L
b305309e64
minor build diffs ( #3427 )
2023-06-27 14:05:59 +03:00
Jarred Sumner
c96f3b303b
Fix default export of "module" module
2023-06-26 20:39:15 -07:00
dave caruso
ecb0bd39b6
fix #3412 ( #3422 )
2023-06-26 19:27:12 -07:00
Dylan Conway
4e4cae0fc3
webpack test and add empty prototype prop to module ( #3421 )
2023-06-26 19:16:59 -07:00
Jarred Sumner
4be15cff02
Tweak the ramSize setting because /= 1024 is causing CI to fail on arm64 when there's only 8 GB of ram
2023-06-26 19:07:54 -07:00
Jarred Sumner
f839cf1ce3
Update crypto.mjs
2023-06-26 19:07:54 -07:00
Jarred Sumner
1e6a41b5cf
change the text from "error" to "warn"
2023-06-26 19:07:54 -07:00
Dylan Conway
1ed1723a2f
Update bundle_v2.zig ( #3420 )
2023-06-26 19:00:55 -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
28f27f733b
[bun install] Implement --exact flag ( #3409 )
...
* [bun install] Implement `--exact` flag
* Rename to --save-exact
* Rename --exact to --save-exact
* Update bun-add.test.ts
* We're going with --exact as the flag name
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-26 15:51:57 -07:00
Jarred Sumner
a5100ad380
Fix .rejects
2023-06-26 15:49:26 -07:00
Silas Rech
16598555f1
.randomInt() support (#3357 )
...
* Add initial .randomInt() fallback
* Add basic .randomInt() test
* Attempt creating a native implementation
* Switch to JSC.wrapWithHasContainer
* Switch to .jsNumberFromUint64(), it seems like using just .jsNumber() causes the number to overflow in some cases
* Regenerate out folder after rebasing
2023-06-26 15:35:48 -07:00
Jarred Sumner
a732999da5
Runtime support for __esModule annotations ( #3393 )
...
* Runtime support for `__esModule` annotations
* Ignore `__esModule` annotation when `"type": "module"` is set
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-26 12:49:20 -07:00
Dylan Conway
6d01e6e367
test moved to node-module-module.test.js
2023-06-26 12:09:18 -07:00
Jarred Sumner
50e872fc76
Implement writev & readv ( #3419 )
...
* [node:fs] Implement `writev` and `readv`
* writev & readv tests
* cast to const type
* woops
* cast
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-26 11:56:53 -07:00
Alex Lam S.L
318879d174
[install] support trustedDependencies ( #3288 )
...
* [install] support trustedDependencies
closes #2073
* use `strings.indexOfChar()`
* use hashes instead of strings
* utilise `inline else`
2023-06-26 11:55:26 -07:00
Dylan Conway
ec3ed67bc9
implement _nodeModulePaths and require.main.paths ( #3411 )
...
* tests in progress
* add `require.main.paths`, add every dir up to root
* remove imports
2023-06-26 08:12:37 -07:00
Jarred Sumner
76626ac54b
Fix test failures in import.meta ( #3403 )
...
* Fix test failures in import.meta
* regenerate
* Use bound functions for `import.meta.require` and `import.meta.require.resolve` and `Module.createRequire`
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 19:48:56 -07:00
Jarred Sumner
116bcf4245
Fixes #3334 ( #3401 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 18:49:16 -07:00
Jarred Sumner
f2285a6d71
Use bun.String in mkdir ( #3404 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 17:54:55 -07:00
Jarred Sumner
e682ffb61c
Update schema.zig
2023-06-25 17:54:21 -07:00
Jarred Sumner
9ebb25427a
remove very old stuff
2023-06-25 17:51:24 -07:00
Jarred Sumner
66195ffeed
Update WebKit
2023-06-25 17:50:12 -07:00
Brúnó Salomon
662335d81a
chore: update lol-html version ( #3356 )
...
* chore: update lol-html version
* add tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-06-25 16:48:03 -07:00
Tiago Teixeira
d8817c2d32
Add support for install with --frozen-lockfile ( #3365 )
...
* Add support for install with --frozen-lockfile
* Add test
* Add test for frozenLockfile in config file
2023-06-25 16:43:39 -07:00
Jarred Sumner
15ac08474e
fixup
2023-06-25 16:40:51 -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
Ciro Spaciari
3ed28f2828
[fs.watch] fix reference/deinit ( #3396 )
...
* fix js reference
* fix close oops
* refactor + hasPendingActivity
* fmt
* fix race conditions
* fixup
* add test calling close on error event
* fix close inside close + test
* cleanup
2023-06-25 16:16:25 -07:00
Ai Hoshino
fcf9f0a7ee
Fix the parameters of WriteStream constructor. ( #3402 )
...
* Fix the parameters of the `WriteStream` constructor.
Close: https://github.com/oven-sh/bun/issues/3395
* test append mode in `createWriteStream`
* fix lint
* wait first stream finished
2023-06-25 16:15:56 -07:00
Alex Lam S.L
33903ea892
[install] fix hang in bun install --production ( #3406 )
2023-06-26 01:43:58 +03:00
Jarred Sumner
5bd94b8f47
Add process.mainModule
2023-06-25 11:43:54 -07:00
Jarred Sumner
aa5432e162
FIx launch.json cwd
2023-06-25 11:33:13 -07:00
Jarred Sumner
c4c714f10b
Speculative fix for regression causing a hang with install --production ( #3400 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 04:52:43 -07:00
Jarred Sumner
f8abd167d8
Revert "make these strings lazy"
...
This reverts commit 777f98bd10 .
2023-06-25 04:17:07 -07:00
Jarred Sumner
777f98bd10
make these strings lazy
2023-06-25 03:32:10 -07:00
Jarred Sumner
30798c7078
Make timeout longer
2023-06-25 03:32:10 -07:00
Jarred Sumner
bc7719fc28
Reliability bugfix for WebSocket ( #3394 )
...
* Rewrite elementLengthLatin1IntoUTF8
* Update SIMDUTF
* Make `elementLengthLatin1IntoUTF8` faster
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-25 02:58:49 -07:00
Jarred Sumner
ff63555143
Rewrite Bun's runtime CommonJS loader ( #3379 )
...
* wip changes for CommonJS
* this rewrite is almost complete
* even more code
* wip
* Remove usages of `import.meta.require` from builtins
* Remove usages of require
* Regenerate
* ✂️ builtin rewrite commonjs in printer
* Use lazy custom getters for import.meta
* fixups
* Remove depd
* ugh
* still crashing
* fixup undici
* comment out import.meta.require.resolve temporarily
not a real solution but it stops the crashes
* Redo import.meta.primordials
* Builtins now have a `builtin://` protocol in source origin
* Seems to work?
* Finsih getting rid of primordials
* switcharoo
* No more function
* just one more bug
* Update launch.json
* Implement `require.main`
* ✂️
* Bump WebKit
* Fixup import cycles
* Fixup improt cycles
* export more things
* Implement `createCommonJSModule` builtin
* More exports
* regenerate
* i broke some stuff
* some of these tests work now
* We lost the encoding
* Sort of fix zlib
* Sort of fix util
* Update events.js
* bump
* bump
* bump
* Fix missing export in fs
* fix some bugs with builtin esm modules (stream, worker_threads, events). its not perfect yet.
* fix some other internal module bugs
* oops
* fix some extra require default stuff
* uncomment this file but it crsahes on my machine
* tidy code here
* fixup tls exports
* make simdutf happier
* Add hasPrefix binding
* Add test for `require.main`
* Fix CommonJS evaluation order race condition
* Make node:http load faster
* Add missing exports to tls.js
* Use the getter
* Regenerate builtins
* Fix assertion failure in Bun.write()
* revamp dotEnv parser (#3347 )
- fixes `strings.indexOfAny()`
- fixes OOB array access
fixes #411
fixes #2823
fixes #3042
* fix tests for `expect()` (#3384 )
- extend test job time-out for `darwin-aarch64`
* `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 >
* fixup min/memcopy (#3388 )
* Fix crash in builtins
* Don't attempt to evaluate modules with no source code
* Update WebCoreJSBuiltins.cpp
* Update WebCoreJSBuiltins.cpp
* Update WebCoreJSBuiltins.cpp
* Fix crash
* cleanup
* Fix test
cc @paperdave
* Fixup Undici
* Fix issue in node:http
* Create util-deprecate.mjs
* Fix several bugs
* Use the identifier
* Support error.code in `util.deprecate`
* make the CJs loader slightly more resilient
* Update WebCoreJSBuiltins.cpp
* Fix macros
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Alex Lam S.L <alexlamsl@gmail.com >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2023-06-24 06:02:16 -07:00
Ciro Spaciari
069b42a7cc
[feat] fs.watch ( #3249 )
...
* initial support
* add types
* fix comment
* fix types
* bigfix up
* more fixes
* fix some encoding support for watch
* fix rename event
* fixup
* fix latin1
* add fs_events, still failing some tests
* fixuup
* remove unecesary check
* readd tests ops
* this is necessary? just testing CI/CD weird errors
* just use dupe here
* cleanup and fix deinit
* fix zig upgrade
2023-06-23 23:24:34 -07:00
dave caruso
ceec1afec2
Add vi.spyOn and clean up some mock function binding calls ( #3376 )
...
* Add vi.spyOn and clean up some binding calls
* add vi.restoreAllMocks
* remove junk file
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-06-23 23:24:05 -07:00
dave caruso
5ae8e5d773
Make node-fallbacks build as esm not cjs / Fix node-fetch ( #3377 )
...
* Make node-fallbacks build as esm not cjs.
* fix stuff
2023-06-23 23:23:39 -07:00
Ciro Spaciari
4ff920c915
fixup min/memcopy ( #3388 )
2023-06-23 18:19:00 -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
Alex Lam S.L
ae4b65c52e
fix tests for expect() ( #3384 )
...
- extend test job time-out for `darwin-aarch64`
2023-06-22 20:13:26 -07:00
Alex Lam S.L
ca1fe3c602
revamp dotEnv parser ( #3347 )
...
- fixes `strings.indexOfAny()`
- fixes OOB array access
fixes #411
fixes #2823
fixes #3042
2023-06-22 17:05:54 -07:00
Jarred Sumner
4a13a53058
CommonJS bun build cannot use import.meta ( #3378 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-22 01:06:50 -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
Jarred Sumner
bfb322d618
Revert "Update Github action runners"
...
This reverts commit 69f558db8e .
2023-06-21 19:52:53 -07:00
dave caruso
43865a3e29
finish implementing JSMockFunction prototype + lots of expect test organizing ( #3304 )
...
* mock tests
* fix mistake
* stuff
* partially implement mock return promises
* lot of housecleaning on jest tests
* document / rename internalFields in jsmockfunction
* finish implementing JSMockFunction prototype
* cleanup
* more progress
* everything is done
* remove demo.test.js
* finish rebase
* requested changes
* fix compile error
2023-06-21 12:59:56 -07:00
Andreas Pfurtscheller
b691212c6e
Update module resolution order docs ( #3372 )
...
If I'm reading and interpreting [these lines](69f558db8e/src/options.zig (L605-L627) ) correct, the module resolution order [in the current docs](https://bun.sh/docs/runtime/modules#resolution ) is outdated.
This change will fix the order.
2023-06-21 12:08:05 -07:00
Ashcon Partovi
69f558db8e
Update Github action runners
2023-06-21 11:14:41 -07:00
Jarred Sumner
9befbf02f1
Update WebKit
2023-06-20 21:32:19 -07:00
Jarred Sumner
f81c7f10f6
Fix crash with .env files that are exactly 159 bytes long ( #3369 )
...
* Fix crash with .env files that are exactly 158 bytes and a newline character
* Update env_loader.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-20 21:17:32 -07:00
Jarred Sumner
b9c950bfb7
Improve error message for error.DependencyLoop ( #3368 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-20 19:29:47 -07:00
Dylan Conway
6a1fbef8fd
record jsx factory symbols in classic mode ( #3360 )
...
* record jsx factory symbols
* merge factory/fragment when more than one part
* update test
* use existing functions, use, `memberListToComponentsIfDifferent`
* missing file
* fix defaults
2023-06-20 19:29:20 -07:00
Dylan Conway
5006435234
enable asymmetric matchers in expect.toEqual, expect.toStrictEqual, and expect.toHaveProperty ( #3367 )
...
* add asymmetric matchers to `deepEquals`
* fix comparison of a few jstypes
* clean up and tests
* fix merge
* improve `expect.any` for primitives
2023-06-20 19:06:58 -07:00
Colin McDonnell
adb451eec6
Docs for DOM testing and FileSink ( #3330 )
...
* Update websocket docs & jsdoc
* Add info about user-specific data in ws
* Document FileSink
* Docs for happydom test
* Updates
2023-06-20 18:57:37 -07:00
Jarred Sumner
62639081c1
[JSTranspiler] Make scan and scanImports more careful with GC
2023-06-20 18:55:14 -07:00
Jarred Sumner
570ef07170
woops
2023-06-20 18:06:28 -07:00
Jarred Sumner
83d7ec728f
Clone SourceOrigin string
2023-06-20 17:12:47 -07:00
Jarred Sumner
9f301e13c5
Cleanup fs.utimesSync ( #3363 )
...
* Fix UB in fs.utimesSync when passing a number with an integer greater than i32
* Fix make headers
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-20 00:31:07 -07:00
Jarred Sumner
f1b1dbf5cd
prettier
2023-06-20 00:02:14 -07:00
Keyhan Vakil
bdbb637b3d
implement more of V8's stack trace API ( #3359 )
...
- fix source map positions for getLineNumber / getColumnNumber
- fix return value getting coerced to a string
- implement CallFrame.p.toString
- add tests for getFunction, getThis, isConstructor, isNative, toString,
getLineNumber, getColumnNumber
still not implemented:
- isPromiseAll/getPromiseIndex
- getEvalOrigin
- getScriptHash
- getPosition
- getEnclosingColumnNumber/getEnclosingLineNumber
- isAsync
- accessing Error.stack should call prepareStackTrace
still broken:
- isEval: often returns false when it should return true
- isToplevel: often returns true when it should return false
Refs: https://v8.dev/docs/stack-trace-api
Refs: v8/src/objects/call-site-info.cc
Fixes: https://github.com/oven-sh/bun/issues/2883
2023-06-19 23:28:40 -07:00
Tiramify (A.K. Daniel)
e9e0e05156
feat(bun/test): Impl. "toBeArray", "toBeArrayOfSize" & "toBeTypeOf" ( #3316 )
...
* Implement toBeArray, toBeArrayOfSize, toBeTypeOf
* fix typos/variable names
* Add testcases for regex and dates
* little fix
* i didn't paste that...
2023-06-19 22:39:44 -07:00
Jarred Sumner
7d94a49ef4
Fix bug that breaks bunx prisma init when node is not installed ( #3362 )
...
* tweak cjs
* Handle more cases, add a test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-19 22:34:22 -07:00
Jarred Sumner
cbd6d24d34
Move this code up a bit
2023-06-19 00:33:14 -07:00
Jarred Sumner
b951c1f89e
Press the secret "use less RAM" button
2023-06-18 23:30:01 -07:00
Jarred Sumner
b78b2a3031
Update esbuild-test.js
2023-06-18 21:57:52 -07:00
Jarred Sumner
7dcf8b2186
Make the esbuild integration test more thorough
2023-06-18 21:57:40 -07:00
Jarred Sumner
8a5b8f1fca
Make more tests fail
2023-06-18 21:07:38 -07:00
Jarred Sumner
8ad9e5755d
Add missing ucs2 alias
2023-06-18 21:05:05 -07:00
Jarred Sumner
fdb7940c4e
Fix a bunch of bugs ( #3352 )
...
* Fix a bunch of bugs
* undo that one
* Fix crash in readdir()
* woops
* woops
* Add comment
* ✂️
* Make `readlink()` and `realpath` use much less memory
* Update BunString.cpp
* woopsie
* Unnecessary
* Don't commit these
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-18 10:47:42 -07:00
Alex Lam S.L
873f615358
minor build diffs ( #3349 )
2023-06-18 03:45:41 -07:00
Ciro Spaciari
b2af1984ed
[eventsource] SSE Client ( #3074 )
...
* fix flush
* remove logs
* add HTTP/1.1 eventsource
* fix parse spec
* multiple data in one event
* get lastEventId for reconnection
* fix parsing add reconnect
* fix reconnection retry
* add retry option
* move eventsource to builtins
* remove duplicate interface on globals.d.ts
* move test to TS
* fmt
* allow no Content-Length or Transfer Encoding
* udpate builtins
* hardcoded
* merge
* revert /src/out
* updated
* Update .gitignore
* Make the tests fail
* Cleanup EventSource getter
* fixup
* fixup TS
* fmt
* update builtins
* fix tests
* Clear existing timeouts
* Add `ref` and `unref` methods
* Use `super` to make prototype pollution slightly harder
* Reduce test timeout
* Regenerate builtins
* prettier + ref/unref
* Outdated
* forgot to commit this
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-17 20:54:50 -07:00
Tiramify (A.K. Daniel)
065713aeca
Add types for toBeOdd & toBeEven ( #3344 )
2023-06-17 14:05:28 -07:00
Luigi Pinca
68c092aef2
Set the publishToSelf option to true ( #3343 )
...
All messages sent by the clients are expected to be received by all
clients. Without the `publishToSelf` option a message is not sent back
to the sender and the benchmark hangs.
2023-06-17 14:05:11 -07:00
Dylan Conway
9b8054ae11
don't remove const if referenced before declaration ( #3337 )
2023-06-16 21:11:57 -07:00
Jarred Sumner
0591c6b4bb
Fix make headers jun 15 edition
2023-06-15 23:00:57 -07:00
Kabir Goel
4a22fcd93c
Fix typo in run.md ( #3331 )
2023-06-15 15:03:46 -07:00
Jarred Sumner
dc06caccaa
Tweak CommonJS output ( #3320 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-15 01:18:23 -07:00
Ciro Spaciari
e6d4b3a89a
[Bun.serve] fix Bun.serve argument check ( #3314 )
...
* fixup checks
* throw when tls is not a object also fix socket
* fix error message
* null or undefined on tls option in Bun.serve or sockets should not throw
* add tests
* fix tests and socket validation
* remove unnecessary check
* add listen tests
2023-06-14 19:29:36 -07:00
Jarred Sumner
0f131a976e
Update build-id
2023-06-14 08:37:33 -07:00
Jarred Sumner
7f535a20a2
Workaround issue with module.require =
2023-06-14 08:35:51 -07:00
Jarred Sumner
bac7526c03
Make Bun.argv the same as process.argv ( #3310 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-14 04:01:28 -07:00
Jarred Sumner
c2a83f87d8
Remove redudant put
2023-06-14 03:25:43 -07:00
Jarred Sumner
333b3f6beb
Prepare to support webkit debug build assertions
2023-06-14 03:24:39 -07:00
dave caruso
b7ff3b0745
document Bun.argv in typedefs ( #3302 )
2023-06-14 01:48:51 -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
xxxhussein
171ba6327d
fix TS5096 ( #3256 )
2023-06-13 17:42:29 -07:00
Jarred Sumner
2ab797ff75
lol
2023-06-13 10:54:51 -07:00
Jarred Sumner
bdb1b7124a
Fix crash in CJS ( #3294 )
...
* Fix crash in CJS
* Add std.heap.ArenaAllocator
* Use our arena allocator
* Reduce JS parser memory usage and make HMR faster
* Write some comments
* fix test failure & clean up this code
* Update javascript.zig
* make arena usage safer
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-13 09:15:05 -07:00
Jarred Sumner
b93bdbb124
Add test
2023-06-13 07:29:02 -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
Dylan Conway
067a0235e4
handle unwrapping require in any expression ( #3292 )
2023-06-12 21:43:45 -07:00
Jarred Sumner
dbb2416542
Make mocks use FunctionPrototype ( #3291 )
...
* Make mocks use FunctionPrototype
* Fix static methods
* Fix types
* Update JSMockFunction.cpp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-12 19:55:07 -07:00
dave caruso
51c093e24e
typo in readline ( #3286 )
2023-06-12 07:41:54 -07:00
Keyhan Vakil
50a18b6bac
doc: minor fixes ( #3278 )
...
* `bun link` only modifies `package.json` when `--save` is passed.
* clang-15 is a separate package from llvm-15.
2023-06-11 09:26:46 -07:00
Keyhan Vakil
9a8d9b5e91
add --save argument to install ( #3277 )
2023-06-11 07:10:55 -07:00
Jarred Sumner
ef65f3c305
Support using WTF::StringImpl from Zig ( #3279 )
...
* Fix `make headers`
* [JS parser] Fix bug with printing non-ascii import paths in ascii mode
* Introduce `bun.String`
* Add test for non-ascii imports & entry points
* Add comment
* Fix build issue
* Support HTTP server
* Make it print the same
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-11 05:26:37 -07:00
Jarred Sumner
02eafd5019
Make cold bun install use 2x less memory ( #3271 )
...
* Make cold `bun install` use 2x less memory
In this benchmark: https://github.com/orogene/orogene/blob/main/BENCHMARKS.md
This brings us from around 2.7 GB to 1.2 GB of memory
* Address comments
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-10 15:38:09 -07:00
Luigi Pinca
04cd6a82b8
Fix benchmark ( #3276 )
2023-06-10 11:39:26 -07:00
Jarred Sumner
a2ec2ea397
Fixes #3250 ( #3269 )
...
* Fixes #3250
We must call `EVP_MD_CTX_cleanup` because `EVP_MD_CTX` containers pointers inside to allocated memory
* Fix leak
* Update sha.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-10 02:26:48 -07:00
paperluigis
f51878a8ec
Fix wording and code example in docs for Bun.sleepSync ( #3270 )
2023-06-10 01:03:30 -07:00
Alex Lam S.L
f18423cf45
[install] fix lockfile fallback for life cycle scripts ( #3265 )
2023-06-09 21:02:37 -07:00
Dylan Conway
68b9731db2
Update writing.md ( #3264 )
2023-06-09 19:46:29 -07:00
Dylan Conway
76cf465cc2
toMatchObject and some asymmetric matchers (#3260 )
...
* `toMatchObject` progress
* add `expect.stringContaining()`
* add `expect.stringMatching()`
* print asymmetric matchers
* cleanup
* return before printing if constructor value isn't there
* move matcher logic to cpp
* pretty format and tests
* fix formatting for snapshots
* format `stringContaining` and `stringMatching` like jest
* better test
* remove commented tests
* remove old property matcher code
* add types
* make sure all props are matched in arrays
* add `Bun.deepMatch`
2023-06-09 19:26:36 -07:00
Jarred Sumner
0f018ea215
Fixes #3206 ( #3262 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-09 18:22:32 -07:00
Colin McDonnell
a8dc41cd9f
Fix jest.fn type
2023-06-09 18:08:36 -07:00
Alex Lam S.L
dbcaa02d89
[install] fix life cycle scripts execution ( #3235 )
...
[install] fix life cycle scripts execution
- scripts from dependencies did not run during re-installation
- `bun.lockb` now contains data on life cycle scripts
- handle prior lockfile format by reading missing info from every `package.json`
- suppress spurious log output from tests
2023-06-10 03:30:43 +03:00
Colin McDonnell
e6b1574046
Clean up types
2023-06-09 17:23:06 -07:00
Colin McDonnell
5df26a6a9b
Improve types for mocks ( #3261 )
...
* Add jest.fn to types
* Fix type-tests
2023-06-09 17:10:19 -07:00
Colin McDonnell
fc3331628e
Clean up comments in types
2023-06-09 16:45:41 -07:00
Colin McDonnell
0ec70119f2
Add types for mocks
2023-06-09 16:44:29 -07:00
Jarred Sumner
bf518222d4
Implement mocks in bun:test ( #3252 )
...
* wip
* wip
* most of the code for mocks in bun:test
* finishing up
* Implement `toHaveBeenCalled` and `toHaveBeenCalledTimes(1)`
* Test
* visit
* results, not returnValues
* exact
* Update jest.zig
* A couple more tests
* Add jest.fn
* support resetting mocks
* Implement spyOn
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-09 16:38:06 -07:00
ytakhs
6565bd89d5
Fix to retain a newline after removing a package ( #3231 )
2023-06-09 08:42:38 -07:00
Ashcon Partovi
99485bec4c
Fix tests that pass but generate annotation
2023-06-09 05:53:23 -07:00
Ashcon Partovi
0eb5103642
Fix missing JSC.markBinding
2023-06-09 05:40:44 -07:00
James Liu
edd03341b1
docs: add missing right parenthesis in example code ( #3245 )
...
add missing right parenthesis in example code in `HTTP server` section
2023-06-09 05:20:37 -07:00
Alex Lam S.L
1d2f06b37e
replace sudo usage in GitHub Actions ( #3254 )
2023-06-09 11:33:22 +03:00
dave caruso
870e5ac1dc
improve stream types ( #3240 )
2023-06-07 14:45:14 -07:00
Jarred Sumner
7e296a1adc
[breaking][bun:sqlite] .values() returns [] instead of null for queries returning 0 results ( #3219 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-06 23:52:23 -07:00
Jarred Sumner
b9a705f84b
add buffer label ( #3220 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-06 23:51:05 -07:00
Colin McDonnell
d265ed80d2
Docs for Bun.password and ws publish ( #3227 )
...
* Update websocket docs & jsdoc
* Document Bun.password
* Update hash encoding docs
* Fix typos
* Add info about user-specific data in ws
* Update outdated websocket jsdoc
* Replace usages of req.url
* Remove log
2023-06-06 23:50:43 -07:00
dave caruso
fa3cfd34cb
yeah ( #3229 )
2023-06-06 23:48:13 -07:00
Colin McDonnell
bcd67c3455
Bun.passwordSync -> Bun.password.{method}Sync ( #3228 )
...
* Bun.passwordSync -> Bun.password.{method}Sync
* Update jsdoc
* Updates
2023-06-06 23:44:40 -07:00
Jarred Sumner
ec71e7afe4
Rename bun-link-lld-debug to link
2023-06-05 18:14:44 -07:00
dave caruso
17bca62df1
add a test for lodash-es ( #3217 )
...
* add bundling tests for lodash-es
* add isBuffer tests
2023-06-05 17:38:03 -07:00
Jarred Sumner
0c11762c31
[node:vm] Fix crash when new ArrayBuffer() is returned
2023-06-05 17:17:48 -07:00
Dylan Conway
fe7d5357d8
allow v flag in regexp literal ( #3213 )
...
* add v to possible regexp flags
* alphabetical
2023-06-05 13:33:02 -07:00
Dylan Conway
568f170e12
[transpiler] Fix new length for raw template contents ( #3215 )
...
* use correct length for raw template contents
* tests for raw template contents
2023-06-05 12:55:56 -07:00
Jarred Sumner
c87d65856c
[Inspector] Introduce inspector: true in Bun.serve()
...
This exposes the WebKit inspector debugger protocol over WebSockets at the endpoint `/bun:inspect` when `Bun.serve()`.
To enable, pass:
```js
Bun.serve({inspector: true, development: true, fetch(req){ /* rest of params *... });
```
Both `development` and `inspector` must be true, as this is very security sensitive to expose publicly.
2023-06-05 04:31:13 -07:00
Jarred Sumner
9b996e702e
Implement Bun.password and Bun.passwordSync ( #3204 )
...
* Implement `Bun.password.{verify, hash}` and `Bun.passwordSync.{verify, hash}`
* flip the booleans
* delete unused
* Add `cost` for `"bcrypt"`, add `"memoryCost"` and `"timeCost'` for argon2, use SHA512
* Update bun.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-04 18:20:04 -07:00
Dylan Conway
2cb1376a93
removeAllListeners return this (#3208 )
...
* return this in `removeAllListeners`
* move `UNUSED_PARAM` for used params
2023-06-04 18:19:41 -07:00
Jarred Sumner
1f3da24fe0
[Transpiler] Fix normalizing \r\n in template string literals ( #3209 )
2023-06-04 18:07:38 -07:00
Jarred Sumner
c4e31551f3
Update .gitattributes
2023-06-03 17:44:28 -07:00
dave caruso
52d11ce845
Add test case ( #3186 )
2023-06-03 16:38:49 -07:00
dave caruso
7d8b6d487b
make hardcoded -> make esm + document needing bun to build bun ( #3188 )
2023-06-03 16:38:33 -07:00
Jarred Sumner
583c6d3644
Bump
2023-06-03 16:37:53 -07:00
Ciro Spaciari
aabb0b77ce
[tests] prisma tests ( #3197 )
2023-06-03 15:04:19 -07:00
Jarred Sumner
59d7c47e3f
Fix crash with path parse in win32 ( #3187 )
...
* Update CommonJSModuleRecord.cpp
* smaller
* [node:path] Fix crash, mark TODO
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-03 00:14:27 -07:00
Dylan Conway
21bc3a9c39
[bundler] fix json imports, undo some todos
2023-06-02 22:44:19 -07:00
dave caruso
cfd73cec81
fixes with hardcoded modules ( #3182 )
...
* fixes with hardcoded modules
* add make hardcoded to make dev
* adjust this message
* remove debugging logs
* this
* restore2
2023-06-02 21:36:05 -07:00
Dylan Conway
3e437a6ae0
check package name length in shouldUnwrapRequire() ( #3183 )
...
* make sure length is equal
* add and use `indexEqualAny`
2023-06-02 20:45:48 -07:00
Dylan Conway
d8e7436db0
use NODE_ENV for react-jsx or react-jsxdev ( #3184 )
2023-06-02 20:35:00 -07:00
dave caruso
f798a0cfe8
fix readableStreamToArrayBuffer ( #3181 )
...
* fix discord.js again
* remove one of the async hooks warnings
* clarify hardcoded modules docs
2023-06-02 19:03:16 -07:00
Ciro Spaciari
51846d0277
[napi] some fixes for prisma ( #3176 )
...
* patch create object, so it can be used on wrap
* cleanup
* cleanup
* dont override napiRef
* make wrap strong ref
* workaround tests
* remove work around
2023-06-02 17:56:16 -07:00
Colin McDonnell
c4f237572d
Update macro/test docs ( #3180 )
...
* Add test and fix plugin type
* Update docs and config pages
2023-06-02 17:43:51 -07:00
Dylan Conway
e20e695775
continue if import is standalone ( #3178 )
2023-06-02 17:07:16 -07:00
Jarred Sumner
132ab63a32
Add comment
2023-06-02 16:39:16 -07:00
Ashcon Partovi
bfd315fc72
Support NO_COLOR environment variable ( #3055 )
2023-06-02 14:24:16 -07:00
Jarred Sumner
72c2123e07
Maybe we don't need to do this anymore? ( #3169 )
2023-06-02 14:22:39 -07:00
Colin McDonnell
1f7d62bfd5
Support NodeJS.ProcessEnv
2023-06-02 12:49:31 -07:00
Jozef Steinhübl
4d1c900cac
types: expose Bun.Env ( #3111 )
...
* expose Bun.Env
* export bun.Env
* fix: use import instead namespace access
* fix(child_process): use import
* tests(env): use module instead namespace
2023-06-02 12:48:19 -07:00
Jarred Sumner
97c522517c
Fixes #3161 ( #3174 )
...
* Fixes #3161
* Fix the error message
* woops
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-02 04:01:25 -07:00
Ashcon Partovi
4c6245b2e5
Add concurrency to workflows, enable cancel-in-progress
2023-06-01 18:38:40 -07:00
Ashcon Partovi
b21a58e564
Fix github annotation when using inspect() ( #3166 )
2023-06-01 18:25:06 -07:00
dave caruso
4df1d37ddc
Bundle and minify .exports.js files. ( #3036 )
...
* move all exports.js into src/js
* finalize the sort of this
* and it works
* add test.ts to gitignore
* okay
* convert some to ts just to show
* finish up
* fixup makefile
* minify syntax in dev
* finish rebase
* dont minify all modules
* merge
* finish rebase merge
* flaky test that hangs
2023-06-01 18:16:47 -07:00
Ashcon Partovi
03ffd1c732
Disable typecheck workflow for now
2023-06-01 18:04:45 -07:00
Jarred Sumner
3e84f18cc0
Implement __dirname and __filename, allow direct eval in CommonJS ( #3164 )
...
* Implement `__dirname` and `__filename`, allow direct eval in CommonJS
* Fixup dirname and add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-01 18:04:09 -07:00
Jarred Sumner
42606d6aed
Rename ptr to _unsafe_ptr_do_not_use ( #3163 )
...
* Rename `ptr` to `_unsafe_ptr_do_not_use`
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-06-01 18:02:41 -07:00
Derrick Farris
c366b62160
Update macros.md ( #3165 )
...
Fix a repeated "for"
2023-06-01 17:25:28 -07:00
dave caruso
42d8b7183c
random fixes that help vite/sveltekit ( #3140 )
...
* existsSync with invalid paths should return false
* partially support file urls (does not do percent encoding)
* add utf16 support for Path.isAbsoluteString
* Update src/resolver/resolver.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* fixups
* revert
* prettier format
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-06-01 16:48:37 -07:00
Ciro Spaciari
f9809f0044
[napi] fix thread safe function callback ( #3162 )
...
* fixup
* add debug log message to event loop unexpected tag
* fix fmt
2023-06-01 15:19:06 -07:00
dave caruso
4378ef8e97
mark currently known test fails as .todo ( #3052 )
...
* start this
* commit
* mark all failing tests as todo
* fasdfad
* bundler tests
* tests
* adjust failing tests to todo
* comment out some more tests
* png as test
2023-06-01 14:37:35 -07:00
dave caruso
2c1694f63b
Fix streams breaking on reverted EventEmitter / Make Discord.js work ( #2913 )
...
* Revert "Revert "use a lazyily initialized stream for `node:crypto` `createHash` (#2652 )""
This reverts commit 613bb4822e .
* Revert "Revert "implement `node:events` in javascript (#2604 )""
This reverts commit a4d0a1961a .
* oops
* fix entrypoints stuff
* fix hash copy
* use native events for node streams and crypto
* requested changes
* oops
* make discord.js work
* fix webkit hash
* headers tojson
2023-06-01 14:31:36 -07:00
Jarred Sumner
ae277a0dec
Update build-id
2023-06-01 13:58:50 -07:00
Dylan Conway
473b219a37
only add cjs export name if it is assigned ( #3159 )
2023-06-01 13:57:51 -07:00
Noah Chase
be1833898e
fix typo in documentation ("the today" -> "today") ( #3160 )
2023-06-01 13:34:09 -07:00
Jozef Steinhübl
a64da8f0cb
ci: dont run builds in forks ( #3156 )
2023-06-01 12:35:26 -07:00
Dylan Conway
689434e012
don't rewrite module.exports if assign target is update or replace ( #3147 )
...
* don't rewrite `module.exports` if assign target is `update` or `replace`
* missing `is_delete_target`, check de-opt before rewriting
2023-05-31 23:51:32 -07:00
Jarred Sumner
a73a4d1e0b
Fix test failure due to cloudflare changing dns ttl
2023-05-31 23:19:32 -07:00
Jarred Sumner
457f325773
slightly clean up this test
2023-05-31 23:18:58 -07:00
Jarred Sumner
5f80681295
[TCP] Ensure we keep the handlers functions alive when an error callback needs to be called
...
This can cause test failures due to GC'ing the handlers when we are *just* about to call them.
2023-05-31 23:17:18 -07:00
Jarred Sumner
fdcfcce9e7
Clean-up some option parsing in Bun.spawn
2023-05-31 23:15:21 -07:00
Jarred Sumner
1ca70b855c
Update launch.json
2023-05-31 23:13:50 -07:00
Ashcon Partovi
e632941c52
Small improvements to bun test ( #3071 )
...
* Change status icon for skipped tests from "-" to "»"
* Show file path instead of filename in `bun test`
* Emit collapsable logs when running `bun test` in Github Actions
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
* Add fallback for test icons when emojis are not available
* Only check for GITHUB_ACTIONS when running `bun test`
* Emit error annotations when running `bun test` in Github Actions
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message
* Remove ANSI output from Github annotation, it doesn't work
* Remove outdated code from internal test runner
* Add GithubActionFormatter to handle cases where error name or message is already ANSI
* Fix formatting of test
* Fix #3070
* Implement `bun test --run-todo`
By default, `test.todo()` is no longer run, unless `--run-todo` is specified.
* Fix test that relies on test.todo() being run
* Support vitest-style test options
* Disable GITHUB_ACTION in test harness
* Add types for TestOptions
* Fix bug where test.skip() actually ran
* Implement `test.skipIf()` and `describe.skipIf()`
* Implement `test.runIf()`
* Move DiffFormatter to its own file
* Fix bug where Bun.inspect() would emit a Github annotation
* Introduce `bun test --only`, rename `--run-todo` to `--todo`
* Implement `test.if()`, `describe.if()`, and other test fixes
* Remove unwanted files from last commit
* Fix last reference to --run-todo
* Fix memory issues with printing github actions text
* Update bindings.zig
* Fix bug with `test.only()`
* Remove debug test
* Make the github annotations better
* Improve .vscode/launch.json
* Implement `expect().toBeNil()`
* Remove .only() from test
* Implement toBeBoolean(), toBeTrue(), toBeFalse()
* Add lots of matchers
* toBeNil()
* toBeBoolean()
* toBeTrue()
* toBeFalse()
* toBeNumber()
* toBeInteger()
* toBeFinite()
* toBePositive()
* toBeNegative()
* toBeWithin()
* toBeSymbol()
* toBeFunction()
* toBeDate()
* toBeString()
* toInclude()
* toStartWith()
* toEndWith()
* Fix #3135
* Reduce verbosity of test
* Fix snapshot bug
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-31 23:12:04 -07:00
Colin McDonnell
176fade220
Remove bun-macro-relay and update docs ( #3145 )
...
* Update macro docs
* Remove bun-macro-relay
2023-05-31 19:51:08 -07:00
Jarred Sumner
110d0752f3
Add "macro" package.json exports condition
2023-05-31 19:01:59 -07:00
Ciro Spaciari
e24d579a32
isolated version of Path compatible with nodejs ( #3143 )
2023-05-31 18:20:50 -07:00
Mike Roelens
a7c7128cd7
Fix typo in macro docs ( #3144 )
2023-05-31 18:15:49 -07:00
Jarred Sumner
4c01454376
Make uploading files with fetch()fast ( #3125 )
...
* Make file uploads fast
* Add benchmark
* Update README.md
* defaults
* print
* prettier
* smaller
* fix(path) fix parse behavior (#3134 )
* Add macro docs (#3139 )
* Add macro doc
* Updates
* Tweaks
* Update doc
* Update macro serialization doc
* Update macro doc
* `--no-macros` flag, disable macros in node_modules
* invert base/filename internally (#3141 )
* always false
* Fix broken test
* Add a test sendfile() test with large file
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-05-31 17:20:30 -07:00
Dylan Conway
611f1d0e24
set optional_chain instead of optional_start ( #3142 )
2023-05-31 16:13:24 -07:00
Ciro Spaciari
52c6609792
invert base/filename internally ( #3141 )
2023-05-31 15:13:37 -07:00
Jarred Sumner
7057cb1982
--no-macros flag, disable macros in node_modules
2023-05-31 15:05:49 -07:00
Colin McDonnell
68c1568075
Update macro doc
2023-05-31 13:58:38 -07:00
Colin McDonnell
4b34a7ce2a
Update macro serialization doc
2023-05-31 13:43:08 -07:00
Colin McDonnell
b284e09ce5
Update doc
2023-05-31 13:35:11 -07:00
Colin McDonnell
8f55f05871
Add macro docs ( #3139 )
...
* Add macro doc
* Updates
* Tweaks
2023-05-31 13:34:35 -07:00
Ciro Spaciari
58fcb60831
fix(path) fix parse behavior ( #3134 )
2023-05-31 12:07:52 -07:00
Jarred Sumner
557aac6a34
Support FormData & file uploads in fetch body ( #3123 )
...
* Fixes #2264
* fixup
* Don't leak HTTP headers
* Include the mime type. It's cleaner
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-31 00:43:59 -07:00
Jarred Sumner
0aab11a95d
always clone these
2023-05-30 19:39:12 -07:00
Jarred Sumner
7376ae6980
Update modules.md
2023-05-30 15:52:21 -07:00
Jarred Sumner
148c6e7551
Fix wasi
2023-05-30 15:41:27 -07:00
Jarred Sumner
b0c38a3c15
Update ZigGeneratedClasses.h
2023-05-30 13:13:42 -07:00
Jarred Sumner
756e15f6e2
Add another comment
2023-05-30 02:53:28 -07:00
Jarred Sumner
10be26f011
[CommonJS] Handle this better
2023-05-30 02:51:50 -07:00
Jarred Sumner
12a0e2bfdd
Fixes #3115
2023-05-30 02:51:27 -07:00
Jarred Sumner
481f916f3f
More comments
2023-05-30 00:30:47 -07:00
Jarred Sumner
85565d95d5
Add a comment
2023-05-30 00:26:30 -07:00
Jarred Sumner
fdbf8a5184
Handle Object.defineProperty(module, "exports", {get: getter})
2023-05-30 00:24:18 -07:00
Jarred Sumner
8e911d38c4
Bump
2023-05-30 00:19:15 -07:00
Jarred Sumner
052df7d48c
Cleanup CommonJS changes ( #3112 )
...
* Add more GC in test
* Fix handling of functions and re-assignments in CommonJS
* Increase timeout
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-29 21:01:39 -07:00
Jarred Sumner
5990a9528f
Rename this file so we know what it is
2023-05-29 19:58:40 -07:00
Jarred Sumner
aa6801d5df
Update index.md
2023-05-29 12:22:13 -07:00
Jarred Sumner
d0185925ff
Update modules.md
2023-05-29 12:15:33 -07:00
Colin McDonnell
9b6913e1a6
More/better docs for JSX, utils, binary data, streams, hashing, bun test, Bun.serve ( #3005 )
...
* WIP
* Updates
* Document deepEquals
* WIP
* Update typeS
* Update TLS docs for Bun.serve
* Update types for tls
* Draft binary data page. Add Streams page.
* Update test runner docs
* Add hashing, flesh out utils
* Grammar
* Update types
* Fix
* Add import.meta docs
* Tee
2023-05-29 11:49:51 -07:00
Jarred Sumner
e2de1f5c13
Natively support CommonJS at runtime ( #3104 )
...
* Natively support CommonJS at runtime
* cleanup how getters are handled, add fast path
* more consistent with node
* use * As
* Remove thrown modules on exception
* Handle exception better
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-29 11:23:10 -07:00
Jarred Sumner
2b04ef4fae
Convert module.exports = { foo: 'bar'} to ESM in bun build ( #3103 )
...
* Convert `module.exports = { foo: 'bar'}` to ESM in `bun build`
* De-opt for `module.exports = {}`
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-28 21:02:51 -07:00
Jarred Sumner
8dfd3dbdbc
Add query string to express integration test
2023-05-28 13:30:25 -07:00
Ciro Spaciari
63e2d78e76
[node:net] fix createConnection options passing ( #3101 )
...
* fixup createConnection
* fix comment
* fixup comment
* also fix it on tls
2023-05-28 13:20:32 -07:00
Jarred Sumner
1388ec0d60
Fixes #2356 ( #3098 )
2023-05-27 23:33:47 -07:00
Tiramify (A.K. Daniel)
4ba3ed512a
Implement process.env.npm_lifecycle_event ( #3097 )
...
* Update run_command.zig
* Update env.test.ts
* Add files via upload
* Update run-process-env.test.ts
* Update env.test.ts
* Update harness.ts
2023-05-27 20:43:08 -07:00
Jarred Sumner
f870f97a94
Fixes #3091 ( #3092 )
...
* Fixes #3091
* Update build-id
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-27 00:21:54 -07:00
Jarred Sumner
7094997eec
Fix crash in Server.prototype.fetch() helper function
...
cc @cirospaciari, if you use `mimalloc-debug` it catches things like this
2023-05-26 21:18:31 -07:00
Jarred Sumner
79907fe84c
Add more debug safety checks
2023-05-26 21:17:10 -07:00
Ashcon Partovi
1a30b4fe29
Implement expect().toBeEmpty() ( #3060 )
...
* Implement `expect().toBeEmpty()`
* Fix formatting on test
* Finish up expect().toBeEmpty()
* Update expect.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-26 19:24:20 -07:00
Jarred Sumner
4298f36fc9
fixup
2023-05-26 16:29:44 -07:00
Jarred Sumner
3a0735e164
Pretty formatter for Headers & URLSearchParams ( #3081 )
...
* Pretty formatter for `Headers` & `URLSearchParams`
* cleanup
* console.log on Headers, FormData, URLSearchParams will always quote the keys now
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-26 16:28:09 -07:00
Ciro Spaciari
42125b4351
[fetch] change response allocator ( #3086 )
...
* change allocator
* cleanup
2023-05-26 15:07:03 -07:00
Jarred Sumner
0f2a79b9c1
Fix crash in test.todo + remove JSC C API usages in bun:test ( #3079 )
...
* Fix crash in test.todo
* remove usages of JSC C API in bun:test
* Remove additional JSC-C API usages
* fix `make headers`
* URLSearchParams.length
* FormData length
* URLSearchParams length
* Fix `make headers`
* very fancy length
* Fix bug with exceptions being ignored sometimes
* Add tests for extension toHaveLength
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-26 03:32:28 -07:00
Dylan Conway
62f05ec103
avoid using null value
2023-05-25 23:07:18 -07:00
Jiri Spac
1f7ad0cc37
add a bit more info on Elysia ( #3062 )
2023-05-25 22:04:07 -07:00
Alex Lam S.L
4c566f56c1
[install] fix .bin linking ( #3067 )
...
- causes intermittent `bun install` failures on `bun-types`
2023-05-25 21:58:30 -07:00
Dylan Conway
b395836080
jsx runtime from env ( #3076 )
...
* use `NODE_ENV` for jsx mode
* check env after `configureRouter`
* get `NODE_ENV` from `options.production`
2023-05-25 21:39:01 -07:00
Dylan Conway
801881dd7d
update jsx test for classic runtime
2023-05-25 20:54:39 -07:00
Jarred Sumner
7b4bba787d
prettier
2023-05-25 18:14:01 -07:00
Ciro Spaciari
e95f9c6daa
[stream] fix flush ( #3073 )
...
* fix flush
* remove logs
2023-05-25 16:41:00 -07:00
Jarred Sumner
50bad43dbe
Remove paragraph that has incorrect information in the docs
2023-05-25 16:16:16 -07:00
Dialga
48997eaeba
Update sqlite.md ( #3063 )
...
fix serialize example
2023-05-25 10:14:29 -07:00
Jarred Sumner
f02561530f
Bump
2023-05-24 19:54:00 -07:00
Jarred Sumner
88d9bac5ec
Support with { type: "macro"} in bun build ( #3059 )
...
* [bun macro] Support `assert { type: "macro" }` and `with {type: "macro"}`
* [bun macro] Pass through input as arguments instead of a JSNode
* Fix hang when loading many entry points simultaneously with macros
* do not clone
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-24 19:37:57 -07:00
Jarred Sumner
63740a382b
Load .env.test, set NODE_ENV=test in bun test, load .env.{test,production,development}.local ( #3037 )
...
* Support `.env.test` & `.env.{test,production,development}.local`
* Fix bug preventing inlining of process.env.NODE_ENV by default
* Update env_loader.zig
* add env tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: dave caruso <me@paperdave.net >
2023-05-24 18:52:50 -07:00
Ciro Spaciari
ed1f62ffff
[server.fetch] call when using Request object ( #3051 )
...
* patch server.fetch
* add tests and fix types
2023-05-24 18:52:13 -07:00
Dylan Conway
4972934189
fix setting jsxImportSource, jsxFactory, and jsxFragmentFactory ( #3057 )
...
* default automatic, merge jsx flags from multiple tsconfigs
* use entire package name
* some tests
* more tests
2023-05-24 18:33:28 -07:00
Jarred Sumner
d73bce058a
don't do MMD in CI
2023-05-24 18:31:33 -07:00
Ciro Spaciari
10c018df8e
[bun:FileSystemRouter] add more validations on parameters ( #3053 )
...
* add validations and allow relative path on dir
* remove unneed things
* add origin/dir validation tests
* remove workaround
* add back relative path resolution
2023-05-24 16:36:20 -07:00
Jarred Sumner
29969bc130
Add comment
2023-05-24 15:45:39 -07:00
Jarred Sumner
1ea74238cd
Remove that field
2023-05-24 15:44:22 -07:00
Jarred Sumner
3361814cab
Fix string check
2023-05-24 15:44:02 -07:00
Jarred Sumner
cc84c689ea
Fixes #3031 ( #3041 )
...
* Fixes #3031
* Leave original input in there
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-24 12:02:33 -07:00
Jarred Sumner
b3d5f37598
Implement require.cache ( #3045 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-24 12:01:59 -07:00
Alex Lam S.L
31c967206a
extend test time-outs ( #3048 )
...
- avoid intermittent failures due to network latencies
2023-05-24 08:33:18 -07:00
Ashcon Partovi
c3d402ce47
Implement bun test --timeout ( #3040 )
...
You can change the default per-test timeout in `bun test`:
> bun test --timeout 10
The default timeout is 5000.
2023-05-23 22:33:32 -07:00
Kruithne
d9bdfcf131
Fix incorrect URL in loaders.md ( #3025 )
2023-05-23 18:08:24 -07:00
Jarred Sumner
6074d4e378
workaround
2023-05-23 18:07:23 -07:00
Jarred Sumner
57d341f390
too noisy
2023-05-23 16:57:02 -07:00
Bill Mill
bf759b62c6
Add pkg-config as a build requirement ( #3027 )
...
Without pkg-config, the libarchive build fails in autogen.sh[1]
1: https://github.com/libarchive/libarchive/issues/742
2023-05-23 16:06:35 -07:00
dave caruso
5b0fea7093
fix bun init and update node vm docs ( #3014 )
2023-05-23 15:02:39 -07:00
Dylan Conway
21002ed405
check if key from exports can be printed as an identifier ( #3032 )
...
* check if key can be printed as an identifier
* possibly escape
2023-05-23 14:56:03 -07:00
Ashcon Partovi
2a669a657a
Support test.todo() in ecosystem runner
2023-05-23 13:39:58 -07:00
Jarred Sumner
f71eb39b14
[bun:test] Don't schedule the GC aggressively on every file
...
We already run the GC automatically whenever heap size grows, so this is mostly unnecessary
In one benchmark, this is an 83% performance improvement at a cost of 9% more memory
2023-05-23 00:44:56 -07:00
Jarred Sumner
de185bdc05
Skip failing tests
2023-05-23 00:42:02 -07:00
Jarred Sumner
1e3476ee08
[bun:test] Fix async/done-based test.todo ( #3015 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-23 00:40:41 -07:00
Jarred Sumner
5b38c55c3d
Support setting a timezone with process.env.TZ and Bun.env.TZ ( #3018 )
...
* Support setting a timezone via `process.env.TZ`
* Implement `setTimeZone` in `bun:jsc` module
* [breaking] `bun:test` now defaults to `Etc/UTC` timezone
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-23 00:40:12 -07:00
dave caruso
83e7b9e198
fix extra/ArbitraryModuleNamespaceIdentifiers2 ( #3016 )
...
* fix extra/ArbitraryModuleNamespaceIdentifiers2
* remove assert
2023-05-22 20:59:25 -07:00
Jarred Sumner
879fd45ea2
Update .prettierignore
2023-05-22 20:10:00 -07:00
dave caruso
e5501551f4
add some connect test and type changes ( #3013 )
2023-05-22 19:48:07 -07:00
Ciro Spaciari
e57dcdfcf1
fix marking requestCert ( #3012 )
2023-05-22 19:44:32 -07:00
Jarred Sumner
5cfa5edd63
[node:http] Fix return type for getHeader() ( #3007 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-22 19:44:21 -07:00
dave caruso
fc40c690ea
Write out builtins with TypeScript + Minify them ( #2999 )
...
* start work drafting how builtins will work
* work on ts builtin
* builtins stuff so far
* builtins
* done for today
* continue work
* working on it
* bindings so far
* well, it builds. doesnt run
* IT RUNS
* still lots of ts errors but it is functional
* sloppy mode
2023-05-22 18:51:05 -07:00
Ciro Spaciari
23d42dc237
443 should default to https when no protocol is informed ( #3008 )
2023-05-22 17:58:32 -07:00
Jarred Sumner
e869fc092f
[node:buffer] Add missing inspect function
...
cc @paperdave
2023-05-22 13:53:24 -07:00
Jarred Sumner
2a6a5cf6d9
[node:vm] Accept undefined in createContext
2023-05-22 13:53:24 -07:00
Ciro Spaciari
eebf44c709
fixup ( #3001 )
2023-05-22 13:07:51 -07:00
Jarred Sumner
05e98ed5d1
Skip test
2023-05-22 12:29:22 -07:00
Jarred Sumner
b71fa2b6d7
Skip more tests
2023-05-22 12:29:15 -07:00
Jarred Sumner
82e762fe2f
[breaking] ServerWebSocket.publish no longer publishes to self by default
...
This changes `publishToSelf` to be `false` by default instead of `true`.
This is a breaking change because it means that `ws.publish("foo", "bar")` will exclude `ws` from the list of websockets to broadcast.
We are making this change because many people asked for this and were confused by the status quo - that `w.publish` publishes to self.
2023-05-22 12:29:10 -07:00
Jarred Sumner
a5acf7bfa0
[ServerWebSocket] binaryType now defaults to "nodebuffer"
...
Previously, this defaulted to "uint8array", so this shouldn't be a breaking change unless you make use of `.slice()` in which case it will now be a reference to the same ArrayBuffer rather than a clone.
The rationale for this change is most usages of Uint8Array on the server need a little more than just the bytes. Many npm packages expect Buffer rather than Uint8Array. Directly returning it for binary websocket messages is faster than creating another one.
2023-05-22 11:46:39 -07:00
Dylan Conway
3de350b24d
only merge if kind is var
2023-05-22 11:33:01 -07:00
dave caruso
2e54601a2d
document arch linux workaround, see #2664 ( #2997 )
2023-05-22 10:10:04 -07:00
Jarred Sumner
1f0dfacc0d
Fix memory leak in fetch(url) ( #2989 )
...
* Fix memory leak in `fetch(url)`
* Bump those numbers up
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-22 10:09:30 -07:00
Jarred Sumner
7e17a91a1c
Update WebKit
2023-05-22 10:08:33 -07:00
Jarred Sumner
3cbb1a429c
Skip hanging tests
2023-05-21 23:28:02 -07:00
Jarred Sumner
8b3952baf9
Fix test
2023-05-21 21:31:38 -07:00
Jarred Sumner
24e0c269d2
[internal] Even more logging
2023-05-21 21:30:05 -07:00
Jarred Sumner
9f935c4683
[internal] Use HiveArray instead of bespoke memory allocator in Bun.serve()
...
No performance or memory usage change
Just removing some duplicate code
2023-05-21 21:29:17 -07:00
Jarred Sumner
3c57911b59
Fix assertion failure
2023-05-21 21:27:33 -07:00
Jarred Sumner
1a2a52b3f3
oopsie
2023-05-21 20:13:40 -07:00
Ciro Spaciari
fd21243efd
WS send with callback ( #2986 )
...
* WS send with callback
* add opts.compress support
* fmt
* compress is the only option we care
* add ws client options
* only change ws client when using blob
* fmt
* fix errors
* fixup
* fixup
* fmt
2023-05-21 19:36:42 -07:00
Jarred Sumner
d90f7c7bf6
[Bun.serve] Support "nodebuffer" binaryType in ServerWebSocket
2023-05-21 19:20:40 -07:00
Jarred Sumner
91c9bd9dcc
[WebSocket] Implement "nodebuffer" binaryType
2023-05-21 18:34:00 -07:00
Jarred Sumner
7d682c0fe7
[ws client] Make it a little more type safe
2023-05-21 15:23:02 -07:00
Jarred Sumner
b6007a860e
[internal] Add more debug logs for uws
2023-05-21 14:30:36 -07:00
Jarred Sumner
eb3765ef93
[internal] Add a 0 byte to EOF read files as a precaution
2023-05-21 14:30:17 -07:00
Jarred Sumner
b33f20d51b
[internal] Make AbortSIgnal usage slightly safer
2023-05-21 14:29:02 -07:00
Jarred Sumner
1e307e7690
Add extra flag just to be sure
2023-05-21 14:28:09 -07:00
Jarred Sumner
6e6d34eca7
[internal] Fix potential missing callbacks in AbortSignal
2023-05-21 14:00:32 -07:00
Jarred Sumner
9834cba762
Add node:vm types
2023-05-21 12:41:15 -07:00
Ciro Spaciari
3870f674f9
fix(tls.connect) fix SNI on tls sockets and also servername (mongodb) ( #2934 )
...
* fixes SNI on tls sockets and also servername
* 💅
* 💅
* add support for https and wss
* fix bun types
* support Bun.file on ca, key and cert
* 💅
* add setTimeout (makes fastify run)
* fix httpVersion
* fix WebSocketServer and add listen event
* fix ws exports and http listening
* fix default import
* bump uws
* add nodebuffer compatibility
* fix drain and allow more passing tests to run
* fix enqueud messages
* default to arraybuffer
* fix constructor binaryType
* fmt
* fixup
* skip some tests
* skip more
* skip fault tests
* reuse encoder instance
* fix handshake WS Client
* temporary revert handshake fix
* fix handshake
* disable all socket.io test temp
* fixup
* add back socket.io tests
* use node_fs to read cert, ca and key on server.zig
* throw the error returned by NodeFS
* 💅
2023-05-21 09:50:53 -07:00
Jarred Sumner
12b34c6258
Add watch mode page
2023-05-21 01:29:57 -07:00
Jarred Sumner
34af34db9f
Update extending.md
2023-05-21 01:21:13 -07:00
Jarred Sumner
a29ee9f9a2
Update extending.md
2023-05-21 01:20:21 -07:00
Jarred Sumner
7ad1fc4f8f
Update extending.md
2023-05-21 01:18:43 -07:00
Jarred Sumner
40ee435a4b
More documentation
2023-05-21 01:17:21 -07:00
Jarred Sumner
ae8fc25b58
Update extending.md
2023-05-21 00:57:44 -07:00
Jarred Sumner
ef9555b9e1
Update extending.md
2023-05-21 00:56:13 -07:00
Jarred Sumner
3c2ac63d6e
Update extending.md
2023-05-21 00:56:05 -07:00
Jarred Sumner
fdd5d49fe3
Update extending.md
2023-05-21 00:55:03 -07:00
Jarred Sumner
b27f4ceb9c
Update extending.md
2023-05-21 00:53:50 -07:00
Jarred Sumner
1888c2df22
Update extending.md
2023-05-21 00:53:00 -07:00
Jarred Sumner
08043c5274
Update extending.md
2023-05-21 00:50:25 -07:00
Jarred Sumner
40de6d8cda
Update extending.md
2023-05-21 00:49:55 -07:00
Jarred Sumner
d5c9e5ee79
Add --preload docs
2023-05-21 00:48:25 -07:00
Jarred Sumner
def8824bc2
Upgrade WebKit ( #2980 )
...
* [internal] Show the file path to the calling function from JS
* [internal] Make `JSC.NewFunction` more type safe
* Upgrade WebKit
* Finish
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-21 00:20:04 -07:00
Jarred Sumner
5a38c4bc0a
Fixes #2976
2023-05-20 23:46:46 -07:00
Jarred Sumner
7a91d40a24
[bun:test] Add tests for --preload with beforeAll, afterAll, afterEach, beforeEach
2023-05-20 23:22:58 -07:00
Jarred Sumner
b16ddd95d9
[bun:test] preload now supports beforeAll, beforeEach, afterAll, afterEach hooks
...
Towards #198
2023-05-20 23:22:12 -07:00
Jarred Sumner
76e92abc7e
Fix missing arg
2023-05-20 22:57:05 -07:00
Jarred Sumner
db062a7c30
[bun:jsc] Rewrite describe -> jscDescribe to not confuse them in autocomplete
2023-05-20 22:56:53 -07:00
Jarred Sumner
5959418605
Bun.inspect gets a max depth of 32
2023-05-20 22:02:09 -07:00
Jarred Sumner
ee40d9c3b4
[bun:test] Make forEachPropertyOrdered behave closer to forEachProperty
...
When diffing, we were missing some properties due to not calling getters and other types of properties
This led to situations where Bun.deepEquals would report false and then display no difference
This aligns the behavior closer to forEachProperty
cc @dylan-conway please let me know if this is going to break anything
2023-05-20 22:02:09 -07:00
Jarred Sumner
cd28c2cd2b
[console.log] Set depth limit to 8
...
Towards #198
2023-05-20 22:02:09 -07:00
Jarred Sumner
50bb4749af
[internal] Make JSC.NewFunction more type safe
2023-05-20 22:02:09 -07:00
Jarred Sumner
ff4df6b600
[internal] Show the file path to the calling function from JS
2023-05-20 22:02:09 -07:00
Degreat
0e97f91f9f
Implement test.todo ( #2961 )
...
* Implement `test.todo`
* remove skip condition
* Allow callbacks in .todo
* Add descriptive comment
* Log todos
* Include tests in title
* edit test.todo tests
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-05-20 22:03:55 -04:00
Jarred Sumner
367f3a9c81
[bun:test] Fix bug where indexed properties would print "undefined" in diffs
2023-05-20 17:14:48 -07:00
Jarred Sumner
89e87a9050
[bun:test] Fix bug where indexed properties would print "undefined" in diffs
2023-05-20 17:12:50 -07:00
Jarred Sumner
7cf674a253
Support test timeouts in bun:test ( #2969 )
...
* [bun:test] Support timeouts in `test`
* make this test more resilient
* ✂️
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-20 17:04:51 -07:00
Jarred Sumner
e453b0e7c1
smol
2023-05-19 22:41:37 -07:00
e3dio
1973975ce0
fix #2964 ( #2965 )
2023-05-19 20:44:59 -07:00
Jarred Sumner
4db3d793cf
console.log changes ( #2966 )
...
* [breaking] Don't quote property names of identifiers in console.log
* Make UTF-16 strings green
* always quote for jest
* update tests
* Update this
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-19 19:50:06 -07:00
Jarred Sumner
0b6a32269f
ensure unused variable is not eliminated
2023-05-19 19:36:27 -07:00
Jarred Sumner
a3841a7de9
Fix failing node:vm tests
2023-05-19 19:35:05 -07:00
Ashcon Partovi
386ac374d5
Add tests for node:vm
2023-05-19 18:40:01 -07:00
Dylan Conway
9306103949
make sure key is added to args ( #2968 )
2023-05-19 18:22:54 -07:00
Jarred Sumner
12d841a3f5
[node:vm] Fix crash in syntax error in runinThisContext
2023-05-19 18:21:42 -07:00
Jarred Sumner
deeccb0dc4
[node:vm] Handle exceptions in runInThisContext and runInContext
2023-05-19 17:08:20 -07:00
Dylan Conway
aa34529b5b
resolve rope string for multipart template ( #2963 )
...
* resolve rope for multipart template
* fix tests
* clone template part if it is `e_string` and folded
* clone string only
* don't clone data again
2023-05-19 16:04:38 -07:00
e3dio
4101eeabde
update docs hot.md ( #2954 )
...
* Update hot.md
* Update hot.md
2023-05-19 15:23:24 -07:00
dave caruso
0036c3d8f5
Add tests for --compile tests ( #2901 )
...
* add compile test support
* add react ssr test
* add tests
* Fix flaky compile test
@paperdave we can't pass a non-zero port or it will be flaky
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-19 12:18:14 -07:00
Jarred Sumner
bf0f5c9b3d
Make node-fetch polyfill better ( #2962 )
...
* Make `node-fetch` polyfill better
* fixup
* Test using localhost
* Add comment
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-19 12:12:54 -07:00
Jarred Sumner
9b28d2009d
Add snippet for node:vm
2023-05-19 12:12:13 -07:00
Jarred Sumner
f910d791f9
[node:vm] Make vm.runInThisContext 10x faster
2023-05-19 11:18:11 -07:00
Zbyszek Tenerowicz
d6223c7f73
Fix typo ( #2959 )
2023-05-19 12:53:00 -04:00
Dylan Conway
c3233f1b21
set node_allocator for sourcemap joiner ( #2953 )
2023-05-18 19:39:31 -07:00
Jarred Sumner
a3e53b025e
Make node:vm 12x faster
2023-05-18 19:27:02 -07:00
Jarred Sumner
f862ae4050
[node:vm] Propagate global properties defined on the new context object
2023-05-18 18:45:13 -07:00
Jarred Sumner
958f5f8b99
clang-format
2023-05-18 18:37:53 -07:00
Silver
ac64eb420d
Implement node:vm ( #2785 )
...
* feat: begin implementing node:vm Script object
* refactor: clean up and address review comments
* refactor: rename Script to VMModuleScript
* fix: expose VMModuleScript.prototype
also oops I forgot to commit the new files last time
* feat(vm): Implement contexts and scripts
* feat(vm): implement globalThis
* feat(vm): expose node:vm module with global helper functions
* refactor(vm): rename VMModuleScript to NodeVMScript
* feat: implement script options
* doc: add TODOs for runIn*Context options
2023-05-18 16:45:18 -07:00
Jarred Sumner
b76974a2a8
Fixes #2924
2023-05-18 14:41:50 -07:00
Jarred Sumner
5bec0252a0
handle when cwd is not writable, attempt to use tmp dir explicitly
...
Fixes https://github.com/oven-sh/bun/issues/2944
2023-05-18 14:21:19 -07:00
Jarred Sumner
f7f0acbcd3
Bump
2023-05-18 13:41:16 -07:00
Jarred Sumner
f3a1a3bb2b
Fixes #2946 ( #2949 )
...
* Fixes #2946
* Update string_mutable.zig
* Fixes #2948
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-18 13:27:05 -07:00
Jarred Sumner
755c0d62c4
Fixes #2942 ( #2947 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-18 12:35:34 -07:00
Degreat
228ca3269a
Implement expect().toBeCloseTo() ( #2870 )
2023-05-18 11:32:31 -07:00
Dylan Conway
621232c197
use raw template contents for tagged templates ( #2937 )
...
* use raw template contents when tagged
* use union for template contents
* pointer to cooked contents
* raw if suffix
* fix and don't skip test
2023-05-18 10:52:34 -07:00
Jarred Sumner
642b3978a6
Fixes #2928 ( #2939 )
...
* Fixes #2928
* another case
* Fix console.log with utf-16 string mismatched quotes
* Fix issue with json
* Even more cases
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-18 10:38:50 -07:00
Jarred Sumner
17c258eb34
Update fs.test.ts
2023-05-17 20:51:38 -07:00
Jarred Sumner
aacbef3cf9
Mention setting target to "node" or "bun" when a ResolveMessage occurs for a Node.js builtin
2023-05-17 20:29:35 -07:00
Jarred Sumner
4f7198f780
Fixes https://github.com/oven-sh/bun/issues/2931
2023-05-17 20:19:31 -07:00
Jarred Sumner
21086c3a78
Update benchmarking.md
2023-05-17 18:52:29 -07:00
Jarred Sumner
206b85e5db
Support static string values in our class bindings generator
2023-05-17 18:52:23 -07:00
Jarred Sumner
25447426f1
Make BuildError and ResolveError use C++ instead of JSC C API
...
Fixes memory leak with private data never being cleared
Fixes a case where a ResolveError could actually be a BuildError
2023-05-17 18:51:50 -07:00
Jarred Sumner
67f543daa7
Update json-parse-stringify.mjs
2023-05-17 12:25:19 -07:00
Jarred Sumner
6c847f638f
microbenchmark for json.parse / stringify
2023-05-17 12:12:42 -07:00
Jarred Sumner
8d90d79587
Bump
2023-05-17 12:06:43 -07:00
Jarred Sumner
59adc6cb78
Merge branch 'jarred/webkit-upgrade-may-17'
2023-05-17 11:36:24 -07:00
Jarred Sumner
bff465a2a2
Finish bumping
2023-05-17 11:34:37 -07:00
Bryce Kalow
fb7fb0a537
fix: bun-plugin-server-components name ( #2919 )
2023-05-17 11:04:40 -07:00
dave caruso
f1b16cd36a
do not fail bundles on warnings ( #2920 )
2023-05-17 10:25:56 -07:00
Jarred Sumner
84fd6a514a
Do the WebKit upgrade
2023-05-17 09:55:24 -07:00
Dylan Conway
bf1216021e
resolve rope before pushing to previous string ( #2909 )
2023-05-16 17:19:56 -07:00
Harry Yep
2f4162e692
fix: broken link ( #2897 )
2023-05-16 17:08:45 -07:00
dave caruso
ad20b13985
Fix segfault on passing undefined to bun.build ( #2902 )
2023-05-16 17:08:00 -07:00
Dylan Conway
1ad8c54c90
fix asset naming output paths ( #2904 )
...
* rename to `src_path` and `dest_path`, use `dest_path` for output
* format
* option for compile
2023-05-16 17:07:40 -07:00
Jarred Sumner
78229da760
Bump
2023-05-16 11:44:03 -07:00
Jarred Sumner
3adadffc0e
Fixes #2895
2023-05-16 11:43:09 -07:00
Colin McDonnell
366eba78f0
Tweaks to bundler docs ( #2867 )
...
* WIP
* Fix typo
* Updates
* Document --compile
* Add bundler benchmark
* Remove esbuild
* Add bench to docs
* Add buttons
* Updates
2023-05-16 10:47:00 -07:00
Jarred Sumner
60bc804c58
Bump
2023-05-16 09:31:04 -07:00
Jarred Sumner
65237b3054
Update run-cjs.test.ts
2023-05-16 08:52:14 -07:00
dave caruso
c842f5bfe3
Fix running commonjs modules as entry point ( #2885 )
...
* fix cjs run issue
* use a primordial
* fix behavior
* fix it again
* fix tste
2023-05-16 08:49:35 -07:00
Ciro Spaciari
fe74c948cd
feat(WebSocketServer) WebSocketServer wrapper + socket.io initial support ( #2880 )
...
* WebSocketServer wrapper + socket.io initial support
* fix up backpressure
* fix up backpressure
* fix http address
* add socket.io tests
* add closing tests
* add connection state recovery tests for socket.io
* add handshake test
* add middeware tests for socket.io
* added socket.io socket middleware tests
* add more socket.io test comment/skip hang tests
* add pending package for tests
* add server attachment servers for socket.io
* add utility-methods tests for socket.io
* rename
* rename
* add messaging-many socket.io tests
* add namespaces tests to socket.io
* skip some tests
* fmt
* add packages to general package.json
2023-05-16 08:48:17 -07:00
Dylan Conway
9c85483a81
handle printing missing expressions and add tests ( #2872 )
...
* handle missing expressions and add tests
* minify missing expression blocks in parser
2023-05-15 21:50:44 -07:00
dave caruso
29572737ab
bundler testing ( #2886 )
...
* bundler testing
* add requireVarThenExport test
* work towards adding more esbuild tests
* tests
* remove this file
2023-05-15 21:18:52 -07:00
dave caruso
dce4a15e69
Change the debug id suffix to hex encoded "bun!bun!" ( #2890 )
2023-05-15 21:15:32 -07:00
Colin McDonnell
a52715597a
Add plugins for yaml & RSC ( #2888 )
...
* WIP
* WIP
* Add yaml plugin
* Publish v0.0.1
* Updates
* Start RSC plugin - not finished
* Add readme
* Updates
* Add shell dirs for a few other plugins
2023-05-15 20:37:03 -07:00
Jarred Sumner
b2a750e186
remove incorrect comment
2023-05-15 10:55:35 -07:00
Jarred Sumner
dd11f02a45
[bun build] builds w/ sourcemaps get 15% faster
...
parallelize quoting source contents
2023-05-15 08:49:54 -07:00
Jarred Sumner
1088a22802
Add TODO
2023-05-15 06:33:20 -07:00
Jarred Sumner
9076a981e8
Set files with #! as executable
2023-05-15 06:31:21 -07:00
Jarred Sumner
8eaf30c022
[bun build] Automatically set target to bun when a hashbang is provided
2023-05-15 06:30:55 -07:00
Jarred Sumner
0a879be328
[bun build --compile] Avoid creating holes
2023-05-15 05:57:46 -07:00
Jarred Sumner
ddb6de2fe6
[bun build --compile] Add some retry logic for opening the files
2023-05-15 05:57:27 -07:00
Jarred Sumner
8a68f3aa71
Remove unused dockerfile
2023-05-15 05:19:24 -07:00
Jarred Sumner
386eec31ac
More error message cleanup
2023-05-15 05:17:15 -07:00
Jarred Sumner
9c19383843
Fix crash when importing a file with an unknown extension
2023-05-15 04:35:59 -07:00
Jarred Sumner
47d2e2cb19
Make bun build --compile a little more resilient, output better errors, and clean up files
2023-05-15 04:35:21 -07:00
Jarred Sumner
4d751db27a
More DCE
2023-05-15 02:36:43 -07:00
Jarred Sumner
4ec2ed4f6c
Fix broken test
2023-05-15 01:56:59 -07:00
Jarred Sumner
e7e4030299
Fix bug with req.url set incorrectly ( #2881 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-15 01:52:51 -07:00
Jarred Sumner
d3a72a1254
Set more things to const
2023-05-15 00:00:13 -07:00
Jarred Sumner
44417e9d1e
github actions doesn't like SSH submodules
2023-05-14 23:51:24 -07:00
Jarred Sumner
9acf854f5b
Workaround https://github.com/ziglang/zig/issues/15715
2023-05-14 23:38:55 -07:00
Jarred Sumner
8cce69e7c2
wip
2023-05-14 23:14:45 -07:00
Jarred Sumner
a425376c3d
Fix process.argv with standalone
2023-05-14 23:09:19 -07:00
Jarred Sumner
c367408233
a little less inline
2023-05-14 21:15:35 -07:00
Jarred Sumner
328d09129a
Fix scope chain bug
2023-05-14 20:56:06 -07:00
Ciro Spaciari
e096a03e3e
fix(spawn) add Uint8Array support for stdout ( #2866 )
...
* add array_buffer support for stdout
* fix comment
* fix param name on baby_list
* keep test names consistent
* add more test cases
2023-05-14 10:22:02 -07:00
Ciro Spaciari
bf9e40d5b4
feat(Timer.refresh) add refresh support on Timer ( #2874 )
...
* add refresh support on Timer
* fix this return
* add refresh setTimeout tests
* fix tests and add setInterval test
* use setCached for arguments and callback
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-05-14 10:18:56 -07:00
Jarred Sumner
2a66229b0f
fixup
2023-05-14 06:31:17 -07:00
Jarred Sumner
688637d835
fix flags
2023-05-14 06:30:47 -07:00
Jarred Sumner
893f70fee4
Single-file standalone Bun executables ( #2879 )
...
* Add LIEF
* Compile LIEF
* Implement support for embedding files on macOS
* proof of concept
* Add zstd
* Implement runtime support
* Move some code around
* Update .gitmodules
* Upgrade zig
https://github.com/ziglang/zig/pull/15278
* leftover
* leftover
* delete dead code
* Fix extname
* Revert "Upgrade zig"
This reverts commit dd968f30bf .
* Revert "leftover"
This reverts commit 7664de7686 .
* Revert "leftover"
This reverts commit 498005be06 .
* various fixes
* it works!
* leftover
* Make `zig build` a little faster
* give up on code signing support
* Support Linux & macOS
* Finish removing LIEF
* few more
* Add zstd to list of deps
* make it pretty
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-14 06:13:39 -07:00
dave caruso
7f25aa9e08
windows path compatibility ( #2869 )
...
* winndows path compatibility
* change * to "star" and fix import
---------
Co-authored-by: cirospaciari <ciro.spaciari@gmail.com >
2023-05-12 17:39:28 -03:00
Ciro Spaciari
f48f48795b
proper stub for sockets ( #2868 )
2023-05-12 09:27:17 -07:00
Jarred Sumner
8f3b648602
finish #2864
2023-05-12 08:53:23 -07:00
Dylan Conway
5f897589fc
disable sloppy mode block level functions when not bundling ( #2864 )
...
* enable only during bundling
* add `willUseNumberRenamer()`
2023-05-12 08:32:24 -07:00
Dylan Conway
4d5d0d075a
root bundle option (#2859 )
...
* handle multiple output files and `[dir]`
* get the realpath of `root_dir`
* duplicate output paths
* add `rootdir` to `JSBundler`
* use realpath of input file
* add tests for naming and root
---------
Co-authored-by: Dave Caruso <me@paperdave.net >
2023-05-12 07:33:07 -07:00
Jarred Sumner
c815716899
[bundler] Don't wait on sourcmaps that don't exist
2023-05-12 07:28:56 -07:00
Jarred Sumner
6f0f506e95
[bundler] De-optimize import defaultIdentifier from './foo.cjs'
2023-05-12 07:28:40 -07:00
Jarred Sumner
da10cd6010
[bundler] Empty ESM gets undefined, empty CJS gets {}
2023-05-12 07:27:53 -07:00
Jarred Sumner
a46d3162ae
Fix importstar_ts/ReExportTypeOnlyFileES6
2023-05-12 07:27:25 -07:00
Jarred Sumner
02a8f99629
sort more
2023-05-12 07:27:15 -07:00
Jarred Sumner
20f1057a7d
Fix a couple tests
2023-05-12 07:27:09 -07:00
Jarred Sumner
f6bbfb16fd
Add a couple tests
2023-05-12 07:27:03 -07:00
Jarred Sumner
b5c70814e5
handle errors + sort things
2023-05-12 07:21:57 -07:00
Jarred Sumner
8340b98352
[bundler] Disable export star redirect code size optimization
2023-05-12 07:14:48 -07:00
Jarred Sumner
d2e09ce519
[bundler] Fix export * from ./my-cjs-file.cjs'
2023-05-12 04:11:21 -07:00
Jarred Sumner
1e450dbcab
[bundler] Implement export * from code size optimization
2023-05-12 04:11:21 -07:00
Jarred Sumner
231da81528
[bundler] Fix --transpile --outfile
2023-05-12 04:11:21 -07:00
Ciro Spaciari
6070e135e9
fix proxy status return ( #2860 )
2023-05-12 08:06:17 -03:00
Ciro Spaciari
f8c840aec7
fix large stdout output ( #2850 )
...
* fix large stdout output
* remove skip from #2674 for testing
* add big stdout test using spawnSync
* add bunEnv on big stdout test
2023-05-12 08:05:46 -03:00
Jarred Sumner
273ccbc241
[bundler] Fix bug with export default TypeScriptType
2023-05-12 02:02:35 -07:00
Jarred Sumner
3f01e2a519
alphabetize
2023-05-12 01:49:17 -07:00
Jarred Sumner
b0908b7b13
Fix test
2023-05-12 01:49:07 -07:00
Jarred Sumner
5b3e18e028
Fix regression
2023-05-12 01:49:00 -07:00
Jarred Sumner
155110a03a
Fix our tree shaking optimization
2023-05-11 23:19:21 -07:00
Jarred Sumner
3bb5c45385
Fix require() on a converted file
2023-05-11 23:18:36 -07:00
Jarred Sumner
e785b0872a
Fix tree shaking flag
2023-05-11 23:17:06 -07:00
Jarred Sumner
99cce67d61
enable tree shaking
2023-05-11 21:40:47 -07:00
dave caruso
4381204cdb
oops ( #2863 )
...
* oops
* oops part 2
2023-05-11 21:25:03 -07:00
Jarred Sumner
0cee7c028a
woops
2023-05-11 20:05:46 -07:00
Jarred Sumner
bfcc0b8960
handle module.exports.foo = class {} in the entry point in the runtime
...
Related to https://github.com/oven-sh/bun/issues/2862 , but does not fix it
2023-05-11 20:01:10 -07:00
dave caruso
dfd0f3e252
Allow reading config from within plugins, and partially implement esbuild initialOptions ( #2861 )
...
* Implement plugin build.config and initialOptions
* update types
* default initialoptions entrypoints
2023-05-11 22:58:41 -04:00
Jarred Sumner
136b50c746
formatting
2023-05-11 19:31:55 -07:00
Jarred Sumner
5bb42c81e4
give up on this optimization so we can ship
2023-05-11 19:31:39 -07:00
Jarred Sumner
a008e49a40
forgot to commit this
2023-05-11 15:14:43 -07:00
Jarred Sumner
56b8458c62
call stop before emit
2023-05-11 15:10:40 -07:00
Jarred Sumner
7141e19a10
fixup
2023-05-11 15:10:06 -07:00
Jarred Sumner
5c08200b18
[node:http] handle errors generated by fetch
2023-05-11 15:09:30 -07:00
Jarred Sumner
d67bdb7e9b
[node:http] Fix close() to accept a callback and implement closeAllConnections
2023-05-11 15:09:14 -07:00
Jarred Sumner
77eb61a1fe
Fix OutputKind, add "use client" and "use server"
2023-05-11 15:08:18 -07:00
dave caruso
6a163cf933
bundler tests and improve Bun.build return type ( #2833 )
...
* importstar_ts
* tests
* run acorn test suite
* bench tweaks
* test
* bun.build tests very incomplete
* remove dataurl and base64 loaders from tests since they dont work yet
* tests
* stuff
* stuff
* add errors and array of blobs
* work so far
* docs
* requested changes
* fix overwrite docs
* remove this file
2023-05-11 14:42:54 -07:00
Dylan Conway
02cad591f8
fix child process tests ( #2584 )
...
* always handle exit on next tick
* emit spawn immediately
2023-05-11 14:39:44 -07:00
Ciro Spaciari
3530cfac68
fix redirect: \'manual\' and setTimeout on node:http request ( #2848 )
2023-05-11 14:25:21 -07:00
Ciro Spaciari
bc7d0adcf9
fix(fs) mkdtemp and mkdtempSync errors ( #2851 )
...
* fix mkdtemp
* fmt
* fix errno
2023-05-11 14:23:33 -07:00
Ciro Spaciari
d032b73b10
add tests for ws.close ( #2844 )
...
* add tests for ws.close
* add timeout on ws.close tests
2023-05-11 02:30:48 -07:00
Ciro Spaciari
9c166a1bdf
add support for { all: true } option on dns.lookup ( #2846 )
2023-05-11 02:30:20 -07:00
Jarred Sumner
e125ed2aa3
Report timings for failing tests too
2023-05-11 01:16:46 -07:00
Jarred Sumner
5ffee9477c
[bun test] Add timings to successful tests
2023-05-11 00:55:41 -07:00
Degreat
4b79b37a99
Implement describe.skip ( #2836 )
...
* Implement describe.skip
* Add more tests to cover hooks
2023-05-10 23:57:30 -07:00
Ciro Spaciari
f9831e1f6f
feat(fetch) add redirect: 'error' support ( #2845 )
...
* add redirect: 'error' support
* fix typo
* fix typo
* refactor FetchRedirect enum
* fix FetchRedirect
* updated
2023-05-10 23:55:39 -07:00
Dylan Conway
8f4a5903ab
make sure vars can be hoisted in catch scope ( #2847 )
2023-05-10 23:55:27 -07:00
Jarred Sumner
0e5f0940ee
serialize
2023-05-10 23:30:30 -07:00
Jarred Sumner
9d3a95ed96
Add version
2023-05-10 23:03:37 -07:00
Jarred Sumner
2abfa84db7
Implement the benchmark snippet runner minus the sqlite serialization step
2023-05-10 22:50:56 -07:00
Dylan Conway
53fe8d61e7
object empty ast
2023-05-10 21:53:38 -07:00
Jarred Sumner
e1c6adc737
Prepare to run these automatically
2023-05-10 21:37:08 -07:00
Jarred Sumner
5e0eedccb0
Fix test failure in scope order verification
2023-05-10 20:07:12 -07:00
Jarred Sumner
06a03df9a6
Fix assertion
2023-05-10 17:59:55 -07:00
Jarred Sumner
ed5dd3fee1
Fix incorrect assertion
2023-05-10 17:50:02 -07:00
Jarred Sumner
96dc0471ff
Clean-up 85b4be5f71
...
- We don't need to make `Bun__fetch` exported in every C++ header file
- We shouldn't return JSObjectRef, its an unnecessary wrapper
- The version of `fetch` on the Bun global should be non-configurable so that it is safe for anyone who wants to use that without a user-modifiable one
2023-05-10 16:55:13 -07:00
Ciro Spaciari
85b4be5f71
fix(fetch) fix fetch inheritance ( #2842 )
...
* patch fetch function inheritance
* fmt
* fix reserveCapacity and number of arguments for fetch
* change Bun.fetch to use Fetch.jsFunction
* merge Fetch.jsFunction and Fetch.call
* remove commented code
2023-05-10 16:38:52 -07:00
Ciro Spaciari
643aa27a03
fix closing WS with code and reason ( #2843 )
2023-05-10 14:37:29 -07:00
Dylan Conway
e7d4f5fb16
use member from parent scope when hoisting ( #2840 )
2023-05-10 13:12:16 -07:00
Alex Lam S.L
5fd838b9e4
bun add from root folder when call within workspaces (#2841 )
...
- ignore invalid `package.json` from parent directories
- `echo` new lines from `make` targets correctly
2023-05-10 17:22:01 +03:00
Jarred Sumner
5b2c3fe440
clarify the types more
2023-05-10 05:08:22 -07:00
Jarred Sumner
53a198f2f7
Update test
2023-05-10 04:22:03 -07:00
Jarred Sumner
982dc0b441
Implement BuildArtifact
2023-05-10 04:21:53 -07:00
Dylan Conway
1f8c60123d
fix catch scope var declarations ( #2839 )
...
* use `catch_binding` kind and report errors
* make hash optional
2023-05-09 23:52:40 -07:00
Alex Lam S.L
4ccca13001
[install] operator on root package of workspaces ( #2834 )
...
- parse `bunfig.toml` from same directory as `package.json`
- handle `--cwd` correctly
fixes #2592
2023-05-10 08:26:29 +03:00
Jarred Sumner
1e8b9258b2
Expose bindings for Map
2023-05-09 21:47:18 -07:00
Jarred Sumner
c7c5dc1438
Add name property
2023-05-09 21:44:05 -07:00
Jarred Sumner
a5b3056c76
Fix extra semicolon
2023-05-09 21:41:05 -07:00
Jarred Sumner
e8989f9a60
Fix make headers (May 9th 2023 edition)
2023-05-09 21:05:33 -07:00
Jarred Sumner
4346f6afc0
RSC
2023-05-09 20:38:26 -07:00
Dylan Conway
38e72a528d
code splitting option
2023-05-09 20:38:02 -07:00
Dylan Conway
eb2510170f
resolve rope string before returning ( #2838 )
2023-05-09 20:33:26 -07:00
Dylan Conway
1d72bbe96c
space before label ( #2837 )
2023-05-09 20:27:20 -07:00
Dylan Conway
a47e2c6021
add WebAssemblyInstance and WebAssemblyGCObject js types ( #2835 )
...
* add `WebAssemblyInstance` and `WebAssemblyGCObject`
* update c api
2023-05-09 18:37:50 -07:00
Jarred Sumner
5a18d24a96
Re-run builtins generator
2023-05-09 16:17:42 -07:00
Jarred Sumner
d1dd7a7ebb
Add a comment
2023-05-09 15:40:51 -07:00
Jarred Sumner
65eb6db7fa
Fix a memory leak in module resolution
2023-05-09 15:29:32 -07:00
Jarred Sumner
ce3c7d2961
bun build --transform should not run the module resolver
2023-05-09 15:27:04 -07:00
Jarred Sumner
ff1edca9ee
Fix regression with bun test not recursively scanning the directory tree
2023-05-09 14:56:39 -07:00
Jarred Sumner
ffd48dc7a7
fix tracy i think
2023-05-09 14:32:26 -07:00
Dylan Conway
b3dc14ef0f
don't replace with there isn't a star ( #2825 )
2023-05-09 14:20:46 -07:00
dave caruso
22b801bb89
fix #2820 ( #2832 )
2023-05-09 14:20:12 -07:00
Dylan Conway
c35518e6d6
Fixes #2807
...
we will look at the minify tests for uglifyjs too
2023-05-08 23:39:02 -07:00
Dylan Conway
232a25b77f
add the class name to the current scope
2023-05-08 23:34:36 -07:00
Dylan Conway
e74207650b
Fix bug with float minification
2023-05-08 23:07:14 -07:00
Dylan Conway
aa85d7af92
Fix incorrect fd usage
2023-05-08 22:54:25 -07:00
Jarred Sumner
0b52f9210a
Add a couple helpers
2023-05-08 22:36:52 -07:00
Jarred Sumner
69ea6fd54f
Fix memory issues with loader and define in JSBundler
2023-05-08 22:35:13 -07:00
Jarred Sumner
73b0d8a51c
Make the enum serializer more flexible
2023-05-08 22:34:01 -07:00
Jarred Sumner
b874d0b387
✂️ dead code
2023-05-08 22:32:04 -07:00
dave caruso
5e366872f6
implement build api define and loaders ( #2805 )
...
* parse error logs
* clean up types
* remove --jsx-production. use NODE_ENV instead
* add define to js api
* add loaders to js api
* fixups
* sourcemap
* typo fix
* remove label, comment dir just for now
* test tweaks
* test work
* make optional enums actually optional.
allows `sourcemap: undefined`
* overload host ram test
* string tests
* tests
* test for 2815
* requested changes
* sort this list
* remove this test file now that it passes
* oops
* add --format
* finish ts tests
* doc typos related to define and loader
2023-05-08 21:55:21 -07:00
Jarred Sumner
1a411e201b
Add some comments
2023-05-08 21:32:17 -07:00
Jarred Sumner
4a2d89d865
✂️ some dead code
2023-05-08 21:29:19 -07:00
Jarred Sumner
e422c849d5
Fix bug in Bun.build() where it wouldn't pick up changes to directories on rebuilds ( #2824 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-08 21:14:56 -07:00
Ciro Spaciari
c6c21eeba7
added some improvements on server ( #2803 )
...
* added some improvements on server
* undo unintended change
* clean data handler before end calls
* refactor
* make ctx.resp nullable
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-05-08 14:10:40 -07:00
Jarred Sumner
14597dbcdc
Don't leak file handles
2023-05-08 02:43:17 -07:00
Jarred Sumner
f9d6a61676
[fs] Add an extra byte to files we read
2023-05-08 01:45:10 -07:00
Jarred Sumner
3f895085a0
[fs] More logging
2023-05-08 01:44:50 -07:00
Jarred Sumner
81e4203efe
[bundler] Make module resolution single-threaded
2023-05-08 01:44:08 -07:00
Jarred Sumner
db44f41dd0
Possibly fix the linux perf issue
2023-05-07 23:53:45 -07:00
Jarred Sumner
56bd410044
Reduce over-allocation
2023-05-07 23:52:05 -07:00
Jarred Sumner
35685bbc86
Reduce the size of the JS AST to attempt to resolve the linux performance issue
2023-05-07 22:33:59 -07:00
Jarred Sumner
af1cd23b8c
Add tracy ( #2817 )
...
* Add tracy
* RTLD
* Linux needs LD_PRELOAD
* More tracing
* Inline this
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-05-07 21:08:32 -07:00
Jarred Sumner
d3ae9ac7ce
experiment to try to fix linux bundler perf regression
2023-05-07 01:51:05 -07:00
Jarred Sumner
1fbfaa5ca1
Use dwarf v4
2023-05-07 01:50:20 -07:00
Jarred Sumner
243847f992
Add alignment feature flag
2023-05-07 01:04:38 -07:00
Jarred Sumner
25eecc3e07
Add latin1 identifier fast path
2023-05-06 23:36:37 -07:00
Jarred Sumner
0e1b934e27
Fix overflow
2023-05-06 19:52:46 -07:00
Jarred Sumner
2aa4fba99d
💅
2023-05-06 19:09:14 -07:00
Jarred Sumner
cf4d13dcc0
Fixes #2811
2023-05-06 19:06:52 -07:00
Jarred Sumner
4708835ae6
[minifier] Rewrite equality check logic
2023-05-06 18:23:37 -07:00
Jarred Sumner
8975717bc3
Fix several transpiler tests
2023-05-06 18:20:19 -07:00
Jarred Sumner
5327940132
Fixes https://github.com/oven-sh/bun/issues/2810
2023-05-06 18:16:21 -07:00
Jarred Sumner
54d5f59f09
Cleanup some of the log-related code
2023-05-06 16:32:29 -07:00
Jarred Sumner
46a0a4d984
[Bun.build] Add error when an onResolve plugin returns a namespace which has no loader
2023-05-06 16:32:06 -07:00
Jarred Sumner
70e850bf76
fix crash when there are lots of build errors
2023-05-06 16:31:46 -07:00
Jarred Sumner
d4b35d9ae6
Fix make headers
2023-05-06 13:19:41 -07:00
Jarred Sumner
f523b2187a
Fix make headers
2023-05-06 13:19:23 -07:00
Jarred Sumner
41a59d0d03
Fix a memory leak
2023-05-06 13:19:11 -07:00
Jarred Sumner
9c9425bc8c
Another .isFile()
2023-05-06 13:18:38 -07:00
Jarred Sumner
01ce690a01
Clone the logs more
2023-05-06 13:18:13 -07:00
Jarred Sumner
1da75791da
Use isFile() helper
2023-05-06 12:52:55 -07:00
Jarred Sumner
3bc02e48ca
Comment out buchta from docs
...
The repo is archived, so it should not appear in our docs
2023-05-06 12:41:03 -07:00
Jarred Sumner
9d7ecf7909
[misctools] Add cold jsc start test
2023-05-05 20:01:26 -07:00
Jarred Sumner
31cb49a026
[ci] Fix broken test runner
...
cc @Electroid we need `@actions/core` to be installed in node_modules
2023-05-05 18:34:43 -07:00
Jarred Sumner
f95a81e05d
[napi] Fix crash in napi_create_external_buffer
...
This impacted LightningCSS when garbage collection ran. cc @devongovett
2023-05-05 17:16:47 -07:00
Jarred Sumner
c3d512f27e
Fix valgrind tracking flag
2023-05-05 15:48:27 -07:00
Jarred Sumner
9a09f9f532
Fix bug where the Bun.file() returned by Bun.build() would have an incorrect path
2023-05-05 15:48:26 -07:00
Jarred Sumner
3a01316707
Cleanup how some of the server components stuff works
2023-05-05 15:48:26 -07:00
Kruithne
e00017f7b8
Add missing JSON API to Web APIs page ( #2799 )
...
* Add missing JSON API to Web APIs page
Unless I'm missing something obvious, it appears that Bun has the JSON API (`stringify`/`parse`) but is not listed anywhere in the documentation.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
* Include JSON in global docs
2023-05-05 12:54:54 -07:00
Colin McDonnell
386639a4c5
Start esbuild migration guide. More docs. ( #2787 )
...
* Bundler docs updates. Start esbuild migration guide.
* Updates
* Add JS API comp
* Tweaks
* Updates
* Updates
* Updates
2023-05-05 12:53:38 -07:00
Dylan Conway
d9386a68a4
fix source map line offsets ( #2791 )
...
* find codepoint at `i`
* fix allocator usage
* missing comment
* switch to `Cursor` iterator
2023-05-04 22:44:02 -07:00
Jarred Sumner
945d069290
Add UNLIKELY
2023-05-04 17:09:59 -07:00
Jarred Sumner
7cb1404511
Revert "Add setNoDelay"
...
This reverts commit 8b6dd0c7e1 .
2023-05-04 17:09:24 -07:00
Jarred Sumner
8e4f777d35
Throw error on non-file url
2023-05-04 17:09:10 -07:00
Jarred Sumner
8b6dd0c7e1
Add setNoDelay
2023-05-04 17:09:10 -07:00
Ashcon Partovi
c43c1b50ff
Add no-op for ClientRequest.{setNoDelay,setTimeout}
2023-05-04 16:09:45 -07:00
Ashcon Partovi
1574ac7896
Only checkout test folder for ecosystem tests
2023-05-04 15:55:12 -07:00
Ashcon Partovi
a66137bdce
Actually fix the git clone URL
2023-05-04 15:36:56 -07:00
Ashcon Partovi
b2abf82494
Use HTTPS instead of SSH for git clone in ecosystem tests
2023-05-04 15:35:58 -07:00
Ashcon Partovi
d68786909c
Fix working directory of GitHub action
2023-05-04 15:33:33 -07:00
Ashcon Partovi
1183dd1a3f
Add initial ecosystem tests ( #2801 )
...
* Add initial ecosystem tests
* Run ecosystem tests every morning, after canary release
2023-05-04 15:27:12 -07:00
Dylan Conway
8e18229d5d
parse and visit catch body scope ( #2796 )
2023-05-04 08:21:33 -07:00
Jarred Sumner
243dfc177a
Fix code splitting for server components
2023-05-03 23:48:18 -07:00
Jarred Sumner
f114e88bee
Clean up edgecase causing plugins to be called too many times
2023-05-03 15:35:11 -07:00
Jarred Sumner
2d0eaf9842
Fix broken test
2023-05-03 15:32:15 -07:00
Jarred Sumner
101f0ee6ba
re-enable our CJS optimization
2023-05-03 10:35:55 -07:00
Jarred Sumner
9b5caf7467
Implement synthetic default export
2023-05-03 00:55:06 -07:00
Jarred Sumner
b2a50671ab
add deoptimization
2023-05-02 23:03:39 -07:00
Dylan Conway
ca776326cf
entry_point_kinds only at source_index
2023-05-02 22:16:46 -07:00
Jarred Sumner
1346293619
Add missing function
2023-05-02 22:12:56 -07:00
Jarred Sumner
bc4a8bf595
Small refactor
2023-05-02 22:02:19 -07:00
Jarred Sumner
2bc449656e
Visit the runtime
2023-05-02 22:02:19 -07:00
Jarred Sumner
6a74651eb4
Add helper fn
2023-05-02 22:02:19 -07:00
Dylan Conway
755874a9ea
Fix checking for dynamic exports ( #2792 )
...
* only look at import records for the current source index
* skip `source_index` when it is invalid
* iterate `export_star_records` at `source_index`
* comment
2023-05-02 21:57:57 -07:00
Jarred Sumner
082bc62589
alignment
2023-05-02 19:57:44 -07:00
Jarred Sumner
2250f7a0c0
Add __ulock_wait2 polyfill
...
cc @kzc
2023-05-02 18:33:03 -07:00
Jarred Sumner
fe52627dea
fix spacing
2023-05-02 11:58:24 -07:00
Jarred Sumner
6bdc158e9c
Use pretty
2023-05-02 11:58:14 -07:00
Jarred Sumner
7a699c1ac2
Fix a couple spltiting bugs
2023-05-01 22:23:07 -07:00
Jarred Sumner
c5df4e9477
Compress let f; f=123 => let f = 123;
2023-05-01 21:00:51 -07:00
Jarred Sumner
b3c7d0ea23
Small improvement to minifier
2023-05-01 21:00:31 -07:00
Jarred Sumner
1af4e1dce1
Fixes #2783
2023-05-01 16:55:50 -07:00
Jarred Sumner
5d8027cd5a
Fix test
2023-05-01 16:55:11 -07:00
Jarred Sumner
69b767fadc
Update bundle_v2.zig
2023-05-01 15:24:10 -07:00
Jarred Sumner
44fbd7719e
Fix some splitting bugs
2023-05-01 15:04:46 -07:00
Jarred Sumner
0b2422b1f3
Fix another crash
2023-05-01 13:01:30 -07:00
Jarred Sumner
331a3cec8c
Fix crash
2023-05-01 12:24:28 -07:00
Revenity
c2a223802b
Add StricJS to ecosystem ( #2747 )
...
* Create stric.md
* Update nav.ts
* Update stric.md
Add codetabs for ArrowJS
* Update stric.md
* Update stric.md
2023-05-01 10:37:39 -07:00
Ashcon Partovi
c19c522744
Fix error links in markdown summary
2023-05-01 09:01:41 -07:00
Ashcon Partovi
1fc8639177
Condense errors in test runner script
2023-05-01 08:48:40 -07:00
Jarred Sumner
fe57932dfb
Add missing type for sqlite ( #2764 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-30 23:36:32 -07:00
Will Richards 2
59b3556fab
Bun Test matchers even/odd. Also, .toContains fix and truthy ( #2754 )
...
* bun test matcher tests for even/odd, few more truthy tests, and fix for contains empty string
* implementation of even/odd matchers
* didn't add the codegen bindings
* linted
2023-04-30 23:36:08 -07:00
Jarred Sumner
8b53b3ed88
FIx esm -> cjs require interop with converted CJS
...
TODO: make `default` namespace object for these not load the entire wrapper
2023-04-30 23:17:25 -07:00
Jarred Sumner
c0a1c76edb
Fix garbled line text in some errors
2023-04-30 23:16:23 -07:00
Jarred Sumner
f26fef1010
Update options.zig
2023-04-30 22:41:07 -07:00
Jarred Sumner
f8b0730231
Fix missing imports in DCE tests
2023-04-30 22:34:23 -07:00
Jarred Sumner
fe14b7244d
Fix missing "default" export condition
2023-04-30 22:34:13 -07:00
Dylan Conway
0490bd3d2e
Implement source maps ( #2770 )
...
* wip
* Begin computing source map tables
* source map progress
* external source maps
* fix merge
* remove `@as` coercion
* inline source maps and output source map shifts
* fix `codeWithSourceMapShifts()` after merge
* remove second call to `findReachableFiles()`
* use `worker.allocator`, remove comment
* don't reuse memory for source and sourceContents
* don't reuse `quote_buf`
* fix writing to stdout
* Add comment
* Don't include a sourcemap if the text was empty
* Make the parser faster
* +16% faster sourcemap generation
@dylan-conway I'll need you to look this over to make sure I didn't mess anything up
Though it currently doesn't generate the offsets in the right order...
* 30% performance improvement to Bun.build()
* Print `debugId` in source maps
cc @mitsuhiko @notzeeg
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-30 22:09:40 -07:00
dave caruso
137dc6e19f
test default condition ( #2776 )
2023-04-30 21:16:32 -07:00
Alex Lam S.L
c05a6744bb
[install] handle devDependencies of local folders ( #2781 )
...
fixes #2653
2023-05-01 06:41:33 +03:00
Jarred Sumner
f54fbaf3ba
prevent crash
2023-04-30 09:50:37 -07:00
Alex Lam S.L
dd03a4f95d
[install] handle repeated install of GitHub dependency correctly ( #2780 )
...
fixes #2602
2023-04-30 09:45:08 -07:00
Jarred Sumner
4be3548829
add to symbols.txt
2023-04-30 00:55:09 -07:00
Jarred Sumner
c3dc64d468
Fix a load order issue
2023-04-29 21:37:04 -07:00
Jarred Sumner
bd1f9d8370
Fix some runtime issues caused by bundler
2023-04-29 21:14:21 -07:00
Jarred Sumner
0cb090f118
Fix garbled text in errors
2023-04-29 19:42:47 -07:00
Jarred Sumner
5fb014876b
Fix plugin namespaces always being set to "flie"
2023-04-29 19:42:38 -07:00
Jarred Sumner
e7ff65ce2c
[Transpiler] Fix crash in scanImports when the text is empty
2023-04-29 18:59:22 -07:00
Jarred Sumner
e321e1c5f8
Fix debug mode crash with trailing slash in import specifier
2023-04-29 18:58:43 -07:00
Jarred Sumner
737822b2ba
Put transpiler tests in a separate folder
2023-04-29 18:47:52 -07:00
Jarred Sumner
9a929ff873
Update bun.zig
2023-04-29 18:16:57 -07:00
Jarred Sumner
3b6fb37497
Clean up args parsing with --loader
2023-04-29 18:12:55 -07:00
Jarred Sumner
229f5f7770
Export 4 missing napi symbols on macOS
2023-04-29 16:04:08 -07:00
dave caruso
96e113f41c
bundler tests: rest of default.test.ts and starting jsx tests ( #2765 )
2023-04-28 21:08:48 -07:00
Jarred Sumner
bc0c0f7d20
fix several memory issues related to plugins
2023-04-28 18:59:12 -07:00
Jarred Sumner
98583972df
cargo cult some code from JSC
2023-04-28 18:57:00 -07:00
Jarred Sumner
994c715700
Fix race condition
2023-04-28 17:46:43 -07:00
Jarred Sumner
e3a0c4e06d
Update bun-test.yml
2023-04-28 17:12:01 -07:00
Jarred Sumner
bc43d33be9
move this
2023-04-28 17:10:24 -07:00
Jarred Sumner
73d499ed22
Add a comment
2023-04-28 17:02:12 -07:00
Ashcon Partovi
912ae8d2b5
Improve test runner markdown
2023-04-28 14:58:16 -07:00
Jarred Sumner
26d81fc5ba
[resolver] Propagate module type from package.json "exports" when possible
2023-04-28 14:21:18 -07:00
Jarred Sumner
396416a91f
Fix crash with invalid input in fetch()
2023-04-28 13:54:22 -07:00
Ciro Spaciari
4515a6373e
Improves Body.Value life cycle and Signal life cycle on server.zig ( #2752 )
...
* reestruct request body value and signal
* revert react-hello-world
* fix constructInto and test
* fmt
* fix body nullable
* Request can outlive RequestContext
* fmt
* BodyValue is now HiveRef
* hasDecl for Ref and HiveRef
* fix deinit call on Ref/HiveRef
* adds InlineBlob
* fix Bun.inspect when using InlineBlob
* revert InlineBlob
* Fix mimalloc-debug
* Add TODO note
* fix: make node:crypto Hash.copy work correctly (#2761 )
This commit will also:
- add a CryptoHasher.copy function
- make CryptoHasher.digest reset the hasher so it can be reused
Resolves #2651
* 💅
* address unicode issue (#2763 )
* Fix an oopsie
* Another oopsie
* use inline for
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* Request can outlive RequestContext
* fmt
* garantee to have the abort signnal attached to the server before abort the client on bun-server test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Silver <14016168+silversquirl@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-04-28 13:40:44 -07:00
Jarred Sumner
c383638ddd
Use global allocator tsconfig.json
2023-04-28 10:35:50 -07:00
Ashcon Partovi
af02b75f79
Use setup-bun instead
2023-04-28 10:13:36 -07:00
Ashcon Partovi
a06e90eec3
Fix path of bun in workflow, try 3
2023-04-28 09:58:56 -07:00
Ashcon Partovi
35d470d98a
Fix path of bun in workflow, try 2
2023-04-28 09:54:31 -07:00
Ashcon Partovi
05abe8eabe
Fix path of bun in workflow
2023-04-28 09:52:15 -07:00
Ashcon Partovi
48671b77be
Use GITHUB_PATH instead of cp
2023-04-28 09:44:44 -07:00
Ashcon Partovi
b7c13f2ccc
Maybe fix test runner on macOS
2023-04-28 09:41:36 -07:00
Ashcon Partovi
64b9967fe6
Improve test workflow
2023-04-28 09:35:44 -07:00
Ashcon Partovi
ef894c57cf
Fix typo in runner
2023-04-28 09:17:06 -07:00
Ashcon Partovi
5734889cc7
Use bun x instead of bunx
2023-04-28 09:13:14 -07:00
Ashcon Partovi
59daabb6e7
Fix manual test workflow
2023-04-28 09:11:55 -07:00
Ashcon Partovi
36df170348
Use Node.js APIs for test runner
2023-04-28 09:07:48 -07:00
Ashcon Partovi
6cf4cabab1
New test runner with better Github integration
2023-04-28 08:42:25 -07:00
Colin McDonnell
1483d73c3a
Bundler docs updates + support for naming string ( #2767 )
...
* Bundler docs updates
* Remove comments
* Updates
* Fix bunx usages
* Add info about metafile
2023-04-28 08:35:20 -07:00
Jarred Sumner
52c50e3737
address unicode issue ( #2763 )
...
* Fix an oopsie
* Another oopsie
* use inline for
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-27 08:37:37 -07:00
Jarred Sumner
3ee22065f0
💅
2023-04-27 07:51:30 -07:00
Silver
0060e49923
fix: make node:crypto Hash.copy work correctly ( #2761 )
...
This commit will also:
- add a CryptoHasher.copy function
- make CryptoHasher.digest reset the hasher so it can be reused
Resolves #2651
2023-04-27 07:45:32 -07:00
Jarred Sumner
87921520e4
Add TODO note
2023-04-27 05:35:11 -07:00
Jarred Sumner
73467a5736
Fix mimalloc-debug
2023-04-27 05:35:11 -07:00
B. Burt
5a8a418ef4
Remove extra word in docs/index.md ( #2758 )
2023-04-27 04:00:35 -07:00
Jarred Sumner
df59fe2843
Implement outdir in Bun.build
2023-04-27 03:45:49 -07:00
Jarred Sumner
990f53f986
Don't preallocate unless its profitable
2023-04-27 03:45:09 -07:00
Jarred Sumner
9383333799
Add microbenchmark
2023-04-27 03:44:23 -07:00
Jarred Sumner
4558ea712a
very slightly faster open() and writeFileSync() ( #2759 )
...
* Make open() slightly faster on macOS
* Support using `writeFileSync` from native code
* Add `openat$NOCANCEL` symbol
* fixups for linux
* do benchmark
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-27 03:35:46 -07:00
Jarred Sumner
f1c1f556a3
more esbuild compat
2023-04-26 22:36:56 -07:00
Jarred Sumner
6142f6eb61
Wrap some things in minify_syntax flag
2023-04-26 22:32:48 -07:00
Jarred Sumner
316a75005b
Inline spreads of array literals
2023-04-26 22:32:31 -07:00
dave caruso
5b76ee769e
bundler tests! ( #2741 )
...
* bundler tests!
* tests
2023-04-26 21:57:49 -07:00
Silver
3a203abc10
Use Ninja to build mimalloc and gitignore test/bun.lockb ( #2750 )
...
* build: use ninja to build mimalloc
This is both faster than make, and ensures the same generator is
always used, even when CMAKE_GENERATOR exists in the environment.
* chore: gitignore test/bun.lockb
2023-04-26 21:57:25 -07:00
Dylan Conway
75e3546f3a
ensure super() is not merged with adjacent statements ( #2757 )
...
* ensure `super()` is not merged with adjacent statements
* add TODO
2023-04-26 21:46:35 -07:00
Jarred Sumner
6c6118e210
Fixes #2746 ( #2748 )
...
* Fixes #2746
* add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-26 21:07:40 -07:00
dave caruso
55c05c0a1f
fix ( #2756 )
2023-04-26 20:45:27 -07:00
dave caruso
7d7748f69f
docs hotfix ( #2755 )
2023-04-26 20:27:24 -07:00
Colin McDonnell
8ba13f273c
Add bundler documentation ( #2753 )
...
* WIP
* WIP
* WIP
* Document API
* Updates
* Polish bundler docs
* Tweaks
* Tweak
2023-04-26 20:07:30 -07:00
Colin McDonnell
68ab71eb13
Basic types for Bun.build ( #2713 )
...
* Basic types for Bun.build
* Tweaks
* Updates
2023-04-26 14:54:05 -07:00
Jarred Sumner
ab447e4ff7
Implement file loader in Bun.build ( #2745 )
...
* Update bundle_v2.zig
* Implement `file` loader
* Hash in parallel
* Implement `publicPath`
* simplify
* Update bundle_v2.zig
* Implement `#!`
* Remove unnecessary optional
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-26 07:22:29 -07:00
Jarred Sumner
149f097ffd
Update outdated help
2023-04-25 22:21:40 -07:00
Jarred Sumner
3e374c0ee4
Fix assertion failure
...
reproduces if building Three.js 10 times in runtime
2023-04-25 22:21:24 -07:00
Jarred Sumner
f42663ce9a
Avoid unnecessary copies
2023-04-25 22:11:15 -07:00
Jarred Sumner
c48f7e2663
Fix error with --jsx-production in runtime
2023-04-25 22:10:59 -07:00
dave caruso
0846a4fa80
bundler tests, testing plugins ( #2740 )
...
* add cjs2esm stuff
* tests
* plugin testing
2023-04-25 19:13:39 -07:00
Jarred Sumner
2256d43a32
now it works
2023-04-25 08:19:40 -07:00
Jarred Sumner
947634c9ed
typo
2023-04-25 07:57:00 -07:00
Jarred Sumner
126885e1fe
Implement onResolve plugins in Bun.build(), support multiple onLoad and onResolve plugins ( #2739 )
...
* its 2023
* WIP `onResolve` plugins
* more progress
* it compiles
* Lots of small fixes
* Seems to work excluding entry points
* Update BundlerPluginBuiltins.cpp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-25 07:27:18 -07:00
Jarred Sumner
5353d41014
Fixes #2738
2023-04-25 07:25:00 -07:00
Alex Lam S.L
460563ee89
fix make setup ( #2731 )
...
- minor clean-ups
2023-04-25 15:13:57 +03:00
Jarred Sumner
3c4f0920b9
Log HTTP requests and responses by default when log level is debug or verbose
2023-04-25 04:01:26 -07:00
Alex Lam S.L
6e16bb67eb
[install] fix bun add on non-aliased dependency ( #2728 )
2023-04-24 17:56:43 -07:00
Jarred Sumner
e9e7645048
In bun run, rewrite usages of npx to bun x instead of bunx to workaround missing symlink
2023-04-24 17:55:34 -07:00
dave caruso
f2112fc0de
Continue bundler tests ( #2691 )
...
* start refine + skipping some packagejson tests
* some more tests
* stuff
* tests for minify branch
* pkgjson
* add minify/MergeAdjacentVars
* add test for #2699
* more tests!
* more tests
* finish splitting tests
* all but 2 import star tests are good
* test
2023-04-24 14:12:21 -07:00
Jarred Sumner
923ac39c0b
Support plugins in Bun.build ( #2720 )
...
* wip
* Implement `onLoad` plugins
* Support exceptions and async `onLoad` plugins
* Fix filtering
* Handle empty files
* Fix JSON loader
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-24 14:11:59 -07:00
Plecra
98209b8e10
Reduce friction for building with npm ( #2723 )
...
This was the only dependency on bun that I encountered while building the
project, and the change to the gitignore ensures that it's easy to
make changes after an npm based build
2023-04-24 04:23:38 -07:00
Jarred Sumner
4b24bb464c
Make Bun.build more reliable ( #2718 )
...
* One possible implementation to make `Bun.build` work better
* Pass allocator in
* Make our temporary buffers a little safer
* rename
* Fix memory corruption in symbol table
* Add support for deferred idle events in ThreadPool
* Free more memory
* Use a global allocator FS cache
* more `inline`
* Make duping keys optional in StringMap
* Close file handles more often
* Update router.zig
* wip possibly delete this commit
* Fix memory issues and reduce memory usage
* > 0.8
* Switch to AsyncIO.Waker and fix memory leak in JSBundleCompletionTask
* We don't need to clone this actually
* Fix error
* Format
* Fixup
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-22 19:44:23 -07:00
Jarred Sumner
7d6b5f5358
Fix minify: true not applying to identifiers
2023-04-21 18:03:27 -07:00
Jarred Sumner
9423693a6e
[breaking] In Bun.Transpiler, don't wrap CommonJS modules in export default
2023-04-21 18:03:07 -07:00
Jarred Sumner
8b9462fde5
Add minify option to Bun.Transpiler
2023-04-21 18:02:29 -07:00
Colin McDonnell
caa90ba98e
Update TS docs for bun-types changes ( #2590 )
...
* Update TS docs for bun-types changes
* Update typescript, remove extends guidance
* Updates
* Tweaks
* Tweaks
2023-04-21 11:35:42 -07:00
Colin McDonnell
55d50565a5
Add tsconfig.json to bun-types ( #2587 )
...
* Add tsconfig.json to bun-types. Document 'extends' pattern.
* Updates
* Update bun init to use extends:bun-types
* Update type:module recommendation
* Add note about transpilation. Closes #2553
* Make typescript a peer dep
* Revert changes to docs
* Revert tsconfig extends
* Update readme
* FMC
* Undo changed
2023-04-21 11:34:05 -07:00
Jarred Sumner
dc55e11714
Keep the node crypt otest
2023-04-21 07:25:51 -07:00
Jarred Sumner
613bb4822e
Revert "use a lazyily initialized stream for node:crypto createHash ( #2652 )"
...
This reverts commit 3a2fd65f20 .
2023-04-21 07:18:32 -07:00
Jarred Sumner
a4d0a1961a
Revert "implement node:events in javascript ( #2604 )"
...
This reverts commit 96a2ed1040 .
2023-04-21 07:16:23 -07:00
Jarred Sumner
143ccdbeb6
Fix order
2023-04-21 05:10:03 -07:00
Jarred Sumner
b98f90fc6e
Bun.build() partial implementation
2023-04-21 01:04:55 -07:00
Jarred Sumner
281b810664
slightly better minified
2023-04-21 01:04:06 -07:00
Jarred Sumner
ffdac249ae
Add comment
2023-04-21 00:52:31 -07:00
Jarred Sumner
541d16f8be
Fix bug with merging adjacent vars
2023-04-20 23:57:44 -07:00
Emmanuel Vazquez
b609f9be28
chore(docs): add xcode runtime install to docs ( #2706 )
2023-04-20 20:03:12 -07:00
Jarred Sumner
b473a0022d
Fix whitespace edgecase with export * from
2023-04-20 19:51:20 -07:00
Dylan Conway
94cd68d7a6
append if the previous part is not UTF8 ( #2705 )
2023-04-20 16:35:01 -07:00
Jarred Sumner
6d5378566a
Fix template string folding test
...
@paperdave --minify-syntax now causes `true` to print as `!0` and `false` to print as `!1`
`undefined` is now `void 0`
2023-04-20 05:44:50 -07:00
Jarred Sumner
c33df9e99f
Increase timeouts :(
2023-04-20 05:40:20 -07:00
Jarred Sumner
4dc0364201
Update runner.node.mjs
2023-04-20 05:40:11 -07:00
Jarred Sumner
aa4d47fe2d
Improve error message when failing to read a file
2023-04-20 05:30:35 -07:00
Jarred Sumner
3a68ca775f
Fix bug with invalid character at the end of comment path
2023-04-20 05:24:29 -07:00
Dylan Conway
d78ecc76c8
Symbol minification ( #2695 )
...
* minify
* Update renamer.zig
* --minify-whitespace
* Speed up minification a little
* handle private names
* 5% faster minification
* use helper function
* fix nested scope slots
* `bun build --minify` gets another +8% faster
* print semicolons afterwards
* print semicolon after checking error
* after all error checking
* Delete code for generating legacy bundes
* remove extra whitespace around if statements
* print space before import identifier
* Use `@constCast`
* Make `S.Local#decls` use `BabyList(Decl)`
* Add `fromSlice` helper to `BabyList`
* Remove unnecessary optional chains
* minify `undefined, true, false`
* Another @constCast
* Implement merge adjacent local var
* Support --minify in `bun build --transform`
* skip comments when counting character frequencies
* Don't wrap commonjs with --transform on (unless targeting bun)
* Support --minify in the runtime
* Fix edgecase with import * as
* don't infinite loop
* --trnasform shouldn't mess with require
* Only track comments when minifying
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-20 05:23:12 -07:00
Dylan Conway
9e7bfdec8c
with body can be an expression
2023-04-20 01:03:38 -07:00
flakey5
f0dd5b8a43
Fix typo in benchmarking docs ( #2702 )
2023-04-19 19:16:45 -07:00
Jarred Sumner
ea47ed0ee5
Fix broken autocomplete
2023-04-19 00:01:27 -07:00
Alex Lam S.L
36f9fd607a
fix make setup ( #2693 )
...
- properly reset `JSC_BASE_DIR` after installing `bun-webkit`
2023-04-19 04:55:00 +03:00
dave caruso
96a2ed1040
implement node:events in javascript ( #2604 )
...
* initial event emitter reimplementation
* implement most of node:events. tests passing
* work on emitter
* fix importing node:events
* work on event emitter tests
* event work
* event work
* event stuff and experimenting with a lazy createHash
* cleanup crypto stuff i had on this branch
* finish event stuff up
* fix error monitor
* validate listeners are functions
* changes requested
2023-04-18 14:59:51 -07:00
dave caruso
76deb51c29
clarify file io docs ( #2689 )
2023-04-18 11:09:41 -07:00
Dylan Conway
5712fbd5b9
use properties length instead of capacity ( #2687 )
2023-04-18 04:13:04 -07:00
Jarred Sumner
b5b4356d52
Prepare for JavaScript Bundler API
2023-04-18 01:01:48 -07:00
Jarred Sumner
d1de291b2a
Fix the extremely annoying ./ requirement in bun build
2023-04-18 01:01:31 -07:00
Jarred Sumner
af96e8fcdd
Remove spin loop in bun build
2023-04-17 23:03:58 -07:00
Jarred Sumner
9e1745ee1f
Fixes #2676
2023-04-17 20:07:08 -07:00
Jarred Sumner
05cb5bb659
Make bun dev CLI flags only show in --help for bun dev --help
...
This impacts:
--disable-bun.js
--disable-react-fast-refresh
--bunfile <STR>
--server-bunfile <STR>
--public-dir <STR>
--disable-hmr
--use <STR>
2023-04-17 19:20:39 -07:00
Jarred Sumner
dec5b07782
Fix template string folding bug
2023-04-17 18:01:38 -07:00
Jarred Sumner
b758779c49
Fix missing should_fold_typescript_constant_expressions
2023-04-17 17:33:21 -07:00
Jarred Sumner
3a63fe457d
Fix DCE bug with new Foo() when pure without arguments
2023-04-17 17:16:57 -07:00
Dylan Conway
a17624942e
make sure with is parsed as a block ( #2680 )
2023-04-17 15:54:02 -07:00
Dylan Conway
1ce60275d0
fix typescript decorators with index and number keys ( #2677 )
...
* handle index property key case
* non-method number property
* tests for property keys
2023-04-17 15:26:18 -07:00
Simon Legner
93a43c8fc1
docs: fix code block ( #2662 )
2023-04-17 13:01:08 -07:00
Jarred Sumner
bffe5e820b
more
2023-04-17 08:01:03 -07:00
Jarred Sumner
983d9428a6
Get axios working ( #2673 )
...
* Revive node:http tests
* Fix a couple bugs in node:http
* possibly breaking: use `"browser"` exports condition last
* Make URL validation error better
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-17 07:13:01 -07:00
Jarred Sumner
fc539c278e
cleanup
2023-04-17 05:47:20 -07:00
Jarred Sumner
d19005aa76
Fix access of inactive union field
2023-04-17 05:46:44 -07:00
Jarred Sumner
d2c64300f6
Fixup options parsing
2023-04-17 05:46:29 -07:00
Jarred Sumner
4cb739a8c5
enable minify syntax by default in the runtime
2023-04-17 03:56:52 -07:00
Jarred Sumner
01a03bcce4
Prepare for Bun.build
2023-04-17 03:56:38 -07:00
Jarred Sumner
6b758c809f
Fix dynamic require()
2023-04-17 03:45:54 -07:00
Jarred Sumner
746940d21e
Fixes #2634
2023-04-17 01:20:38 -07:00
Jarred Sumner
07b4b4ced0
Don't record named exports for deoptimized CJS
2023-04-17 01:18:05 -07:00
Jarred Sumner
e624dd6d4d
Deoptimize CJS more
2023-04-17 00:54:03 -07:00
Jarred Sumner
ed2f24e409
Update bun.zig
2023-04-17 00:34:54 -07:00
Jarred Sumner
c650b0b848
bun build should write to stdout instead of stderr
...
@paperdave this probably breaks all your tests
2023-04-17 00:34:49 -07:00
Jarred Sumner
0514f59288
DCE for some global constructor calls
2023-04-17 00:32:21 -07:00
Jarred Sumner
5a8cfd8390
Deoptimize CJS -> ESM transform on computed property access of exports object
...
Example:
```js
for (var k in constants) {
exports[k] = constants[k];
}
```
2023-04-17 00:30:40 -07:00
Jarred Sumner
a2d5e7c570
Update bundle_v2.zig
2023-04-16 23:42:45 -07:00
Jarred Sumner
af0a4c5638
Mark builtins as external for node and bun
2023-04-16 22:48:32 -07:00
Jarred Sumner
eec1a07907
Attempt to automatically handle some cyclical import issues with ESM
...
Fixes https://github.com/kysely-org/kysely/issues/412
2023-04-16 22:20:22 -07:00
Jarred Sumner
30b0d006fe
Fix for ReferenceError: Cannot access uninitialized variable.
2023-04-16 21:49:33 -07:00
Jarred Sumner
413ce0c7a5
Add some comments
2023-04-16 21:04:07 -07:00
Jarred Sumner
c916a55ead
Lazily wrap
2023-04-16 20:15:47 -07:00
Jarred Sumner
31319c0177
Add temporary fix
2023-04-16 19:31:45 -07:00
Jarred Sumner
255a805e00
Fix some edgecases with CJS -> ESM unwrapping
2023-04-16 19:31:45 -07:00
dave caruso
eff48cd95c
more bundler tests ( #2670 )
...
* tests!
* run formatters
2023-04-16 18:57:56 -07:00
Jarred Sumner
338565eea4
Fix test
2023-04-16 07:33:30 -07:00
Jozef Steinhübl
264f3b91b6
fix: replace unknown link with bun docs ( #2669 )
2023-04-16 07:13:08 -07:00
Jarred Sumner
06dab241ef
Unwrap, but we broke code splitting
2023-04-16 06:51:07 -07:00
Jarred Sumner
29cacb7da7
Update cli.zig
2023-04-16 01:56:37 -07:00
Jarred Sumner
e05cc8db90
prepare for unwrapping
2023-04-16 01:56:14 -07:00
Jarred Sumner
09357f55f9
Fix bugs with loading jsxDEV when it should be jsx or vice versa
2023-04-16 01:31:01 -07:00
Jarred Sumner
33049fa6fd
Rename E.Require -> E.RequireString and E.RequireOrRequireResolve -> E.RequireResolveString
2023-04-16 01:30:01 -07:00
Jarred Sumner
be5d21a4f1
Delete some legacy bundling code
2023-04-15 18:45:29 -07:00
dave caruso
2dc3f4e030
more work on bundler tests ( #2667 )
...
* Fix `make dev` reusing old .o file
* more bundler tests
* document capture
* bundler tests
* bundler tests
* bundler tests
* finish up
* remove bad thing to merge on main
2023-04-15 18:28:21 -07:00
Colin McDonnell
1a7c3cdf3b
Add .txt loader docs
2023-04-15 11:52:39 -07:00
Will Richards 2
f1f7369897
toBeFalsy expect counter and test scope check ( #2661 )
2023-04-15 08:52:46 -07:00
Jarred Sumner
4b3c483cd4
Handle more cases in length
2023-04-15 05:17:37 -07:00
Jarred Sumner
df88b998d6
Mostly implement cross-module constant inlining, but disable it
...
There are some test failures
2023-04-15 05:17:12 -07:00
Jarred Sumner
b687c3ab88
Implement template string folding
...
@paperdave can you help write tests for this if not already covered?
example:
```js
if (
`${1}-${2}-${3}-${null}-${undefined}-${true}-${false}` === "1-2-3-null-undefined-true-false"
) {
if (
"\uD83D\uDE0B \uD83D\uDCCB \uD83D\uDC4C".length === 8 &&
"😋 📋 👌 ".length === 6
) {
console.log(`such fold. very inline. wow.`);
}
}
```
2023-04-15 05:15:46 -07:00
Jarred Sumner
d4436f278c
Fix failing to log error with --transform
2023-04-15 02:41:32 -07:00
Jarred Sumner
530f5ef82c
Add error for assigning to a constant
2023-04-15 02:32:11 -07:00
Jarred Sumner
9e5efe61a3
Add unset function
2023-04-15 02:31:01 -07:00
Jarred Sumner
82b2c5221b
Update bun.zig
2023-04-14 23:09:20 -07:00
Jarred Sumner
e977bfb5a7
Implement --transform CLI flag
2023-04-14 23:09:14 -07:00
Jarred Sumner
81e11ae586
Include the error return trace
2023-04-14 23:08:29 -07:00
Jarred Sumner
0d248568f6
Fix string concat
2023-04-14 23:08:17 -07:00
Jarred Sumner
96d522a7db
+6 more passing tests
2023-04-14 22:09:48 -07:00
Jarred Sumner
b4989a316b
Support importing .txt files as strings ( #2660 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-14 17:45:16 -07:00
Jarred Sumner
8b897e1a6b
Fix bug with mjs
2023-04-14 04:16:38 -07:00
Kruithne
730074b75d
[nit] minor typo in tcp.md ( #2657 )
2023-04-14 04:00:02 -07:00
Jarred Sumner
f6a4516d66
Upgrade Zig ( #2656 )
...
* Upgrade Zig
* Don't add `d` files in github actions
* Revert "Don't add `d` files in github actions"
This reverts commit 446e2dd674 .
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-14 03:58:38 -07:00
Jarred Sumner
6c69c2b364
Implement @bun annotation
2023-04-14 03:44:41 -07:00
Jarred Sumner
ba057e50c3
Update bun.zig
2023-04-14 03:12:40 -07:00
Jarred Sumner
1e6dcef0c5
fixup pragma parsing
2023-04-14 03:12:33 -07:00
Jarred Sumner
889462a891
Support @jsx, @jsxRuntime, @jsxImportSource, and @jsxFragment pragmas ( #2655 )
...
* Support parsing @pragma comments
* Support `@jsx`, `@jsxRuntime`, `@jsxImportSource`, `@jsxFragment`
* Fix bug where NODE_ENV would be development in certain places and production in others
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-14 01:49:29 -07:00
dave caruso
3a2fd65f20
use a lazyily initialized stream for node:crypto createHash ( #2652 )
...
* lazy hash
* finish up crypto stuff
* remove lockfiles
* ok
* add pipe test
* update this lockfile
* remove unrelated crypto benchmark from this file
2023-04-13 21:55:01 -07:00
Colin McDonnell
267a38f6fc
Remove Bun.dns docs
2023-04-13 18:32:22 -07:00
Colin McDonnell
011e157cac
Docs restructuring ( #2638 )
...
* Restructure
* Update nav
* Reorg
* Reshuffle ecosystem pages
* Split up runtime/runtime
* Back to runtime/index
* Fix issue
* Split up runtime/index
* Add Writing Tests page
* Prettier matcher table
* More updates
2023-04-13 18:26:45 -07:00
Jarred Sumner
0cc56e8efc
Update default.test.ts
2023-04-13 18:02:49 -07:00
Jarred Sumner
54ef58db48
Fix default/ReExportDefaultExternalES6
2023-04-13 18:00:39 -07:00
Dylan Conway
476ab24081
fix ambiguous import ( #2654 )
...
* check all files before
* better error/warning
* update todo
2023-04-13 17:41:07 -07:00
Jarred Sumner
8a2545a172
Fix default/ReExportCommonJSAsES6
2023-04-13 17:00:24 -07:00
Jarred Sumner
e9016415bc
Only set is_web_browser_navigation in debug mode server
2023-04-13 16:33:11 -07:00
Dylan Conway
242aa0be12
Update import-meta.test.js
2023-04-13 16:03:11 -07:00
Ciro Spaciari
041231d7ca
fix node-net-test hang ( #2649 )
...
* fix tests
* fix fmt
* fix fmt
2023-04-13 15:14:58 -07:00
Ciro Spaciari
bee743fd61
fix(server) fixes UAF of uWS headers ( #2648 )
...
* fixes UAF of uWS headers
* fix transfer encoding condition
2023-04-13 15:14:34 -07:00
Jarred Sumner
d7a8037899
Fixes #2645
2023-04-13 14:42:35 -07:00
Nilan Marktanner
d226a054ae
Update development.md ( #2647 )
2023-04-13 09:07:44 -07:00
Jarred Sumner
aeb3bb949b
Upgrade WebKit ( #2643 )
...
* Missing export
* Regenerate builtins
* Fix crash in require()
* Various breaking JSC changes
* hopefully speed up C++ compilation a little
* Skip failing test fo rnow
* Update WebKit
* Add a comment
* Fix error in postinstall
* Update WebKit
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-13 04:11:12 -07:00
Dylan Conway
db15a23a63
import file path and fix disabled browser require ( #2642 )
...
* print disabled `require`
* bundle file paths
* update tests
2023-04-13 00:20:59 -07:00
dave caruso
1cc4eb0e3f
fix expectBundled precheck ( #2641 )
2023-04-12 19:30:55 -07:00
Dylan Conway
a03ee18262
fix bundling many entry points ( #2640 )
...
* fix going out of bounds when length is over 8
* remove
2023-04-12 19:25:39 -07:00
Ciro Spaciari
108c54134c
fix types and add more reliable tests ( #2621 )
2023-04-12 18:41:40 -07:00
dave caruso
73216b10ce
bundler tests ( #2635 )
2023-04-12 18:41:04 -07:00
Dylan Conway
ff5c522712
bundler bug fixes ( #2637 )
...
* append import to outer wrapper prefix
* print space
* require text loader
* import empty esm and cjs
* add text to schema
2023-04-12 18:40:21 -07:00
hiroki osame
14f87156a2
fix(fs): remove readfile ( #2630 )
2023-04-12 18:40:02 -07:00
Dylan Conway
d8d4abb58e
don't increment i if escaped ( #2639 )
2023-04-12 17:42:56 -07:00
Dylan Conway
4b9b648f8a
could include /private/ on macos
2023-04-12 15:22:04 -07:00
dave caruso
519f9aac80
finish refining bundler tests ( #2623 )
...
* bundler tests
* test refining, 257/847
* bundler tests, 298/849
* more bundler tests
* finish dce
2023-04-11 18:18:49 -07:00
Ryan Morey
a744f5369d
Update development.md ( #2625 )
...
* Update development.md
adds the `bash` language specifier to `which clang-15` so that when you click the copy button, it doesn't include the `$`
* Update development.md
* Update development.md
* Update development.md
2023-04-11 13:19:24 -07:00
hiroki osame
14c6023e15
docs: remove dev container section ( #2610 )
2023-04-11 01:52:54 -07:00
Ciro Spaciari
f91dc8c0d3
always safe deinit socket context ( #2611 )
2023-04-10 15:05:16 -07:00
Dylan Conway
f4ab79d6bb
add original name to list ( #2613 )
2023-04-10 15:03:27 -07:00
Jarred Sumner
373248ce9c
Implement TOML & JSON support in Bun's new bundler ( #2609 )
...
* Implement JSON & TOML support in the bundler
* Fix failing to bind namespace imports
* Support namespace exports better
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-10 06:35:41 -07:00
Jarred Sumner
5c37d0f2a5
Parse import attributes
...
https://github.com/tc39/proposal-import-attributes#import-attributes
2023-04-09 07:49:08 -07:00
Jarred Sumner
7bd6a1f86d
Remove usages of void{} in favor of {}
...
See https://github.com/ziglang/zig/issues/15213
2023-04-09 05:39:05 -07:00
Jarred Sumner
1e717dd941
Add some test coverage for instantiation expressions
...
Related to #2203
2023-04-09 05:07:44 -07:00
Jarred Sumner
e9d6a4042f
Fix another case with instantiation expressions
...
Related to #2203
2023-04-09 05:07:28 -07:00
Jarred Sumner
c97cb4ec1e
Lower for-in variable initializers
2023-04-09 05:07:07 -07:00
Jarred Sumner
21acc50d88
Fixes #2594 ( #2600 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-09 03:43:04 -07:00
Jarred Sumner
b34f0da499
Fixes #2599
2023-04-09 03:18:26 -07:00
Jarred Sumner
eb18101d84
Update TypeScript parsing to 5.0 ( #2593 )
...
* update syntax
* seems to work, needs tests
* This test wasn't supposed to be added
* Many bugfixes to TypeScript parser
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-09 03:16:11 -07:00
dave caruso
2117723642
Fix callout tag on development docs ( #2595 )
...
* fix callout tag on development docs
* add notes on cmakeconfig.h
* Update Makefile
2023-04-08 20:05:05 -07:00
dave caruso
461ae27d31
Rewrite Developer Docs, Improve DX for new users, moving away from Devcontainer ( #2588 )
...
* new docs starting point. missing alot of information
* very experimental idea: make setup
* run on ubuntu 20
* builds on ubuntu 20 (wsl) now
* add release instructions
* add valgrind note from jarred/new-bundler branch, just in case it gets lost when rebasing
* changes requested
2023-04-08 02:23:11 -07:00
Jarred Sumner
ba7a8a9cb5
Fix node: prefix when --platform=node
2023-04-07 23:15:19 -07:00
Jarred Sumner
c764543af5
Fix sort
2023-04-07 22:33:33 -07:00
Jarred Sumner
60fc80d4c4
Workaround crash
...
https://github.com/ziglang/zig/issues/15204
2023-04-07 22:12:19 -07:00
Jarred Sumner
6362414d65
Bun gets a new bundler ( #2312 )
...
* alright now just gotta try running it
* fix a gajillion compiler errors
* even more code
* okay i fixed more errors
* wip
* Update launch.json
* Update string_builder.zig
* `fast_debug_build_mode` makes debug build 2x faster
* Update bundle_v2.zig
* more code!
* It bundles!
* Rename `Bun.Transpiler` to `Bun.Bundler`
* `import()` expressions almost work
* wip attempt to get import() expr to work
* Bundle namespace imports
* Attempt to fix the issue with import() unsuccessfully
* consider current working directory when resolving relative paths (#2313 )
* consider current working directory when resolving relative paths
fixes #2298
* comment test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* support `expect().toThrow(/pattern/)` (#2314 )
- fix time-zone-dependent test failure
* fix missing `Blob` error messages on Linux (#2315 )
* fix & clean up tests (#2318 )
- skip flaky tests when running as `root`
- use `expect().toThrow()`
- clean up temporary files after tests
* feat(tty): add some `tty.WriteStream` methods to `process.{stdout, stderr}` (#2320 )
* feat(stdio): add some `tty.WriteStream` methods
* chore(builtins): add process builtin gen'd code
* Fix docker install command
* `bun test` on macOS in GitHub Actions (#2322 )
* Fixes #2323
* throw invalid parameter errors in `crypto.scryptSync` (#2331 )
* throw invalid parameter errors
* remove comptime, add empty buffer function
* remove error_name comptime
* Add reference documentation for bun:test (#2327 )
* Reorganize tests (#2332 )
* Fix html-rewriter.test.js
* fix the wrong thing being incremented in hmr example (#2334 )
* Add more test harness
* Improve Benchmarking page, small fixes (#2339 )
* Improve benchmarking page
* WIP
* Add typescript instructions to hot
* Document preload in Plugins. Fix loader in plugin types.
* Fix typo
* Fix links
* run prettier
* Document openInEditor
* improve `Buffer` compatibility with Node.js (#2341 )
* improve `Buffer` compatibility with Node.js
* use `memmove()`
allow `encoding` to be `undefined`
* run `bun test` after macOS builds (#2343 )
* "binary" is an alias of "latin1"
Fixes https://github.com/oven-sh/bun/issues/2110
* More spec compliant `Blob.prototype.type` (#2340 )
* Make `Blob.prototype. type` more spec compliant
* Add a few more checks for isNumber()
* Fix `make headers`
* Safer JSValue.isString()
* More tests for blob.slice
* Make `Blob.prototype.type` more spec compliant
* Add isASCII check
* Fix types
* Fix failing type test
* Update blob.zig
* Update blob.zig
* Fix .eql check on empty values
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* Fix bug in test runner
* Support `import()` expressions
* Implement `require()`
* clean up bit_set.zig slightly
* Move some things around
* misc cleanup
* Cleanup some things
* Fix a lot of stuff
* Fix `module.exports.fn = fn;` in ESM entry point
* Fix crash due when printing file
* Fix issue with class names
* Fix issue with `export default identifier`
* Update js_parser.zig
* optimization: inline single-property object acceses and arrays
* Fix undefined memory in renamed symbols list
* Handle call target
* wip
* Inline it
* Fix undefined memory issue when reclaiming blocks in ast
* Halt linking on any parse errors
* alias
* Rename `enable_bundling` to `enable_legacy_bundling`
* Workaround anonymous struct literal zig bug
* Use slower approach (without bitset) because it doesn't break after 8 symbols
* Fix incorrectly-renaming statically defined symbols
* Handle more edgecases in our bit_set fork
* Reduce number of allocations for `define`
* Do not rename unbound symbols
* Clean up dot defines a little more
* Make the generated names prettier
* Workaround runtime symbol missing issue
* Fail the build on errors
* Support export * from
* Support `--outfile`
* partially fix renaming
* fanicer symbol renaming impl
* misc, extremely revertible cleanup
* Fix up some bugs with symbol renaming
* formatting
* Update launch.json
* Parse `__PURE__` comments
* clean up simd code for pure comments
* changes to merge
* workaround runtime issue
* Fix issue with `export * as` not propagating correctly
* Make all top-level declarations `var` when bundling
* Fix missing prefix
* Fix assigning to stack copy
* Fix missing runtime symbol
* Fix bug with namespace exports
* Dramatically reduce allocations
* Update launch.json
* Add missing flags
* Update js_parser.zig
* small cleanup
* Make the export name better
* Fix unnecessary `var foo = foo`
* Implement CommonJS -> ESM conversion
* Implement module redirects
* Port esbuild bundler tests for new bundler (#2380 )
* started porting esbuild tests
* clean up test names and api before moving on
* port tests using a program i wrote
* replace todo generated comment
* fix generated tests not including some files
* work on tests
* [github web editor] add define, external, inject, minifySyntax, minifyWhitespace options.
* get most of the todo comments out of the way, but expectBundled does not handle most of the cases
* continue working on esbuild tests
* use test.skip for unsupported tests
* Fixups for test runner
* Hoist imports & exports
* Fix test
* Hoist classes
* bundler test refining, 51/835
* Fix runtime require
* bundler test refining, 81/835
* bundler test refining, 93/835
* Make the test work in any timezone
* feat(expect): update toBeInstanceOf (#2396 )
* feat: update instanceof binding
* fix: according to PR comments
* Rename `expectObjectTypeCount` to `expectMaxObjectTypeCount`
* Fix socket tests with connection errors (#2403 )
* release pending activity with connection error handler
* unref poll_ref
* remove trailing comma
* Organize Dockerfiles for official status
* Remove test Dockerfile
* Remove old Docker workflow
* Feat(test): add toMatch (#2404 )
* Fix various fetch/response/request tests (#2416 )
* fix most fetch tests, skip a few
* fastGet, toValueGC, and invalid init
* bigint unreachable, range error, log process as process
* remove extra fetch_headers
* remove js_type parameter, check isObject()
* throw invalid mime type error, use enum literal
* switch back to promise rejection
* RangeError pascal case
* Fix several bugs (#2418 )
* utf16 codepoint with replacement character
* Fix test failure with `TextEncoder("ascii')`
* Add missing type
* Fix Response.prototype.bodyUsed and Request.prototype.bodyUsed
* Fix bug with scrypt error not clearing
* Update server.zig
* oopsie
* 💅
* docs: Use correct url in the 'Issues' link in README header (#2420 )
* Fix crash when rendering error page and the server or network is slow
* [fetch] Make the default body value `null` when unspecified
This is better aligned with the fetch spec
* Make node-net tests less flaky
* [node:net] Fix issue with `listen` callback firing before it's listening
* Always clear timers in node test harness
* Fix out of bounds access
Repro'd in Buffer tests
* Update UWS
cc @cirospaciari
* Make this test more thorough
* Hanging abort test
* 0 length body is a null stream
* Several bug fixes (#2427 )
* Fix test
* Fix segfault when unexpected type is passed in `expect().toThrow`
* Fix issues with request constructor
* Don't bother cloning headers when its empty
* woops
* more tests
* fix incorrect test
* Make the fetch error messages better
* Update response.zig
* Fix test that failed on macOS
* Fix test
* Remove extra hash table lookups
* Support running dummy registry directly
cc @alexlamsl
* Update test
* Update test
* fixup
* Workaround crash in test runner
* Fixup test
* Fixup test
* Update os.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* Remove usages of port numbers in tests
* Set -O2 and -fno-rtti
* Remove -g
* Prevent undefined memory access
* [bun test] Implement `--rerun-each` flag to run each test N times
* Reduce number of module scopes created
* add some extra abort checks into streams (#2430 )
* add some checks to avoid UAF
* avoid multiple calls to finalize if endFromJS is called more than once
* fix no-op comment
* mark as requested_end on abort
* remove requested_end from abort
* remove unnecessary check (#2432 )
* Fix bug with scoped aliased dependencies in bun install on macOS
* remove `addLog`, remove `--prominent-compile-errors`
* Finish the upgrade
* Optional chaining flag
* Implement same_target_becomes_destructuring optimization
* bundler test refining, 109/835
* Reset bindings
* Support multiple entry points
* Implement `--entry-names` flag
* Use a tempdir with a better name
* prettier
* Log file name
* Update js_parser.zig
* Mark all bun builtins as external
* Make resolve errors actually errors
* Update bundler_default.test.ts
* Fix `await import(foo)`
* WIP react server components
* Do more stuff at runtime
* ✂️
* Support automatic JSX imports
* Use a module cache for now
* Update tsconfig.base.json
* Fix ThisOutsideFunctionNotRenamed
* woopsie
* moar cpu
* clamp it
* fixup
* Add a bunch of assertions
* Bun uses automatic runtime by default
* Parse Import Attributes
* Add a note about Valgrind
* Update developing.md
* Fix up code splitting for React Server Components
* Implement client component manifest
* Fix crash with --react-server-components and no client components
* Backport 4d31e3c917
* Update launch.json
* Fix for latest zig
* Workaround bug with ?[]const string
Occasionally saw alignment errors in this code
Workaround https://github.com/ziglang/zig/issues/15085
related: https://github.com/ziglang/zig/pull/15089
* switch to regular slice
* Avoid initializing named_imports and named_exports as undefined
* Reduce usages of `undefined`
* Add more assertions
* --watch wip
* Update javascript.zig
* Possibly fix the race condition
* Faster `do`
* bump allocator
* Reduce the size of `Symbol` slightly
* Alphabetically sort runtime import symbols, for determinism
* Prepare for code splitting
* handle overlapping stdout
* pure
* clean up some things
* Fix bug with `$$typeof`
* Address CommonJS -> ESM hoisting bug
* Support `"use server"` in manifest
* Implement `"use server"`
* Fix importing bun builtins when bundling
* Make `commonjs_to_esm` a feature flag, fix some splitting bugs
* ✂️
* fixme remove this
* Fix crash in longestCommonPath
* Chunking! Just need to do import paths now.
* Import paths work...now trying to figure out how to make runtime symbols work
* add workaround
* Replace `bun bun` with `bun build`
* Fix crash with dual package hazard
* Fix many CommonJS <> ESM interop bugs
* Support package.json `"sideEffects"`
also skip loading unnecessary package.json data in `bun run`
* add a not good --watch implementation
* bundler test refining, 140/831
* remove accidentally committed file
* do not return status code 1 on successful bundles
* bundler test refining, 159/830
* pass exit code to exitOrWatch
* clean up help menu
-remove two spaces to line up bun build
-moved all <r> tags to the end of the text they are colorizing
-moved other colors to the start of the text they colorize
-removed unneeded <r> tags, keeping only one at the start of the block
* importstar is fully ported
* wip
* you can run code in this branch now
* Disable this transform
* organize and document bundler tests
* Fix double import
* Fix sloppy mode function declarations
* Disable our CommonJS transform for now
* add `assertNotPresent` to make splitting cases easier
* Bump!
* Update bun.d.ts
* use import.meta.require in runtime code
* Disable this again
* Fix dirname
* Fix ESM -> CJS wrapper
* 💅
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Alex Lam S.L <alexlamsl@gmail.com >
Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
Co-authored-by: pfg <pfg@pfg.pw >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: zhiyuan <32867472+zhiyuang@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2023-04-07 20:08:01 -07:00
Ashcon Partovi
c0c5f07218
Fix trailing slash bug in upload script
2023-04-07 16:05:47 -07:00
Ashcon Partovi
0a91dd9f71
Fix environment variables in workflow
2023-04-07 15:42:41 -07:00
Ashcon Partovi
bed56ab406
Upload releases to S3
2023-04-07 15:38:38 -07:00
Jake Boone
4978a6b74d
Add TSConfig object type to TranspilerOptions interface ( #2545 )
2023-04-07 15:16:21 -07:00
hiroki osame
35b279a4bb
chore: simplify prettier command and cache ( #2589 )
2023-04-07 09:11:23 -07:00
Colin McDonnell
c8e09f563f
FileBlob -> BunFile, add BunFile.lastModified (#2581 )
...
* Improve BunPlugin types
* FileBlob -> BunFile
* Update Bun.env types. Fixes #2481
* Add lastModified to BunFile
2023-04-07 04:03:06 -07:00
Ciro Spaciari
6baedd27bc
feat(tls.Server) basic support (cert, key, rejectUnauthorized, requestCert, ca) #2412 ( #2552 )
...
* cherry picked
* add StringOrBuffer parameter
* Format and adds types
* update uws
* fix tests
* more types
* fix typing
* add timeouts, clean some stuff
* move tests to describe
* fixes SSL hostname when Host is provided
* cleanup on tests
* change 127.0.0.1 to 0.0.0.0
* try another listening parameter
* test timings and update uws
* remove unnecessary comment
* move listening event around
* always await Bun.connect
* do not fail if the tests already passed when using Bun.connect
* regenerate classes
* undo generated classes
* generate classes
* fix merge
---------
Co-authored-by: cirospaciari <cirospaciari@MiWiFi-RA82-srv.cirospaciari >
2023-04-07 04:02:05 -07:00
Jarred Sumner
5465a3980a
Proactively add these to the list
2023-04-06 19:30:50 -07:00
Jarred Sumner
b6bd7e24d7
Bump
2023-04-06 19:30:38 -07:00
dave caruso
e4e81bc49e
fix: export constants from fs/promises ( #2567 )
...
* fix: export `constants` from `fs/promises`
* fix type tests
* third time's the charm fixing the typedef
* run fmt
* remove injected constant from fs, re-exporting from fs/promises
2023-04-06 15:55:23 -07:00
dave caruso
b8aca35b76
docs: add a section on uninstalling bun ( #2560 )
2023-04-06 15:12:59 -07:00
Jozef Steinhübl
68670eeb7b
docs(cli/bunx): add notice ( #2574 )
...
* docs(cli/bunx): add notice bunx alias bun x
* docs: grammar
2023-04-06 15:09:20 -07:00
Dylan Conway
2b170c9d13
Fix toEqual when the second array has extra array holes ( #2580 )
...
* iterate through remaining indexes, keep prop identifier
* tests
* format
2023-04-06 14:49:07 -07:00
Zhongwei Yao
1d138057cb
Add last modify field "mtime" for FileBlob ( #1431 ) ( #2491 )
...
* Add lastModified field for FileBlob (#1431 )
lastModified value is epoch timestamp in millisecond unit.
* update according to review comment.
2023-04-06 14:01:49 -07:00
dave caruso
f788519263
bun-types: infer strict Subprocess from Bun.spawn() options, part 2 ( #2573 )
2023-04-06 13:59:06 -07:00
Dylan Conway
8a73c2a453
cache needs to update, move to another process ( #2578 )
2023-04-06 13:58:01 -07:00
hiroki osame
21978dabe5
fix(ws): export Server ( #2575 )
2023-04-06 04:18:17 -07:00
hiroki osame
aa4c4a9b22
docs(CONTRIBUTING): referece development guide ( #2576 )
2023-04-06 04:18:02 -07:00
dave caruso
569d4940bb
rebase ( #1501 )
2023-04-05 19:15:06 -07:00
Colin McDonnell
4af78c7d5a
Update typecheck ( #2572 )
...
* Update typecheck
* Test ci
* Test ci
* Prettify files
2023-04-05 18:31:13 -07:00
Jarred Sumner
cfb1c661d5
prepend
2023-04-05 18:29:41 -07:00
Jake Boone
864302a634
Add tests for bun test with preload scripts ( #2566 )
...
* Use zsh-compatible syntax in cowsay example
zsh interprets the string !" differently than bash or sh, but we can use single quotes in all of them. See https://unix.stackexchange.com/a/497335/548905 .
* Add tests for bun:test with preload scripts
* Look at `stderr` in `bun test --preload` tests
2023-04-05 18:28:41 -07:00
Jarred Sumner
b50f3d3f6f
Disable buffering when we clear terminal
...
hopefully fixes an issue reported in Discord
2023-04-05 18:27:43 -07:00
Jarred Sumner
65d646bc68
Prettier
2023-04-05 18:27:02 -07:00
Ciro Spaciari
d8c467be42
fix(fetch.proxy) fix proxy authentication ( #2554 )
...
* fix proxy authentication
* add auth tests
* remove unused
2023-04-05 17:48:18 -07:00
hiroki osame
fd680d6c1d
fix: build warnings ( #2562 )
2023-04-05 17:38:47 -07:00
Lawlzer
f7d0eee0ac
In Documentation, move --watch before the script name ( #2569 )
...
Related message by Jarred: https://discord.com/channels/876711213126520882/876711213126520885/1093286199369682944
If you put `--watch` after the script name, it will not work.
2023-04-05 15:02:08 -07:00
Dylan Conway
ac092a1e04
fix deepEquals with array holes and accessors ( #2557 )
...
* `deepEqual` handles slow array indexes
* another test
* oops
* remove bad test
* compare indexes in non-strict mode
* more tests
2023-04-05 13:39:51 -07:00
hiroki osame
fd5bb6b201
fix: modules to have null prototype ( #2561 )
2023-04-05 00:31:58 -07:00
Jarred Sumner
d8360ab3cf
🕐 🕑 🕒
2023-04-04 16:50:03 -07:00
Jarred Sumner
a369fc8c89
Implement import.meta.main ( #2556 )
...
* Implement `import.meta.main`
* Update main-test-1.js
* Update fs.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-04 16:49:33 -07:00
Jarred Sumner
54d6f95f43
Dylan/fix some failing tests ( #2544 )
...
* handle `umask()` invalid arguments
* move `bktree-fast` to test root, fix postinstall
* fix fs test
* could be baseline
* handle different timezones
* accidentally deleted tests
* fix hang in `AbortSignal.timeout`
* bring abort tests back
* Revert "bring abort tests back"
This reverts commit 0ff2ad5bf4 .
* bunx node-gyp
* bun x
* fix typecheck
* test
* Update inspect.test.js
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-04-04 16:47:57 -07:00
Colin McDonnell
76adc5be8a
Add npm benchmark ( #2555 )
...
* Add install bench
* Update scripts and readme
* remove lockfiles
* Format bench
* Add dev instructions
2023-04-04 16:26:40 -07:00
Jarred Sumner
f3ab445c3f
Use absolute paths more
2023-04-03 18:12:51 -07:00
Jarred Sumner
ae849528b8
Fix test failure
2023-04-03 18:11:14 -07:00
Colin McDonnell
6a66fffd39
Add rfcs under docs dir
2023-04-03 17:06:40 -07:00
Alex Lam S.L
9b0f12883c
[install] reduce parallel HTTP requests under heavy load ( #2536 )
...
* [install] reduce parallel HTTP requests under heavy load
* make `max_simultaneous_requests` atomic
2023-04-02 22:32:19 -07:00
Jarred Sumner
fcd8b82864
Add stubs for missing node builtins ( #2534 )
...
* Stub `node:v8`
* Stub `node:trace_events`
* Stub `node:repl`
* Stub `node:inspector`
* Stub `node:http2`
* Stub `node:diagnostics_channel`
* Stub `node:dgram`
* Stub `node:cluster`
* Link stubs
* cleanup
* Clean up the test
* Implement `node:vm` stub
* Cleanup `v8` module stub
* Add missing `promises` export to node:stream
* Implement `node:stream/promise`
* Implement `node:assert/strict`
* cleanup
* better errors
* Increaase timeout
* Update inspector.exports.js
* Make the version consistent
* Implement `process.binding("constants")`
* Update runner.node.mjs
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-01 21:13:27 -07:00
Jake Boone
63d138b046
Update NodeJS LTS version in run_command.zig ( #2533 )
2023-04-01 17:49:56 -07:00
Dylan Conway
8904398619
remove debug symbols ( #2527 )
2023-03-31 19:20:11 -07:00
Alex Lam S.L
685e298146
report timed-out test as failure ( #2523 )
2023-03-31 07:14:55 -07:00
Alex Lam S.L
74cacffb0c
[install] fix stale pointer with tarball URLs ( #2520 )
...
* [install] fix stale pointer with tarball URLs
fixes #2512
* `alloc()` & `free()` instead of fixed-size buffer
2023-03-30 21:54:56 -07:00
Alex Lam S.L
977446ef3c
[install] fix re-install of git dependency ( #2519 )
...
- add tests for re-install of npm alias & GitHub URL
2023-03-30 19:50:23 -07:00
Dylan Conway
1fa7c1f79e
Generate dependency files in make bindings ( #2510 )
...
* generate dependency files, include in makefile
* move `make webcrypto` to `make bindings`
* update more references to `make webcrypto`
* remove `-lwebcrypto`
2023-03-30 19:34:20 -07:00
Alex Lam S.L
758daa7367
[install] fix re-run of tarball URL from lockfile ( #2507 )
2023-03-29 20:38:19 -07:00
Adrien Zinger
95cb2b2ac2
Fix date format ( #2422 ) ( #2474 )
...
* Fix date format (#2422 )
* Add unit tests for #2422
2023-03-29 17:41:11 -07:00
Colin McDonnell
b0e0853360
Update vscode auto save mention
2023-03-29 17:27:13 -07:00
Colin McDonnell
f16995910a
Update vscode auto save mention
2023-03-29 17:26:52 -07:00
Colin McDonnell
b2f3dbfd43
Typo
2023-03-29 17:12:06 -07:00
Niles Salter
9f07073074
Fix some lockfile creation issues ( #2506 )
2023-03-29 17:10:44 -07:00
Colin McDonnell
546f78a49e
Update --watch docs
2023-03-29 17:02:16 -07:00
Jarred Sumner
767fdfbb97
Fixes #2499 ( #2501 )
...
* Fixes #2499
* This needs to be quoted
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-29 09:37:15 -03:00
Jarred Sumner
f0def8c770
Add doc on watch mode ( #2502 )
...
* Add doc on watch mode
* Update hot.md
* Update hot.md
* More words
* Update hot.md
* Update hot.md
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-28 23:26:43 -07:00
Jarred Sumner
786475ff58
bun --watch and bun test --watch (#2500 )
...
* --watch wip
* Upgrade for latest zig
* Implement `bun --watch`
* Implement `bun test --watch`
* Auto restart on crash in --watch
* 🕐 🕑 🕒 🕞
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-28 21:28:35 -07:00
Jarred Sumner
b76384351c
More bug fixes ( #2486 )
...
* readline_promises test fix
* fix `escapeHTML` for baseline builds
* fs test fixes, use `tmpdir()`
* add paths for `resolve.test.js`
* isError with toString symbol and error prototype
* comment about `toString`
* skip async macro transform
* test cleanup, skip stack format test
* readline undo and redo fix
* capture error from readline keypress
* Update tcp-server.test.ts
* use `removefileat` for recursive rmdir
* use strong for `signal.reason`
* initialize `m_flags`
* directory with file fs test
* recursive option
* import expect
* could be less than
* move abort signal tests to another process
* fix typecheck
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-03-28 18:23:50 -07:00
Alex Lam S.L
0a91490226
[install] support tarball URLs ( #2497 )
...
closes #2448
2023-03-28 13:45:00 -07:00
Ashcon Partovi
93585291f9
Sign canary release before Docker release
2023-03-28 12:06:22 -07:00
Ashcon Partovi
de46ad23e5
Fix BUN_VERSION in bun-release
2023-03-28 12:03:25 -07:00
Ashcon Partovi
f455845a0a
Fix BUN_VERSION in bun-release-canary
2023-03-28 12:01:06 -07:00
Andres Beltran
d5418052b1
Remove extra 's' on keep ( #2498 )
2023-03-28 09:37:46 -07:00
Jarred Sumner
cfceb26edd
Fix for latest zig ( #2495 )
...
* Fix for latest zig
* Revert "Use PATH instead of sudo to install bun for testing (#2460 )"
This reverts commit 5fd406ca2f .
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-27 18:22:13 -07:00
Ciro Spaciari
b2d90f07ba
fix https default port on http.request ( #2490 )
...
* fix https default port on http.request
* Update http.exports.js
2023-03-26 22:45:52 -05:00
Alex Lam S.L
319efe9c7b
[install] fix tests ( #2488 )
...
- avoid creating spurious directories next to test scripts
2023-03-25 21:51:03 -07:00
Jarred Sumner
52d27659a2
Fixes #2462 ( #2463 )
2023-03-23 15:49:42 +02:00
Derrick Farris
732c5e7fa9
test(undici): rm external http reqs from tests ( #2459 )
...
* test(undici): rm external http reqs from tests
* cleanup(http-test-server): remove finished TODOs
* test(undici): fix server type, remove type:module to fix typings in test dir
* test(undici): make the typings better
* test(undici): fix typo
2023-03-22 21:22:31 -07:00
Josh Soref
5fd406ca2f
Use PATH instead of sudo to install bun for testing ( #2460 )
2023-03-22 21:21:57 -07:00
Dylan Conway
31c2fea74a
A couple bug fixes ( #2458 )
...
* fix valid status code range
* update path
* highwatermark option
* throw DOMException
* remove extra transpiler output
* more transpiler tests
* comment
* get index not quickly
* replace with `getDirectIndex`
* update abort test
* throw out of range status code
* promisify test fix
* move stdio test instance files
* working crypto tests
* allow duplicate set-cookie headers
* different formatting
* revert, fix will be in different pr
* it is called
* use min buffer size
* fix url tests
* null origin for other protocols
* remove overload
* add very large file test
* await
* coerce to int64
* 64
* no cast
* add todo blob url tests
* use `tryConvertToInt52`
2023-03-22 18:09:51 -07:00
Colin McDonnell
a5f92224b5
Fix types ( #2453 )
...
* WIP
* WIP
* WIP
* WIP
* Improve typechecking in type files
* Fix typechecking
* Update
* Update submodule
* CI for typechecking
* Add ci
* Update commands
* Format after build
* Dont use bunx
* Rename job
* Use nodemodules prettier
* Update workflow
* Use symlink
* Debug
* Debug
* Clean up and rename jobs
2023-03-22 15:01:01 -07:00
Jarred Sumner
2bdaa81b1c
Upgrade Mimalloc
2023-03-21 23:32:04 -07:00
Jarred Sumner
8b92469d42
Update build-id
2023-03-21 21:52:43 -07:00
Jarred Sumner
5915ab19fe
Don't use function from bundler branch
2023-03-21 21:52:11 -07:00
Jarred Sumner
58a5c2a3aa
Fix possible crash with export namespace ns { export class F {} }
2023-03-21 21:44:42 -07:00
Joker_
f3a91339fc
Update sqlite.md ( #2452 )
...
Fix benchmark source pointing to wrong URL.
2023-03-21 18:51:31 -07:00
Igor Shevchenko
54b62aad05
Fix typo ( #2446 )
...
- fixed typo in the month name
2023-03-21 10:14:21 -07:00
Ján Gajdoš
15f23d70d6
docs: Buchta Docs Page ( #2378 )
...
* Idea: Buchta Docs Page
* Tweaks
---------
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-03-20 21:32:20 -07:00
Colin McDonnell
42eff1d917
Add test-d files for eventemitter
2023-03-20 20:39:57 -07:00
Gaurish Sethia
02e5c5f795
Make event emitter type-safe ( #2414 )
...
* Add filePath property on MatchedRoute
* Fix #1880 #851
* Fix #1972 as well
* FMC
* Bump querystring-es3
* fix querystring status
* Fix typos in docs
* Make event-emitter by default type-safe
* Remove Makefile.save
* Resolve merge conflict
* Tweaks
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-03-20 20:32:28 -07:00
John Reilly
2503b3409e
docs: update moduleResolution to bundler ( #2429 )
...
* docs: update moduleResolution to bundler
* docs: bundler as well
* Updates
---------
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-03-20 19:51:24 -07:00
jq170727
6539f66642
"bun-create" example "postinstall"→"preinstall" ( #2441 )
...
"postinstall" is listed twice in the example for the "bun-create" section of package.json.
Based on the context and content of the echo commands I believe the intent is that the
first "postinstall" should be "preinstall". This change corrects this.
2023-03-20 17:49:55 -07:00
Jackson Kearl
4dd4bab7b9
Support directories in ZSH run completions ( #2425 )
...
* Support scripts in dirs in zsh run completions
* add back wasm support
2023-03-20 11:27:39 -07:00
jq170727
035183eb12
Fix example for "bun pm ls" ( #2440 )
2023-03-20 11:26:22 -07:00
Jarred Sumner
aaef99ab68
Update install.md
2023-03-20 06:20:16 -07:00
Jarred Sumner
1a25af5e3d
Implement simple workspaces glob support in bun install ( #2435 )
...
* [bun install] Implement `packages/*`-style globs
* Fix incorrect assertion
* 💅
* remove extraneous console.log
* Fix pointer to stack memory
* Add a test with a scoped package name from a glob workspace
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-20 05:57:23 -07:00
Jarred Sumner
343721627e
Finish the upgrade
2023-03-19 23:03:08 -07:00
Dylan Conway
6e0e140f2f
remove addLog, remove --prominent-compile-errors
2023-03-19 23:03:00 -07:00
Jarred Sumner
0edd8d262d
Fix bug with scoped aliased dependencies in bun install on macOS
2023-03-19 20:58:27 -07:00
Ciro Spaciari
76622e41d6
remove unnecessary check ( #2432 )
2023-03-19 20:09:13 -07:00
Ciro Spaciari
7aa297012b
add some extra abort checks into streams ( #2430 )
...
* add some checks to avoid UAF
* avoid multiple calls to finalize if endFromJS is called more than once
* fix no-op comment
* mark as requested_end on abort
* remove requested_end from abort
2023-03-19 19:42:45 -07:00
Jarred Sumner
9443cca1bb
Reduce number of module scopes created
2023-03-19 19:09:16 -07:00
Jarred Sumner
a83c5c996f
[bun test] Implement --rerun-each flag to run each test N times
2023-03-19 19:07:56 -07:00
Jarred Sumner
b053dffca7
Prevent undefined memory access
2023-03-19 19:06:52 -07:00
Jarred Sumner
cb1b881746
Remove -g
2023-03-19 18:11:38 -07:00
Jarred Sumner
9679cdb12c
Set -O2 and -fno-rtti
2023-03-19 18:08:46 -07:00
Jarred Sumner
9ce18245d1
Remove usages of port numbers in tests
2023-03-19 16:51:13 -07:00
Jarred Sumner
5a23d17620
Several bug fixes ( #2427 )
...
* Fix test
* Fix segfault when unexpected type is passed in `expect().toThrow`
* Fix issues with request constructor
* Don't bother cloning headers when its empty
* woops
* more tests
* fix incorrect test
* Make the fetch error messages better
* Update response.zig
* Fix test that failed on macOS
* Fix test
* Remove extra hash table lookups
* Support running dummy registry directly
cc @alexlamsl
* Update test
* Update test
* fixup
* Workaround crash in test runner
* Fixup test
* Fixup test
* Update os.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-19 14:08:20 -07:00
Jarred Sumner
8f02ef8294
0 length body is a null stream
2023-03-18 18:03:05 -07:00
Jarred Sumner
e41e884747
Hanging abort test
2023-03-18 17:55:05 -07:00
Jarred Sumner
1b7423412a
Make this test more thorough
2023-03-18 16:58:15 -07:00
Jarred Sumner
41c4a66e4a
Update UWS
...
cc @cirospaciari
2023-03-18 16:58:04 -07:00
Jarred Sumner
7216bfe016
Fix out of bounds access
...
Repro'd in Buffer tests
2023-03-18 16:57:55 -07:00
Jarred Sumner
1c85e94977
Always clear timers in node test harness
2023-03-18 16:36:40 -07:00
Jarred Sumner
25097cd632
[node:net] Fix issue with listen callback firing before it's listening
2023-03-18 16:36:19 -07:00
Jarred Sumner
d9711c64eb
Make node-net tests less flaky
2023-03-18 16:35:49 -07:00
Jarred Sumner
96fcecdcc9
[fetch] Make the default body value null when unspecified
...
This is better aligned with the fetch spec
2023-03-18 16:15:21 -07:00
Jarred Sumner
12c4ed89e3
Fix crash when rendering error page and the server or network is slow
2023-03-18 15:53:19 -07:00
Kamil Ogórek
f1cfa5dfeb
docs: Use correct url in the 'Issues' link in README header ( #2420 )
2023-03-18 03:10:31 -07:00
Dylan Conway
dd9ebe9c50
💅
2023-03-18 00:57:38 -07:00
Dylan Conway
a9c41c67e6
Fix several bugs ( #2418 )
...
* utf16 codepoint with replacement character
* Fix test failure with `TextEncoder("ascii')`
* Add missing type
* Fix Response.prototype.bodyUsed and Request.prototype.bodyUsed
* Fix bug with scrypt error not clearing
* Update server.zig
* oopsie
2023-03-18 00:55:05 -07:00
Dylan Conway
1d4cc63154
Fix various fetch/response/request tests ( #2416 )
...
* fix most fetch tests, skip a few
* fastGet, toValueGC, and invalid init
* bigint unreachable, range error, log process as process
* remove extra fetch_headers
* remove js_type parameter, check isObject()
* throw invalid mime type error, use enum literal
* switch back to promise rejection
* RangeError pascal case
2023-03-17 17:14:39 -07:00
zhiyuan
c5f2b42649
Feat(test): add toMatch ( #2404 )
2023-03-17 03:49:41 -07:00
Ashcon Partovi
37293cb26a
Remove old Docker workflow
2023-03-16 15:51:54 -07:00
Ashcon Partovi
57255ad565
Remove test Dockerfile
2023-03-16 15:50:28 -07:00
Ashcon Partovi
2dd99a37fd
Organize Dockerfiles for official status
2023-03-16 15:49:41 -07:00
Dylan Conway
baf8787fa4
remove trailing comma
2023-03-15 22:06:28 -07:00
Dylan Conway
d5ef247b3b
Fix socket tests with connection errors ( #2403 )
...
* release pending activity with connection error handler
* unref poll_ref
2023-03-15 22:01:58 -07:00
Jarred Sumner
b66df90b49
Rename expectObjectTypeCount to expectMaxObjectTypeCount
2023-03-15 22:00:53 -07:00
zhiyuan
0befd9ad85
feat(expect): update toBeInstanceOf ( #2396 )
...
* feat: update instanceof binding
* fix: according to PR comments
2023-03-15 20:04:55 -07:00
Jarred Sumner
79a05d50ad
Make the test work in any timezone
2023-03-15 19:59:09 -07:00
Jarred Sumner
9a5f78fa3b
Fixes #2399
2023-03-15 19:18:56 -07:00
Alex Lam S.L
47865fe82a
fix gc-related flaky test failures ( #2402 )
2023-03-15 18:51:22 -07:00
Ashcon Partovi
480567a5af
Remove nested tests from harness
2023-03-15 17:45:24 -07:00
Ashcon Partovi
976ef92473
Improve reliability of generated tests
2023-03-15 17:34:23 -07:00
Jarred Sumner
abd34abf08
✅ some test matchers
2023-03-15 16:50:05 -07:00
Dylan Conway
1f811980c3
fix gc import from harness
2023-03-15 16:48:02 -07:00
Jarred Sumner
654ba5b671
Case sensitive
2023-03-15 16:47:40 -07:00
Jarred Sumner
babbfc6404
fix fixture
2023-03-15 16:47:08 -07:00
Jarred Sumner
86891a5d12
✂️
2023-03-15 16:43:32 -07:00
Jarred Sumner
9b321c3b06
Make this test more reliable
2023-03-15 16:41:23 -07:00
Jarred Sumner
cb5b08b22e
Fix broken import path in test
2023-03-15 15:39:38 -07:00
Dylan Conway
a4741f6fe1
add tsconfig and update path ( #2401 )
2023-03-15 15:18:31 -07:00
Ciro Spaciari
ac970146b4
allows Bun.serve to listen on IPV6 ( #2400 )
2023-03-15 14:30:31 -07:00
Alex Lam S.L
acd361855a
[install] sanitise against malformed bun.lockb ( #2397 )
...
* [install] sanitise against malformed `bun.lockb`
fixes #2392
* fix `prettier` checks in unrelated files
2023-03-15 08:49:52 -07:00
Dylan Conway
b6ec31ba4b
don't delete bun-snapshots
2023-03-14 18:33:10 -07:00
Dylan Conway
62acc096f5
test added snapshots in new process
2023-03-14 18:09:36 -07:00
Jarred Sumner
7baaf2065a
Update child_process-node.test.js
2023-03-14 18:07:58 -07:00
Dylan Conway
0f434f9457
generate jest snapshots manually
2023-03-14 17:33:32 -07:00
Jarred Sumner
d0522bb6a7
Condense snapshot output
2023-03-14 17:18:09 -07:00
Jarred Sumner
9b066ac6b1
Fix failing test
2023-03-14 17:17:43 -07:00
Dylan Conway
7fcbffa19a
calculated class name after name prop
2023-03-14 17:03:52 -07:00
Ashcon Partovi
fc11894235
Skip some more irrelevant tests
2023-03-14 16:52:13 -07:00
Dylan Conway
4792abdb7f
Implement toMatchSnapshot() ( #2294 )
...
* buggy snapshot
* error output for failed snapshot
* missing first
* hints
* open dir once, better cleanup
* update flag
* truncate on update
* object and class snapshot formatting
* array formatting
* no function name, single item is empty array
* string objects, maps, sets, promise
* avoid using invalid memory
* handle number objects
* handle extending `Number`
* boolean objects
* snapshot tests and test updates
* snapshot format for buffers
* safer snapshot parsing
* property matchers setup
* strings and tests
* generate classes with empty prototype
* optional `propertyMatchers` parameter
* new test folder structure
* strings.eqlLong
* globalObject.throwPretty() and expect.any tests
* add updateSnapshot flag to help
* move snapshot format out of `printErrorlikeObject`
* empty object snapshot format
* separate typed array, remove trailing comma
* use `isCell`, object trailing commas
* handle unicode
* todo for primitive constructors
* switch to `JSC.Node.Syscall.open` and `JSC.Maybe`
* use js parser for snapshot files
* deinit ast, log parse error
* copy/paste most of `exports.ZigConsoleClient`
* remove snapshot option
* remove ordered properties option
* remove snapshot format option from `exports.zig`
* remove extra newlines
* change mode
* update test runner output
* escape backticks faster
* `bunx jest` in temp dir
* remove buffered writer
* add `toMatchSnapshot` to types
* cleanup, switch to `pread`
* cli `--update` flag
* `--update-snapshots`
* remove string object format
2023-03-14 16:50:59 -07:00
Jarred Sumner
76b875e414
Update .prettierignore
2023-03-14 16:42:49 -07:00
Jarred Sumner
eb9e3e9aec
Update harness.ts
2023-03-14 16:42:26 -07:00
Ashcon Partovi
851fd039da
Ignore irrelevant tests in encoding.test.ts
2023-03-14 16:37:32 -07:00
Jarred Sumner
e1921ff8c5
Fix node test harness
2023-03-14 15:59:55 -07:00
Jarred Sumner
2b5139aa46
Add missing export
2023-03-14 15:58:00 -07:00
Ashcon Partovi
d1d2d842d5
Move tobeInstanceOf() tests to expect.test.ts
2023-03-14 12:19:24 -07:00
Ashcon Partovi
5d89efedec
Add tests for AbortSignal, AbortController
2023-03-14 11:54:16 -07:00
Jarred Sumner
80f3bc64ed
Fix incorrect test folder
2023-03-14 08:49:03 -07:00
Jarred Sumner
e613b501e2
Fix missing constants export in zlib
2023-03-14 08:49:03 -07:00
zhiyuan
6d50b90070
feat: add toBeInstanceOf matcher in expect ( #2389 )
2023-03-14 08:30:50 -07:00
Jarred Sumner
27f5012f50
Fix node:https being readonly
2023-03-14 08:16:53 -07:00
Josh Soref
ba994c52b8
Markdown ( #2383 )
...
* Fix test/README.md reference
* Apply markdown links
2023-03-14 08:13:47 -07:00
Jarred Sumner
4c38798142
Fix text formatting in .remoteAddress in ServerWebSocket and Socket
...
Fixes #2387
2023-03-14 07:44:54 -07:00
Ashcon Partovi
f63c26208a
Better test coverage for Request and Response
2023-03-13 17:13:24 -07:00
Ciro Spaciari
ac9f8c0e93
feat(net.createServer) and adds socket.connect IPC support ( #2337 )
...
* added net.Server
* fix fmt
* fix cast and move test
* fix node-net.tests.ts but breaks server data receive
* fix end and close only emitting when data or pipe was added
* fix socket starting paused
* add echo test
* fix fmt
* fix fmt
* on close if the socket is paused, keep paused until the user resumes it to match node behavior
* resume on connect
* fix getConnections, error on close, make _Handler private and create symbols for SocketServerHandlers
* add path support (IPC)
* fix unix domains support, add connect unix tests
* fix unix socket tests
* emit listening and listening error on next tick
* fix connection flask test
* try fix connect error on macos test
* merge connection and drop tests
* added exclusive option
* fix socket.zig fmt
* fix validation for options and add test for it
* pass prettier fmt
2023-03-13 16:42:35 -07:00
Miles Johnson
8d320d1373
Add install with proto examples. ( #2361 )
2023-03-13 13:47:57 -07:00
dave caruso
21f9fc828f
fix require.resolve with an empty options object #2370 ( #2371 )
...
* fix #2370 and import-meta test
* edit test to not allow transpiler optimization
2023-03-12 03:43:32 -07:00
Nicholas
8c91278a00
Update comparison matchers compatibility in docs ( #2366 )
2023-03-11 08:33:46 -08:00
Haris Sulaiman
d61e90d558
Update file-system-router.md ( #2365 )
2023-03-11 01:28:33 -08:00
noahmarro
a4fdc1e0d5
removed JSON trailing comma ( #2364 )
2023-03-11 00:13:00 -08:00
Fran Zekan
cc7d2cf343
Fix link in globals.md ( #2362 )
2023-03-10 16:47:33 -08:00
Ashcon Partovi
d7e067902f
Add more tests for Headers
2023-03-09 12:34:11 -08:00
Ashcon Partovi
c5e76f8bfe
Remove websocket test because it's not substantial
2023-03-08 15:37:42 -08:00
Ashcon Partovi
ebb42bb67b
Add so many more tests, it's not even funny
2023-03-08 15:36:16 -08:00
Derrick Farris
42edcaae8c
fix(node:child_process): fix missing primordial StringPrototypeSlice ( #2352 )
2023-03-08 14:04:21 -08:00
Ashcon Partovi
ab02ab25b1
Improve test harness
2023-03-08 11:38:09 -08:00
buu
deb7a2b192
docs(react): add the missing props.message to <Component /> ( #2347 )
2023-03-08 08:16:06 -08:00
Jarred Sumner
0fd9b2421e
Fix bug in test runner
2023-03-08 00:18:52 -08:00
Jarred Sumner
f22336b5b5
More spec compliant Blob.prototype.type ( #2340 )
...
* Make `Blob.prototype. type` more spec compliant
* Add a few more checks for isNumber()
* Fix `make headers`
* Safer JSValue.isString()
* More tests for blob.slice
* Make `Blob.prototype.type` more spec compliant
* Add isASCII check
* Fix types
* Fix failing type test
* Update blob.zig
* Update blob.zig
* Fix .eql check on empty values
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-08 00:18:14 -08:00
Jarred Sumner
e16053c39e
"binary" is an alias of "latin1"
...
Fixes https://github.com/oven-sh/bun/issues/2110
2023-03-07 22:59:29 -08:00
Alex Lam S.L
e389b6ef19
run bun test after macOS builds ( #2343 )
2023-03-07 22:30:53 -08:00
Alex Lam S.L
28346e4a39
improve Buffer compatibility with Node.js ( #2341 )
...
* improve `Buffer` compatibility with Node.js
* use `memmove()`
allow `encoding` to be `undefined`
2023-03-07 22:29:29 -08:00
Colin McDonnell
95b59ea0ef
Document openInEditor
2023-03-07 21:05:44 -08:00
Jarred Sumner
24e90726fd
run prettier
2023-03-07 18:44:12 -08:00
Colin McDonnell
cac4012a7e
Fix links
2023-03-07 18:43:15 -08:00
Colin McDonnell
6505e5c3a4
Fix typo
2023-03-07 18:07:53 -08:00
Colin McDonnell
9bf4d9b8a2
Improve Benchmarking page, small fixes ( #2339 )
...
* Improve benchmarking page
* WIP
* Add typescript instructions to hot
* Document preload in Plugins. Fix loader in plugin types.
2023-03-07 17:44:05 -08:00
Ashcon Partovi
1d2b0bbc98
Add more test harness
2023-03-07 17:02:43 -08:00
pfg
45ddf321b1
fix the wrong thing being incremented in hmr example ( #2334 )
2023-03-07 13:11:54 -08:00
Ashcon Partovi
e84ff1d8b7
Fix html-rewriter.test.js
2023-03-07 12:28:16 -08:00
Ashcon Partovi
f7e4eb8369
Reorganize tests ( #2332 )
2023-03-07 12:22:34 -08:00
Ashcon Partovi
36275a44ce
Add reference documentation for bun:test ( #2327 )
2023-03-06 22:50:11 -08:00
Dylan Conway
68e58605b6
throw invalid parameter errors in crypto.scryptSync ( #2331 )
...
* throw invalid parameter errors
* remove comptime, add empty buffer function
* remove error_name comptime
2023-03-06 20:00:50 -08:00
Jarred Sumner
0a9cb0e13a
Fixes #2323
2023-03-06 19:22:52 -08:00
Alex Lam S.L
b211fb1298
bun test on macOS in GitHub Actions (#2322 )
2023-03-06 15:22:42 -08:00
Ashcon Partovi
7f715e15cc
Fix docker install command
2023-03-06 14:05:43 -08:00
Derrick Farris
a512bdad8d
feat(tty): add some tty.WriteStream methods to process.{stdout, stderr} ( #2320 )
...
* feat(stdio): add some `tty.WriteStream` methods
* chore(builtins): add process builtin gen'd code
2023-03-06 13:09:52 -08:00
Alex Lam S.L
3e1d368a27
fix & clean up tests ( #2318 )
...
- skip flaky tests when running as `root`
- use `expect().toThrow()`
- clean up temporary files after tests
2023-03-06 12:09:44 -08:00
Alex Lam S.L
993fed51c1
fix missing Blob error messages on Linux ( #2315 )
2023-03-05 22:45:27 -08:00
Alex Lam S.L
d4bd156d9d
support expect().toThrow(/pattern/) ( #2314 )
...
- fix time-zone-dependent test failure
2023-03-06 03:33:38 +02:00
Alex Lam S.L
c7bfb3aa3a
consider current working directory when resolving relative paths ( #2313 )
...
* consider current working directory when resolving relative paths
fixes #2298
* comment test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-05 08:54:00 -08:00
Jarred Sumner
7273713158
Update out of date doc
2023-03-05 08:31:56 -08:00
Alex Lam S.L
67422785cc
[install] fix connection error detection ( #2307 )
2023-03-05 08:09:17 -08:00
Jarred Sumner
42f6b35a5b
Test action comment ( #2310 )
...
* test
* Update bun-linux-build.yml
* fixup
* Update bun-linux-build.yml
* Use outputs
* set id
* Update bun-linux-build.yml
* Update runner.node.mjs
* Update runner.node.mjs
* wip (will revert)
* Update runner.node.mjs
* Update runner.node.mjs
* Update runner.node.mjs
* Update runner.node.mjs
* Update bun-linux-build.yml
* Update bun-linux-build.yml
* works well enough for now
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-05 00:21:00 -08:00
Jarred Sumner
665486dab8
Run tests
2023-03-04 19:22:20 -08:00
Jarred Sumner
a7cdd49244
Artifact version
2023-03-04 19:01:42 -08:00
Jarred Sumner
0b4e7179b5
dump failing tests to disk
2023-03-04 18:58:10 -08:00
Jarred Sumner
c34b92d16b
Update runner.node.mjs
2023-03-04 18:39:40 -08:00
Jarred Sumner
339b811b48
Update runner.node.mjs
2023-03-04 18:36:14 -08:00
Jarred Sumner
adf8bae23c
Update runner.node.mjs
2023-03-04 18:32:27 -08:00
Jarred Sumner
03997086ea
Update runner.node.mjs
2023-03-04 18:22:48 -08:00
Jarred Sumner
cbfe17d95a
Update runner.node.mjs
2023-03-04 18:18:15 -08:00
Jarred Sumner
f915abf3be
Update run-test-manually.yml
2023-03-04 18:15:35 -08:00
Jarred Sumner
c6b0e45a52
Update run-test-manually.yml
2023-03-04 18:14:25 -08:00
Jarred Sumner
571ba8ef3f
Add node runner
2023-03-04 18:11:54 -08:00
Jarred Sumner
9963e1c3d8
Update runner.ts
2023-03-04 17:52:13 -08:00
Jarred Sumner
9e2f6ef1be
chdir
2023-03-04 17:45:50 -08:00
Jarred Sumner
1843a37ebb
oops
2023-03-04 17:38:44 -08:00
Jarred Sumner
f333a0c243
Update run-test-manually.yml
2023-03-04 17:35:18 -08:00
Jarred Sumner
ffdc8a19d1
fixup
2023-03-04 17:31:59 -08:00
Jarred Sumner
c1c8d6356f
Update run-test-manually.yml
2023-03-04 17:26:24 -08:00
Jarred Sumner
7a8a887d4b
Update run-test-manually.yml
2023-03-04 17:25:42 -08:00
Jarred Sumner
5ca4778746
Update run-test-manually.yml
2023-03-04 17:24:41 -08:00
Jarred Sumner
28b80e6433
Update run-test-manually.yml
2023-03-04 17:23:09 -08:00
Jarred Sumner
dcc46b2862
Rename packages/bun-test to packages/bun-internal-test
2023-03-04 17:21:25 -08:00
Jarred Sumner
e4bd4d134d
Update run-test-manually.yml
2023-03-04 17:18:39 -08:00
Jarred Sumner
cfa21dc9d0
Update run-test-manually.yml
2023-03-04 17:18:15 -08:00
Jarred Sumner
7dde3d4974
Update run-test-manually.yml
2023-03-04 17:17:18 -08:00
Jarred Sumner
5c6cbb0283
Update run-test-manually.yml
2023-03-04 17:16:30 -08:00
Jarred Sumner
6a1667a5f4
Add a manual test running action
2023-03-04 17:15:54 -08:00
Jarred Sumner
d77bd35556
Delete broken CI action
2023-03-04 17:01:36 -08:00
aab
ddb6624ad1
docs: Fix invalid default port on bun-types docs ( #2300 )
2023-03-04 06:01:39 -08:00
aab
0eeac32ef4
docs(websocket): change server port on example to default port ( #2301 )
...
Current example will fail without explicitly configure the server to use port 8080. Hence, replacing it with default port (3000).
2023-03-04 06:01:04 -08:00
Alex Lam S.L
31447fdc19
[install] use latest tagged version if in range ( #2302 )
2023-03-04 06:00:38 -08:00
Fran Zekan
8e1d2a5af9
fix(bunx): can't resolve executable for scoped packages ( #2293 )
...
Fixes #2292
2023-03-04 14:56:25 +02:00
Derrick Farris
3626845051
fix(node:http): match Node headers casing (lowercase only) ( #2288 )
...
* fix(node:http): match Node headers casing (lowercase only)
* fix(JSFetchHeaders): `WTFMove` the ascii string
2023-03-03 21:08:26 -08:00
Jarred Sumner
d8d23f2594
Update Dockerfile
2023-03-03 19:03:47 -08:00
Jarred Sumner
122e6a8860
Update bindings.zig
2023-03-03 18:59:20 -08:00
Jarred Sumner
9f132ea241
BigInt64Array and BigUint64Array are typed arrays too
...
Fixes #2296
2023-03-03 18:51:52 -08:00
Fran Zekan
7c367ff687
fix(bunx): Show usage when calling bunx without arguments ( #2295 )
...
* Make sure to return a helpful error message if no args are passed to bunx
* Add tests for bunx without args
2023-03-03 17:49:32 -08:00
Colin McDonnell
0f8f484e21
Improve types for node:http ( #2284 )
...
* Document node:http
* Fix test
* Fix default
* Fix default
2023-03-03 14:24:12 -08:00
Hannes Käufler
7e5dddd2fa
Fix broken async test example ( #2291 )
2023-03-03 12:41:36 -08:00
Jarred Sumner
838b37eed0
Update react-dom-render.bun.js
2023-03-03 04:45:33 -08:00
Jarred Sumner
1f10e25bd9
react-dom/server@next
2023-03-03 04:26:30 -08:00
zhiyuan
18178b4e48
Fix http server req url ( #2285 )
...
* fix: http url add search query
* fix: add tests
2023-03-03 02:45:34 -08:00
aab
3456831b82
docs: Fix variable name in transpiler API docs ( #2281 )
2023-03-02 21:49:12 -08:00
zhiyuan
6a1701fedd
Fix update zls version in devcontainer ( #2280 )
...
* fix: update zls version for new zig
* fix: rm outdated vscode extension
---------
Co-authored-by: Zhiyuan Guo <zhiyuan.guo@shopee.com >
2023-03-02 19:53:37 -08:00
Jarred Sumner
3318ccfb4a
Update Makefile
2023-03-02 19:11:41 -08:00
Jarred Sumner
9388b3f825
Add a zig fmt action ( #2277 )
...
* Add a zig fmt action
* add failing file
* Setup prettier better
* Update prettier-fmt.yml
* Fail on error
* Update prettier-fmt.yml
* boop
* boop2
* tar.gz
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* boop
* Update prettier-fmt.yml
* tag
* newlines
* multiline
* fixup
* Update zig-fmt.yml
* update it
* fixup
* both
* w
* Update prettier-fmt.yml
* prettier all the things
* Update package.json
* zig fmt
* ❌ ✅
* bump
* .
* quotes
* fix prettier ignore
* once more
* Update prettier-fmt.yml
* Update fallback.ts
* consistentcy
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-02 19:02:10 -08:00
Colin McDonnell
b469e50351
Add fs/promises tests and migrate fs.test.js to TypeScript ( #2279 )
2023-03-02 17:36:47 -08:00
Ciro Spaciari
27c3579118
fix(os.tmpdir()) strip trailing slash on *unix machines ( #2276 )
...
* fix(os.tmpdir()) strip trailing slash on *unix machines
* make use of strings.withoutTrailingSlash(dir);
2023-03-02 17:33:25 -08:00
Colin McDonnell
3852a52601
Add separate bun-types release CI ( #2275 )
...
* Release on every commit
* Remove bun-types publish from bun-release-canary
* Undo formatting changes
2023-03-02 15:34:36 -08:00
Jarred Sumner
1ba007831d
Ensure prettier knows where to look
2023-03-02 15:12:00 -08:00
Alex Lam S.L
c0a49e405e
add tests for scoped dependency aliasing ( #2271 )
2023-03-02 13:30:20 -08:00
Ciro Spaciari
78762e8305
fix tmp dir in fetch.tests.js ( #2270 )
2023-03-02 12:54:59 -08:00
u9g
57fcf8f9ba
Remake typings for FFI dlopen/linkSymbols + introduce Pointer type ( #2227 )
...
* Give dlopen & linkSymbols typings for exported functions
* Fix lookup table
* Fully change over to Pointer + fix examples
* add back header for typings
* Fix tsc errors
* Run formatter on ffi.d.ts
* Revert args/return type change
* Add type tests for ffi
---------
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-03-02 12:24:43 -08:00
Ciro Spaciari
c81043bf5e
put AbortSignal in WebCore namespace ( #2267 )
2023-03-02 11:49:32 -08:00
Ciro Spaciari
156c1d4bec
only free sink after promises solves ( #2268 )
2023-03-02 11:48:11 -08:00
Justin Whear
20930849ce
Fix Bun.sleepSync to actually use milliseconds ( #2242 )
...
* Fix Bun.sleep/sleepSync to actually use milliseconds
`Bun.sleepSync` was accidentally treating its argument as seconds rather than milliseconds as the docs stated. This is a breaking change in that the function now behaves as documented. Fixed relevant tests.
* sleepSync: add more argument checking, tests
2023-03-02 09:00:20 -08:00
Derrick Farris
efdf647460
fix(bindings): mark JSCInitialize ( #2265 )
2023-03-01 22:41:20 -08:00
Colin McDonnell
167de9091a
Add page descriptions ( #2260 )
...
* Add page descriptions
* Update bun install
* Description tweaks
* Tweaks
2023-03-01 21:45:49 -08:00
Ciro Spaciari
1be834b073
fix bun server segfault with abortsignal ( #2261 )
...
* removed redundant tests, fixed server segfault
* fix onRejectStream, safer unassign signal
* fix abort Bun.serve signal.addEventListener on async
* move ctx.signal null check up
* keep original behavior of streams onAborted
2023-03-01 21:40:11 -08:00
Derrick Farris
b9137dbdc8
fix(node:http): match Node http.request() GET/HEAD w/ body ( #2262 )
2023-03-01 21:28:21 -08:00
Jarred Sumner
706a3e8169
Add a test for https request in node:http
2023-03-01 19:31:16 -08:00
Derrick Farris
7c81d97684
fix(node:http/https): fix passing URL objs to http.request( #2253 ) ( #2258 )
...
* fix(node:http/https): fix passing `URL` objs to `http.request`(#2253 )
* fix(node:http): hoist debug env var
* fix(node:http): make body `undefined` when falsy
2023-03-01 18:11:38 -08:00
Jarred Sumner
6bc075e377
Revert "Update clap ( #2238 )"
...
This reverts commit 7b9a17f9d7 .
2023-03-01 16:17:47 -08:00
Jarred Sumner
ba0706939d
Revert "Add -D, --dev flags for bun install ( #2240 )"
...
This reverts commit ec20fae57f .
2023-03-01 16:15:55 -08:00
Ashcon Partovi
6e512eda0d
Use GitHub action ID instead of SHA for test workflow
2023-03-01 16:07:27 -08:00
Ciro Spaciari
1227a7b995
avoids segfault after aborted onReject in Bun.serve streams ( #2256 )
...
* avoids segfault after aborted on reject
* silence err on handleRejectStream after aborted
2023-03-01 15:47:04 -08:00
Ashcon Partovi
ef56961007
Run tests in CI for bun-linux-aarch64
2023-03-01 14:31:56 -08:00
Jarred Sumner
ff51a253e2
Revert spawnSync change
...
cc @FireTheFox
2023-03-01 14:12:59 -08:00
Jarred Sumner
ee6f54180a
Update bindings.zig
2023-03-01 14:12:59 -08:00
Ciro Spaciari
cf8568ccff
fix deinit behavior when connection is aborted using ResponseStream and abort event behavior ( #2252 )
...
* fix deinit behavior when connection is aborted using ResponseStream
* fix abort handling on stream, and get better tests
* avoid segfault by trying to deinit 2x when aborted
* make tests more reliable
* more reliable onResolveStream after aborted
* add test case for not firing the abort signal
2023-03-01 13:15:52 -08:00
Ciro Spaciari
56ca48ece8
fix Bun.file.arrayBuffer() segmentation fault on empty file #2248 ( #2249 )
...
* fix Bun.file.arrayBuffer() segmentation fault on empty file #2248
* cleanner this.iotask check
2023-03-01 13:07:21 -08:00
Colin McDonnell
530cf4caf8
Fix async in sqlite
2023-03-01 12:27:14 -08:00
Justin Whear
9a7333dd5e
Forces a specific libdir for c-ares ( #2241 )
...
The c-ares build expects lib/libcares.a to exist after cmake, but on my system it was being generated in lib64. This simply sets the cmake variable so that the target ends up where we expect.
2023-02-28 23:35:04 -08:00
Jarred Sumner
88b5cda109
Make Bun.gc(true) more aggressive
2023-02-28 21:56:28 -08:00
Jarred Sumner
45704a55dc
Expose JSC::Options via BUN_JSC_ prefix
...
Example usage:
BUN_JSC_logGC=1 bun file.js
2023-02-28 21:56:28 -08:00
Jarred Sumner
714b8d10e0
fixup
2023-02-28 21:56:28 -08:00
Colin McDonnell
931f23d360
Fix typecheck
2023-02-28 19:47:46 -08:00
Derrick Farris
1da8045ce4
Fix incorrect Bun version in docs ( #2236 )
2023-02-28 17:55:18 -08:00
Ciro Spaciari
e512be8c18
just some comments fix ( #2237 )
2023-02-28 16:56:12 -08:00
Justin Whear
ec20fae57f
Add -D, --dev flags for bun install ( #2240 )
...
* remove vendored clap
* Update to latest zig-clap
Major changes:
* Instead of vendoring zig-clap and adding changes, this uses Hejsil/zig-clap directly as a submodule
* `cli.zig` and related files have been updated to use new API (no more `flag()` or `option()`)
* A workaround for the Run and Auto commands has been implemented that allows us to use the official upstream
Minor change:
* `-i` now has the long option `--install-fallback`; I didn't spend much time thinking about this name, so suggestions weclome.
* add --development and --optional to bun install
* Add support for `-D`, `--dev` in bun install, fix `--save`
2023-02-28 16:39:06 -08:00
Colin McDonnell
fd19d01583
Document punning
2023-02-28 16:10:51 -08:00
Colin McDonnell
1826abbc65
Add deploy hook workflow
2023-02-28 15:52:15 -08:00
Justin Whear
7b9a17f9d7
Update clap ( #2238 )
...
* remove vendored clap
* Update to latest zig-clap
Major changes:
* Instead of vendoring zig-clap and adding changes, this uses Hejsil/zig-clap directly as a submodule
* `cli.zig` and related files have been updated to use new API (no more `flag()` or `option()`)
* A workaround for the Run and Auto commands has been implemented that allows us to use the official upstream
Minor change:
* `-i` now has the long option `--install-fallback`; I didn't spend much time thinking about this name, so suggestions weclome.
* deinit jsBundleArgs
2023-02-28 13:49:05 -08:00
Jarred Sumner
bd91aa8c25
Don't tick the event loop in spawnSync
2023-02-28 00:12:32 -08:00
Jarred Sumner
31389b4906
Make response.body null only when user explicitly passes null/undefined
2023-02-28 00:12:32 -08:00
Jarred Sumner
d93d1013a6
Add back the tests
2023-02-28 00:12:32 -08:00
Jarred Sumner
12d6db0cad
Add explicit Null tag to Body
...
This reverts commit e538bb31ad .
2023-02-28 00:12:32 -08:00
Jarred Sumner
ec7929b251
Implement preload support (like node -r except in a config file) ( #2231 )
...
* Update Makefile
* Introduce `preload`
* Add a test
* Support entry points
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-02-28 00:01:21 -08:00
maor-benami
590219966e
Update file-io.md ( #2230 )
...
should `notreal.type` reflect the overridden value?
2023-02-27 21:08:27 -08:00
maor-benami
0a340d1920
Update file-io.md ( #2229 )
...
duplicated word
2023-02-27 21:07:35 -08:00
Jarred Sumner
56488d54d0
Add some more functions to sha bench
2023-02-27 18:30:42 -08:00
Derrick Farris
ae35f17a99
fix(bun:sqlite): fix sqliteDb.run(' ') throwing not an error ( #2226 )
2023-02-27 18:29:00 -08:00
Ciro Spaciari
062b5565a7
use abort signal on http.ClientRequest ( #2222 )
...
* use abort signal on http.ClientRequest
* fix edge case and add test
2023-02-27 20:28:42 -06:00
Ciro Spaciari
4b62745754
add signal on http.Server.listen ( #2223 )
...
* add signal on http.Server.listen
* actual call close instead of just stopping the server
2023-02-27 16:24:59 -08:00
Ciro Spaciari
0afb1693d3
fix(fetch.signal) capture socket and shutdown on abort signal ( #2143 )
...
* capture socket and shutdown on abort signal
* queue shutdown tasks
* little cleanup
* change shutdown strategy
* use fetchSwapRemove on fetch shutdown
* use fetchSwapRemove on fetch shutdown
* fix formatting, remove unused property
2023-02-27 16:10:03 -08:00
Gaurish Sethia
7a4ac03338
Update module statuses in docs ( #2219 )
...
* Add filePath property on MatchedRoute
* Fix #1880 #851
* Fix #1972 as well
* FMC
* Bump querystring-es3
* fix querystring status
* Fix typos in docs
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-02-27 16:08:01 -08:00
Tamas Sule
630d2314b6
Bundler uses incorrect port when dev server is listening on non-default port #1885 ( #2191 )
2023-02-27 16:06:28 -08:00
Justin Whear
18cce50390
Feat/os.network interfaces ( #2142 )
2023-02-27 09:58:45 -08:00
Alex Lam S.L
c8be1e9a5d
resolve duplicated dependency correctly ( #2213 )
2023-02-27 09:36:17 -08:00
Rodo Abad
f420e81e85
docs(configuration): update misleading comment ( #2205 )
...
The comment was for peer dependencies and not dev dependencies.
2023-02-26 16:37:32 -08:00
Jarred Sumner
5d296f6228
Don't parse shasum twice
2023-02-26 14:53:32 -08:00
Alex Lam S.L
16898a23e6
fix ANSI escape codes piped from stdout to file ( #2202 )
2023-02-26 12:14:51 -08:00
Jarred Sumner
a55ca48797
Update emitter.mjs
2023-02-26 00:51:42 -08:00
Jarred Sumner
94abc87d6e
Add callback to bench
2023-02-26 00:51:42 -08:00
cunzaizhuyi
f89c4c3a0d
Update hot.md ( #2198 )
2023-02-26 00:23:58 -08:00
Jarred Sumner
451ccfd5ef
Update bun.zig
2023-02-25 19:06:11 -08:00
Jarred Sumner
2dd484c180
Add more assertions
2023-02-25 18:48:59 -08:00
Jarred Sumner
58685638e2
Use libc memmove
2023-02-25 18:41:37 -08:00
Jarred Sumner
693be3d1c2
Faster eqlCaseInsensitiveASCII
2023-02-25 18:23:01 -08:00
Jarred Sumner
8ba65a4f0b
Fixes #2194 (most likely)
2023-02-25 18:23:01 -08:00
Derrick Farris
4149b95543
Update node:http compatibility ( #2184 )
2023-02-25 16:37:39 -08:00
Alex Lam S.L
38314c02f2
improve bun pm ls ( #2192 )
2023-02-25 16:37:04 -08:00
Jarred Sumner
f58728ccc7
Call BoringSSL.load() in more places
2023-02-25 15:15:10 -08:00
Jarred Sumner
eb94e5b990
Use mimalloc heap for BoringSSL
2023-02-25 15:01:52 -08:00
Ryan Morey
d4dfb79b72
Fix broken link in developing.md ( #2188 )
...
* Fix broken link in developing.md
* Update developing.md
2023-02-25 12:25:16 -06:00
Florian Dreier
45f4353453
fix: Broken link to Node.js support status page ( #2183 )
...
Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com >
2023-02-25 10:57:26 -06:00
Charlie Marsh
735d48190d
Replace docs/runtime/nodejs with docs/ecosystem/nodejs ( #2185 )
...
* Replace docs/runtime/nodejs with docs/ecosystem/nodejs
* Replace a few more usages
2023-02-25 10:54:29 -06:00
Raxit Majithiya
a819e3b723
docs: Fix the link to Node.js ecosystem ( #2181 )
2023-02-25 09:49:44 -06:00
Tommaso A
8e09b1afff
docs: improved language in yaml loader example ( #2172 )
...
* docs: improved language in yaml loader example
* docs(api/http): fix typo
* docs(api/spawn): fix typo
* docs(api/transpiler): fix typo
2023-02-25 09:47:11 -06:00
Akash Joshi
cf7a09c0d3
Update index.md ( #2182 )
2023-02-25 09:45:26 -06:00
Fernando Daciuk
0d5d3e5dfc
docs: fix typo in install.md file ( #2179 )
2023-02-25 04:33:21 -08:00
Jarred Sumner
a931e21f49
make emitter bench work in node
2023-02-25 04:28:23 -08:00
Jarred Sumner
8f67cf75ee
Bump WebKit
2023-02-25 04:28:04 -08:00
Jarred Sumner
0a7309c8f2
slight performance improvement to EventEmitter
2023-02-25 03:34:41 -08:00
Jarred Sumner
e6f33d9a52
make the test faster
2023-02-25 03:34:41 -08:00
John Reilly
e38cb9aa6a
docs: consistent indentation for post install commands ( #2175 )
2023-02-25 02:45:48 -08:00
Flo
9b66e03a9b
Fix sqlite.md .serialize typo ( #2178 )
2023-02-25 02:45:27 -08:00
Damian Stasik
31627530b9
docs: use proper CSS property in React examples ( #2177 )
2023-02-25 02:45:12 -08:00
Brett Bloxom
ae62825319
Docs: Fixes broken link in express docs ( #2173 )
...
Fixes broken internal link to nodejs compatability information.
2023-02-25 02:44:58 -08:00
Derrick Farris
1e6faa3815
Update hono.md ( #2171 )
2023-02-25 02:44:03 -08:00
Dylan Conway
40ebc994f9
remove parameters
2023-02-24 19:12:04 -08:00
Colin McDonnell
1e1b45b4d9
Tweak readme
2023-02-24 18:55:11 -08:00
Colin McDonnell
39fa458895
Fix indents
2023-02-24 18:50:48 -08:00
Colin McDonnell
a6a0ccf6f0
Rearrange ecosystem
2023-02-24 18:03:52 -08:00
Colin McDonnell
0ecd773081
Docs ( #2170 )
...
* Add hono and elysia
* Update elysia and add coming soon
* Fix typo
* Add back awesome
2023-02-24 17:48:49 -08:00
Colin McDonnell
c72c2c2338
Fixes ( #2168 )
2023-02-24 16:40:08 -08:00
Colin McDonnell
1836250542
Docs tweaks ( #2160 )
...
* Tweaks
* Add ecosystem. Add bunx. Flesh out install.
* Tweaks
* Add TS to installation
* Tweaks
* New readme
* Write new readme
* Tweak
* Center header
* Bun
* tweaks
* No dollar sign
* Fix links
* Update
* Tweak
2023-02-24 16:33:53 -08:00
Dylan Conway
1d85b5efa8
wiptest -> test
2023-02-24 16:32:04 -08:00
Charlie Marsh
7455f385ec
Add missing "that" in modules.md ( #2167 )
2023-02-24 15:47:04 -08:00
Derrick Farris
4c4da4aae2
fix(zig-build): disable stack probing when building other objs too ( #2165 )
2023-02-24 15:37:45 -08:00
Charlie Marsh
3264ca991e
Fix typo in developing.md ( #2166 )
...
* Fix typo in `developing.md`
* Apply suggestions from code review
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-02-24 15:36:12 -08:00
Jarred Sumner
599f63c204
Support macOS 10.15
...
Fixes #1266
Fixes #1323
Fixes #2154
2023-02-24 15:07:27 -08:00
Alex Lam S.L
26df7ca892
fix compiler_rt linking failure on x86_64 ( #2163 )
...
- minor code tweaks
2023-02-24 14:51:20 -08:00
Ciro Spaciari
d33a53deb0
fix(dns) Fix resolve4 and resolve6 behavior ( #2144 )
...
* fix https://github.com/oven-sh/bun/issues/2098
* fix last promisifyResolve call
* avoid some functions alloc on dns.exports
2023-02-24 13:56:41 -08:00
Justin Whear
6d5f0167c5
Fix lol_html_rewriter_builder_add_document_content_handlers binding ( #2161 )
...
The `lol_html_rewriter_builder_add_document_content_handlers` does not return a
status code and always succeeds; errors are reported on subsequent calls to `write` or `end`.
Fixes #2024
2023-02-24 13:53:18 -08:00
Dylan Conway
f290b049e8
formatting
2023-02-24 13:34:28 -08:00
Justin Whear
f0e5d54579
Implement os.cpus for Darwin (OS X) ( #2115 )
...
* adding experimental Mac implementation os os.cpus
* Simplify cpus interfaces
* remove support for osx 10
* Refactor os.cpus implementation
This commit substantially refactors how the Linux and Darwin implementations of
`os.cpus`. The goal is to avoid unnecessary copying and allow broader latitude
in responding to errors per implementation.
* improved comments
* ensure no buffer overrun
* use PROCESSOR_CPU_LOAD_INFO_COUNT; not sure if this is correct
* oh teh noes
* use sliceTo instead of span
* cpu_ticks are uints
2023-02-24 14:24:04 -06:00
Ciro Spaciari
1c531472c9
fix(body) Make Request/Reponse empty body to be null ( #2156 )
...
* make empty nullable
* revert mistake change
2023-02-24 12:22:14 -08:00
Derrick Farris
dc8e845049
fix(zig-build): disable stack probing on x86_64 so no compiler_rt required ( #2159 )
2023-02-24 12:20:05 -08:00
Ashcon Partovi
08308e2287
Update docs issue template
2023-02-24 09:57:39 -08:00
Jake Boone
f366231bff
[docs] Minor syntax correction in test.md ( #2153 )
2023-02-24 09:56:18 -08:00
Alex Lam S.L
e887a064fb
prefer bun.copy() over std.mem.copy() ( #2152 )
2023-02-24 05:53:26 -08:00
Jarred Sumner
6e4908e517
Update build-id
2023-02-24 00:20:50 -08:00
Dylan Conway
3f04f8d0a6
Upgrade Zig ( #2151 )
...
* fixup
* Upgrade Zig
* Remove bad assertion
* strings
* bump
* mode -> optimize
* optimize
* Linux build
* Update bindgen.zig
2023-02-23 23:57:19 -08:00
Ashcon Partovi
b5bdde28ed
Fix release workflow
2023-02-23 17:58:56 -08:00
Colin McDonnell
f54300578b
Add documentation ( #2148 )
...
* Add documentation
* Tweaks
* Fixes
* Rearrange
* Update
2023-02-23 17:13:30 -08:00
Alex Lam S.L
5929daeeae
fix illegal memory reference in bun link ( #2147 )
2023-02-23 16:37:08 -08:00
Jarred Sumner
4122cb0b19
Update ZigGlobalObject.cpp
2023-02-23 16:33:51 -08:00
N0N1m3
e6e4e6b577
Update README.md ( #2145 )
2023-02-23 14:13:37 -08:00
Ashcon Partovi
dc634d3b30
Use newer version of setup-bun
2023-02-23 10:10:36 -08:00
Ashcon Partovi
2c795e6a3c
bun-lambda: Fix 502 when handler name was 'fetch'
2023-02-23 09:54:22 -08:00
Jarred Sumner
17f1649c87
Fix flaky tests
2023-02-22 23:00:55 -08:00
B. Burt
93778a66d8
Update README.md ( #2138 )
2023-02-23 00:37:59 -06:00
Dylan Conway
9024125d41
uninstall
2023-02-22 21:54:48 -08:00
Derrick Farris
e687a1cf0c
feat(undici): add undici.request ( #2136 )
...
* wip(undici): get basic requests working
* wip(undici): implement most request params, add tests
* fix(undici): get tests passing for `undici.request`
* test(undici): test headers in `undici.request`
2023-02-22 21:54:05 -08:00
Jarred Sumner
1d592a9489
Add leaky test
2023-02-22 21:50:39 -08:00
Jarred Sumner
17efd52ba3
Add a request.signal test with Bun.serve
2023-02-22 21:50:39 -08:00
Dylan Conway
0cf08c7e7b
fix string diff extra newline
2023-02-22 21:35:44 -08:00
Jarred Sumner
0143eccb27
Fix flaky request.signal implementation
2023-02-22 21:29:43 -08:00
Jarred Sumner
583b29632c
Make the tests run
2023-02-22 20:35:14 -08:00
Jarred Sumner
16ea1753b4
Fix missing ref() in lazily created signal
2023-02-22 20:16:08 -08:00
Ciro Spaciari
24d624b176
feat(Request.signal) Initial support for signal in Request + fetch and Request + Bun.serve ( #2097 )
...
* add fetch abort signal
* get aborted (still segfaults)
* bidings.zig u0 error
* still GC/memory error
* fix start crash
* fix AbortSignal fromJS
* change fromJS to obj.as
* addAbortSignalEventListenner
* handle abort types, and add tests
* fix tests
* add custom reason test
* merge 2 substring methods, use MAKE_STATIC_STRING_IMPL
* fix create AbortError and TimeoutError, move globalThis and exception creation to main thread
* fix tests and rebuild headers
* no need to check with substring reason is already an exception
* no need to check with substring reason is already an exception
* fix dumb error inverting conditions for check reason
* fix custom reason behavior
* Request signal
* remove package-lock.json
* Remove JSC.Strong from Request signal
* fix globals for fetch abort signal
* more tests, clone signal crashs
* fix AbortSignal.toJS
* fix toJS bidings for AbortSignal
* add streaming tests
* fix abortion before connecting
* fix tests and segfault
* add fetch testing abort after finish
* fix signal handler cleanup
* support signal event Bun.serve
* pull tests (failing)
* remove unsupported test
* formating
* fix server Request.signal, fix cleanNativeBindings
* add direct tests
* more pull tests
* fix stream tests
* fix fetch, pending onAborted fix in HTTPServerWritable
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-02-22 19:27:25 -08:00
Dylan Conway
9c5f02e120
newlines for array diff
2023-02-22 19:25:17 -08:00
Jarred Sumner
2a1558e4d6
[breaking] Return Node.js Timeout objects in setTimeout, setInterval, and setImmediate
...
Fixes #2129 #880
2023-02-22 19:07:27 -08:00
Jarred Sumner
0911bd3af2
Support well known symobls in prototypes for generated classes
2023-02-22 19:04:54 -08:00
Colin McDonnell
9f53a2210c
Various type fixes ( #2135 )
...
* Simplify serve() types
* Remove baseURI
* Add Bun.serve type tests
* Number env vars
* Make loader optional
* FSRouter doesn't support URL
* Update sqlite types
* Bench
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-02-22 17:45:22 -08:00
Dylan Conway
575291a301
format options with quote strings ( #2134 )
2023-02-22 15:46:56 -08:00
Jarred Sumner
ac3973016f
Fixes #2121 in runtime, but not in tests
2023-02-22 15:29:09 -08:00
Andrea Giammarchi
9b5ddef598
Fix glibc error in alpine Docker image ( #2126 )
...
There's an override error with latest alpine and various versions of glibc (including 2.35): https://github.com/sgerrand/alpine-pkg-glibc/issues/185
This MR proposes a workaround (tested on fly.io - it works) so that it's possible to have bun usable with minimal linux dependencies.
2023-02-22 14:26:21 -08:00
Dylan Conway
424045835c
wiptest -> test ( #2131 )
...
* +/- for object diff, quote more strings
* wiptest -> test
* quote strings fix
2023-02-22 13:55:42 -08:00
Derrick Farris
e8c9c644ca
fix(child_process): import from primordials ( #2132 )
2023-02-22 12:51:17 -08:00
Jarred Sumner
629be18867
Update recommended extensions
2023-02-22 12:44:50 -08:00
Derrick Farris
9be68ac235
fix(child_process): match Node's promisified exec fn ( #2128 )
2023-02-22 12:39:40 -08:00
Ashcon Partovi
ee60a5c55c
Add runtime layer for Bun on AWS Lambda ( #2009 )
2023-02-22 10:34:16 -08:00
Alex Lam S.L
2dc85c4e45
[install] support SCP-style git dependencies ( #2124 )
...
- try HTTPS first before SSH
- improve package name resolution
- improve report messages
fixes #2119
2023-02-21 19:32:35 -08:00
Dylan Conway
88c238dc5c
isRegExp() without cpp
2023-02-21 12:18:24 -08:00
Dylan Conway
12b2ad7363
add diffz
2023-02-21 11:52:41 -08:00
Dylan Conway
d786dd6c0b
Update test runner output with colors and diffs ( #2122 )
...
* add zig-diff
* move diff functions
* toHaveProperty diff for objects
* use formatter
* format labels
* move work to format, diff when it makes sense
* remove comptime, dim equal slices
* order before diff
* line diffs
* add diffz
* switch to diffz
* add `diffLines()` function
* small `prettyFmt()` bug fix
* test runner color output
* update `toBe()` error output
* fix test
* diff method, fix crash
* fix link test
* remove `isRegex`
2023-02-21 11:47:13 -08:00
Derrick Farris
e21796acf5
Add mention of bunx --bun to README ( #2114 )
...
* readme(bunx): add info about `bun --bun x`
* chore(formatting): add extension for formatting markdown to avoid a bunch of diffs
* chore(formatting): fix JS formatting in README
2023-02-20 16:46:26 -08:00
Craigory Coppola
f6705a73c7
docs(bunx): add initial documentation to readme ( #2106 )
2023-02-20 09:08:31 -06:00
Mathias Lafeldt
8bcf64c881
Fix Deno SQLite benchmark ( #2112 )
...
Deno has removed direct access to Deno.core:
https://deno.com/blog/v1.30#removal-of-internal-denocore
As a result, a newer version of sqlite3 is required:
https://deno.land/x/sqlite3@0.8.0/src/util.ts?source#L19
2023-02-20 08:52:33 -06:00
Jarred Sumner
bcb7be4909
fixup double export
2023-02-19 19:04:29 -08:00
Jarred Sumner
c006a7f054
Fixes #2108
2023-02-19 16:50:13 -08:00
Micha Reiser
8aa6ee5332
fix: Print URL as object in ( #2104 )
2023-02-18 15:44:29 -08:00
Carter Snook
963bb54e87
feat(node/os): implement os.machine() ( #1378 )
...
* feat(node/os): implement 'os.machine()'
---------
Co-authored-by: Justin Whear <justin.whear+github@gmail.com >
2023-02-18 13:54:59 -08:00
Jarred Sumner
8ff1ff16a5
Update fs.test.js
2023-02-17 22:28:28 -08:00
Alex Lam S.L
7285b9cf75
update bun.lockbs ( #2101 )
2023-02-17 22:07:02 -08:00
Jarred Sumner
7416672e93
Fix edgecase in some arg parsing in fs module
2023-02-17 22:03:22 -08:00
Jarred Sumner
fa10631c2f
use map
2023-02-17 22:00:44 -08:00
Jarred Sumner
1106c8e2f2
More correct filesystem flags parsing
2023-02-17 21:41:58 -08:00
Jarred Sumner
20d9483cd0
Fix issue with express body-parser introduced by our async_hooks polyfill
2023-02-17 18:05:41 -08:00
Jarred Sumner
155e3706b1
Merge branch 'main' of github.com:oven-sh/bun
2023-02-17 17:30:51 -08:00
Jarred Sumner
44cdb1ec8e
Fix a couple flaky tests
2023-02-17 17:30:29 -08:00
Alex Lam S.L
d406ca6328
use bun.logger instead of bun.Output ( #2099 )
2023-02-17 17:06:01 -08:00
Jarred Sumner
e542d9b4ed
Fix flaky test
2023-02-17 17:02:55 -08:00
Justin Whear
fb313f210a
Fix #1602 ( #2066 )
...
* initial test case
* fix segfault from JSObjectMakeDeferredPromise
* pass exceptions through from FetchHeader.createFromJS
* not resolved, but getting close
* implement review suggestions
* fix exception check, tests
* Change how header filtering is accomplished
Previously the FetchHeaders implementation relied on converting names and values
to IDLByteString to catch non-ASCII data, though not always reliably. This
resulted in message-less TypeErrors when headers contained invalid characters.
This commit shifts everything to IDLDOMString for the conversion and relies on
the actual error checking in FetchHeaders.canWriteHeader, resulting in nicer
error messages.
To ensure that all headers are written as ASCII/UTF8 rather than UTF16, the
copyTo bindings function checks the encoding and converts if necessary.
* wrapping up FetchHeader fixes
* since utf8 allocates only do so when needed
* Update src/bun.js/bindings/bindings.cpp
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* WebCore__FetchHeaders__has should return on exception path
* strip out log calls from test
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-02-17 15:54:05 -08:00
Alex Lam S.L
c60d7db178
[install] support git dependencies ( #2094 )
2023-02-17 14:48:57 -08:00
Justin Whear
d37daeb76a
Fix #2005 ( #2096 )
2023-02-17 14:48:10 -08:00
Alex Lam S.L
79f7d29d03
allow bun add of packages with capital letters ( #2095 )
2023-02-17 14:46:07 -08:00
Jarred Sumner
56b75dbac3
faster Buffer.byteLength("latin1")
2023-02-16 17:17:29 -08:00
Jarred Sumner
5007c6b218
Support yarn-like "workspaces"."packages": string[] ( #2086 )
...
* [workspaces] Support yarn-like `"workspaces"."packages": string[]`
* Add a test
* ✂️
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-02-16 15:06:35 -08:00
Justin Whear
d95404fd7a
Implement machine for Linux ( #2088 )
2023-02-16 15:05:15 -08:00
Justin Whear
7762f3fad7
Fix #1516 ( #2089 )
...
`FileSystemFlags.fromJS` was hardcoded to return O_RDONLY when the flag value
was null or undefined and this caused breakage when used with write functions.
Updated the function to take a `default` argument so that the caller can specify
a sane default for their use.
2023-02-16 14:01:07 -08:00
Jarred Sumner
e7cd45d0fa
Update globals.d.ts
2023-02-16 03:18:01 -08:00
Jarred Sumner
0e688d62f9
Add missing type definition
2023-02-16 03:11:40 -08:00
Jarred Sumner
ce01a31e94
[napi] Fix crash in creating arrays > 8 elements long
2023-02-16 03:11:22 -08:00
Luke Deen Taylor
37fafc208f
Clarify and clean up macOS build process ( #2087 )
...
* Add missing steps to macOS build
* Remove codesigning step from make dev
ref: https://discord.com/channels/876711213126520882/888839314056839309/1075681626127872030
2023-02-16 00:01:41 -08:00
Jarred Sumner
88a8aa4797
Don't crash on null version string
2023-02-15 19:57:59 -08:00
Jarred Sumner
610eb06ddc
Add disabled optimization
2023-02-15 19:31:14 -08:00
Jarred Sumner
49cd122bda
Add more logging to napi
2023-02-15 18:08:31 -08:00
Jarred Sumner
1125728097
Incorrect implementation of napi_create_threadsafe_function
2023-02-15 18:08:31 -08:00
Ciro Spaciari
597053ea91
feat(fetch) AbortSignal ( #2019 )
...
* add fetch abort signal
* get aborted (still segfaults)
* bidings.zig u0 error
* still GC/memory error
* fix start crash
* fix AbortSignal fromJS
* change fromJS to obj.as
* addAbortSignalEventListenner
* handle abort types, and add tests
* fix tests
* add custom reason test
* merge 2 substring methods, use MAKE_STATIC_STRING_IMPL
* fix create AbortError and TimeoutError, move globalThis and exception creation to main thread
* fix tests and rebuild headers
* no need to check with substring reason is already an exception
* no need to check with substring reason is already an exception
* fix dumb error inverting conditions for check reason
* fix custom reason behavior
2023-02-15 14:20:40 -08:00
Derrick Farris
1c221d33b0
fix(webcrypto): fix ed25519 CryptoKey.algorithm ( #2082 )
2023-02-15 13:48:11 -08:00
Justin Whear
e67b4e73b5
Fix 2063 ( #2079 )
2023-02-15 12:58:53 -08:00
Jarred Sumner
95e727162b
Make sure we test * in tesconfig
...
Fixes #540
2023-02-15 03:53:33 -08:00
Jarred Sumner
e860e12be5
don't return an error there
2023-02-15 03:28:35 -08:00
Jarred Sumner
ad0bee532c
Fix cast
2023-02-15 03:18:54 -08:00
Jarred Sumner
c7d16d2ed5
ensure we allocate for > 6 arguments
2023-02-15 02:51:44 -08:00
Jarred Sumner
d150a73b9b
Update async_hooks.exports.js
2023-02-15 01:41:28 -08:00
Jarred Sumner
0d7cea69c2
workaround prisma's usage of eval("__dirname")
2023-02-15 01:35:02 -08:00
Jarred Sumner
c83eaf09b9
some cleanup
2023-02-15 00:36:18 -08:00
Jarred Sumner
4320108add
ED25519 WebCrypto ( #1971 )
...
* ed25519
* Register the algorithm
* try this?
* fix(webcrypto): fix ed25519 keypair gen (#1985 )
* fix: import and export ed25519 (#2004 )
* fix(webcrypto): allow import and export ed25519
* fix(webcrypto): copy exportkey
* fix(webcrypto): fix use after stack free
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com >
2023-02-15 02:11:48 -06:00
Jarred Sumner
d91052516e
Fix up async_hooks polyfill
2023-02-14 23:58:05 -08:00
Jarred Sumner
c6ee401bf4
Add temporary polyfill for async_hooks
2023-02-14 23:37:25 -08:00
Jarred Sumner
f19e3d66cb
😷 async_hooks
2023-02-14 22:29:10 -08:00
Alex Lam S.L
e63e3a0ca7
[install] link network-delayed .bin scripts correctly ( #2076 )
2023-02-14 22:25:50 -08:00
Jarred Sumner
5598ea69f2
don't break esbuild
2023-02-14 22:24:11 -08:00
Jarred Sumner
4dc6bf1b09
Add workaround for tls and worker_threads
2023-02-14 21:56:49 -08:00
Alex Lam S.L
7597e4ad2a
[install] improve package.json validation ( #2074 )
...
- report error and exit gracefully instead of crashing
2023-02-14 18:04:06 -08:00
Derrick Farris
a80981c966
[WIP] fix(node:fs): export fs.ReadStream and fs.WriteStream ( #1798 )
...
* fix(node:fs): export fs.WriteStream and fs.ReadStream
* test(node:fs): add tests for fs.ReadStream and fs.WriteStream
* test(node:fs): prevent opening fd w/o closing
* fix(node:fs): hack ESM export for fs streams to keep lazy loading
* fix(node:fs): = -> ===, fix hasInstance comparison
* test(node:fs): add test that actually checks that re-exported streams work
* fix(fs): eagerly load our slow lazy fns (thanks esm)
* fix(fs): employ @alexlamsl 's constructor w/o new trick on Read/WriteStream
2023-02-14 15:54:50 -08:00
Eric Zhang
6e1a52691a
Reject with error when invalid fetch() body ( #2047 )
...
* Reject with error when invalid fetch() body
Resolves #2014
* Make sure the test actually throws an exception
* Update fetch error paths to return TypeErrors
2023-02-14 15:43:18 -08:00
Derrick Farris
ef75cd4658
fix(FormData): make String explicit, thanks @dylan-conway ( #2065 )
2023-02-13 13:04:54 -05:00
Derrick Farris
af3f42e630
fix(FormData): add string literal operator ( #2064 )
2023-02-13 09:42:49 -08:00
Jarred Sumner
37186f4b0a
Add pretty printer for FormData
2023-02-13 04:37:23 -08:00
Michał Warda
f310d7414b
Add dynamic port assigning to Bun.serve ( #2062 )
2023-02-13 03:08:11 -08:00
Derrick Farris
739de2c9cd
feat(napi): add napi_get_value_bigint_words ( #2061 )
...
* feat(napi): add `napi_get_value_bigint_words`
* fix(napi): handle `napi_get_value_bigint_words` arr too small
2023-02-13 03:07:18 -08:00
Jarred Sumner
0db8cdf4e9
Fixes https://github.com/oven-sh/bun/issues/1456
2023-02-13 03:05:26 -08:00
Jarred Sumner
246db4fed0
Add FormData bench snippet
2023-02-13 01:36:43 -08:00
Jarred Sumner
aa0762e466
Implement FormData ( #2051 )
...
* Backport std::forward change
* Implement `FormData`
* Fix io_darwin headers issue
* Implement `Blob` support in FormData
* Add test for file upload
* Fix bug with Blob not reading Content-Type
* Finish implementing FormData
* Add FormData to types
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-02-13 00:50:15 -08:00
Alex Lam S.L
cdbc620104
[install] support git://github.com/ dependencies ( #2059 )
2023-02-12 14:44:39 -08:00
Ashcon Partovi
bb2aaa36fb
Add release signing to release workflow
2023-02-12 13:10:10 -08:00
Jarred Sumner
f4f88701c5
prettier + stop server
2023-02-12 04:41:18 -08:00
Michał Warda
cc214baacf
Return server on listen ( #2057 )
2023-02-12 04:37:28 -08:00
Jarred Sumner
83473c60df
Set require("module").globalPaths to empty array
...
https://github.com/oven-sh/bun/issues/1641#issuecomment-1427017442
2023-02-12 04:35:52 -08:00
Alex Lam S.L
8b4e58f3d2
fix string corruption in FS entry cache ( #2055 )
2023-02-11 21:35:33 -08:00
Alex Lam S.L
30e82c5df4
fix segfault during non-install script execution ( #2045 )
2023-02-11 20:40:18 -08:00
Derrick Farris
9eba1e0e3f
[WIP] feat(napi): add napi-fatal-exception ( #2054 )
...
* feat(napi): add `napi-fatal-exception`
* fix(napi): fatal_exception - add symbol to list, don't optimize away
2023-02-11 20:20:25 -08:00
Jarred Sumner
675529bd0c
Fixes https://github.com/oven-sh/bun/issues/2052
2023-02-11 18:11:09 -08:00
Jarred Sumner
5528c0fa47
Backport std::forward change
2023-02-11 17:31:16 -08:00
Justin Whear
c208c4e319
Fix #631 : bun add throwing JSON lexer bug ( #2041 )
...
* add double-backslash to list of control chars
* update test
* stderr as string
2023-02-10 19:05:32 -08:00
Eric Zhang
10650cced2
Fix PATH setup in macOS setup instructions ( #2044 )
...
Very minor! I was just going through the setup instructions and had a bit of a double take.
2023-02-10 15:16:51 -08:00
Jarred Sumner
8466e60e3a
update to simdutf 3.2.0
...
thanks @lemire
2023-02-10 15:02:30 -08:00
Derrick Farris
b1aac9ff6d
fix(string_immutable): fix toUTF16Alloc for bindgen w/ use_simdutf = false ( #2042 )
2023-02-10 13:12:14 -08:00
Ashcon Partovi
ed2e0e1617
Add bun-ecosystem for running tests on npm packages
2023-02-10 09:47:59 -08:00
Alex Lam S.L
09585c4b24
[install] fix duplicate check on peerDependencies ( #2039 )
...
fixes #2037
2023-02-10 09:23:40 -08:00
Alex Lam S.L
5181aa54e2
drop ASCII double-scan and other minor clean-ups ( #2038 )
2023-02-10 09:22:24 -08:00
Jarred Sumner
995880a7ef
Enable https://github.com/tc39/proposal-set-methods
2023-02-10 00:27:06 -08:00
Jarred Sumner
941c6ed814
Upgrade WebKit
2023-02-09 21:28:50 -08:00
Alex Lam S.L
6052a3edbd
fix assertion failure ( #2033 )
2023-02-09 21:20:11 -08:00
Alex Lam S.L
6fd7c1921e
[install] fix flaky tests ( #2032 )
2023-02-09 20:35:58 -08:00
Alex Lam S.L
119120d21c
[simdutf] workaround validation OOB access ( #2031 )
2023-02-09 20:26:23 -08:00
Jarred Sumner
4bedd3833d
Workaround https://github.com/simdutf/simdutf/issues/213
2023-02-09 19:06:20 -08:00
Alex Lam S.L
2abfa8abd2
[streams] fix byte accounting ( #2029 )
...
fixes #1939
2023-02-09 17:04:36 -08:00
Jarred Sumner
ad9d4fb0c4
Add a note about builtins
2023-02-09 14:09:50 -08:00
Jarred Sumner
523b112945
[bun:test] Auto-import jest globals in test files
2023-02-09 00:30:40 -08:00
Jarred Sumner
8aa29040e6
move some code around
2023-02-08 23:09:24 -08:00
Jarred Sumner
a2afb252bf
Update CONTRIBUTING.md
2023-02-08 21:46:53 -08:00
Jarred Sumner
abb89f489f
Create CONTRIBUTING.md
2023-02-08 20:47:11 -08:00
Jarred Sumner
ddec9e0bf6
handle more cases with util.isError
2023-02-08 17:18:02 -08:00
Jarred Sumner
4962bea4fc
cleanup util.test
2023-02-08 17:17:40 -08:00
Alex Lam S.L
f31330d3e2
[install] pick latest tagged version by default ( #2016 )
...
* [install] pick `latest` tagged version by default
fixes #1993
* update `package.json` the same way as `npm
2023-02-08 16:28:29 -08:00
Ashcon Partovi
ee8ccca605
Remove test run workflow, for now
2023-02-08 16:11:24 -08:00
Dylan Conway
6fdbb25f9a
utf16 to utf8 conversion validation ( #2001 )
...
* use replacement character for invalid surrogate pairs
* return index of non-ascii
* non-allocating case
* edge cases
* function rename
* oops
* get length once, index counter
2023-02-08 14:42:10 -08:00
RobViren
b8c0554839
Fix minor version bug for README.md ( #2013 )
...
Addresses issue #2012 and corrects the minor version to the current minor version
2023-02-08 14:39:57 -08:00
Alex Lam S.L
18807cef03
[install] assorted fixes & improvements ( #2011 )
...
- take `peerDependencies` into account during package placement
- do not recursively resolve `workspaces` (matches `npm`)
- link binaries to non-root packages correctly
- prune empty nodes during dependency tree construction
- support non-standard `workspace:` specifier
2023-02-08 14:37:14 -08:00
Ashcon Partovi
cbc28afd51
Fix 'MissingPackageJSON' in Dockerfile
...
Closes #2008
2023-02-07 14:33:22 -08:00
Jarred Sumner
7886bce8c8
cleanup
2023-02-07 10:51:55 -08:00
Ashcon Partovi
7cd26232b1
Update docker image in README
2023-02-07 08:46:09 -08:00
Ashcon Partovi
a0b0cd6844
Fix bugs with release script
2023-02-07 04:47:36 -08:00
Jarred Sumner
52f9c3d05e
set the type
2023-02-06 23:27:18 -08:00
Jarred Sumner
f947987a2c
default not configurable
2023-02-06 23:19:12 -08:00
Jarred Sumner
30106c4f54
Fix failing test in debug mode
2023-02-06 23:19:05 -08:00
Jarred Sumner
34b2d7fe57
Mark things as DontDelete
2023-02-06 23:15:32 -08:00
Jarred Sumner
153834cf5c
Throw on process.binding
2023-02-06 23:15:23 -08:00
Jarred Sumner
6aea31f4fc
cleanup
2023-02-06 22:41:44 -08:00
Jarred Sumner
0fd144993c
Fix test failing on macOS
2023-02-06 22:41:37 -08:00
Jarred Sumner
6699fe14e7
minor cleanup
2023-02-06 22:32:10 -08:00
Jarred Sumner
add7b1101e
Add bounds check
2023-02-06 22:29:24 -08:00
Alex Lam S.L
5a19f8434b
[WIP] fix corner cases with aliases dependencies ( #2000 )
...
* fix corner cases with aliases dependencies
* in-memory convert legacy `bun.lockb`
2023-02-06 22:24:34 -08:00
Jarred Sumner
d5f3bb1c74
Update text-decoder.mjs
2023-02-06 22:13:05 -08:00
Colin McDonnell
08e33fbd42
Fix gaps in types ( #2003 )
...
* Add type for clearImmediate
* Expose Crypto class
* Add types for CustomEvent
* Add types for module and exports
* Add types for global
* Add types for DOMException
* Add types for WebAssembly
* Update formatting
* Fix clearTimeout
* Fix formatting
* Update formatting
* Remove log
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-02-06 21:36:36 -08:00
Jarred Sumner
7ddbbc53b4
Make Stat functions fast
2023-02-06 21:18:58 -08:00
Jarred Sumner
85611272c6
bump
2023-02-06 20:35:59 -08:00
Jarred Sumner
c40912b8dc
formatting
2023-02-06 20:28:59 -08:00
Jarred Sumner
77974f2a6e
tweaks to generator
2023-02-06 19:27:21 -08:00
Jarred Sumner
ed72bee373
Mark some things as not configurable
2023-02-06 19:27:16 -08:00
Jarred Sumner
05f3a22cba
Use new bindings for Stat
...
Fixes #1999
2023-02-06 18:40:52 -08:00
Jarred Sumner
f5df1044d4
Fix build
2023-02-06 18:39:03 -08:00
Jarred Sumner
4329f6ad16
Backport https://github.com/WebKit/WebKit/pull/9713
2023-02-06 14:21:25 -08:00
Michał Warda
fd4668d97c
Expose Dirent and Stats ( #1998 )
...
* Expose dirent and stats
* Expose Dirent and Stats inside fs
* Add tests for Dirent and Stats exposing
* Automatically generate bindings
2023-02-06 14:15:20 -08:00
Ciro Spaciari
8c4ed963ec
fix(uWS:capi) uws_req_set_yield typo and uws_res_override_write_offset ( #1996 )
2023-02-06 12:59:04 -08:00
Colin McDonnell
e7f9ce47f4
Add types for node:console and node:perf_hooks ( #1982 )
...
* Add types for node:console and node:perf_hooks
* Add types for util/types
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-02-06 12:57:19 -08:00
Dylan Conway
98022bec1e
mark binding
2023-02-06 12:23:59 -08:00
Cheng Shao
397f559e77
Fix URL of wasi-js ( #1997 )
2023-02-06 11:35:01 -08:00
Jarred Sumner
ca2e708be1
speed it up a little more
2023-02-05 07:07:35 -08:00
Jarred Sumner
8649136845
substringSharingImpl allocates, do not use
2023-02-05 06:17:21 -08:00
Jarred Sumner
e8fe6dd2f8
Faster Buffer.toString("ascii")
2023-02-05 04:14:16 -08:00
Gaurish Sethia
df126b2f3b
Bump querystring-es3 ( #1988 )
...
* Add filePath property on MatchedRoute
* Fix #1880 #851
* Fix #1972 as well
* FMC
* Bump querystring-es3
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-02-04 23:15:42 -08:00
Jarred Sumner
7d3a2ca382
Add isDeepStructEqual to node:util
2023-02-04 00:34:03 -08:00
Jarred Sumner
b7c96bfaae
Fixes #1978
2023-02-03 22:29:32 -08:00
Justin Whear
a2fd20e5c0
Implement os.cpus() for Linux ( #1977 )
...
* Implement os.cpus() for Linux
`os.cpus()` currently returns an empty array for all platforms. This PR implements full functionality for Linux and has been tested on x86-64. Other OSes will continue to return an empty array.
Note that Linux on Arm64 may report the CPU model differently; if this is the case the CPU model will currently be reported as "unknown". As I do not have Arm64 hardware to verify and develop against, a todo has been left in the code.
* resolve issues from review
2023-02-03 18:13:33 -08:00
Jarred Sumner
de613baf81
Support passing Date to Bun.sleep
2023-02-03 17:25:25 -08:00
Jarred Sumner
4590e2b83a
Add test for propagating exception
2023-02-03 17:04:47 -08:00
Jarred Sumner
2758e0cab9
Add missing crypto export
...
Fixes #1984
2023-02-03 16:39:16 -08:00
Jarred Sumner
7d386bf1f1
Introduce await Bun.sleep(ms)
2023-02-03 16:39:16 -08:00
Ashcon Partovi
164cd774f7
Fix types for Array.fromAsync
2023-02-03 16:29:03 -08:00
Gaurish Sethia
6469649f64
Fix/Update Typescript types ( #1972 )
...
* Add filePath property on MatchedRoute
* Fix #1880 #851
* Fix #1972 as well
* FMC
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
2023-02-03 14:53:18 -08:00
Jarred Sumner
06d073003d
fix require("perf_hooks")
2023-02-03 14:39:07 -08:00
Jarred Sumner
50f1dd61a6
allow other ArrayBufferView in Buffer functions
2023-02-03 14:39:07 -08:00
Jarred Sumner
c64d7933a1
Make it less flaky
2023-02-03 14:39:07 -08:00
Ashcon Partovi
b289b51894
Run tests on pull requests
2023-02-03 11:55:15 -08:00
Ashcon Partovi
17ad8005c7
Run tests on push
2023-02-03 11:54:31 -08:00
Dylan Conway
f572305013
another
2023-02-03 11:50:23 -08:00
Dylan Conway
17b4e5ce08
integers overflowing
2023-02-03 11:47:21 -08:00
Ashcon Partovi
3933ccab3b
Attempt to debug annotations 2
2023-02-03 11:35:24 -08:00
Ashcon Partovi
92255d56c8
Attempt to debug annotations
2023-02-03 11:32:01 -08:00
Ashcon Partovi
ba076b0a2b
Fix console output in bun wiptest
2023-02-03 11:23:55 -08:00
Ashcon Partovi
10600c4abd
Use GitHub action SDK
2023-02-03 11:18:44 -08:00
Ashcon Partovi
d16dffa2b4
Add workflow for bun wiptest
2023-02-03 11:01:22 -08:00
Alex Lam S.L
65e0d10ee0
prettier deltas ( #1973 )
2023-02-02 17:29:28 -08:00
Colin McDonnell
742368f03a
Update/fix types ( #1955 )
...
* WIP
* Update types
* Spacing
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-02-02 17:29:10 -08:00
Dylan Conway
242dcea2fe
match formatting
2023-02-02 16:15:12 -08:00
Jarred Sumner
198322073d
Update string_immutable.zig
2023-02-02 15:58:10 -08:00
Jarred Sumner
b12762af6c
Fix stack overflow when console.log'ing strings
2023-02-02 15:56:16 -08:00
Ashcon Partovi
440a21eb1d
Add bun-test to run bun wiptest
2023-02-02 11:57:36 -08:00
Jarred Sumner
2bc4858346
export more
2023-02-02 01:34:41 -08:00
Jarred Sumner
26d15cf542
Update build-id
2023-02-02 01:32:39 -08:00
Derrick Farris
8361513acf
feat: add http.request ( #1959 )
...
* fix(node-test-helpers): make sure to call done with any Errors thrown from wrapped fn
* feat(node:http): add http.request, patch some missing apis for IncomingRequest, etc.
* fix(node:http): FakeSocket -> Socket
* refactor(node:http): only save type from IncomingMessage.options for now
* fix(node:http): remove unnecessary check for UInt8Array
* perf(node:http): globalThis.fetch -> var fetch = Bun.fetch
* todo(node:http): add notes about handling abort/timeout w/ AbortSignal
* refactor(node:http): standardize on FakeSocket and this.#fakeSocket
* fix(node:http): fix headers getter
* fix(node:http): remove _headers
* perf(node:http): make http headers lazy
* fix(node:http): return bool from keepSocketAlive
2023-02-01 19:22:29 -08:00
Dylan Conway
19eca76498
change file extension
2023-02-01 19:06:56 -08:00
Dylan Conway
3c23f9ad57
fix text encoding for utf8 ( #1967 )
...
* use character
* replacement character
* also test encoding decoded points
* increase length by 1
2023-02-01 18:48:09 -08:00
Alex Lam S.L
76f3c9c07b
resolve duplicate npm dependencies correctly ( #1970 )
...
* resolve duplicate npm dependencies correctly
fixes #1952
* modify the correct reference
2023-02-01 18:13:25 -08:00
Ashcon Partovi
3a3bf33335
Stop releasing bun:0 for docker
2023-02-01 15:01:12 -08:00
Ashcon Partovi
69ee87d8e2
Add script to calculate semver for release
2023-02-01 14:53:57 -08:00
Ashcon Partovi
6d0fff4fab
Fix version in bun-types canary release
2023-02-01 14:16:48 -08:00
Ashcon Partovi
f7a93fe294
Add bun-types release to canary workflow
2023-02-01 14:13:39 -08:00
Ashcon Partovi
02fc87ea29
Fix bad tag in npm publish
2023-02-01 14:03:00 -08:00
Ashcon Partovi
7f853af6f0
Add bun-types release to workflow
2023-02-01 14:00:31 -08:00
Ashcon Partovi
04309431bb
Tweak commit message for robobun
2023-02-01 13:37:36 -08:00
Ashcon Partovi
fc712ead2f
Add GPG key to release
2023-02-01 13:28:30 -08:00
Ashcon Partovi
e7f2d34c44
Maybe fix permissions with Homebrew
2023-02-01 12:02:43 -08:00
Ashcon Partovi
0c3e55132c
Update homebrew release action
2023-02-01 11:33:08 -08:00
Ashcon Partovi
c69bbbd24f
Update trustdb in Docker image
2023-02-01 11:24:12 -08:00
Ashcon Partovi
c0bfdebbd9
Fix grouping for Docker tag
2023-02-01 11:02:39 -08:00
Ashcon Partovi
9c27b5d17f
Fix getting SHA for canary
2023-02-01 10:56:08 -08:00
Ashcon Partovi
9973df028b
Fix missing dependency from release script
2023-02-01 10:44:19 -08:00
Ashcon Partovi
a0be199b4f
Add morningly workflow to release to canary
2023-02-01 10:42:04 -08:00
Ashcon Partovi
73d6c888b9
Add bun-release package
2023-02-01 10:28:01 -08:00
Gaurish Sethia
661fca9cde
Add filePath property on MatchedRoute ( #1964 )
2023-02-01 05:10:48 -08:00
Jarred Sumner
b0803298f9
Update javascript_core_c_api.zig
2023-02-01 00:52:45 -08:00
Jarred Sumner
6318017f84
Update module_loader.zig
2023-02-01 00:52:45 -08:00
Colin McDonnell
696d4b6267
Add target for printing version in makefile ( #1957 )
...
* Add get-*
* Add print-version target
* Webkit
---------
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-31 20:35:12 -08:00
Jarred Sumner
cc4326cd82
Re-run prettier after changes
2023-01-31 17:55:16 -08:00
Jarred Sumner
c57b37d29f
Handle invalid input in clear* timer
2023-01-31 17:52:17 -08:00
Jarred Sumner
b09896f06e
mostly fix node:timers
2023-01-31 17:51:36 -08:00
Jarred Sumner
b7816f3175
Fixes fs.constants
2023-01-31 17:20:48 -08:00
Jarred Sumner
0dfde6f8c7
misc wasi fixes + prettier
2023-01-31 15:17:39 -08:00
Jarred Sumner
0788bc1d94
Fixes #1958
2023-01-31 15:05:52 -08:00
Jarred Sumner
28a7f27633
Remove validateion
2023-01-31 15:05:52 -08:00
Jarred Sumner
b2daf3c982
Update build-id
2023-01-31 13:32:24 -08:00
Alex Lam S.L
9598868b57
[bun add] various fixes ( #1953 )
2023-01-31 13:05:41 -08:00
Devin Rhode
79b32f80fa
Use proper casing for tsconfig values ( #1644 )
...
See: https://share.cleanshot.com/gcB3gbXJz6RQk5tx559n
2023-01-31 12:22:50 -08:00
Jarred Sumner
4bfdad2981
Fix missing *ms getters in Stat
...
Related to #1949
2023-01-31 03:04:59 -08:00
Jarred Sumner
3ddd8b2fa5
Fixes #1949
2023-01-31 02:15:00 -08:00
Jarred Sumner
da598a3f37
Update build-id
2023-01-30 23:13:14 -08:00
Jarred Sumner
ad3295668f
Fix crash in bun install <package-name> ( #1947 )
...
* Fix crash in `bun install <package-name>` when <package-name> already exists
* Prettier
* Add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-30 23:12:41 -08:00
Jarred Sumner
f9fd7e9d08
Fixes #1928
2023-01-30 17:39:52 -08:00
Jarred Sumner
8b8bd6a405
remove log that appears in production
2023-01-30 16:14:23 -08:00
Ciro Spaciari
aa10799d8a
fix utf16le fill and utf8 partial write of utf16 ( #1943 )
2023-01-30 12:21:23 -08:00
Alex Lam S.L
ec2c16fefa
fix assert() crash ( #1941 )
2023-01-30 12:20:29 -08:00
Alex Lam S.L
c11bb93552
report invalid input file as test failure ( #1938 )
...
fixes #1935
2023-01-30 01:55:32 -08:00
Alex Lam S.L
5c30983d5d
[bunx] fix version parsing ( #1937 )
2023-01-30 00:33:13 -08:00
Jarred Sumner
c9ca729493
Update buffer-create.mjs
2023-01-29 22:59:16 -08:00
Jarred Sumner
9cd9df698a
Update child_process-node.test.js
2023-01-29 22:42:03 -08:00
Jarred Sumner
57edf3d91f
Skip flaky test
2023-01-29 22:36:29 -08:00
Jarred Sumner
f9b14dc87b
Fix flaky websocket test
...
cc @dylan-conway, the tests should be able to run when cwd is not the test folder
2023-01-29 22:36:24 -08:00
Jarred Sumner
a9bdc0fd44
Add check in test
2023-01-29 22:35:32 -08:00
Jarred Sumner
703bee976b
[breaking] Add binaryType option to Bun.connect & Bun.listen
...
This is a breaking change because the default is `Buffer`, but previously the default was `Uint8Array`. While `Buffer` is a subclass of `Uint8Array`, it still technically is a breaking change because `slice` in `Uint8Array` is not semantically identical to `slice` in `Buffer`
cc @colinhacks, the .d.ts changes I made here aren't great.
2023-01-29 22:33:37 -08:00
Jarred Sumner
eb5105aa09
Update buffer.test.js
2023-01-29 21:27:52 -08:00
Jarred Sumner
552a1940eb
[buffer] More passing Node.js tests
2023-01-29 21:27:42 -08:00
Jarred Sumner
98becc3538
Add another latin1 test
2023-01-29 21:23:10 -08:00
Jarred Sumner
49d8316922
Make this more careful
2023-01-29 19:01:47 -08:00
Jarred Sumner
7a496fa41a
Fixes #1915
2023-01-29 19:01:39 -08:00
Jarred Sumner
4211f733d1
cleanup
2023-01-29 18:59:14 -08:00
Jarred Sumner
44eec0c5bb
Fixes #1933
2023-01-29 16:29:39 -08:00
Agnieszka Stec
ac64d87a1c
Update README.md ( #1934 )
...
Hi, just caught 2 small typos in Readme
2023-01-29 14:58:26 -08:00
Jarred Sumner
8e52e36846
[buffer] Buffer.byteLength passes Node.js tests
2023-01-29 03:45:58 -08:00
Jarred Sumner
348e72356b
Bump WebKit
2023-01-29 01:26:16 -08:00
Jarred Sumner
035d31904a
Make the build less flaky
2023-01-29 00:25:10 -08:00
Jarred Sumner
192629c8ca
Fix bug in fs.openSync
2023-01-29 00:10:46 -08:00
Jarred Sumner
75181ea1f3
Add helper
2023-01-29 00:10:46 -08:00
Alex Lam S.L
d9c1a18776
[bun add] fix more corner cases ( #1930 )
2023-01-28 23:54:47 -08:00
Jarred Sumner
f087388ebc
Support running WASI (WebAssembly) files using bun run ( #1929 )
...
* another micro bench
* Support running WASI
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-28 23:23:26 -08:00
Alex Lam S.L
48eb0c12ab
parse git+ https://github.com/ as GitHub URLs ( #1926 )
...
fixes #1921
2023-01-28 22:14:07 -08:00
Alex Lam S.L
fe389ad5ab
normalise bun add package specifiers ( #1924 )
...
- fix invalid buffer references
fixes #1920
2023-01-28 21:30:46 -08:00
Alex Lam S.L
97b637a0bc
fix corner cases with aliased dependencies ( #1927 )
2023-01-28 15:49:30 -08:00
u9g
7e9c88aa41
Fix if condition always being true ( #1923 )
2023-01-28 14:07:57 -08:00
Alex Lam S.L
07258bd559
[WIP] append GitHub package after fully parsed ( #1911 )
2023-01-28 07:05:28 -08:00
Jarred Sumner
0646efbf30
fix broken build
...
this breaks the build
@Electroid feel free to re-enable once it works
2023-01-28 05:47:22 -08:00
Jarred Sumner
517bdbdd0c
Update bun-linux-build.yml
2023-01-28 05:03:00 -08:00
Jarred Sumner
7f8be29f25
[buffer] Use jsDynamicCast
2023-01-28 04:06:35 -08:00
Jarred Sumner
7db4b90837
commit failing tests
2023-01-28 04:03:45 -08:00
Jarred Sumner
cd48346ca8
use wrapper
2023-01-28 04:03:33 -08:00
Jarred Sumner
1b6a99636d
[buffer] Do not throw in getters
2023-01-28 03:52:47 -08:00
Jarred Sumner
188c1f1f75
[buffer] Use length instead of byteLength for non-uint8array and non-arraybuffer
2023-01-28 03:50:32 -08:00
Jarred Sumner
812490e4a4
[buffer] Add missing offset property
2023-01-28 03:49:57 -08:00
Jarred Sumner
128a293901
Make the parser error in bun install look better
2023-01-28 01:09:42 -08:00
Jarred Sumner
6557df2912
Fixes #1913
2023-01-28 01:00:26 -08:00
Jarred Sumner
aff91436c0
Buffer.from doesn't need to be the Buffer constructor
2023-01-27 22:55:46 -08:00
Jarred Sumner
8075158639
Make Bun.dns lazy
2023-01-27 21:58:33 -08:00
Jarred Sumner
2757dc5e1b
prettier
2023-01-27 21:56:48 -08:00
Jarred Sumner
cd90342a76
Fix flakiness
2023-01-27 21:56:34 -08:00
Jarred Sumner
8d622ad541
Fixes #1904
2023-01-27 21:39:40 -08:00
Ashcon Partovi
ed5bcf17fc
Fix incorrect docker image
2023-01-27 21:21:26 -08:00
Ashcon Partovi
9e46ca19d8
Maybe fix path issue with Docker action
2023-01-27 21:09:12 -08:00
Ashcon Partovi
866646a98e
Fix latest later...
2023-01-27 21:00:19 -08:00
Ashcon Partovi
4118c3d0a6
Fix invalid expression, 2nd attempt
2023-01-27 20:56:59 -08:00
Ashcon Partovi
6029a57d0b
Fix invalid expression
2023-01-27 20:55:15 -08:00
Ashcon Partovi
309b741aa1
Tweak release scripts
2023-01-27 20:53:09 -08:00
Dylan Conway
d90a00857b
fix sentinel mismatches
2023-01-27 20:41:15 -08:00
Ashcon Partovi
5ab2c8e4d6
Remove 'id' from each job
2023-01-27 20:39:02 -08:00
Ashcon Partovi
c194f15418
Fixup docker release
2023-01-27 20:36:13 -08:00
Ashcon Partovi
3be8a4733a
Create unified release workflow
2023-01-27 20:31:18 -08:00
Jarred Sumner
3243936d3e
less flaky macOS build
2023-01-27 20:25:44 -08:00
Dylan Conway
ec1ba91c38
fix import
2023-01-27 20:00:21 -08:00
Dylan Conway
ea55ef504b
ensure name is allocated with toSliceClone ( #1917 )
...
* ensure name is allocated with `toSliceClone`
* shorten toSliceClone
2023-01-27 19:38:40 -08:00
Ashcon Partovi
34b643e654
Enable release signing
2023-01-27 19:14:14 -08:00
Jarred Sumner
2e1c7f5597
sentinel
2023-01-27 15:27:04 -08:00
Jarred Sumner
6cccc0d26c
Update uws
2023-01-27 15:27:04 -08:00
Dylan Conway
0147647e06
fix sentinel slice
2023-01-27 14:49:12 -08:00
Jarred Sumner
ec010e4930
Update buffer.test.js
2023-01-27 14:47:13 -08:00
Dylan Conway
41af4b43e2
more websocket ref/deref tests
2023-01-27 14:22:03 -08:00
Ciro Spaciari
c1d05cf623
fix(Express.js) Express.js try to use function as hostname ( #1914 )
2023-01-27 13:33:53 -08:00
Jarred Sumner
724f23c19f
Update watcher.zig
2023-01-27 03:54:30 -08:00
Jarred Sumner
ddca89f425
🪦
2023-01-27 03:53:01 -08:00
Jarred Sumner
805e87eeb6
Add a comment
2023-01-27 03:29:53 -08:00
Jarred SUmner
8dc1140f43
Fixup
2023-01-27 02:10:30 -08:00
Jarred Sumner
b136125bb0
[[bun hot]] More reliability improvements to macOS watcher
2023-01-27 01:56:07 -08:00
Jarred Sumner
1da7f5fe5d
[bun --hot] Report exceptions in reloaded modules
2023-01-27 00:21:04 -08:00
Jarred Sumner
655c19b07c
More reliable bun --hot on macOS
2023-01-27 00:15:56 -08:00
Jarred SUmner
ed5bcfc76b
Another test
2023-01-26 23:21:10 -08:00
Jarred SUmner
421588d631
More reliable bun --hot on Linux
2023-01-26 23:04:37 -08:00
Jarred SUmner
915b46768c
Remove usages of assumeSentinel
2023-01-26 23:04:37 -08:00
Jarred Sumner
7169bbbb9c
Fixes #1907
2023-01-26 19:18:35 -08:00
Ciro Spaciari
6d06606135
Implement all pending resolve methods in DNS ( #1903 )
...
* initial steps to create generic resolve
* add soa
* add naptr
* add naptr
* add mx and fix naptr
* add resolve caa
* fix Caa test
* fix toJS from caa
* add resolveNs
* add resolvePtr
* fix resolvePtr test
* add resolveCname
* add resolve rrtype options (still missing ANY)
* fix Naptr
* fix drainPendingCares
2023-01-26 18:36:53 -08:00
Dylan Conway
44c6ce11c4
fix websocket hang ( #1910 )
...
* ref and deref, and some tests
* subprocess file
* remove deref
* use flag in test
2023-01-26 18:26:05 -08:00
Ciro Spaciari
b32b0b8736
fix large packages receive for WS client ( #1909 )
2023-01-26 15:08:34 -08:00
Jarred SUmner
fbe45fcb03
Fix branching on undefined
2023-01-26 05:20:53 -08:00
Jarred SUmner
2c23d8736f
valgrind
2023-01-26 04:45:24 -08:00
Jarred SUmner
f14032e4b4
zig changes
2023-01-26 04:43:57 -08:00
Jarred Sumner
d912214719
Upgrade Mimalloc
2023-01-26 04:03:36 -08:00
Jarred Sumner
6c9e7de824
copy paste is harder to mess up than C macros
2023-01-26 04:02:21 -08:00
Alex Lam S.L
f8f989f667
parse package-spec from CLI correctly ( #1895 )
...
* parse package-spec from CLI correctly
fixes #861
* copy separately for `UpdateRequest.name`
fix GItHub URL reporting in results
update tests to reflect latest code changes
* better fix for GitHub URL display issue
2023-01-26 01:06:51 -08:00
Jarred Sumner
781df80a90
[bun install] Support verifying GitHub dependencies
2023-01-25 17:26:49 -08:00
Jarred Sumner
b26ff0074d
[bun install] Include the resolved version for github dependencies in the hash
2023-01-25 17:26:09 -08:00
Jarred Sumner
0a8e42a4ba
[bun install] For github dependencies, write a .bun-tag to mark the revision
2023-01-25 17:25:19 -08:00
Jarred Sumner
b767f9a99a
Add a test
2023-01-25 13:43:23 -08:00
Jarred Sumner
f61ee1ed42
Fixes #1902
2023-01-25 13:42:31 -08:00
Jarred Sumner
a8743f0a34
Fix "failed to resolve"
2023-01-25 02:21:40 -08:00
Jarred Sumner
468226fc90
be more careful
2023-01-25 01:52:04 -08:00
Jarred Sumner
9cb1ec2c58
Undo
2023-01-25 01:10:15 -08:00
Jarred Sumner
0f2c9c9ff3
Fix "failed to resolve" bug 🫠
2023-01-25 01:09:42 -08:00
Jarred Sumner
ed2a57fcc9
Add log
2023-01-25 01:09:05 -08:00
Jarred Sumner
81b6878e1a
Add assertion
2023-01-24 23:54:42 -08:00
Jarred Sumner
325ffd70e1
one less alloc
2023-01-24 23:53:03 -08:00
Jarred Sumner
d4ce045f9e
More careful about the lifetime of alias
2023-01-24 23:51:48 -08:00
Jarred Sumner
7f65875406
Update base.zig
2023-01-24 23:51:02 -08:00
Jarred Sumner
ce38365106
assert defined in development
2023-01-24 23:50:35 -08:00
Jarred Sumner
a3cc911e7a
get cache key for github in one pass
2023-01-24 22:27:06 -08:00
Sean Scally
ac7aff1b47
Add FileSystemRouter + React example ( #1894 )
2023-01-24 19:09:39 -08:00
Ashcon Partovi
d714df48f9
Add npm install -g bun to README
2023-01-24 12:42:37 -08:00
Ashcon Partovi
fb1902448e
Add bunx to bin for npm installer
2023-01-24 12:04:35 -08:00
Alex Lam S.L
f43b675200
support GitHub URLs as dependencies ( #1875 )
2023-01-24 11:57:25 -08:00
Alex Lam S.L
e47fe2ca00
support bun link of scoped packages ( #1892 )
2023-01-24 11:52:47 -08:00
Ashcon Partovi
2edbf4d0ec
Iterate on canary version again
2023-01-24 11:17:08 -08:00
Ashcon Partovi
645b7271f9
npm does not accept '+build' in releases :(
2023-01-24 10:31:04 -08:00
Ashcon Partovi
77c72b3193
Fix detection of canary
2023-01-24 10:06:58 -08:00
Ashcon Partovi
34f97be86a
Copy .npmrc to each package
2023-01-24 09:59:58 -08:00
Ashcon Partovi
2ffe77140e
Maybe fix .npmrc
2023-01-24 09:38:44 -08:00
Jarred Sumner
be79f6e893
Add failing test
2023-01-24 04:08:24 -08:00
Jarred Sumner
bb5119f7eb
Add simple test for bun --hot
2023-01-24 03:30:27 -08:00
Jarred Sumner
6f682c6369
Use more specific function
2023-01-24 03:03:57 -08:00
Jarred Sumner
05b1ce39d2
Faster string length in napi
2023-01-24 03:03:44 -08:00
Jarred Sumner
6cf87d022f
[napi] Clean up some string handling code
2023-01-24 02:59:51 -08:00
Jarred Sumner
6c3842f67d
Update text-decoder.test.js
2023-01-24 02:31:53 -08:00
Jarred Sumner
63403741ff
flaky
2023-01-24 02:31:45 -08:00
Jarred Sumner
66643a5b57
Try resolving against the path without the .js extension
2023-01-24 02:22:16 -08:00
Jarred Sumner
e2f709b2a5
Always allow importing ${package}/package.json
2023-01-24 02:21:43 -08:00
Jarred Sumner
4ea104f5bd
Fix canary bug
2023-01-24 00:57:03 -08:00
Jarred Sumner
0fe7f7b6f0
Update README.md
2023-01-24 00:56:39 -08:00
Jarred Sumner
566a2c668b
Sort families
2023-01-24 00:14:59 -08:00
Jarred Sumner
ad692495a1
Update class-definitions.ts
2023-01-24 00:14:59 -08:00
Jarred Sumner
2c31beda75
Fixes #1887
2023-01-24 00:14:59 -08:00
Ashcon Partovi
cd684fdad0
Tweak semver for canary again
2023-01-23 23:38:38 -08:00
Ashcon Partovi
ad40eec079
Fix ordering of github action command
2023-01-23 23:10:16 -08:00
Jarred Sumner
90d62ecc24
Add DOMJIT test
2023-01-23 23:08:31 -08:00
Ashcon Partovi
cab1f860e4
npm install bun (#1874 )
...
* Add bun-npm package to publish and install Bun via npm
* Add newlines to patchJson
* Update version to latest release
* Tweak semver for canary
* Use GITHUB_TOKEN
* Prevent bun from being run in slow mode
2023-01-23 23:06:13 -08:00
Jarred Sumner
7ca867f7c8
3x faster Buffer.isBuffer
2023-01-23 22:34:04 -08:00
Jarred Sumner
fe03e90d80
Update build-id
2023-01-23 19:05:41 -08:00
Jarred Sumner
f992942391
Make Object.prototype.toString.call(new Buffer(0)) consistent with Node.js
2023-01-23 18:51:04 -08:00
Jarred Sumner
7420cb1d73
fix test failure in aarch64 and add test for simd code path
2023-01-23 18:03:48 -08:00
Dylan Conway
73961a1494
missing test
2023-01-23 17:39:40 -08:00
Jarred Sumner
d7b5e4b901
Update uws
2023-01-23 16:51:52 -08:00
Jarred Sumner
efc024cfc4
clean up deps
2023-01-23 16:51:48 -08:00
Ciro Spaciari
b3533fb3a8
fix(Buffer) Fix arguments in buffer.write, fix size returned from buffer.write for utf16, fix size calc for base64, fix calc for hex byte size ( #1881 )
...
* fix buffer write when more than 2 args are passed
* fix encoding parameter
* better buffer write tests
* fix ucs2/utf8 len return
* fix base64 size in Buffer write
* fix hex encoding size
* actual fix base64
* actual fix base64
* fix segfault
* add fill parameter in Buffer.alloc
* use createUnitialized when alloc have fill parameter, use RETURN_IF_EXCEPTION when static casting
* fix utf16le, ucs2 copying in Buffer write
2023-01-23 16:48:52 -08:00
Dylan Conway
79c0b614ee
fix child process node test hang ( #1884 )
...
* fix test hang from skipped tests
* add error target
2023-01-23 15:59:45 -08:00
Dylan Conway
f5cda8ff18
fix constructor statement order ( #1883 )
...
* leave super alone
* more tests
2023-01-23 15:57:47 -08:00
Jarred Sumner
4570ff7780
[napi] Support defining properties with symbol as names
2023-01-23 15:09:23 -08:00
Jarred Sumner
aa456805dd
[napi] Handle missing description in napi_create_symbol
2023-01-23 15:09:18 -08:00
Ciro Spaciari
efd33c398f
enhancement(fetch): Merge parameters from request parameter with the second parameter for fetch, move verbose and proxy options to second parameter, add non-TLS tests for fetch ( #1862 )
...
* initial steps for proxy-server
* added http_proxy in fetch, move 3rd argument to 3nd argument options, add some non-TLS proxy tests
* some changes
* use only 1 buffer for url+proxy, merge headers on fetch
* initial steps
* change back to override headers instead of merging in fetch
* fix build response.zig
* fix conditional in merged headers on fetch
* updated with main and make proxy disabled if null is passed
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-23 14:38:40 -08:00
Jarred Sumner
9a2b586337
Update bench
2023-01-23 05:22:03 -08:00
Jarred Sumner
df999306c0
✂️ duplicate code
2023-01-23 05:05:54 -08:00
Jarred Sumner
45296570ce
Fix crash in DOMJIT call with empty input
2023-01-23 04:58:42 -08:00
Jarred Sumner
f9306ff815
Update transpiler.zig
2023-01-23 04:09:28 -08:00
Jarred Sumner
c530ead1e0
Add a comment
2023-01-23 04:06:01 -08:00
Jarred Sumner
f6227bf6dd
Upgrade Bun.Transpiler to use new bindings
2023-01-23 04:03:01 -08:00
Jarred Sumner
4f84c6bc34
Prepare for plugins
2023-01-23 04:02:06 -08:00
Jarred Sumner
d141783ebd
Sort the generated classes list
2023-01-23 04:01:45 -08:00
Jarred Sumner
d4ef935478
[bindings] Add custom field to enable writing one-off C++ in the zig class
2023-01-23 04:01:36 -08:00
Jarred Sumner
bf68df0070
fix unrefOnNextTick
2023-01-22 21:22:46 -08:00
Jarred Sumner
407088f6ab
Add tests for async failure
2023-01-22 20:49:21 -08:00
Jarred Sumner
2cce810190
Add a test for zlib (thanks @jiaz)
2023-01-22 19:54:42 -08:00
Jarred Sumner
eaea08ea45
Add one gc test for eventemitter
2023-01-22 19:53:59 -08:00
Jarred Sumner
4dfc09018f
[EventEmitter] Preserve this in event emitter callbacks
2023-01-22 19:52:51 -08:00
Jarred Sumner
771db64cbe
[bun:sqlite] cleanup run
2023-01-22 19:35:32 -08:00
Jarred Sumner
c6b941d803
Add some more emitters to the benchmark
2023-01-22 19:11:04 -08:00
Jarred Sumner
3492248697
Fixes #1366
2023-01-22 19:09:52 -08:00
Jarred Sumner
bc7192dca1
Add extremely slow node:zlib polyfill
2023-01-22 15:34:21 -08:00
Jarred Sumner
188f472ed2
Update http.exports.js
2023-01-22 14:58:57 -08:00
Jarred Sumner
befd97a891
[node:http] Add address() and fix callback / options parsing
2023-01-22 14:58:22 -08:00
Ciro Spaciari
481dbf7c6e
feat(dns) resolveSrv ( #1870 )
...
* initial steps
* in-progress resolveSrv support
* fix memory leak and ZigGlobalObject
* promise.resolve + fix priority and weight mistake
* fix node dns export
* little better test
* add poll_ref to keep alive loop in callback for resolveSrv and lookup
* add test for error case in resolveSrc
* fix Bun.dns.resolveSrv type
2023-01-22 14:31:08 -08:00
Jarred Sumner
8d692f1511
Update Makefile
2023-01-22 14:20:44 -08:00
Jarred Sumner
c08b546728
Allow very old CPUs to use Bun (~2008)
2023-01-22 14:20:25 -08:00
Jarred Sumner
fefa4a1623
Add a test for require with a query string
2023-01-22 03:24:42 -08:00
Jarred Sumner
043e408b15
cleanup execArgv a little
2023-01-22 03:24:32 -08:00
Jarred Sumner
9f6658b981
stub out process.stdin.setRawMode
2023-01-22 02:40:18 -08:00
Jarred Sumner
5ce2b8e604
Implement process.execArgv
2023-01-21 23:52:51 -08:00
Jarred Sumner
ee9893c4e1
Zig stdlib change
2023-01-21 23:13:19 -08:00
Jarred Sumner
8b0e2efd6e
Bump zig
2023-01-21 23:13:04 -08:00
Jarred Sumner
4d1e977399
Update uws
2023-01-21 23:12:30 -08:00
Jarred Sumner
0ee13892fd
Update buffer-create.mjs
2023-01-21 23:11:55 -08:00
Jarred Sumner
99d2d6e607
Support query string parameters in module resolution
2023-01-21 23:11:31 -08:00
Jarred Sumner
a2cfdf0e1c
Refactor new Buffer to pass Node.js tests
2023-01-21 23:03:43 -08:00
Jarred Sumner
29a576a167
[Buffer] Add deprecated parent property
2023-01-21 22:55:56 -08:00
Jarred Sumner
6424ce6397
Update .gitignore
2023-01-21 20:54:31 -08:00
Jarred Sumner
fdb9472f88
Fix make headers
2023-01-21 19:42:21 -08:00
Jarred Sumner
17bde9bc86
Fix test failure due to UB
2023-01-21 15:36:51 -08:00
Alex Lam S.L
fd29d05c6a
minor clean-ups ( #1869 )
...
- use `Lockfile.str()` more
- allow `child-process-stdio.test.js` to run with `bun-debug`
2023-01-21 14:02:22 -08:00
Jarred Sumner
f475802206
Update module_loader.zig
2023-01-21 13:14:02 -08:00
Alex Lam S.L
f0fa760479
[semver] parse ^ & ~ expressions correctly ( #1854 )
...
* [semver] parse `^` & `~` expressions correctly
* handle semver ranges correctly against build tags
2023-01-21 04:16:26 -08:00
Jarred Sumner
24e8aa105f
Remove UB with semver.String
...
Thanks @MasterQ32
2023-01-21 04:11:57 -08:00
Jarred Sumner
ed421855d7
[buffer] Add faster path for Uint8Array
2023-01-21 04:06:06 -08:00
Jarred Sumner
627da44527
Handle string subclasses and new String() in new Buffer
2023-01-21 03:14:00 -08:00
Jarred Sumner
9955b74622
Make Buffer.alloc* 3ns faster
2023-01-21 03:13:45 -08:00
Jarred Sumner
d955bfe50f
[buffer] Make Buffer.from pass more tests
2023-01-21 03:12:59 -08:00
Dylan Conway
b8648adf87
constructor parameter properties in class expressions ( #1867 )
2023-01-20 16:24:40 -08:00
Jarred Sumner
ff6fb587f6
Update transpiler.test.js
2023-01-20 04:12:03 -08:00
Jarred Sumner
e361ed4451
Update transpiler.test.js
2023-01-20 04:11:47 -08:00
Dylan Conway
42e9f6e0b1
push super before generated statements ( #1856 )
2023-01-20 03:25:21 -08:00
Jarred Sumner
e3ed905b0a
Clear the errors
2023-01-20 02:19:23 -08:00
Jarred Sumner
224312c014
one less hash table
2023-01-20 02:19:14 -08:00
Jarred Sumner
bdf792adbc
Add another test
2023-01-20 00:20:33 -08:00
Jarred Sumner
3c6616a23d
fix hanging test
2023-01-20 00:07:11 -08:00
Jarred Sumner
ff7e984f0a
Further cleanup buffer encoding
2023-01-20 00:06:46 -08:00
Jarred Sumner
3a100af876
Fixes #1855
2023-01-20 00:06:27 -08:00
Jarred Sumner
7d7b535014
Fix assertion failure with boringssl messages
2023-01-20 00:05:48 -08:00
Jarred Sumner
a98b1751a6
Revert "ignore sighup"
...
This reverts commit 03ab4be9ee .
2023-01-19 23:59:20 -08:00
Jarred Sumner
03ab4be9ee
ignore sighup
2023-01-19 23:56:49 -08:00
Jarred Sumner
f993975ae6
make this code easier to read
2023-01-19 21:00:53 -08:00
Jarred Sumner
53f7bd32d8
Update types.zig
2023-01-19 20:34:06 -08:00
Jarred Sumner
784496b773
Bump
2023-01-19 20:32:38 -08:00
Jarred Sumner
4c0b0e2e8e
Fix buffer encoding bug
2023-01-19 20:28:34 -08:00
Alex Lam S.L
bab7e63d7c
use String.from() ( #1850 )
2023-01-19 19:26:10 -08:00
Jarred Sumner
3511a4b5be
Bump zig
2023-01-19 19:09:25 -08:00
Jarred Sumner
e485f7bb51
make it packed
2023-01-19 19:05:29 -08:00
Jarred Sumner
795cde6d62
Bugfixes to install ( #1848 )
2023-01-20 04:55:22 +02:00
Alex Lam S.L
9dfbf57397
repopulate alias_map correctly ( #1847 )
2023-01-19 16:24:56 -08:00
Jarred Sumner
e04fe64a82
Add a comment
2023-01-19 16:19:15 -08:00
Jarred Sumner
495c70053f
Add a debug safety check for UAF in AST nodes
2023-01-19 16:14:56 -08:00
Jarred Sumner
9bcd4952ce
Fix UAF when opening workspaces
2023-01-19 16:14:40 -08:00
Jarred Sumner
8745f10cd3
Improve error message when a workspace is not found
2023-01-19 15:48:03 -08:00
Volodymyr Palamar
ac0dab3679
Create new example http-file-extended.ts ( #1827 )
...
New code sample with http Range and ETag support
Some code is taken from here https://github.com/gornostay25/svelte-adapter-bun/blob/master/src/sirv.js
2023-01-19 10:35:55 -08:00
Ciro Spaciari
01c97e4033
fix(fetch:HTTP_PROXY) fix support for HTTP_PROXY/HTTPS_PROXY and NO_PROXY in fetch instances ( #1844 )
...
* fix response.zig fetch
* use VM bundler env instead of DotEnv.instance
* remove unnecessary import
2023-01-19 10:34:32 -08:00
Alex Lam S.L
cd5f2ab11f
parse dependency specifier correctly ( #1840 )
2023-01-19 06:39:01 -08:00
Alex Lam S.L
61736966ad
fix stale references upon Lockfile tree cloning ( #1845 )
2023-01-19 06:38:08 -08:00
Alex Lam S.L
8bdcded5c1
fix memory reference issues ( #1841 )
2023-01-19 00:53:01 -08:00
Alex Lam S.L
c0ec61cf16
support npm dependency aliasing ( #1837 )
...
* support npm dependency aliasing
* fix variable name
2023-01-18 20:11:52 -08:00
Alex Lam S.L
d4e323b997
add fs.rmdir & friends ( #1838 )
2023-01-18 19:56:34 -08:00
Jarred Sumner
58cbd6b211
Regenerate lockb
2023-01-18 16:51:18 -08:00
Colin McDonnell
d8d148e3bb
Fix/simplify bun-types release ( #1836 )
...
* Simplify types release
* Further simplify
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-18 16:22:01 -08:00
Jarred Sumner
311185f6d6
Add a test for #1831
2023-01-18 15:00:00 -08:00
Jarred Sumner
7012d2fb74
Fixes #1831
2023-01-18 14:59:39 -08:00