Ashcon Partovi
968a7cd314
Format
2023-07-05 13:27:45 -07:00
Ashcon Partovi
1e1fe22be0
Fix incorrect signatures
2023-07-05 13:26:51 -07:00
Ashcon Partovi
17bacd85f9
Fix detect-libc
2023-07-05 13:21:04 -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
Jarred Sumner
2db04ef9d9
Fix crash with invalid arguments in readdir()
2023-01-18 01:16:13 -08:00
Jarred Sumner
4cb6a34432
Don't report end() because it is inherently flaky
2023-01-18 00:28:53 -08:00
Jarred Sumner
2016e8a0af
micro-optimize loading process environment variables
2023-01-18 00:28:19 -08:00
Jarred Sumner
0759530118
opposite
2023-01-18 00:24:52 -08:00
Jarred Sumner
5ed46913c4
Update node-net.test.ts
2023-01-18 00:17:11 -08:00
Jarred Sumner
bd5b90fbf1
Fix lifetime issue in require.resolve
2023-01-17 23:41:17 -08:00
Colin McDonnell
bba4054da3
Use canary in CI ( #1823 )
...
* Use canary in CI
* Only publish canary when types change
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-17 23:06:26 -08:00
华晨
d16951422b
remove redundant allowSyntheticDefaultImports ( #1802 )
2023-01-17 21:01:55 -08:00
Jarred Sumner
e0eeb1c07e
workaround lifetime issue
2023-01-17 20:10:19 -08:00
Ashcon Partovi
216e872801
Add Bun.dns to the README
2023-01-17 18:17:12 -08:00
Ashcon Partovi
6fbf437f50
Fix Bun.dns examples to use array instead of single result
2023-01-17 18:12:49 -08:00
Ciro Spaciari
c00fadab9e
feat(cli): Support HTTPS_PROXY, HTTP_PROXY, and NO_PROXY #1440 ( #1814 )
...
* WIP: http_proxy implemented, first steps for https_proxy #1440
* add HTTP_PROXY support to upgrade_command and WIP: tunneling
* WIP async handshake, stuck on WANT_READ, try to defer + check
* create and upgrade with proxy working, TLS and non-TLS to proxy TLS working
* bun install/upgrade/create working with http(s)_proxy #1440
* add NO_PROXY support #1440
* remove commented code and add TODO
* fix getHttpProxy no_proxy
* fix formatting
* refactor catch and getHttpProxy, fix empty strngs in env for proxy
* allow optimization for handleResponseBody
2023-01-17 17:47:01 -08:00
Jarred Sumner
9b260fb18b
Allow error instance in process.emitWarning
2023-01-17 17:11:08 -08:00
Colin McDonnell
b931c19ba3
Add types for readline, tls, net ( #1817 )
...
* Add readline, tls, net types
* Remove unimplemented methods
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-17 16:49:18 -08:00
Jarred Sumner
9e403fc8bf
cleanup error message
2023-01-17 16:47:45 -08:00
Jarred Sumner
fd0edd7aa0
[process] Implement process.emitWarning
2023-01-17 16:29:08 -08:00
Jarred Sumner
848658c533
[test] Add helper for bun env
2023-01-17 16:28:49 -08:00
Jarred Sumner
37d2a98331
Update logger.zig
2023-01-17 16:27:52 -08:00
Jarred Sumner
58d1ab02bd
[canary] Fix missing .env log
2023-01-17 16:27:48 -08:00
Jarred Sumner
9f0d402a7d
[EventEmitter] Fix emitter.off("eventName")
2023-01-17 16:27:21 -08:00
Jarred Sumner
f927567b9f
bun install tests shouldn't fail due to terminal colors
2023-01-17 16:00:21 -08:00
Derrick Farris
94ea41a60b
fix(readline/promises): new Interface() -> new PromisesInterface() ( #1818 )
2023-01-17 15:45:15 -08:00
Dylan Conway
8235e59a7f
set available
2023-01-17 15:36:19 -08:00
Jarred Sumner
8924c521ba
// flaky
2023-01-17 14:00:10 -08:00
Jarred Sumner
69875d86cd
Fix console.log printing multiple properties
2023-01-17 13:44:13 -08:00
Jarred Sumner
5bdc923838
dont export twice
2023-01-17 12:53:28 -08:00
Jarred Sumner
25a2962186
Expose tls.connect
2023-01-17 12:52:49 -08:00
Jarred Sumner
c943dbadef
Update crypto-hasher.mjs
2023-01-17 12:52:33 -08:00
Jarred Sumner
aacaa9b85d
Bun v0.5.0
2023-01-17 00:43:56 -08:00
Jarred Sumner
74992f6f34
make node-redis work
2023-01-17 00:09:04 -08:00
Dylan Conway
12b8416b64
send and disconnect
2023-01-16 23:44:09 -08:00
Jarred Sumner
8a5ff676ea
Bump zig
2023-01-16 23:21:52 -08:00
Jarred Sumner
f660f8d22f
Make sure the socket keeps the process alive
2023-01-16 21:43:48 -08:00
Jarred Sumner
38cc947621
Don't need to skip these now
2023-01-16 21:42:52 -08:00
Jarred Sumner
0546aa4fd5
Make entire test line dim
2023-01-16 21:37:12 -08:00
Jarred Sumner
b8b7ad4982
[bun:test] Fix dim, fix missing space
2023-01-16 21:35:19 -08:00
Dylan Conway
d21119b347
remove onClose
2023-01-16 21:20:54 -08:00
Jarred Sumner
d3de366c67
Fix some reliability issues with net.connect and Bun.connect on macOS
2023-01-16 21:14:38 -08:00
Jarred Sumner
a1b581621c
guess we'll check if it's defined
2023-01-16 20:33:31 -08:00
Jarred Sumner
274ae5de1b
[bun install] Make it print workspace: instead of workspace://
2023-01-16 18:57:04 -08:00
Jarred Sumner
74b0a1939d
Fixes https://github.com/oven-sh/bun/issues/1654
2023-01-16 17:48:35 -08:00
Jarred Sumner
6f432e8b7d
Remove assertion
2023-01-16 17:38:04 -08:00
Jarred Sumner
a5f7a23307
Update node-dns.exports.js
2023-01-16 17:12:23 -08:00
Jarred Sumner
88a8614abc
[node:dns/promises] Fix missing import
2023-01-16 17:11:00 -08:00
Jarred Sumner
b23327c283
[node] Add process.config
2023-01-16 16:47:08 -08:00
Jarred Sumner
c83d56c75d
Update c-bindings.cpp
2023-01-16 16:30:33 -08:00
Jarred Sumner
7dd28bbdd9
Fix which returning directories sometimes
2023-01-16 16:28:02 -08:00
Jarred Sumner
d54e23ca33
[napi] Fix potential crash in napi_create_buffer_copy, napi_create_buffer
2023-01-16 15:48:14 -08:00
Jarred Sumner
02f0212cbd
[napi] Don't assume function exists
...
Fixes https://github.com/oven-sh/bun/issues/1808
2023-01-16 15:47:44 -08:00
Jarred Sumner
3484502839
[JS Parser] Don't inline rope strings
2023-01-16 15:21:11 -08:00
Jarred Sumner
a345efd270
Fix getFdPath when /proc/fd is not mounted
2023-01-16 13:59:52 -08:00
Jarred Sumner
30bfb31bce
wip
2023-01-16 12:59:48 -08:00
Jarred Sumner
eef0e8c6bf
Fix incorrect type
2023-01-16 12:56:16 -08:00
Jarred Sumner
4648131c41
Add missing buffer module exports
2023-01-16 12:49:57 -08:00
Colin McDonnell
b0702ce7b1
Publish bun-types@canary ( #1767 )
...
* Publish bun-types@canary
* Get version from bun cli
* Get version from bun cli
* Fixes
* Fixes
* Fixes
* Finalize
* Update names
* Add token
* Remove dryrun
* Switch setup-bun
* Test noncanary publish
* Fix path for GPR
* Use latest
* Remove testing code
* Remove dry run
* Fix paths
* Update bun-types links
* Verbose logging
* Ignore lockfile
* Run install in root
* Remove debug code
* Remove debug code
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-16 11:58:57 -08:00
Jarred Sumner
ff3f5aa154
Don't open non-blocking on Linux
2023-01-16 11:22:54 -08:00
Jarred Sumner
91bcfa9cb4
Clean up the test
2023-01-16 11:22:54 -08:00
Jarred Sumner
cf5f9df211
Use a reusable symbol
2023-01-16 11:22:54 -08:00
Alex Lam S.L
9eb4a4ff3a
[Response] reject HTTP status code correctly ( #1800 )
2023-01-15 03:21:34 -08:00
Alex Lam S.L
7932a55870
fix handler reset in Server.reload() ( #1801 )
2023-01-15 03:19:37 -08:00
Alex Lam S.L
893ec2fb45
fix life-cycle script execution ( #1799 )
...
- change current working directory for workspaces
- add `node_modules/.bin` to `PATH` before running
2023-01-14 21:37:16 -08:00
Alex Lam S.L
136014b13a
fix bugs ( #1795 )
...
- segfault reading stacktrace from `fs/promises` rejections
- `Promise` rejection within `describe()` ends testing abruptly
- `FSSink.write()` incorrectly handles `objectMode`
- `FSSink.write()` throws wrong error codes
2023-01-14 16:50:55 -08:00
Jarred Sumner
d01ec47529
Fixes #1794
2023-01-14 16:37:16 -08:00
Alex Lam S.L
7fa023b8b5
support installation of NPM workspaces ( #1764 )
2023-01-14 07:14:48 -08:00
Jarred Sumner
aa9e56edfe
[bun:test] Always dim skip
2023-01-13 13:13:01 -08:00
Jarred Sumner
88ffdc5fec
[TypeScript transpiler] Fix bug with export default class implements
2023-01-13 12:48:10 -08:00
Jarred Sumner
fab42148e4
Skip failing tests
2023-01-13 11:58:44 -08:00
Jarred Sumner
cce380ec37
Fix broken test helper
2023-01-13 11:57:22 -08:00
Jarred SUmner
828fd0cfea
Fix debug mode crash
2023-01-13 11:55:46 -08:00
Jarred SUmner
168bb1427f
move more things
2023-01-13 11:38:16 -08:00
Jarred SUmner
996ef44c02
Split some things into more files and use bun namespace instead of import more
2023-01-13 11:27:16 -08:00
Jarred Sumner
734b5b89da
Add closeActiveConnections option to types
2023-01-12 19:38:27 -08:00
Jarred Sumner
490814aa35
Update serve.test.ts
2023-01-12 19:38:27 -08:00
Jarred Sumner
ffa8913e54
Update tcp-server.test.ts
2023-01-12 19:38:27 -08:00
Jarred Sumner
73e9cd8e06
[Bun.listen] Add flag to close all connections
2023-01-12 19:38:27 -08:00
Jarred Sumner
62cab3c719
[Bun.serve] Add flag to close all connections
2023-01-12 19:38:27 -08:00
Jarred Sumner
d4f1d29393
Fix https websockets
2023-01-12 19:38:27 -08:00
Jarred Sumner
2eac47a123
Upgrade uSockets
2023-01-12 19:38:27 -08:00
Dylan Conway
32f8cb31be
set remaining indexes ( #1785 )
2023-01-12 18:44:45 -08:00
Dylan Conway
297732bbb3
0 initialize remaining indexes in array ( #1783 )
...
* 0 initialize remaining indexes in array
* switch to memset
2023-01-12 17:53:58 -08:00
Jarred Sumner
90be254373
fix missing error page
2023-01-12 16:26:25 -08:00
Jarred Sumner
034dd3d03d
make the test more resilient
2023-01-12 16:06:28 -08:00
Jarred Sumner
0384d3c558
less flaky
2023-01-12 15:37:03 -08:00
Dylan Conway
00773e15f1
reset string decoder on end ( #1782 )
2023-01-12 15:13:05 -08:00
Jarred Sumner
126809f20c
Add missing type
2023-01-12 15:08:32 -08:00
Dylan Conway
fbe3f5dfb3
pointer type
2023-01-12 13:59:27 -08:00
Jarred Sumner
29b4c84b8c
woops
2023-01-12 13:28:10 -08:00
Jarred Sumner
38f9bb96df
use .skip() for failing test
2023-01-12 13:20:10 -08:00
Jarred Sumner
6e0ec3248f
Add c-ares to make clean
2023-01-12 13:11:05 -08:00
Jarred Sumner
35d0cf910d
Uncomment flaky test
2023-01-12 13:11:05 -08:00
Jarred Sumner
5cb84231b2
Reduce amount of cloning
2023-01-12 13:11:05 -08:00
Jarred Sumner
bbd4504954
Add a couple more tests for errors with Bun.file()
2023-01-12 13:11:05 -08:00
Jarred Sumner
a0b44e9873
more careful
2023-01-12 13:11:05 -08:00
Jarred Sumner
90c395bdac
Update inspect.test.js
2023-01-12 13:11:05 -08:00
Jarred Sumner
c2b7cadd4f
[bindings] Make isObject align with JSC::isObjectType
2023-01-12 13:11:05 -08:00
Jarred Sumner
1a4685213b
[bun:test] Support async in expect(async () => { await 1; }).toThrow()
2023-01-12 13:11:05 -08:00
Ethan Burrell
76e6a178e3
fix(bun-test): test title in results ( #1753 )
...
* fix(bun-test): test title in results
* missed case
* clean up import
* respond to reviews
2023-01-12 12:49:36 -08:00
Jarred Sumner
bb5efb67ab
Update socket.test.ts
2023-01-12 12:08:11 -08:00
Jarred Sumner
4bac561184
missing
2023-01-12 12:07:52 -08:00
Jarred Sumner
edf9757650
Fixes #1772
2023-01-12 10:14:35 -08:00
Jarred Sumner
e65def0f82
Remove extra wrapper
2023-01-11 20:21:41 -08:00
Jarred Sumner
7970704222
end callback
2023-01-11 20:21:41 -08:00
Jarred Sumner
ced3226ffb
Update ImportMetaObject.cpp
2023-01-11 20:21:41 -08:00
Jarred SUmner
1c20e05d70
[Bun.serve] Introduce publishToSelf boolean on websocket: {} config object
2023-01-11 17:14:07 -08:00
Colin McDonnell
4969f068f6
Types update ( #1761 )
...
* Fix type tests
* Add dns types
* Add node:net types
* Make process.exit return never
* Make ArrayBufferView tighter
* Add types for node:dns
* Remove docs
* Use latest
* Fix CI
* Fix CI
* Stop double trigger
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2023-01-11 14:56:41 -08:00
Jarred Sumner
4a1470d26c
require.resolve in the runtime should use CommonJS export conditions
2023-01-11 14:22:31 -08:00
Jarred Sumner
5a3b634982
[breaking] Read the "node" export condition in package.json in Bun's runtime
2023-01-11 14:21:45 -08:00
Jarred Sumner
520ecc21ac
[node:net] Hopefully fix unix sockets
2023-01-11 13:58:25 -08:00
Jarred Sumner
8911c398d9
Support socketPath
2023-01-10 20:39:11 -08:00
Jarred Sumner
1738588f38
potentially support tls in some cases
2023-01-10 19:39:34 -08:00
Jarred Sumner
5e60a9363f
[node:tls] Stub out just enough to make it load
2023-01-10 19:29:27 -08:00
Jarred Sumner
cd20a84f18
Disable reading the browser field when targeting Bun's runtime ( #1763 )
...
* Fix flipped order
* Disable reading `"browser"` field when targeting Bun's runtime in the resolver
* Update resolver.zig
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-10 19:09:53 -08:00
Jarred Sumner
e07dd6194a
make it size_t
2023-01-10 19:06:53 -08:00
Jarred Sumner
bcabf31121
Make Buffer mockable
2023-01-10 18:49:26 -08:00
Jarred Sumner
5cb6890fad
Fix flipped order
2023-01-10 18:49:26 -08:00
Malcolm Still
f1e6ea2254
Implement Buffer swap16, swap32, swap64 ( #1659 )
...
* Implement Buffer swap16, swap32, swap64
* Initial incorporation of feedback
- Use constexpr
- Clean up the indexing
- Check for detached
- Use suggested text for exception text
2023-01-10 18:43:58 -08:00
Jarred Sumner
56a6cf716e
[TCPSocket] Add a log for write()
2023-01-10 17:16:42 -08:00
Jarred Sumner
3517ce8e23
Add two tests for fs/promises
2023-01-10 17:16:16 -08:00
Jarred Sumner
3c525b4962
Fix fs:promises
2023-01-10 17:16:08 -08:00
Jarred Sumner
e945be72b4
Add some missing types
2023-01-10 14:36:00 -08:00
Jarred Sumner
3002a7e14f
don't call add_server-name if len is not >0
2023-01-10 11:56:02 -08:00
Jarred Sumner
c18165b30f
Allow tls: true in Bun.connect
2023-01-10 11:55:42 -08:00
Jarred Sumner
e18863df1b
attempt (unsuccessfully) to improve c++ build time
2023-01-10 10:23:11 -08:00
Jarred Sumner
41f23273b0
[js parser] Do not inline regexp literals
2023-01-10 10:23:11 -08:00
Jarred Sumner
e62a422c14
Fix circular dependency in make headers
2023-01-10 10:23:11 -08:00
Jarred Sumner
91f7e6c66d
Changes from upgrading webkit
2023-01-10 10:23:11 -08:00
Jarred Sumner
946424cf86
buffer.toString(undefined) should be UTF-8
2023-01-10 10:23:11 -08:00
Alex Lam S.L
270b07e85e
use strings.hasPrefixComptime() ( #1755 )
2023-01-10 05:35:20 -08:00
Jiaji Zhou
b458abedbb
Fix missing c-ares dep in dev build ( #1754 )
2023-01-10 04:51:01 -08:00
Derrick Farris
4ef60da8a9
refactor(readline/promises): re-export readline.promises from readline ( #1748 )
...
* refactor(readline/promises): re-export readline.promises from readline/promises
* fix(readline): don't export Readline from `readline`
* perf(readline): return Promise.reject immediately after failed validation
2023-01-09 16:27:56 -08:00
Jarred Sumner
0e7f69f179
Update child_process-node.test.js
2023-01-09 10:37:02 -08:00
Jarred Sumner
84ee02cb4b
Update test_command.zig
2023-01-09 10:33:39 -08:00
Jarred Sumner
7a92bf87c8
Add very simple dns test
2023-01-09 10:12:46 -08:00
Jarred Sumner
55c1311aef
fixup
2023-01-09 09:42:09 -08:00
Jarred Sumner
beed35e55e
Update test_command.zig
2023-01-09 09:40:54 -08:00
Jarred Sumner
5cd37e5e8a
Rename
2023-01-09 09:40:46 -08:00
Jarred Sumner
1761379135
Update test_command.zig
2023-01-09 09:13:23 -08:00
Jarred Sumner
30b10d5fb1
[bun:test] Implement test.root configuration option
2023-01-09 08:28:37 -08:00
Jarred Sumner
ca58556c54
Fix frozen IO stuff
2023-01-09 08:26:20 -08:00
Jarred Sumner
a1b2c23671
[bun:test] Implement test.skip
2023-01-09 08:25:39 -08:00
Jarred Sumner
5d60aae3b3
[dns] Fix UAF
2023-01-09 08:21:05 -08:00
Jarred Sumner
2392e48e9d
Fixes https://github.com/oven-sh/bun/issues/1533
2023-01-09 03:41:03 -08:00
Jarred Sumner
3386afc0bc
Add test for Bun.listen throwing
2023-01-09 03:26:16 -08:00
Jarred Sumner
1a1014525b
Make autotick logic more consistent
2023-01-09 03:25:57 -08:00
Jarred Sumner
c30a110641
Cleanup code in expectToThrow
2023-01-09 03:25:41 -08:00
Jarred Sumner
ced6201cb0
Cleanup error handling in Bun.listen
2023-01-09 03:25:06 -08:00
Jarred Sumner
905a3313b5
check for isEmpty or !isCell
2023-01-09 03:18:41 -08:00
Jarred Sumner
f0475e89c5
Handle 0 in isCell
2023-01-09 02:28:14 -08:00
Jarred Sumner
cb75b4799f
Add test for expect().toThrow
2023-01-09 00:22:54 -08:00
Jarred Sumner
5f1150442a
Revert "lazily create buffer/string slices ( #1735 )"
...
This reverts commit e2ed31b7e7 .
2023-01-08 23:53:31 -08:00
alexlamsl
94b6ab02c2
fix string encoding detection
2023-01-09 01:08:24 +02:00
Jarred Sumner
631181a503
Add welcome page when viewed from a browser
2023-01-08 07:37:51 -08:00
Jarred Sumner
83a5c9f3da
[internal] Fix checking for Error object
2023-01-08 07:37:51 -08:00
Jarred Sumner
791f8ab0a1
[internal] Regenerate code
2023-01-08 07:37:51 -08:00
Jarred Sumner
da11bb4a82
[internal] Fix type casting in Zig bindings
2023-01-08 07:37:51 -08:00
Derrick Farris
94409770de
feat(node:readline): add node:readline and node:readline/promises ( #1738 )
...
* feat(readline): WIP: add readline
* test(helpers): add deepStrictEqual helper
* feat(readline): add readline & readline/promises to loader
* fix(node:events): emit newListener on new listener added
* feat(readline): finish readline cb interface, add tests
* fix(stream): fix Transform.end()
* fix(node-test-helpers): correct throws behavior, improve how all asserts work
* feat(readline/promises): add readline/promises
* feat(assert): add assert.match
* test(readline): uncomment more tests
* fix(readline): MaxCeil -> MathCeil 🤦
* fix(readline): export promises from node:readline
* fix(readline): temp fix for circular dependency
* cleanup(readline): remove console.log
* fix(readline): change true -> 0 for CommonJS export
* perf(readline): micro-optimizations with some getters
* perf(readline): lazy load isWritable
* cleanup(readline): rename debug flag env var to BUN_JS_DEBUG
2023-01-08 01:49:49 -08:00
Jarred Sumner
c505f172b8
Add napi to process.versions
2023-01-08 01:11:23 -08:00
Jarred Sumner
9972e553a0
Update process.versions
2023-01-08 00:50:38 -08:00
Jarred Sumner
cdbdc55cbf
We don't statically link iconv
2023-01-08 00:12:24 -08:00
Jarred Sumner
3f472bd511
cleanup
2023-01-08 00:10:02 -08:00
Jarred Sumner
4eb3067ef5
Workaround macOS issue
2023-01-07 23:58:25 -08:00
Jarred Sumner
3c8701362b
Document connectError
2023-01-07 23:47:08 -08:00
Jarred Sumner
fadd1c0152
[Bun.connect] Fix bug where connect() Promise wouldn't reject on a connection error
2023-01-07 23:45:43 -08:00
Jarred Sumner
1e19d59273
Update uws
2023-01-07 23:45:43 -08:00
Jarred SUmner
cfd42c3999
Linux build
2023-01-07 21:48:31 -08:00
Jarred SUmner
98010efefc
Change error
2023-01-07 21:41:07 -08:00
Jarred SUmner
020f49dcd6
Return ENOTFOUND instead of ENOTERROR
2023-01-07 21:05:34 -08:00
Jarred SUmner
1e841a7881
Fix segfault on Linux when getaddrinfo returns an error\nSee https://github.com/ziglang/zig/pull/14242
2023-01-07 21:05:34 -08:00
Jarred Sumner
b0d1cc1df7
Mark more things as only mac
2023-01-07 19:55:51 -08:00
Jarred Sumner
0a835ba963
Don't include this symbol on linux
2023-01-07 19:48:49 -08:00
Jarred Sumner
2b1b897375
very simple node:dns implementation
...
completely untested
2023-01-07 07:59:36 -08:00
Jarred Sumner
87983464d8
Implement DNS module ( #1691 )
...
* Boilerplate for DNS stuff
* Add c-ares
* lookup
* make
* Implement dns.lookup
* Create c-ares
* wip
* normalize
* repro
* Revert "repro"
This reverts commit 8b93e0c295b335b8882a9601da47720348549beb.
* Implement macOS `getaddrinfo_async_start`
* embiggen
* Update string_immutable.zig
* Update Makefile
* alright
* Update .gitignore
* Add types
* more ccache
* Update Dockerfile
* Update Dockerfile
* Update Dockerfile
* Update bun.d.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-07 07:09:48 -08:00
alexlamsl
d5565ab2cd
test BufferList against surrogate pairs
2023-01-07 12:39:32 +02:00
Jarred Sumner
8dc811e4aa
Add missing null check
...
Fixes https://github.com/oven-sh/bun/issues/1739
probably
2023-01-06 16:41:34 -08:00
Ikko Eltociear Ashimine
1e1c817603
fix typo in install.sh ( #1737 )
...
infomation -> information
2023-01-06 10:15:32 -08:00
Alex Lam S.L
e2ed31b7e7
lazily create buffer/string slices ( #1735 )
2023-01-05 19:43:33 -08:00
Jarred Sumner
a7d9f16107
Report unhandled promise rejection on exit and make exit code 1 instead of 0 ( #1734 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-05 16:23:45 -08:00
Jarred Sumner
bbbb4835b4
always report rejected promises
2023-01-05 15:08:06 -08:00
Jarred Sumner
f191993c8f
Clean up some napi code
2023-01-05 14:49:41 -08:00
Jarred Sumner
994e58b5ea
napi_boolean -> napi_number
2023-01-05 14:40:45 -08:00
Jarred Sumner
59639ba654
Fixes #1733
2023-01-05 14:06:27 -08:00
Alex Lam S.L
d22e3ebf9a
[socket] fix double-free in finalize() ( #1731 )
...
- tidy up `.isEmptyOrUndefinedOrNull()` usage
2023-01-05 13:17:15 -08:00
Jarred Sumner
0873a15a63
Bump
2023-01-05 05:09:34 -08:00
Alex Lam S.L
20718b972e
fix onConnectError() error propagation ( #1730 )
...
* fix `onConnectError()` error propagation
suppress extraneous logging messages
* Update src/bun.js/api/bun/socket.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-01-05 03:31:01 -08:00
Jarred Sumner
a951859c55
Update tcp-echo.bun.ts
2023-01-05 01:38:36 -08:00
Jarred Sumner
3005d9e348
Really fix #1722
2023-01-05 00:24:53 -08:00
Alex Lam S.L
7f96f72d65
improve .toThrow() compatibility with Jest ( #1728 )
2023-01-05 00:15:04 -08:00
u9g
7550658fab
Fix Bun.serve typings ( #1714 )
2023-01-04 23:54:17 -08:00
Alex Lam S.L
80736043d6
implement expect().toThrow() ( #1727 )
...
- fix bugs in `JSBufferList`
- add tests
2023-01-04 22:37:14 -08:00
Jarred Sumner
3b259211df
Add SharedBuffer from WebKit to make it easier to import more WebCore stuff
2023-01-04 18:55:16 -08:00
Jarred Sumner
6b777c4b0b
Fix default export for stream
...
cc @alexlamsl
2023-01-04 18:55:16 -08:00
Jarred Sumner
81a6aef771
Fixes #1722
2023-01-04 18:55:16 -08:00
Jarred Sumner
f41bb3fb20
split server/client for tcp echo benchmark to better measure net.Socket perf
2023-01-04 18:55:16 -08:00
Alex Lam S.L
e0557d70e3
buffer list clean-ups ( #1721 )
2023-01-04 15:32:39 -08:00
Jarred Sumner
e2231f15e8
Support non-classes in node:net ( #1712 )
...
* Support non-classes
* Update net.exports.js
* Make it less observable
* Update net.exports.js
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-04 04:06:24 -08:00
Jarred Sumner
a19c7b4304
Fixes #1716
2023-01-04 03:46:56 -08:00
Jarred Sumner
4a328609b9
10x faster new Buffer ( #1717 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-04 03:30:15 -08:00
Jarred Sumner
021331f154
Update README.md
2023-01-03 20:17:22 -08:00
Jarred Sumner
647093ff73
Add sqlite to vendor
2023-01-03 20:15:57 -08:00
Jarred Sumner
7df50add99
Fixes https://github.com/oven-sh/bun/issues/1695
2023-01-03 19:34:58 -08:00
Jarred Sumner
c99059db9f
Remove usages of std.x
2023-01-03 18:53:40 -08:00
Alex Lam S.L
237bcdf99f
[streams] speed up Readable in some cases ( #1708 )
...
If `encoding` is set, no `Buffer`s would be exposed thus `Uint8Array` can be used directly.
- fix data corruption in `BufferList.concat()`
- fix segfaults in `BufferList.join()`
2023-01-03 16:08:28 -08:00
Jarred Sumner
0b395ca1dc
Fix crash in BufferList
2023-01-03 13:47:05 -08:00
Jarred Sumner
c1fd06c56d
Create readme.md
2023-01-03 13:11:44 -08:00
Jarred Sumner
f79301c620
Implement napi_make_callback
2023-01-03 12:36:56 -08:00
Jarred Sumner
4ae33cbf45
Stub out missing napi functions and include error message
2023-01-03 10:55:13 -08:00
Jarred Sumner
59655d0587
Fix spec issue with napi_get_typedarray_info
2023-01-03 10:32:22 -08:00
Alex Lam S.L
7edaf736a2
[socket] handle connectError ( #1705 )
...
assorted clean-ups & fixes
2023-01-02 23:06:45 -08:00
Jarred Sumner
c770db7d52
make it work with homebrew zig
2023-01-02 22:06:52 -08:00
Jarred Sumner
cbc015d8d8
[internal] allow using zig from more directories
2023-01-02 21:26:02 -08:00
Alex Lam S.L
18e143ae7b
fix double resolve() in test ( #1707 )
...
also clean up `reject()` values
2023-01-02 20:19:44 -08:00
Jarred Sumner
8989a1883e
Support any ArrayBufferView in StringDecoder
2023-01-02 15:39:44 -08:00
Alex Lam S.L
983b747020
implement net.Socket ( #1701 )
...
- support TCP sockets for now, i.e. no IPC
- extra features like keep-alive, no-delay etc. are absent due to limitations of uSockets
- fix `jest` to treat `done(nullish)` as success
2023-01-02 14:55:01 -08:00
Jarred Sumner
1ba95a65ee
Make the error message for unsupported dependency type a little clearer
2023-01-02 14:52:35 -08:00
Jarred Sumner
54b8cbd972
Add buffer creation snippet
2023-01-02 14:52:06 -08:00
Jarred Sumner
4eb9e8bb5a
update node echo bench
2023-01-02 13:23:08 -08:00
Jarred Sumner
80c2da73ef
Upgrade simdutf
...
Thanks @lemire
2023-01-02 12:48:44 -08:00
Jarred Sumner
4ba564dbf1
More instructions
2023-01-02 11:50:47 -08:00
Jarred Sumner
5fc8bc8f04
Update macOS instructions
2023-01-02 11:37:50 -08:00
Jarred Sumner
9fd3b5587b
Auto-install and link webkit
2023-01-02 11:29:22 -08:00
Alex Lam S.L
04b00229cf
fix lingering process by dead sockets ( #1700 )
...
`Bun.listen()` and `Bun.connect()` would create sockets that under certain conditions with calls to `.end()` or `.stop`, prevents the process from exiting gracefully.
2023-01-02 02:24:23 -08:00
Alex Lam S.L
8a29c64302
clean up Promise handling ( #1697 )
2023-01-01 16:37:45 -08:00
Jarred Sumner
2345e268bc
Fix bun --cwd after https://github.com/ziglang/zig/pull/13596
2023-01-01 13:34:50 -08:00
Jarred Sumner
97066d034d
Add workaround
2023-01-01 12:37:00 -08:00
Jarred Sumner
5f24c8a4a8
Bump
2023-01-01 12:04:55 -08:00
Jarred Sumner
96438a4d58
test crypto.randomBytes returns a Buffer
2023-01-01 12:04:49 -08:00
Jarred SUmner
5b3cf8bec5
Handle extremely unlikely edgecase
2023-01-01 07:21:08 -08:00
Jarred SUmner
c02b921983
Fix linux build issue
2023-01-01 07:20:35 -08:00
Jarred SUmner
0b0aadfc5f
Make asPromise() and asInternalPromise() safer, but slower
2023-01-01 07:20:16 -08:00
Jarred Sumner
905aff3cfc
Update bindings.zig
2023-01-01 02:19:34 -08:00
Jarred Sumner
9e6d39bae6
[internal] Add more bindings
2023-01-01 02:19:11 -08:00
Jarred Sumner
f651f74f9d
Add a test for empty chunks
2023-01-01 01:33:13 -08:00
Jarred Sumner
01b908ad64
Workaround https://github.com/ziglang/zig/issues/14148
2023-01-01 01:32:40 -08:00
Gabriel Wu
8a2729e75f
Update ffi.d.ts ( #1694 )
...
* Update ffi.d.ts
Add "usize" and "callback", which are used in `README` but not typed here.
* Update packages/bun-types/ffi.d.ts
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-12-31 23:03:45 -08:00
Alex Lam S.L
9b3db96308
[jest] fix and improve hooks ( #1689 )
...
- wait for async hooks to complete before running tests
- add support for `done(err)` callbacks in hooks
fixes #1688
2022-12-31 03:14:23 -08:00
Jarred Sumner
b86915c808
[internal] Add flag to build bun for editor error reporting
2022-12-30 22:37:28 -08:00
Jarred Sumner
be706fecb4
Make NamesIterator safer
2022-12-30 21:30:23 -08:00
Jarred Sumner
2e94d1a033
Statically link libatomic
2022-12-30 20:27:01 -08:00
Jarred Sumner
fc6c4bbefb
Upgrade WebKit
2022-12-30 06:33:22 -08:00
Jarred Sumner
2fc6913085
More assertions
2022-12-30 04:46:52 -08:00
Jarred Sumner
f444e628ca
Don't use zig's memcpy function
...
It is very slow
2022-12-30 04:46:52 -08:00
Jarred Sumner
42be4e52fe
Use ArrayBitSet that passes by reference instead of value
2022-12-30 04:46:52 -08:00
Jarred Sumner
385c81d67b
Fix crash with bun install <foo>
2022-12-30 04:46:52 -08:00
Jarred SUmner
8b0a7b9fb8
Set CLOXEC
2022-12-29 21:53:04 -08:00
Jarred SUmner
2c5e1cb7d7
Fix broken hardlink installs
2022-12-29 21:46:32 -08:00
Jarred SUmner
7be1e85c6d
Fix OOB when deinit'ing dir walker
2022-12-29 21:46:15 -08:00
Jarred Sumner
4cc9a43089
Update globals.d.ts
2022-12-29 06:18:38 -08:00
Jarred Sumner
01c81a5f57
[node:crypto] 50x faster createHash
2022-12-29 06:05:43 -08:00
Jarred Sumner
85eda20587
Introduce Bun.CryptoHasher
2022-12-29 06:05:43 -08:00
Jarred Sumner
940ecd05a8
[node] Implement process.uptime and process.umask
2022-12-29 06:05:43 -08:00
Jarred Sumner
7c8a196c76
[bun-types] Add missing performance.timeOrigin type
2022-12-29 06:05:43 -08:00
Sam Hughes
79a2f81447
Fix devcontainer (tested) ( #1680 )
...
zls changes may be imprecise.
2022-12-28 22:53:07 -08:00
Jarred Sumner
0504bb8984
Expose the rest of RIPEMD160
2022-12-28 22:24:37 -08:00
Jarred Sumner
d726a17aca
Implement Bun.RIPEMD160
...
`RIPEMD160` is used by node:crypto.
2022-12-28 22:20:15 -08:00
Jarred Sumner
33e93e6789
Use BoringSSL with patches from Electron
2022-12-28 22:18:16 -08:00
Jarred Sumner
c8da2618ee
✂️
2022-12-28 19:28:12 -08:00
Jarred Sumner
8e9af05d6a
[WebSocket] Allow http: and https: protocols
...
See https://github.com/whatwg/websockets/pull/37
2022-12-28 18:41:07 -08:00
Jarred Sumner
ba0b5baee4
[WebSocket] Implement headers support
...
Fixes https://github.com/oven-sh/bun/issues/1676
2022-12-28 18:39:19 -08:00
Jarred Sumner
384a9cda5e
Fix devcontainer (probably)
2022-12-28 18:00:03 -08:00
Jarred Sumner
97ec866f85
Fixes https://github.com/oven-sh/bun/issues/1677
2022-12-28 17:00:04 -08:00
Jarred Sumner
ef3c9b7c6d
Workaround https://github.com/ziglang/zig/issues/14099
2022-12-28 06:09:14 -08:00
Jarred Sumner
6260aaac5f
Add crypto module from browserify
2022-12-28 05:14:40 -08:00
Jarred Sumner
d3dab09690
Statically link atomic
2022-12-28 05:10:16 -08:00
Jarred Sumner
f8f8353108
Always bundle compiler rt
2022-12-28 05:09:51 -08:00
Jarred Sumner
66234d9d57
Move some code up
2022-12-28 04:24:07 -08:00
Jarred Sumner
3d60b870ee
Fix ReadableStream.pipeTo
2022-12-28 03:43:39 -08:00
Jarred Sumner
3ae23091c6
Fix platform setting
2022-12-28 02:16:34 -08:00
Alex Lam S.L
092b86321c
log object string correctly ( #1674 )
...
use `Symbol.toStringTag` of the object or that of its `.prototype`
fixes #1584
2022-12-28 01:21:21 -08:00
Jarred Sumner
da07811427
Fix build issue on latest zig
2022-12-28 01:05:24 -08:00
Jarred Sumner
c0dd284136
Upgrade to latest Zig ( #1610 )
...
* @min and @max
* builtins and some trivial ones
* Most of them
* more
* more!
* More Progress
* wip
* Update tagged_pointer.zig
* Update http_client_async.zig
* Most of the iterable dir changes
* alright
* Remove usages of deprecated formatters
* 📷
* fmt
* Update shimmer.zig
* wip
* wip
* wip
* progress
* more
* Latest
* stuck on error
* latest
* workaround stage2
* wip
* Update string_immutable.zig
* wip
* Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings
* Fix build errors
* Fixup most of the test failures
* Fix `make headers`
* Fix "outside package path" error
* Fixup aligned alloc
* Add missing file
* linux
* More linux fixes
* use latest peechy
* Fix transpiler test failure
* Forgot about these
* Fixup test failure
* Update node-timers.test.ts
* [node:htt] Fix `undefined is not an object` error
Fixes https://github.com/oven-sh/bun/issues/1618
* Update http.exports.js
* Make this test less flaky
* fix hashes
* Fix hex formatting and zls issues
* Download zig version
* Update Dockerfile
* Update Dockerfile
* Update uws
* Update Dockerfile
* Set llvm version
* Update README.md
* Update uws
* Update Dockerfile
* Update io_linux.zig
* Update bun.zig
* Log output
* workaround strange @cInclude error
* Make ffi tests better
* Don't use cImport
* Update c.zig
* Update c-bindings.cpp
* call setOutputDir
* Update Dockerfile
* Use a longer name
* latest
* Update serve.test.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Veikka Tuominen <git@vexu.eu >
2022-12-28 00:51:22 -08:00
Alex Lam S.L
504972fa5d
[bundler] fix logging verbosity ( #1671 )
...
fixes #1666
2022-12-27 16:36:26 -08:00
Alex Lam S.L
f78f423d0b
emit 206 Partial Content only for partial response ( #1670 )
...
fixes #1668
2022-12-27 16:34:33 -08:00
Alex Lam S.L
c4ca4c70d1
[install] specify auth-type ( #1667 )
2022-12-26 15:15:58 -08:00
Alex Lam S.L
d94b96d9f4
[install] use specified base URL as default fallback within scopes ( #1665 )
2022-12-26 00:25:59 -08:00
Alex Lam S.L
74251fbf5e
[install] use default URL when only auth token is specified ( #1664 )
...
Previously it would default to `http://localhost/ ` which was inconsistent with the case sans token.
Use official `npm` registry as fallback in both cases.
2022-12-25 21:20:35 -08:00
Dylan Conway
08a738c6c8
always more packages at new depth
2022-12-23 15:21:03 -08:00
Dylan Conway
cc369ad9d0
fix bun pm ls connectors when node_modules is last
2022-12-23 15:13:09 -08:00
Jarred Sumner
a94bba6399
darken
2022-12-23 01:16:12 -08:00
Jarred Sumner
f6a62c01bf
Cherry-pick #1638
...
Closes #1638
2022-12-23 00:59:41 -08:00
Jarred Sumner
979074de2b
Prevent running compinit twice
2022-12-23 00:50:19 -08:00
Jarred Sumner
958504296d
Disable optimization
2022-12-23 00:48:24 -08:00
Dylan Conway
75a3c25ff8
add node_modules to bin path
2022-12-23 00:04:51 -08:00
Jarred Sumner
3da9c728d6
Make bun pm ls only show top-level by default
2022-12-22 23:38:56 -08:00
Jarred Sumner
85733abe79
npx -> bunx
2022-12-22 23:37:18 -08:00
Jarred Sumner
89625c0cc8
add rome
2022-12-22 19:49:56 -08:00
Alex Lam S.L
2d881b88f9
[install] fix remaining corner cases with dependency resolution ( #1649 )
2022-12-22 19:42:06 -08:00
Colin McDonnell
9ef33312b1
Update bench ( #1648 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-12-22 19:02:59 -08:00
Dylan Conway
1d58da3cb3
fix finding package bin after install
2022-12-22 18:54:02 -08:00
Dylan Conway
c0dee9adf1
pass callback to super _construct if possible
2022-12-22 16:10:58 -08:00
Dylan Conway
afd66c62ff
fix createReadStream hang
...
highWaterMark test not working correctly but this prevents createReadStream from hanging
2022-12-22 15:58:17 -08:00
Alex Lam S.L
57da449442
[install] avoid dependency conflicts between siblings ( #1647 )
...
- consider `peerDependencies` when hoisting packages
2022-12-22 15:19:21 -08:00
Alex Lam S.L
62d1e46b92
fix bun install dependency resolution ( #1643 )
...
- avoid conflicts due to hoisted placement when parent and child depends on different versions of the same package
2022-12-22 03:17:33 -08:00
Jarred Sumner
b988a63429
don't log for ctrl + c
2022-12-22 00:25:31 -08:00
Jarred Sumner
e322dfb589
woops
2022-12-21 22:28:59 -08:00
Jarred Sumner
989ac717fc
Update launch.json
2022-12-21 14:57:04 -08:00
Jarred Sumner
3ceb2655d8
Add test for stat()
2022-12-21 14:57:04 -08:00
Jarred Sumner
8c3a2ff6cc
Fix throw
2022-12-21 14:57:04 -08:00
Jarred Sumner
b9d143c99d
Add section about --bun
2022-12-21 14:57:04 -08:00
Jarred Sumner
f40d6bd94d
Bun v0.4.0
2022-12-21 14:57:04 -08:00
Ethan Burrell
4f7d06500c
fix jest hooks in bun-test ( #1639 )
...
* fix(jest) fix broken jest hooks
* add tests
2022-12-21 14:36:44 -08:00
Jarred Sumner
f6bbfa7e40
[bunx] Install symlink with completions
...
@colinhacks lmk if you have ideas where else it should attempt to isntall:
1) same dir as `bun`
2) $BUN_INSTALL/bin/bunx
3) $HOME/.bun/bin/bunx
4) $HOME/.local/bin/bunx
2022-12-21 00:58:14 -08:00
Jarred Sumner
435fdbfddc
[bunx] Make help a little prettier
2022-12-21 00:56:50 -08:00
Jarred Sumner
83602b6834
Refactor some of bun pm
2022-12-20 23:28:11 -08:00
Jarred Sumner
3b808f5ac5
Update ZigGlobalObject.cpp
2022-12-20 22:11:41 -08:00
Jarred Sumner
aaf1624346
typo
2022-12-20 22:07:04 -08:00
Jarred Sumner
a98e0adc7d
[web] Support multiple arguments in setTimeout, setInterval, and setImmediate
2022-12-20 22:05:47 -08:00
Alex Lam S.L
06487ef64f
add tests for #1633 ( #1635 )
...
- `setImmediate(fn, ...args)`
- `setInterval(fn, delay, ...args)`
- `setTimeout(fn, delay, ...args)`
2022-12-20 21:34:25 -08:00
Jarred Sumner
b2fdcad77b
[bunx] Improve reliability by checking the "bin" from package.json if necessary
2022-12-20 21:33:34 -08:00
Jarred Sumner
51f9a91736
Fixes https://github.com/oven-sh/bun/issues/1636
2022-12-20 21:09:46 -08:00
Jarred Sumner
d7b73dd4fc
Use endsWith
2022-12-19 23:37:53 -08:00
Jarred Sumner
5931e350cd
New subcommand: bunx ( #1634 )
...
* Implement `bunx`
* copy cleanup
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-19 23:05:12 -08:00
Jarred Sumner
e7a14f857d
[Bun.write] Slightly better handling for older linux kernels that lack io_uring support
...
If io_uring is unsupported, we do the writes synchronously even if they're huge
2022-12-19 12:20:59 -08:00
Jarred Sumner
79abd245e2
Regenerate builtins
2022-12-18 08:52:50 -08:00
Alex Lam S.L
2b622162ef
bug compatible with stdin.on("readable") ( #1626 )
2022-12-17 22:37:45 -08:00
Jarred Sumner
5a3e0836b1
Upgrade WebKit
2022-12-17 17:02:56 -08:00
Jarred Sumner
24c4d92c0b
Update globals.d.ts
2022-12-17 16:18:01 -08:00
Jarred Sumner
184c56704b
Add warning in import.meta.require
2022-12-17 16:15:58 -08:00
Jarred Sumner
feea8824f1
Delete Oniguruma ( #1625 )
...
* Update .gitmodules
* Delete oniguruma
* Delete Oniguruma
* Make this test less flaky
* ✂️
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-17 15:41:47 -08:00
Jarred Sumner
028e48ed97
Missing from commit
2022-12-17 14:38:54 -08:00
Jarred Sumner
609222d05e
Fixes https://github.com/oven-sh/bun/issues/1624
...
This was disabled anyway
2022-12-17 14:37:37 -08:00
Jarred Sumner
5d91922c5d
Regenerate builtins
2022-12-17 12:31:07 -08:00
Jarred Sumner
d66831c4f3
Update transpiler.test.js
2022-12-17 12:26:19 -08:00
Jarred Sumner
7f1caaaa44
Update WebKit
2022-12-17 12:26:19 -08:00
Jarred Sumner
42fc49d413
Add node:assert bench
2022-12-17 12:26:19 -08:00
Jarred Sumner
72970ecd15
Update Makefile
2022-12-17 12:26:19 -08:00
Jarred Sumner
f9b573aa89
[bun-types] Add optional param to Bun.deepEquals
2022-12-17 12:26:19 -08:00
Jarred Sumner
bbf8a17bf5
Use Bun.deepEqual in assert module
2022-12-17 12:26:19 -08:00
Jarred Sumner
8c8accf968
Use Buffer.isBuffer and node:util/types in util module
2022-12-17 12:26:19 -08:00
Jarred Sumner
24be0f4fc5
Implement node:util/types
...
Fixes #1617
2022-12-17 12:26:19 -08:00
Jarred Sumner
e59c6f642d
Add strict option to Bun.deepEquals
2022-12-17 12:26:19 -08:00
Jarred Sumner
1bdb4b2466
[napi] Fix assertion failure when argv is null
2022-12-17 12:26:19 -08:00
Hossein Pourdavar
ca0ab9508f
docs(README.md): specify bun-types new path ( #1622 )
2022-12-17 10:34:35 -08:00
Alex Lam S.L
68fd43313d
add tests for process.stdin ( #1621 )
2022-12-16 20:40:41 -08:00
Ikko Ashimine
b06ca07eee
Fix typo in bun.d.ts ( #1619 )
...
occured -> occurred
2022-12-16 10:36:07 -08:00
Jarred Sumner
01ed3045cb
[napi] Implement napi_create_bigint_words
...
warning: not tested
2022-12-16 00:40:08 -08:00
Jarred Sumner
6b3be4d821
[js parser] Workaround symbol collision bug
...
See https://github.com/oven-sh/bun/issues/1616
Fixes https://github.com/oven-sh/bun/issues/1594
2022-12-15 23:42:08 -08:00
Jarred Sumner
e399bceb3c
[js parser] Skip appending empty statements
2022-12-15 23:41:40 -08:00
Jarred Sumner
a8fca7d679
[js parser] Make fnBodyContainsUseStrict faster
2022-12-15 23:41:24 -08:00
Jarred Sumner
b249d1b75b
[js parser] Ignore calls to import.meta.require that will never happen
2022-12-15 23:39:59 -08:00
Jarred Sumner
3495b7c1f8
[bun-types] Remove outdated comments
2022-12-15 21:48:50 -08:00
Jarred Sumner
3c20290e49
[js parser] Fix bug where const {resolve} = require throws "require is not defined"
2022-12-15 21:48:38 -08:00
Jarred Sumner
0df3485132
[js printer] Fix missing space when printing import aliases with whitespace minification enabled
2022-12-15 21:40:56 -08:00
Jarred Sumner
3ea983578f
[node:process] Implement process.argv0, process.execPath
...
Fixes https://github.com/oven-sh/bun/issues/1599
2022-12-15 17:31:18 -08:00
Jarred Sumner
000a0c9dca
Fix missing error when command not found
2022-12-15 17:03:08 -08:00
Jarred Sumner
c1d7ec9564
[node:process] Implement process.abort()
2022-12-15 16:28:47 -08:00
Jarred Sumner
9e909dcae1
[bun run] Include signal code on error
2022-12-15 16:28:47 -08:00
Jarred Sumner
3c1ad4b568
prettier
2022-12-15 16:28:47 -08:00
Jarred Sumner
743531b4ac
[bun run] Introduce --bun flag to run in bun instead of node
2022-12-15 16:28:47 -08:00
Jarred Sumner
d1834b5a92
[process.stdin] Support reading from process.stdin in the same tick
2022-12-15 16:28:47 -08:00
Jarred Sumner
e38a3e5d85
[bun run] Use execve instead of posix_spawn when bun no longer needs to run script/bin
...
When we launch a script & there's nothing left to do, we should replace the process image with the new process instead of keeping the bun process alive while the other script is running.
2022-12-15 16:28:47 -08:00
Derrick Farris
6a1fc20835
fix(stream): make Readable.read work w/o _construct implemented ( #1613 )
...
* fix(stream): put Readable._readableState.constructed default in spec (true, not false)
* cleanup(readable): remove unnecessary _construct methods
* test(stream): add test for Readable w/o _construct method
2022-12-15 00:25:19 -08:00
Dylan Conway
95c747f598
undo bad free
2022-12-14 17:50:14 -08:00
Dylan Conway
65302a1db5
remove incorrect connector character
2022-12-14 14:01:03 -08:00
Dylan Conway
c4557e57a1
add bun pm ls for printing lockfiles ( #1612 )
...
* list directory structure from lockfile
* dim connectors and versions
2022-12-13 22:47:46 -08:00
Jarred Sumner
f61d9e340d
[bun:jsc] Introduce profile function
2022-12-13 20:47:51 -08:00
Jarred Sumner
47a2548cbf
Fix crash in startSamplingProfiler
2022-12-13 20:39:49 -08:00
Jarred Sumner
5516adec57
Avoid creating closure
2022-12-13 19:16:51 -08:00
Alex Lam S.L
4e920d73b7
make process.stdin work under TTY ( #1611 )
...
- workarounds for #1607 & #1608
fixes #1604
2022-12-13 19:02:20 -08:00
Jarred Sumner
a92258355d
Don't call debug streams getter when not in debug
2022-12-13 19:01:25 -08:00
Jarred Sumner
5bbaa7b400
Fix bug where importing a binary file throws a SyntaxError. Instead, return the public path for that file
2022-12-13 18:17:26 -08:00
Jarred Sumner
de8ace9fbe
Add a test for importing unknown file types as file loader
2022-12-13 18:17:26 -08:00
Ashcon Partovi
375f69559f
Move bun-landing to another repository
2022-12-13 17:25:46 -08:00
Jarred Sumner
7d15a040fd
Add missing if
2022-12-13 15:12:14 -08:00
Dylan Conway
3236a99b2d
missing id when over 8 packages
2022-12-13 11:37:50 -08:00
Jarred Sumner
18d4cfd4f2
Update build-id
2022-12-13 11:34:29 -08:00
Jarred Sumner
6255fe6a4b
[internal] Add bun-debug build
2022-12-13 00:16:01 -08:00
Jarred Sumner
dd9691289f
Don't use zls for formatting
2022-12-13 00:15:50 -08:00
Jarred Sumner
e98aae195c
fix UB
2022-12-13 00:15:41 -08:00
Jarred Sumner
5741d4f9b4
[crypto] Implement scryptSync
...
Fixes https://github.com/oven-sh/bun/issues/1228
2022-12-13 00:15:29 -08:00
Jarred Sumner
1bed749d8c
some bugs make you feel like a 🤡
2022-12-12 22:39:15 -08:00
Jarred Sumner
bbe66a4367
Add missing space
2022-12-12 19:29:25 -08:00
Jarred Sumner
f649aae36f
[crypto] Implement crypto.timingSafeEqual
...
This uses BoringSSL's memcmp function
Fixes https://github.com/oven-sh/bun/issues/1308
2022-12-12 19:29:25 -08:00
Derrick Farris
9f9db85a94
fix(stream): Fix Readable.pipe() ( #1606 )
...
* fix(stream): fix some debug logs that were breaking .pipe
* fix(stream): another debug fix
* test(stream): add test for .pipe
2022-12-12 18:58:28 -08:00
Dylan Conway
bbc2dacd84
markbinding for utf8 length from utf16le
2022-12-12 13:41:55 -08:00
Dylan Conway
0bb9493e47
fix fallback install method
2022-12-12 13:38:12 -08:00
Jarred Sumner
14efd03b48
📷
2022-12-12 00:40:00 -08:00
Jarred Sumner
d5b11be769
[internal] Add helper to make it easier to print whitespace
2022-12-12 00:28:37 -08:00
Jarred Sumner
007133d060
[Transpiler] Implement minifyWhitespace option
2022-12-11 23:28:53 -08:00
Jarred Sumner
6279358cbc
[internal] further cleanup for hoistSymbols
2022-12-11 20:25:20 -08:00
Jarred Sumner
ca34a09a4d
fixup
2022-12-11 19:29:27 -08:00
Jarred Sumner
b746579863
[internal] Change HashMap implementation for storing symbols
2022-12-11 18:41:54 -08:00
Jarred Sumner
8549134658
[Bun.Transpiler] Introduce inline flag
2022-12-11 16:38:52 -08:00
Jarred Sumner
27e40b0836
Update WebKit
...
cc @cirospaciari you will need to re-download the precompiled WebKit build from the releases page https://github.com/oven-sh/WebKit/releases/tag/dec11 because there is one small WebKit API change. LMK if you have any trouble with that
2022-12-11 16:14:53 -08:00
Jarred Sumner
b57f51fda2
Add a test for some scopes
2022-12-11 14:18:09 -08:00
Jarred Sumner
fad1742410
[transpiler] Never trim exports
2022-12-11 13:55:31 -08:00
Jarred Sumner
768f4539e8
[transpiler] Fix unbalanced class_name scope
...
surprised this was never caught sooner
2022-12-11 13:55:15 -08:00
Jarred Sumner
37b16a9007
Add _read
2022-12-11 13:01:41 -08:00
Jarred Sumner
a2d96f9040
Fix checking the UTF-16 length twice
2022-12-11 13:01:24 -08:00
Jarred Sumner
b5519af7e7
cleanup some tests
2022-12-11 12:58:48 -08:00
Jarred Sumner
9d94f148dc
Avoid re-visting AST nodes which create scopes
2022-12-11 11:55:06 -08:00
Jarred Sumner
5cf64b07be
Fix segfault in release mode when module list is empty
2022-12-10 22:25:33 -08:00
Jarred Sumner
e301fde96d
Include isTTY in types
2022-12-10 22:25:19 -08:00
Jarred Sumner
2a7687fff8
Regenerate builtins
2022-12-10 22:24:34 -08:00
Alex Lam S.L
780f7de843
override process.stdin.on() correctly ( #1603 )
...
* override `process.stdin.on()` correctly
fixes #1601
* add tests
2022-12-10 21:51:02 -08:00
Jarred Sumner
660eb46b17
[transpiler] Improve constant propagation
2022-12-10 21:36:14 -08:00
Jarred Sumner
c6f3044654
[transpiler] Fix issue with async macros in bun build
2022-12-10 15:30:09 -08:00
Jarred Sumner
b374c67c16
[transpiler] Fix bug with === on statically-known rope strings
2022-12-10 15:29:53 -08:00
Jarred Sumner
ce960f9506
♻️
2022-12-10 00:37:32 -08:00
Jarred Sumner
ab49f95ef2
📷
2022-12-10 00:19:19 -08:00
Jarred Sumner
047754d5dd
Implement simple version of inlining single-use expressions and statements
2022-12-10 00:19:19 -08:00
YuX
b400dfb386
fix path string ( #1597 )
2022-12-09 18:17:12 -08:00
Jarred Sumner
88538b7c2c
Deprecate very incomplete Solid.js JSX transform
...
We don't have time to do a good job of this and Bun.plugin makes it possible to use Solid with Bun
2022-12-09 16:41:38 -08:00
Jarred Sumner
79138c4c7c
Add "bun" to list
2022-12-09 16:10:33 -08:00
Colin McDonnell
24fbcb8f52
Exclude other ts declaration file extensions ( #1596 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-12-09 14:26:33 -08:00
Jarred Sumner
51e437e8a0
EventEmitter - return original this value for better chainability
2022-12-08 18:27:16 -08:00
Colin McDonnell
e6c2f48895
Add filename completions on naked bun command ( #1593 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-12-08 17:32:25 -08:00
Ashcon Partovi
cf961336d0
Update install issue template
2022-12-08 09:50:03 -08:00
Ashcon Partovi
b44615a916
Improve bug report issue template
2022-12-08 09:49:19 -08:00
Ashcon Partovi
fd740d41e5
Fix issue template for docs
2022-12-08 09:44:55 -08:00
Ashcon Partovi
46a9b124f5
Remove needs-repro label from issue template
2022-12-08 09:33:59 -08:00
Simon He
7c2180194c
chore: add eslintcache ( #1586 )
2022-12-07 22:03:11 -08:00
Jarred Sumner
3150ff49a7
fix dirname on an empty string
2022-12-07 21:41:30 -08:00
Jarred Sumner
2fe5b4da2f
📷
2022-12-07 21:41:30 -08:00
Dylan Conway
0b94ccdf8c
disable assignment on user specified assigns
2022-12-07 21:29:32 -08:00
Dylan Conway
845421c44b
fix __require linker collision ( #1585 )
2022-12-07 20:39:55 -08:00
Jarred Sumner
42ea8b2402
[node:events] EventEmitter#on and EventEmitter#off should return the EventEmitter instance
2022-12-07 14:06:18 -08:00
Jarred Sumner
a13e64c286
Update html_rewriter.zig
2022-12-07 00:37:40 -08:00
Derrick Farris
60d0e6b73f
fix(stream): Fix Transform class constructor fn ( #1583 )
...
* fix(stream): fix ReadableFromWeb class, fix Transform
* test(stream): add tests for .call on stream constructors
2022-12-07 00:18:10 -08:00
Jarred Sumner
a315ee7e03
try
2022-12-06 22:31:26 -08:00
Jarred Sumner
57672eb266
try
2022-12-06 22:29:21 -08:00
Jarred Sumner
511c0ab386
Fix aarch64
2022-12-06 22:17:55 -08:00
Dylan Conway
d9306c2681
first_non_ascii != offset
2022-12-06 21:46:20 -08:00
Dylan Conway
aa17f97d13
fix failing text decoder test
2022-12-06 21:04:38 -08:00
Jarred Sumner
e547efbf4a
Don't call getters in console.log
2022-12-06 20:20:08 -08:00
Jarred Sumner
3d243e5e95
Fix node:stream/consumers
2022-12-06 19:56:36 -08:00
Colin McDonnell
5ea8fe8c90
Update types ( #1581 )
...
* Fix TS types, improve child_process types
* Add prettier
* Add ArrayBuffer types
* Add namespace Bun, improve types for SharedArrayBuffer, add toStrictEqual
* Improve types, add test files for types
* Update type tests
* Fix typo
* Add stdio
* Stdio types
* Use latest setup-bun
* Update action
* Update action
* Update action
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
2022-12-06 18:48:02 -08:00
Dylan Conway
84b2cc1739
fix child process test
2022-12-06 18:15:20 -08:00
Jarred Sumner
15ce587fa2
Update glibc-versions-hack.cpp
2022-12-06 18:10:17 -08:00
Dylan Conway
20a4b72ff4
add base64url switch case
2022-12-06 17:36:24 -08:00
Jarred Sumner
41d778fbfb
dlsym pow
2022-12-06 17:21:07 -08:00
Dylan Conway
5f3a6f2bf3
add server scheduleDeinit, ignore logs in test
2022-12-06 17:10:14 -08:00
Jarred Sumner
58185e139a
Add check
2022-12-06 17:08:21 -08:00
Dylan Conway
51d69d8c85
fix event emitter cast
2022-12-06 16:25:39 -08:00
Jarred Sumner
4dd2cb33b7
Ban statx
2022-12-06 15:48:41 -08:00
Jarred Sumner
31f025fa02
Add snippet
2022-12-06 14:18:25 -08:00
Jarred Sumner
81317a52ea
Fix glibc symbol version issues preventing bun install from being used in older glibc versions ( #1580 )
...
* Prevent integer overflow in connectError
* Add missing deepEquals() type to Bun
* fix missing glibc symbols
* Fix missing symbol issues
* Try this
* Update glibc-versions-hack.cpp
* Update glibc-versions-hack.cpp
* Update glibc-versions-hack.cpp
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-06 14:14:27 -08:00
Derrick Farris
7d29782896
cleanup/fix(stdio,child_process): bug fixes, refactoring, etc. ( #1574 )
...
* fix(stream): add back call to Error.captureStackTrace, remove stray garbage
* cleanup(streams): remove unnecessary checks on Promise.then
* fix(child_process): WrappedFileSink -> NativeWritable for ChildProcess stdio
* cleanup(child_process): remove debug id
* fix(child_process): fix process.nextTick not working in onExit, fail to flush stdio
* refactor(streams): revert stream impls to functions from classes
* fix(child_process): revert runOnNextTick to process.nextTick
2022-12-06 13:26:39 -08:00
Dylan Conway
1aa4cd2f6a
9 characters
2022-12-05 19:42:49 -08:00
Jarred Sumner
c7f411bd88
Use more simdutf
2022-12-05 17:14:29 -08:00
Dylan Conway
60e6a47bb0
fix for double free and undefined this
2022-12-05 16:41:55 -08:00
Jarred Sumner
d9dc15115c
linx build issue
2022-12-05 15:23:45 -08:00
Jarred Sumner
159ee8ddfc
indexOfLine type
2022-12-05 14:11:23 -08:00
Jarred Sumner
84634117a9
Missing commit
2022-12-05 14:11:05 -08:00
Jarred Sumner
5ea278e1c6
Update README.md
2022-12-05 12:12:35 -08:00
Jarred Sumner
9e29159f44
More null checking for simdutf
2022-12-05 12:06:24 -08:00
Jarred Sumner
e23832d1ce
Fix regression
2022-12-05 12:05:16 -08:00
Jarred Sumner
9665d7d216
Add some more text decoder tests
2022-12-05 11:37:04 -08:00
Jarred Sumner
c114956788
Fix crash when passing unexpected type to .writer()
2022-12-05 11:37:04 -08:00
Jarred Sumner
61bf957b99
Introduce console.write(text, or, arrayBufferLike)
2022-12-05 11:36:28 -08:00
Jarred Sumner
2cbac4bbdd
Introduce Bun.indexOfLine
2022-12-05 11:36:04 -08:00
Jarred Sumner
320c23543c
Fix alignment edgecase
2022-12-05 11:35:50 -08:00
Jarred Sumner
0ea8de4087
Make console an AsyncIterable
2022-12-05 11:35:34 -08:00
Jarred Sumner
7129303347
Update Process.h
2022-12-05 03:52:40 -08:00
Jarred Sumner
8582bc08ec
microbench
2022-12-05 03:52:35 -08:00
Jarred Sumner
eeea1707a1
process.stdin exists but doesn't totally work yet
2022-12-05 03:52:20 -08:00
Jarred Sumner
b7e08cb937
[Bun.stdin] Fix handling tty
2022-12-05 03:43:09 -08:00
Jarred Sumner
054413ba1f
[internal] Add some logs for string encoding
2022-12-05 03:38:45 -08:00
Jarred Sumner
04dcf180d5
Fix "is not event emitter" errror
2022-12-05 00:44:34 -08:00
Jarred Sumner
79094e6643
more tests for event emitter weirdness
2022-12-05 00:42:02 -08:00
Jarred Sumner
682af03cdc
"Fix" monkey-patching EventEmitter prototype
2022-12-05 00:19:23 -08:00
Jarred Sumner
1564f75d06
Update test-test.test.ts
2022-12-04 23:30:25 -08:00
Jarred Sumner
224f980081
[bun:test] Fix crash when test("foo") is called without passing a function
2022-12-04 23:29:21 -08:00
Jarred Sumner
2369bade48
Clean up more cases
2022-12-04 08:47:22 -08:00
Jarred Sumner
10cd5aaa15
Fix race condition in child_process
2022-12-04 08:32:51 -08:00
Jarred Sumner
f4668e45f8
Update ZigGeneratedClasses.cpp
2022-12-04 08:15:45 -08:00
Jarred Sumner
a1e62e6bf9
Handle exception when creating stdout/stderr
2022-12-04 08:15:39 -08:00
Jarred Sumner
e009be1c5d
Update ffi.zig
2022-12-04 08:15:07 -08:00
Jarred Sumner
af0bc28c51
Update child_process
2022-12-04 08:15:02 -08:00
Jarred Sumner
bb5450fad0
[breaking] onExit callback in Bun.spawn sets the first property to be the Subprocess object
...
Sometimes Bun.spawn calls the onExit callback before the Bun.spawn() callback is called.
Instead of delaying a tick, we set the `Subprocess` to be the first argument to the `onExit` callback now.
2022-12-04 08:11:44 -08:00
Jarred Sumner
5bb8c42bdb
[Bun.spawn] Introduce Subprocess.prototype.signalCode
2022-12-04 08:09:23 -08:00
Jarred Sumner
69114ac0a9
Fix console.log sometimes incorrectly reporting undefined
...
cc @Electroid
2022-12-04 08:05:57 -08:00
Jarred Sumner
8830cbc51e
[test] Ensure console.log(globalThis) doesn't crash
2022-12-04 06:55:12 -08:00
Jarred Sumner
23c90a76c2
Rename file
2022-12-04 06:54:56 -08:00
Jarred Sumner
714ce7619d
[internal] Make string comparisons faster
2022-12-04 06:53:53 -08:00
Jarred Sumner
34b2e9acc2
Fix running zig tests
2022-12-04 05:02:14 -08:00
Jarred Sumner
4c818b9364
Mildly faster startup time
2022-12-04 03:50:22 -08:00
Jarred Sumner
cee33485d0
✂️
2022-12-04 03:22:10 -08:00
Jarred Sumner
f052e66df5
Add some basic tests for process.stdout
2022-12-04 02:53:04 -08:00
Jarred Sumner
46e34a3fa9
Re-add missing global
2022-12-04 02:28:25 -08:00
Jarred Sumner
2bcae716d1
Silence incorrect test failure
2022-12-04 02:28:15 -08:00
Jarred Sumner
4281a68a2b
content-range is inclusive
2022-12-04 01:24:52 -08:00
Jarred Sumner
ab020b2275
Update README.md
2022-12-04 01:11:34 -08:00
Jarred Sumner
0617896d70
[Bun.serve] Implement Content-Range support with Bun.file()
2022-12-04 00:55:05 -08:00
Jarred Sumner
1c3cb22d1f
[may revert later] Coerce Infinity to max int 64, -Infinity & NaN to min int64
2022-12-04 00:53:52 -08:00
Jarred Sumner
275a635ad7
Update .gitignore
2022-12-03 23:57:50 -08:00
Jarred Sumner
35bf039dfb
[test] Add a couple tests for subarray toEqual
2022-12-03 23:57:13 -08:00
Jarred Sumner
de9a2b9fe5
[fetch] Fix bug where .arrayBuffer() on an empty Response body returned a Uint8Array instead of an ArrayBuffer
2022-12-03 23:56:40 -08:00
Jarred Sumner
201cbb20e4
Don't invalidate previous file descriptro to avoid tripping assertion
2022-12-03 08:26:53 -08:00
Jarred Sumner
8c51db0879
misc
2022-12-03 08:26:53 -08:00
Jarred Sumner
10b04fbd26
Add missing type
2022-12-03 08:26:53 -08:00
Jarred Sumner
bdc43c1696
process.stdout and process.stderr
2022-12-03 08:26:53 -08:00
Jarred Sumner
bc028168a8
simdutf ascii validation is about 20% faster on arm64 than our zig simd @Vector version
2022-12-03 08:26:53 -08:00
Reed Jones
00f428b627
typo in readme ( #1576 )
...
Succesfully => Successfully
2022-12-03 07:35:50 -08:00
Jarred Sumner
d28a4dbb00
Object.defineProperties snippet
2022-12-03 04:26:33 -08:00
Dylan Conway
0a30bf0212
make sure to not use incomplete characters ( #1575 )
2022-12-03 02:59:17 -08:00
Jarred Sumner
04658776e4
Push failing tests
2022-12-02 23:17:40 -08:00
Dylan Conway
369e9f3fbd
add deps for make test command
2022-12-02 22:36:23 -08:00
Jarred Sumner
1b7b37232e
Run promise before callback
2022-12-02 22:30:04 -08:00
Jarred Sumner
fe4f39fd17
Add AbortSignal.timeout
2022-12-02 20:48:57 -08:00
Dylan Conway
9cc03cd71a
matchers for less than and greater than ( #1573 )
...
* toBeGreaterThan with tests
* toBeGreaterThanOrEqual and tests
* toBeLessThan and toBeLessThanOrEqual with tests
* expect types
* switch expressions
2022-12-02 20:35:13 -08:00
Jarred Sumner
d9f9fc975b
Propagate reason in AbortSignal and reuse in ReadableStream.pipeTo
...
Similar to https://github.com/WebKit/WebKit/pull/7013
2022-12-02 20:15:50 -08:00
Jarred Sumner
bdbc0f23e7
Update TransformStream options getters to check for undefined
...
This is essentially copied from https://github.com/WebKit/WebKit/pull/7021
2022-12-02 20:00:27 -08:00
Jarred Sumner
ba6908aed7
Remove getSetCookie() from types
2022-12-02 19:35:35 -08:00
Jarred Sumner
4e6b905a98
Update test
2022-12-02 19:35:28 -08:00
Jarred Sumner
43f2a8eb85
Add some code I forgot to commit
2022-12-02 19:35:11 -08:00
Jarred Sumner
c72629d88a
Make cloning headers object faster
2022-12-02 19:34:43 -08:00
Jarred Sumner
33cf491fea
Add a userland way to hide stack frames
2022-12-02 19:33:59 -08:00
Jarred Sumner
2f917f7030
Make constructing headers from an existing headears faster
2022-12-02 19:33:45 -08:00
Jarred Sumner
207282862e
Throw if passing a header not named "set-cookie" to getAll
2022-12-02 19:33:36 -08:00
Jarred Sumner
3c054253e1
Remove getSetCookie
2022-12-02 19:33:22 -08:00
Jarred Sumner
2c0fd28e72
[node:event] Add captureRejectionSymbol
2022-12-02 09:05:11 -08:00
Derrick Farris
b8586b33da
feat(process): add process.{stdin, stdout, stderr} support ( #1495 )
...
* fix(stream): get Duplex working
* feat(process): add stdin,stdout,stderr in a semi-broken state (pipes??)
* test(NodeTestHelpers): fix test names
* test(NodeTestHelpers): add test for createDoneDotAll done called w error
* test(NodeTestHelpers): remove stray console.log
* fix(stream): fix bug in Duplex, Readable
* test(process.stdio): rename test
* fix(process.stdio): change onData listener to onReadable
* refactor(streams): add file-wide debug fn, destructure opts
* fix(child_process): check isCallable on promise
* fix: get stdio streams mostly working (mostly)
* fix(child_process): wait until stream is drained before calling end?
* fix(child_process): change to result?.then
* debug(child_process,streams): add EE id tracking, add shim for stdio after handle is dead
* test(child_process): fix double pipe test, temp fix for ChildProcess.kill() return val
* fix(child_process): remove immediate emit of exit on kill
* debug(streams): add more debug log
* debug(streams): add more debug logs part 2
* feat(streams,fs): add NativeWritable, adapt fs.WriteStream and fs.ReadStream to native
2022-12-02 08:25:13 -08:00
Jarred Sumner
beaf91590a
Tests for set-Cookie
2022-12-02 07:44:57 -08:00
Jarred Sumner
d84f79bcc1
[fetch] Implement Headers#getAll and Headers#getSetCookie()
...
This matches Deno's behavior (get() combines, iterator preserves the order, set and append combine), but implements both the Cloudflare Workers `getAll()` and the potential standard `getSetCookie` function. The rationale for choosing both is to better support libraries which check for `getAll` and also because `getSetCookie` seems a little confusing (names are hard)
This also makes `.toJSON` and JSON.stringify return an array for `Set-Cookie`
2022-12-02 07:42:44 -08:00
Dylan Conway
917cbc8d5d
incorrect name for matcher
2022-12-02 02:30:35 -08:00
Jarred Sumner
074f236994
make the test run faster
2022-12-02 02:17:12 -08:00
Jarred Sumner
03eb000ad6
delete these fixtures which are no longer relevant
2022-12-02 02:16:59 -08:00
Jarred Sumner
9a184c8279
Fix incorrect StringDecoder export test
2022-12-02 01:56:55 -08:00
Jarred Sumner
b53a332809
Fix running tests in older versions of bun
2022-12-02 01:56:41 -08:00
Jarred Sumner
a09b515a62
Skip flaky test
2022-12-02 01:56:25 -08:00
Jarred Sumner
8eddfc61a8
Add generic way to block on a promise
2022-12-02 01:56:12 -08:00
Jarred Sumner
37525db5cf
Faster test
2022-12-02 00:25:38 -08:00
Jarred Sumner
e9eb88355b
Close stdin earlier
2022-12-02 00:25:30 -08:00
Jarred Sumner
9f5564b4bc
Add file descriptor leak test
2022-12-02 00:25:08 -08:00
Jarred Sumner
931ba9ad49
Add file descriptor leak test
2022-12-02 00:23:29 -08:00
Jarred Sumner
851b8acb76
Fix incorrect panic in spawnSync
2022-12-02 00:05:33 -08:00
Jarred Sumner
7a158e68ae
Fix crash when macros return a Promise
2022-12-01 23:46:18 -08:00
Jarred Sumner
cb36b4d1ab
Fix double free in .json() and optimize UTF16 -> json slightly
2022-12-01 23:43:49 -08:00
Jarred Sumner
2621fbf206
Remove file blob caching
2022-12-01 23:42:57 -08:00
Jarred Sumner
d7ab2c04ec
Faster test
2022-12-01 23:42:13 -08:00
Jarred Sumner
f84f77d1ed
[streams] Handle empty state
2022-12-01 23:28:42 -08:00
Jarred Sumner
425f4b0de1
[fetch] Add test that invalid json rejects promise
2022-12-01 23:27:53 -08:00
Jarred Sumner
7b70ed52fa
[bun bun] Fix incorrect package.hash
2022-12-01 21:37:25 -08:00
Jarred Sumner
8cf1707cd3
[bun bun] Fix crash in canary
2022-12-01 21:37:09 -08:00
Jarred Sumner
9f4d7690ac
[fetch] Treat 302 like 303
2022-12-01 21:15:34 -08:00
Jarred Sumner
5854d39525
[fetch] Implement redirect: "manual"
2022-12-01 21:09:43 -08:00
Jarred Sumner
b4e6ca0462
ComptimeStringMap is faster than ExactSizeMatcher
2022-12-01 20:51:35 -08:00
Jarred Sumner
f408749182
Fix timers keeping process alive unnecessarily
2022-12-01 20:46:54 -08:00
Dylan Conway
92da72beb0
bun test toStrictEqual ( #1568 )
...
* toStrictEqual and bug fix in deepEqual
* rebase Remove some dead bindings code
* remove debugging test
* canGetIndexQuickly for array holes
* isStrict template
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-01 19:36:47 -08:00
Jarred Sumner
a896d6c46c
[bun:sqlite] ~15% perf improvement to all() and get()
2022-12-01 19:34:02 -08:00
Jarred Sumner
4eed310a45
3x faster TextEncoder.prototype.encodeInto
...
thanks to @Constellation for the tip
2022-12-01 18:51:16 -08:00
Jarred Sumner
1daa61a45f
Add test for DOMJIT call version of encodeInto
2022-12-01 18:40:56 -08:00
Jarred Sumner
03490afdb3
Fix crash in test runner with gc mode
2022-12-01 18:40:41 -08:00
Jarred Sumner
e1e5f8c43b
Include size of ArrayBuffer and others in GC timer scheduling
2022-12-01 02:36:51 -08:00
Jarred Sumner
b655d09387
Incorrect readme
2022-12-01 02:36:33 -08:00
Jarred Sumner
e0503faec7
Increase sensitivity of GC timers
2022-12-01 02:36:18 -08:00
Jarred Sumner
bddf523ac9
Reduce memory usage in Bun.serve() by up to 3x ( #1569 )
...
* Update WebKit
* Use 5x less memory in Bun.serve()
* Update Dockerfile.devcontainer
* Update async-overhead.mjs
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-01 02:34:15 -08:00
Dylan Conway
1506a25198
formatting and remove comment
2022-11-30 16:40:54 -08:00
Dylan Conway
1abc89e391
fix slow regex tests
2022-11-30 16:36:03 -08:00
Jarred Sumner
3cb462a3e6
Fix console.log regression with emoji
2022-11-30 07:28:48 -08:00
Jarred Sumner
f8b87e3ee2
Redirect imports to "readable-stream" -> "node:stream"
2022-11-30 07:21:27 -08:00
Jarred Sumner
e6f055e9fb
Accidentally deleted prompt as a result of the process.env changes
2022-11-30 06:16:59 -08:00
Jarred Sumner
f999bdca26
✂️
2022-11-29 23:56:52 -08:00
Jarred Sumner
e75ce84c37
Remove some dead bindings code
2022-11-29 23:49:11 -08:00
Jarred Sumner
b631ea7d72
import everything from "bun" where possible
2022-11-29 02:42:56 -08:00
Jarred Sumner
7b59d9d97c
Make .toInt64 faster
2022-11-28 23:48:04 -08:00
Jarred Sumner
d28247573c
Handle when the process already exited immediately
2022-11-28 23:48:04 -08:00
Dylan Conway
56884b5f1d
toHaveProperty and tests ( #1558 )
...
* toHaveProperty and tests
* emoji tests
2022-11-28 23:15:12 -08:00
Jarred Sumner
887496bcf9
Fix failing spawn() and spawnSync() tests
...
cc @ThatOneBro
2022-11-28 23:00:22 -08:00
Jarred Sumner
da43761032
Update README.md
2022-11-28 19:18:17 -08:00
Jarred Sumner
4efce63dad
Update README.md
2022-11-28 19:14:45 -08:00
Jarred Sumner
2a33bd2cc5
Add small section about profiling bun
2022-11-28 19:11:09 -08:00
Jarred Sumner
b337e36da1
Fix hanging in FIFO streams
2022-11-28 18:31:12 -08:00
Jarred Sumner
77d0828179
[internal] Add debug timer
2022-11-28 18:30:49 -08:00
Jarred Sumner
eccd854dbc
Ensure we report errors in controller.close
2022-11-28 18:30:28 -08:00
Jarred Sumner
a64f2f5466
Update JSEnvironmentVariableMap.cpp
2022-11-28 16:57:48 -08:00
Jarred Sumner
d3cd753d4d
Allow overriding node:fs
2022-11-28 16:23:41 -08:00
Jarred Sumner
f423791e19
Add test for process
2022-11-28 15:59:58 -08:00
Jarred Sumner
a6cadce6f6
Fix process.env and Bun.env object spread
...
Fixes https://github.com/oven-sh/bun/issues/1512
2022-11-28 15:55:02 -08:00
Jarred Sumner
51d0c3b79f
Fix console.log(process.env)
2022-11-27 23:01:09 -08:00
Jarred Sumner
7672ee95af
Add google fixture
2022-11-27 22:41:22 -08:00
Jarred Sumner
512acf072e
Add missing v
...
Fixes https://github.com/oven-sh/bun/issues/1554
2022-11-27 22:41:16 -08:00
Jarred Sumner
4ee11d922c
Cleanup some of the encoding code
2022-11-27 22:09:56 -08:00
Jarred Sumner
885049831f
Fix handling delete process.env.foo
2022-11-27 22:09:23 -08:00
Jarred Sumner
e5106d320c
Don't make toJSON enumerable in process.env
2022-11-27 22:09:07 -08:00
Jarred Sumner
ede2a494bc
Fix UTF16 bug in await fetch().text()
2022-11-27 22:08:30 -08:00
Jarred Sumner
48df99c496
✂️ dead code
2022-11-27 22:06:35 -08:00
Jarred Sumner
ed15259623
Fix Buffer.toString("latin1") and make Buffer.toString("utf16le") faster
...
Fixes #455
Fixes #1016
2022-11-27 20:21:41 -08:00
Jarred Sumner
4272038743
Fix failing buffer tests
2022-11-27 20:04:57 -08:00
Jarred Sumner
002f4ecc9e
Fix crash in console.log
2022-11-27 19:37:14 -08:00
Jarred Sumner
495f25501f
Increase the max prototype count
2022-11-27 09:32:40 -08:00
Jarred Sumner
0992c3867d
Update bindings.cpp
2022-11-27 08:45:40 -08:00
Jarred Sumner
58a78ef8b7
[console.log] Remove extra indent
2022-11-27 08:41:08 -08:00
Jarred Sumner
740027975b
Handle more cases with printing objects
2022-11-27 08:39:10 -08:00
Jarred Sumner
706406af48
remove leak
2022-11-27 07:58:10 -08:00
Jarred Sumner
39493e5d94
Add microbenchmark for console log
2022-11-27 07:40:10 -08:00
Jarred Sumner
a249c79983
Add tests for latin1 supplemental chars
2022-11-27 07:29:59 -08:00
Jarred Sumner
6459288c85
fix hanging test
2022-11-27 07:29:46 -08:00
Jarred Sumner
4726b7e227
don't start NetworkThread unless necessary
2022-11-27 07:29:40 -08:00
Jarred Sumner
358f388a46
Fix make headers
2022-11-27 07:29:07 -08:00
Jarred Sumner
4f35d0537b
fix extra indent
2022-11-27 07:28:44 -08:00
Jarred Sumner
1d9c982488
[console.log] Fix printing latin1 supplement characters at runtime
...
Fixes https://github.com/oven-sh/bun/issues/1031#issuecomment-1236092120
2022-11-27 07:28:30 -08:00
Jarred Sumner
5e6e8ece4e
[console.log] Improve Object formatting and error handling
2022-11-27 07:27:21 -08:00
Jarred Sumner
964c4037de
[console.log] log Proxy objects
2022-11-27 07:26:16 -08:00
Jarred Sumner
1bc76511ec
[console.log] Treat GlobalObject like Object
2022-11-27 07:25:55 -08:00
Jarred Sumner
35509126a6
[console.log] Treat ArrayBuffer like Uint8Array
2022-11-27 07:25:41 -08:00
Jarred Sumner
8765092591
[console.log] Fix logging Symbol values
2022-11-27 07:25:25 -08:00
Jarred Sumner
46678c46ee
Now that utf16 is fast we can just count the length instead of re-allocating
2022-11-27 07:24:43 -08:00
Jarred Sumner
e8d948b9d9
Remove extra indent
2022-11-27 06:18:05 -08:00
Jarred Sumner
f891d1df50
Fix strangeness with Bun.env keys
2022-11-27 06:17:59 -08:00
Jarred Sumner
faad250559
Fix crash in Headers.prototype.count
2022-11-27 06:17:32 -08:00
Jarred Sumner
74e87b5a8a
Fix crash in OnigurumaRegExp getters
2022-11-27 06:16:52 -08:00
Jarred Sumner
819a63e3ec
Fix build issue
2022-11-26 22:14:29 -08:00
Jarred Sumner
c65c320b09
[bun:sqlite] Fix bug with latin1 supplemental characters
...
Fixes https://github.com/oven-sh/bun/issues/1553
2022-11-26 21:42:32 -08:00
Jarred Sumner
a53ed1bde1
prettier?
2022-11-26 21:29:53 -08:00
Jarred Sumner
d2190ea6f3
Update mimalloc
2022-11-26 21:20:38 -08:00
Jarred Sumner
b7850565f4
Update string_immutable.zig
2022-11-26 21:20:33 -08:00
Jarred Sumner
10996a797a
Faster UTF16 -> UTF8 and UTF8 -> UTF16 ( #1552 )
...
* Fix freezing test
* Add SIMDUTF
* More micro bench snippets
* Update .gitattributes
* Update .gitattributes
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-26 21:04:38 -08:00
Jarred Sumner
949d715a14
Make HTTP status text more consistent with other HTTP servers
2022-11-26 18:03:20 -08:00
Jarred Sumner
90388aa7ea
Add a console.log write bench
2022-11-26 06:27:49 -08:00
Jarred Sumner
1671977af7
Fix 0
2022-11-26 05:54:28 -08:00
Jarred Sumner
8aec181f16
Slightly improve when printing lots of numbers
2022-11-26 05:22:12 -08:00
Jarred Sumner
37753e9787
Make console.log prettier
2022-11-26 04:50:55 -08:00
Jarred Sumner
8519ff02e6
Prevent closing stdout / stderr
2022-11-25 22:55:35 -08:00
Jarred SUmner
397cb6600b
Update test
2022-11-25 22:53:21 -08:00
Jarred SUmner
bef469ea55
Fix linux build issue
2022-11-25 22:53:07 -08:00
Jarred SUmner
ac7ad4d5c6
Fix double free
2022-11-25 22:52:32 -08:00
Jarred Sumner
0b27a26edb
typo
2022-11-25 22:10:42 -08:00
Jarred Sumner
e12dc23c62
Use ccache for dependencies too
2022-11-25 21:14:57 -08:00
Jarred Sumner
7fec8a96ab
Update zlib
2022-11-25 21:08:24 -08:00
Jarred Sumner
14b063d802
Simplify
2022-11-25 20:27:59 -08:00
Jarred Sumner
99fa95b954
Add some missing finalizers
2022-11-25 20:26:34 -08:00
Jarred Sumner
f27fdf932b
Always watch
2022-11-25 20:26:18 -08:00
Jarred Sumner
d0dbafb32f
Fix Subprocess.prototype.killed
2022-11-25 19:39:40 -08:00
Jarred Sumner
b5bd98c0ef
Another test for macros
2022-11-25 07:04:08 -08:00
Jarred Sumner
e851e5fddb
Fix macros that return a Promise
2022-11-25 06:48:02 -08:00
Jarred Sumner
1aff60d2ba
More CCACHE
2022-11-25 06:24:34 -08:00
Jarred Sumner
d5c81b7423
Report Infinity when for non-regular files with a size of 0
2022-11-25 03:36:42 -08:00
Jarred Sumner
ddb6eced34
Update tests for behavior change
2022-11-25 03:04:12 -08:00
Jarred Sumner
5c3c50372b
[internal] Log stat calls
2022-11-25 03:03:53 -08:00
Jarred Sumner
af0acaff37
[internal] Remove all usages of suspend and resume
2022-11-25 03:03:42 -08:00
Jarred Sumner
9090f06612
Fix memory leak with .json()
2022-11-25 03:02:56 -08:00
Jarred Sumner
7a193ed243
[behavior change] Bun.file().size now always reports a number
2022-11-25 03:02:45 -08:00
Jarred Sumner
c168c70e60
Improve test coverage for Bun.file
2022-11-25 03:01:37 -08:00
Jarred Sumner
557c2e97d7
Fix crash that sometimes occurred when freeing file data
2022-11-25 02:53:08 -08:00
Jarred Sumner
64871b2bfb
Fix spurious assertion
2022-11-25 00:14:01 -08:00
Jarred Sumner
ce2cdb44e1
Use new enum for checking writable
2022-11-25 00:11:02 -08:00
Jarred Sumner
348ad87013
Enable Resizable ArrayBuffer proposal
...
https://github.com/tc39/proposal-resizablearraybuffer
2022-11-25 00:10:47 -08:00
Jarred Sumner
0e900c8ca9
Upgrade WebKit
2022-11-25 00:10:31 -08:00
Jarred Sumner
61673fa705
Add recv
2022-11-25 00:08:48 -08:00
Jarred Sumner
d1a4f4fd69
Introduce FileSink.ref() and FileSink.unref()
2022-11-25 00:08:36 -08:00
Jarred Sumner
0b915fed03
[streams] Always call start
2022-11-25 00:05:33 -08:00
Jarred Sumner
7b23cb5cd7
Fix reading FIFO files
2022-11-25 00:05:14 -08:00
Jarred Sumner
04328c163b
[safety] Add a generation_number to FilePoll on macOS to check for use-after-free
2022-11-25 00:04:12 -08:00
Jarred Sumner
5a95fae533
Improve SIGPIPE handling
2022-11-24 18:57:58 -08:00
Jarred Sumner
47f0e14477
Use is_in_heap_region instead of _check_owned
2022-11-24 18:57:40 -08:00
Jarred Sumner
0ef25c65ec
Add missing keys
2022-11-24 04:58:37 -08:00
Jarred Sumner
b0c89baac7
Fix crash when console.log() / console.error() fails to write to stdout/stdin
2022-11-24 04:26:04 -08:00
Jarred Sumner
7bc20c994c
Fix missing sigpipe handler
2022-11-24 04:25:27 -08:00
Jarred Sumner
033b8936c9
Update streams.zig
2022-11-24 04:03:04 -08:00
Jarred Sumner
6336d01743
Add extra check
2022-11-24 03:55:04 -08:00
Jarred Sumner
cc062855af
Add ccache to more steps
2022-11-24 03:54:54 -08:00
Jarred Sumner
d68f44d604
Don't pre-maturely close the input buffer
2022-11-24 03:54:32 -08:00
Jarred Sumner
ffacc1d02d
Workaround strange crash
2022-11-24 03:53:26 -08:00
Jarred Sumner
1be13fa192
Update streams.zig
2022-11-24 02:41:14 -08:00
Jarred Sumner
46094189f4
update
2022-11-24 02:35:52 -08:00
Jarred Sumner
0c8fe888b9
Update streams.zig
2022-11-24 02:34:05 -08:00
Jarred Sumner
57fcd882fc
Update streams.zig
2022-11-24 02:26:28 -08:00
Jarred Sumner
b2e48477db
Update Dockerfile
2022-11-24 02:17:58 -08:00
Jarred Sumner
e4805d0895
Update bun-linux-build.yml
2022-11-24 02:10:42 -08:00
Jarred Sumner
e9eaab727b
Update bun-linux-build.yml
2022-11-24 02:10:11 -08:00
Jarred Sumner
2ded9af4f7
Update bun-linux-build.yml
2022-11-24 02:07:55 -08:00
Jarred Sumner
2aa304a29d
bump
2022-11-24 02:03:09 -08:00
Jarred Sumner
3419d3bc02
Update bun-mac-aarch64.yml
2022-11-24 01:57:24 -08:00
Jarred Sumner
a6644eac24
missing WORKDIR
2022-11-24 01:53:59 -08:00
Jarred Sumner
6c23035769
Attempt to make builds faster
2022-11-24 01:47:43 -08:00
Jarred Sumner
4a698ed52c
[FileSystemRouter] Start to add types
2022-11-24 00:05:57 -08:00
Jarred Sumner
e1fcc810cb
Remove extra newlines
2022-11-23 23:07:06 -08:00
Jarred Sumner
6bfb65b312
Add expect().toEqual() bench
2022-11-23 23:03:40 -08:00
Dylan Conway
dc330701d2
Bun.deepEquals and expect().toEqual() ( #1548 )
...
* all of deepEquals
* remove comment, tests, move inline function
2022-11-23 22:50:49 -08:00
Jarred Sumner
d434370500
uncomment
2022-11-23 21:46:56 -08:00
Jarred Sumner
9806c301dd
Fix build error
2022-11-23 21:46:46 -08:00
Jarred Sumner
73416ebb62
nohang flag
2022-11-23 21:46:39 -08:00
Jarred Sumner
bddf484c2c
Close the streams more
2022-11-23 21:31:38 -08:00
Jarred Sumner
21531f1e80
Linux build issue
2022-11-23 07:42:56 -08:00
Jarred Sumner
ac36ea51cf
possibly more reliable Bun.spawn ( #1547 )
...
* wip
* wip
* Fix bug with stdin
* zig fmt
* seems to work!
* Update streams.test.js
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-23 07:14:33 -08:00
Jarred Sumner
ae3fcb5bd8
[FileSystemRouter] Fix reload()
2022-11-22 21:41:34 -08:00
Jarred Sumner
5767ad3fc5
Remove some dead code
2022-11-22 21:34:37 -08:00
Jarred Sumner
4f41c3fb40
[FileSystemRouter] Fix failing tests
2022-11-22 21:25:26 -08:00
Jarred Sumner
b249ed7257
[FileSystemRouter] Add more tests
2022-11-22 20:55:09 -08:00
Jarred Sumner
2b4dcc8c81
[FileSystemRouter] base_dir, Request, Response
2022-11-22 04:00:55 -08:00
Jarred Sumner
15a5aa1a68
Update filesystem_router.test.ts
2022-11-22 02:25:58 -08:00
Jarred Sumner
3cf229a898
Update launch.json
2022-11-22 02:13:25 -08:00
Jarred Sumner
e94172255d
Support no constructor in class generator script
2022-11-22 02:13:19 -08:00
Jarred Sumner
d21aee5143
Introduce Bun.FileSystemRouter API
2022-11-22 02:13:03 -08:00
Jarred Sumner
65a56c2560
clone in putRecord
2022-11-22 02:09:57 -08:00
Jarred Sumner
1bd71f2f44
Handle when package version is missing
2022-11-21 18:34:18 -08:00
Jarred Sumner
fe33073f2e
Use const ptr
2022-11-21 18:33:55 -08:00
Jarred Sumner
14d52897ad
Update README.md
2022-11-21 17:49:07 -08:00
Jarred Sumner
ca434fba6e
make it slightly clearer
2022-11-21 17:37:12 -08:00
Jarred Sumner
55f8029dc2
Add test for wildcard import without an extension
2022-11-21 17:31:42 -08:00
João Paquim
a3dc33c133
Wildcard imports map ( #1483 )
...
* Log extra info on missing file extension
* Improve error messages for missing /index.js on import
* Remove unnecessary function parameter path
* Add loadPackageImports function to match esbuild
* Add support for pattern trailer import syntax
* Fix review comments
2022-11-21 17:31:02 -08:00
Jarred Sumner
a274ddba3a
[bun:test] Add test for returning MAX_SAFE_INTEGER
2022-11-21 17:02:43 -08:00
Dylan Conway
8e36485a76
fix oniguruma regex character properties ( #1528 )
...
* fix for character properties
* cleanup tests
* cleanup comments
* i - 2 >= 0
2022-11-21 16:52:00 -08:00
Dylan Conway
5f2e74bbcc
specific error for invalid flag, correct position' ( #1537 )
...
'
2022-11-21 16:51:34 -08:00
Jarred Sumner
ce6fc8609b
[bun:sqlite] fix truncating to int32 in results (now truncates to int52)
...
TODO: bigint
2022-11-21 16:46:45 -08:00
Jarred Sumner
a251669fa1
Make it yellow
2022-11-20 17:58:13 -08:00
Jarred Sumner
4f6636b3ca
Update jest.zig
2022-11-20 16:48:09 -08:00
Jarred Sumner
28a3093d48
Print a count
2022-11-20 16:48:02 -08:00
Jarred Sumner
fe0506b88e
Bump!
2022-11-20 16:31:11 -08:00
Jarred Sumner
e78f891acd
[bun:test] Fix bug with returning a non-promise object in a test or it function
2022-11-20 14:35:48 -08:00
Jarred Sumner
948fdfe482
Fix spurious rejected promise handler calls
2022-11-20 14:33:57 -08:00
Jarred Sumner
757d19c2f7
Assert count
2022-11-20 07:12:01 -08:00
Jarred Sumner
a4b67ccbff
fix protocol relative urls again
2022-11-20 07:03:50 -08:00
Jarred Sumner
1fca6becd3
Enable previously failing GC tests
2022-11-20 07:03:11 -08:00
Jarred Sumner
6965b5c192
mild clean up
2022-11-20 07:02:53 -08:00
Jarred Sumner
dfa62b660d
[internal] Implement visitAdditionalChildren
2022-11-20 07:02:14 -08:00
Jarred Sumner
5ff2cd3418
[streams] Fix memory leak affecting React SSR and more
2022-11-20 06:58:29 -08:00
Jarred Sumner
f56eec6fa3
run clang-format on JSSink
2022-11-20 06:56:05 -08:00
Jarred Sumner
65330a32cc
[jsx] Disable jsxs
2022-11-20 04:55:36 -08:00
Jarred Sumner
003237b086
Typo
2022-11-20 01:45:57 -08:00
Jarred Sumner
70f89b1bfc
Add another test
2022-11-20 01:44:27 -08:00
Jarred Sumner
4f5f01a748
Fix flaky test
2022-11-20 01:44:18 -08:00
Jarred Sumner
e41d7a0bd5
[fetch] Add optimization for chunked encoding
2022-11-20 01:43:40 -08:00
Jarred Sumner
b745ae2667
[TCP] Make Socket more careful about GC
2022-11-20 00:58:46 -08:00
Jarred Sumner
2f1e9b2eb8
[streams] Fix exception in WritableStream
...
cc @Electroid
2022-11-19 23:37:52 -08:00
Jarred Sumner
c68b11e8cb
[streams] Fix exception in streams with 1 item that sometimes occurred
2022-11-19 23:05:03 -08:00
Jarred Sumner
16d20bde09
Set aggression level in tests
2022-11-19 22:35:26 -08:00
Jarred Sumner
bea44d948e
Fix freezing test due to calling GC 36,000 times
2022-11-19 22:35:16 -08:00
Jarred Sumner
b230e7a73a
[fetch] Fix sporadic data corruption bug in HTTP client and add fast path
...
- This removes memory pooling from the HTTP client which sometimes caused invalid memory to be written to the response body.
- This adds a fast path for small HTTP/HTTPS responses that makes it a single memory allocation for the response body, instead of copying & allocating a temporary buffer
cc @Electroid
2022-11-19 22:34:57 -08:00
Jarred Sumner
e024116b77
Add a couple more tests for redirects
2022-11-19 22:23:45 -08:00
Jarred Sumner
79b6d4734a
[internal] Add a function for appending without growing extra data
2022-11-19 22:23:20 -08:00
Jarred Sumner
dc26181da4
Add a log
2022-11-19 22:22:04 -08:00
Jarred Sumner
0603991beb
Make hidden mimalloc dump report process-wide stats instead of thread
2022-11-19 22:21:58 -08:00
Jarred Sumner
17fa4211ac
Introduce Bun.unsafe.gcAggressionLevel API
2022-11-19 22:21:35 -08:00
Jarred Sumner
81a1d8f589
[internal] Add assertion for freeing global strings
2022-11-19 22:15:20 -08:00
Jarred Sumner
055f1e9639
[napi] Fix missing instance data finalizer
2022-11-19 22:14:47 -08:00
Jarred Sumner
cac11ee826
[fetch] Fix bug with redirecting to a protocol-relative URL
2022-11-19 22:14:10 -08:00
Jarred Sumner
f8d9a8be87
[fetch] Fix bug with redirects losing the port number
2022-11-19 22:13:30 -08:00
Jarred Sumner
9c601542d0
Update to Mimalloc v2.0.7
2022-11-19 21:37:31 -08:00
Jarred Sumner
7c7769a7c7
Fix GC crash when handling rejected promises uncovered via BUN_GARBAGE_COLLECTOR_LEVEL
2022-11-19 04:59:38 -08:00
Jarred Sumner
17e8181b4e
Fix GC crash in Bun.file(string).text(), Bun.file(string).arrayBuffer(), Bun.file(string).json() uncovered via BUN_GARBAGE_COLLECTOR_LEVEL
2022-11-19 04:59:17 -08:00
Jarred Sumner
ee939f7a6d
Fix GC crash in Transpiler found via BUN_GARBAGE_COLLECTOR_LEVEL
2022-11-19 04:58:39 -08:00
Jarred Sumner
6cc89eff2c
[internal] Introduce JSPromise.Strong
2022-11-19 04:57:59 -08:00
Jarred Sumner
d6d04cab24
Fix GC crash with WebSocket uncovered thx to BUN_GARBAGE_COLLECTOR_LEVEL
2022-11-19 04:57:32 -08:00
Jarred Sumner
bb95f90a62
Introduce BUN_GARBAGE_COLLECTOR_LEVEL debug environment variable
2022-11-19 04:56:46 -08:00
Jarred Sumner
1806322554
Fix failing test
2022-11-19 04:16:31 -08:00
Jarred Sumner
38b5a85d8a
Fix a GC issue with Bun.spawn
...
The `Subprocess` object stays alive until the process exits, even if it's never referenced
2022-11-19 01:25:15 -08:00
Jarred Sumner
68b55cd855
Implement a singleton version of napi_get_instance_data and napi_set_instance_data
...
Still need to figure out how to do this without adding a layer of indirection to the global object as exposed to NAPI Addons
This code is not tested
2022-11-19 01:18:58 -08:00
Dylan Conway
43b4e1b67b
bun test matchers and tests ( #1526 )
...
* ignore webkit for cherry-pick
* toContain and toBeTruthy
* toBe null, undefined, falsy, toHaveProperty, .not
* markBindings
* remove toHaveProperty, undo ignore webkit, more tests
* undo ignore webkit
* remove bad tests
* check if length property exists for toHaveLength()
* fix call signature
* handle argument that is not an integer
* getLengthOfArray returns u64
* switch to truncate
* toHaveLength() edge cases
* add toBooleanSlow()
* infinity, nan, negative
2022-11-18 23:03:39 -08:00
Jarred Sumner
f3fb712051
Fix crash in process.env.FOO = bar that happened sometimes
2022-11-18 03:47:10 -08:00
Jarred Sumner
f6779193c0
console.timeLog() but no extra arguments yet
2022-11-16 05:16:30 -08:00
Jarred Sumner
29f72efac3
Mark some more commonjs modules
2022-11-16 05:15:56 -08:00
Jarred Sumner
4985a44fe2
Remove incorrect assertion
2022-11-16 05:13:17 -08:00
Jarred Sumner
6a9bc6f6c2
Another test
2022-11-16 04:58:51 -08:00
Jarred Sumner
bf6b174233
Make node:http.createServer work better
2022-11-16 04:42:33 -08:00
Jarred Sumner
5de98f23bb
Fix another assertion failure
2022-11-15 23:23:36 -08:00
Jarred Sumner
1d02104c51
Fix assertion failure
2022-11-15 23:23:23 -08:00
Jarred Sumner
4f22c39651
Handle trailing slash
2022-11-15 22:10:09 -08:00
Jarred Sumner
6c01a1191f
Fixes #1390
2022-11-15 21:58:31 -08:00
Jarred Sumner
b95f7d5bbc
Fixes #1403
...
cc @Electroid this should fix the fly.io api issue too
2022-11-15 21:40:54 -08:00
Jarred Sumner
c32013dbba
Never resize on close
2022-11-15 21:37:28 -08:00
Jarred Sumner
6cdb7e77dd
Handle blocking initial read
2022-11-15 21:01:08 -08:00
Jarred Sumner
0e7ed4c667
Prevent blocking write()
2022-11-15 20:57:21 -08:00
Jarred Sumner
3b802c9a13
Add non-standard headers API types
...
cc @colinhacks @Electroid
2022-11-15 18:32:57 -08:00
Jarred Sumner
996e5dd235
Add test for non-standard Headers API additions
2022-11-15 18:31:22 -08:00
Dylan Conway
025749027b
add generated getter/setter type with thisValue ( #1513 )
2022-11-15 17:47:38 -08:00
Jarred Sumner
44babb9ce5
Update ZigGlobalObject.cpp
2022-11-15 00:12:34 -08:00
Jarred Sumner
a63fe2be24
Add a test with decently large headers
2022-11-15 00:12:34 -08:00
Jarred Sumner
bf75f61ddf
Update test types a little
...
cc @colinhacks
`test` is an alias of `it`
`done` accepts an `error` object
2022-11-15 00:12:34 -08:00
Jarred Sumner
1b608fcc8a
Add missing type
2022-11-15 00:12:34 -08:00
Dylan Conway
c4cf38601b
switch default encoding order ( #1510 )
2022-11-14 22:00:45 -08:00
Jarred Sumner
25fc19e7c6
Fix spawn macOS issue
2022-11-14 21:52:04 -08:00
Jarred Sumner
9c3b2f7ad6
Fix crash in web crypto. caused by refptr
2022-11-14 19:55:48 -08:00
Jarred Sumner
436b8e1461
Fix crashiness with process.env
...
This also makes it a lot slower
2022-11-14 17:53:15 -08:00
Jarred Sumner
272e71fec2
Fix string encoding issue in JSC C API usages
2022-11-14 17:53:15 -08:00
Jarred Sumner
4ba97c7687
Prevent double-frees in log msgs
2022-11-14 17:53:15 -08:00
Jarred SUmner
3df5843503
Fix build error
2022-11-14 04:14:23 -08:00
Jarred SUmner
20eff9f6d2
Bugfixes and perf improvements to child_process
2022-11-14 04:08:36 -08:00
Jarred Sumner
69eedb4c92
use write$NOCANCEL, more logging
2022-11-13 21:57:14 -08:00
Jarred Sumner
4a8bbc2216
Add an e2e test
2022-11-13 20:51:27 -08:00
Jarred Sumner
92b766095d
Add missing rmdir export
2022-11-13 20:09:37 -08:00
Jarred Sumner
b18e4064a2
Make node streams faster ( #1502 )
...
* Make node streams faster
* Fix for macOS, improve performance, handle ref and unref
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-13 19:14:44 -08:00
Jarred Sumner
58b67347e6
Fix incorrect exit status message
2022-11-13 02:38:54 -08:00
Jarred Sumner
1a0fb4cf83
Fix syntax error
2022-11-12 23:43:24 -08:00
Jarred SUmner
6393e1e709
Set linker script to Bun 0.2
2022-11-12 20:40:04 -08:00
Jarred SUmner
a78b6f920d
Fix infinite write loop on Linux
2022-11-12 20:28:10 -08:00
Jarred SUmner
7da520b22e
Add missing type
2022-11-12 20:28:10 -08:00
Tom Birch
45dc75b3be
Add linker script to remove unwanted exports ( #1499 )
2022-11-12 20:22:38 -08:00
Jarred SUmner
1cce9da80a
Fix memory leak in gzip pool + add test for gzip'd data
2022-11-12 18:32:53 -08:00
Jarred Sumner
21bf3ddaf2
Redo how we poll pipes ( #1496 )
...
* Fix pipe
* Handle unregistered
* Fix failing test
2022-11-12 18:30:12 -08:00
Jarred Sumner
514f2a8edd
Add test that fails on linux
2022-11-11 16:02:35 -08:00
Jarred Sumner
5f5d74c534
2 frames
2022-11-11 04:18:15 -08:00
Jarred Sumner
b3b70035a1
Revert "Omit frame pointer"
...
This reverts commit 4f91f66a37 .
2022-11-11 02:10:16 -08:00
Jarred Sumner
666f5c5ea9
Don't rm cached
2022-11-11 01:12:41 -08:00
Jarred Sumner
55488ad77f
try this
2022-11-11 00:51:39 -08:00
Jarred Sumner
23fd28afc3
Update bun-linux-build.yml
2022-11-11 00:48:39 -08:00
Jarred Sumner
f6cb20f516
try using git action
2022-11-11 00:48:05 -08:00
Jarred Sumner
096abc638a
Remove with git rm
2022-11-11 00:43:55 -08:00
Jarred Sumner
d3fc1ee7d2
Reactivate
2022-11-11 00:43:18 -08:00
Jarred Sumner
cd2bf2591d
Re-add
2022-11-11 00:42:58 -08:00
Jarred Sumner
8428bd90a3
Delete .keep
2022-11-11 00:38:20 -08:00
Jarred Sumner
6872af907c
Update .gitmodules
2022-11-11 00:38:09 -08:00
Jarred Sumner
dc906ba0c7
Create .keep
2022-11-11 00:37:10 -08:00
Jarred Sumner
36b814de57
Delete libbacktrace
2022-11-11 00:34:44 -08:00
Jarred Sumner
142ad97886
Update main.zig
2022-11-11 00:33:10 -08:00
Jarred Sumner
cbc3daf739
Update .gitmodules
2022-11-11 00:30:05 -08:00
Jarred Sumner
4f91f66a37
Omit frame pointer
2022-11-11 00:28:45 -08:00
Jarred Sumner
1671e3cc7e
Remove dead code
2022-11-11 00:20:42 -08:00
Jarred Sumner
24a85f8de6
Improve error message
2022-11-11 00:20:42 -08:00
Jarred Sumner
2432150321
Replace libbacktrace with WTFGetBacktrace
2022-11-11 00:20:42 -08:00
Ashcon Partovi
38141e3aa7
Allow install script to specify debug-info variant with debug symbols ( #1484 )
2022-11-10 20:14:41 -08:00
Jarred Sumner
5f5ef81f11
[bun install] Support implicit pre tags in dependency versions
2022-11-10 19:52:39 -08:00
Jarred Sumner
a1e786011d
[bun run] Fix potential crash when a command terminates abnormally
2022-11-10 19:50:35 -08:00
Jarred Sumner
7b4c8802a1
✂️
2022-11-10 15:07:12 -08:00
Jarred Sumner
dddbce8a41
Implement napi_create_external and napi_get_value_external
2022-11-10 15:05:23 -08:00
Dylan Conway
7ce8328d28
add ... switch case ( #1482 )
2022-11-10 13:08:32 -08:00
Jarred Sumner
b62c45fea3
Increase stackframe count
2022-11-10 00:02:16 -08:00
Jarred Sumner
7deca69820
Update websocket-server.test.ts
2022-11-09 23:57:24 -08:00
Jarred Sumner
8753c483ff
Implement Server.publish()
...
Fixes https://github.com/oven-sh/bun/issues/1417
2022-11-09 23:54:56 -08:00
Jarred Sumner
2149e1f0a0
Update server.zig
2022-11-09 23:42:36 -08:00
Jarred Sumner
c52ebd96ba
Fix crash when an exception occurs in open()
2022-11-09 23:42:30 -08:00
Jarred Sumner
904716f56b
Clone all the strings
2022-11-09 22:55:10 -08:00
Jarred Sumner
a858261832
Clone the text
2022-11-09 22:45:02 -08:00
Jarred Sumner
9fccbf9364
Remove bun:wrap from stack traces
2022-11-09 22:44:45 -08:00
Jarred Sumner
41a023e21d
Add another log
2022-11-09 18:56:17 -08:00
Jarred Sumner
cf378d51fd
Fix broken stacktraces
2022-11-09 18:56:17 -08:00
Derrick Farris
7f5022db0c
fix(child_process): fix execFileSync options.input ( #1479 )
...
* fix(child_process): fix execFileSync options.input
* fix(child_process): debug err, check for Uint8Array too
* fix(child_process): fix ArrayBufferIsView call
* test(child_process): fix missing toString() call on test result
* refactor(child_process): change options.input to input to getter calls
2022-11-09 18:10:29 -08:00
Jarred Sumner
9ea025c543
remove this
...
wrong approach
2022-11-09 17:23:48 -08:00
Jarred Sumner
477747142a
Update bun-types-tests.yml
2022-11-09 17:13:54 -08:00
Jarred Sumner
29b0e3eaf7
Only run this for bun-types
2022-11-09 17:12:44 -08:00
Jarred Sumner
9ab21ceb59
Clarify
2022-11-09 17:11:25 -08:00
Colin McDonnell
f7f1b60444
Add bun-types, add typechecking, add child_process types ( #1475 )
...
* Add bun-types to packages
* Improve typing
* Fix types in tests
* Fix dts tests
* Run formatter
* Fix all type errors
* Add strict mode, fix type errors
* Add ffi changes
* Move workflows to root
* Add workflows
* Remove labeler
* Add child_process types
* Fix synthetic defaults issue
* Remove docs
* Move scripts
* Run prettier
* Include examples in typechecking
* captureStackTrace types
* moved captureStackTrace types to globals
* Address reviews
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2022-11-09 15:40:40 -08:00
Jarred Sumner
da257336b0
Fix #1354
2022-11-09 15:11:14 -08:00
Jarred Sumner
565996a087
Support TypeScript satisfies
...
Credit: @magic-akari, almost identical diff in https://github.com/evanw/esbuild/pull/2509/files#diff-ccc0bde7223236d93490b727b272f15765a2674be12a4c310b83b9555bef8816
2022-11-09 01:30:02 -08:00
Jarred Sumner
fac1c49727
Fixup
2022-11-09 01:15:36 -08:00
Jarred Sumner
3a760ec0ec
Update response.zig
2022-11-09 01:12:35 -08:00
Jarred Sumner
d90a638101
Re-enable workaround for 127.0.0.01
2022-11-09 01:12:35 -08:00
Dylan Conway
047a8d3f0d
Error.captureStackTrace implementation ( #1476 )
...
* capture stack trace formatting, tests
* fix callsite methods, stack formatting or undefined
* isNative, tests for callsite methods
* Update src/bun.js/bindings/ZigGlobalObject.cpp
* Update src/bun.js/bindings/ZigGlobalObject.cpp
* template and macros for visitchildren
* static strings, handle infinity and clamp stacktracelimit
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-11-09 00:37:57 -08:00
Jarred Sumner
2c4777f579
[libarchive][bun install] Fix file permissions not always being passed correctly in bun install
...
Fixes #1092
2022-11-09 00:32:50 -08:00
Jarred Sumner
0642cf31f3
[bun install] Support bin with bun link
2022-11-08 23:51:02 -08:00
Jarred Sumner
b1b3f7af54
Update bindings.cpp
2022-11-08 22:39:45 -08:00
Jarred Sumner
cb41d77d2a
Fixes #1426
2022-11-08 22:27:22 -08:00
Jarred Sumner
0fd7d3a8c3
Fix incorrectly reporting URL sizes to GC in some cases
2022-11-08 22:26:58 -08:00
Jarred Sumner
8bc459ba99
Guard against closing the same pid twice
2022-11-08 22:08:49 -08:00
Jarred Sumner
5c312ec0c9
Only perform this check on macOS
2022-11-08 22:07:59 -08:00
Jarred Sumner
bf92c36be1
Fixes #1320
...
Tests pass now on linux
2022-11-08 22:05:59 -08:00
Jarred Sumner
253cb391b3
Remove base64 library
2022-11-08 21:32:08 -08:00
Jarred Sumner
55c262a321
handle undefined better
2022-11-08 21:31:21 -08:00
Jarred Sumner
af3931371e
Fix Buffer.from(text, "base64") and Buffer.toString("base64")
2022-11-08 21:30:54 -08:00
Derrick Farris
9ccc455f8d
Fix child_process tests ( #1471 )
...
* test(child_process): fix broken tests, add our-assert pkg for testing
* test(child_process): replace console.log with debug()
* test(child_process): rename our-assert -> node-test-helpers, use Bun.peek for subproc.exited
2022-11-08 15:33:47 -08:00
Jarred Sumner
8b0a3c75cb
Fix #1473
2022-11-08 15:30:09 -08:00
Jarred Sumner
fac4efb9b9
Add a test for DOMJIT call version of TextDecoder
2022-11-08 15:28:30 -08:00
Jarred Sumner
f17080df7f
Add a couple more tests for typeof
2022-11-08 15:27:55 -08:00
Jarred Sumner
2077e563b7
Fix failing transpiler tests
2022-11-08 15:26:29 -08:00
Jarred Sumner
1604666988
20% faster TextDecoder on small inputs
2022-11-08 12:55:45 -08:00
Jarred Sumner
6c6e680d91
Allow read_only packages to check the cache
2022-11-08 03:02:20 -08:00
Jarred Sumner
9f222c5ed2
Default enable optional dependencies for remote packages
2022-11-08 03:01:41 -08:00
Jarred Sumner
3d0b297306
Fix error message
2022-11-08 03:01:30 -08:00
Jarred Sumner
ce5cbb0491
Install optional dependencies for auto-install
2022-11-08 03:01:12 -08:00
Jarred Sumner
9bf03a84c1
Update crypto.js
2022-11-08 00:29:32 -08:00
Jarred Sumner
3e9bb6859b
Stack allocate arguments to make it actually threadsafe
2022-11-08 00:28:14 -08:00
Jarred Sumner
86f0b08b8d
Add missing exports
2022-11-08 00:14:17 -08:00
Jarred Sumner
38db5f1c83
Fix Buffer.slice and Buffer.subarray
2022-11-08 00:07:25 -08:00
Jarred Sumner
9f10724eda
cast
2022-11-07 21:53:31 -08:00
Jarred Sumner
bb8c803bdf
Fix newline normalization
...
credit: @Validark
2022-11-07 21:43:38 -08:00
Jarred Sumner
9d167deb10
Credit: @Validark
2022-11-07 21:43:38 -08:00
Niles Salter
093fe1bae9
Add more tags to be usable with typeof ( #1258 )
2022-11-07 21:10:19 -08:00
Niles Salter
9dc3fbcfc4
Remove improper coercion of environment variables ( #1256 )
2022-11-07 21:04:49 -08:00
Jarred Sumner
be9bab5c29
Update ZigGlobalObject.cpp
2022-11-07 20:52:21 -08:00
Jarred Sumner
52eac73726
Fix peek test
2022-11-07 20:49:19 -08:00
Jarred Sumner
f05e23ed20
Return a rejected promise if there was an error
2022-11-07 20:43:53 -08:00
Jarred Sumner
b4abb0f337
Visit all the fields
2022-11-07 20:43:34 -08:00
Jarred Sumner
41c983b386
clean up some reliability issues with automatic install
2022-11-07 19:50:54 -08:00
Jarred Sumner
f84b2ec6d1
Handle threadsafety issue
2022-11-07 19:50:54 -08:00
Ikko Ashimine
e0cb7e4342
Fix typo in Dockerfile ( #1468 )
...
specifc -> specific
2022-11-07 18:39:44 -08:00
Jarred Sumner
204f514633
[JS Parser] Do not perform the visit pass if the parse pass had "tolerable" errors
2022-11-07 16:00:14 -08:00
Jarred Sumner
5005188a13
Fix a couple failing tests
2022-11-07 15:20:47 -08:00
Jarred Sumner
8189f78eed
Maybe fix bug with onExit callback?
2022-11-07 14:57:47 -08:00
Jarred Sumner
2eb19a96b1
Support unlimited arguments in process.nextTick
2022-11-07 14:14:19 -08:00
Jarred Sumner
fd26d2e9fa
Fix missing error in process.nextTick and queueMicrotask
2022-11-07 14:13:55 -08:00
Jarred Sumner
370d9c2931
[bun:test] Rejected promises should cause tests to fail
2022-11-07 05:13:54 -08:00
Jarred Sumner
c00359a521
[bun:test] Implement done callback with support for async functions
2022-11-07 04:49:10 -08:00
Jarred Sumner
71d0e14210
[bun:test] Implement expect in faster Zig bindings
2022-11-07 00:53:24 -08:00
Jarred Sumner
d925367cae
[bindings generator] Support cached values that do not correspond to properties and support call() functions
2022-11-07 00:51:36 -08:00
Jarred Sumner
179cd18f70
Handle types which do not support getting an object
2022-11-07 00:50:49 -08:00
Jarred Sumner
072cd5a745
Fix UAF in canary
2022-11-07 00:50:32 -08:00
Jarred Sumner
c52d9fd1b6
Bump
2022-11-06 21:45:45 -08:00
Jarred Sumner
e45f72e8e4
Automatically install npm packages when running a script in Bun's runtime ( #1459 )
...
* Update bundler.zig
* WIP
* Update README.md
* Update README.md
* wip
* Support running scripts without package.json
* Add `--no-auto-install` and `--prefer-offline` flags
* WIP
* wip
* Update headers-handwritten.h
* WIP
* Build fixes
* Fix UAF
* Update install.zig
* Must call .allocate()
* Micro-optimization: only call .timestamp() once per tick when installing packages
* Support progress bar
* Extend the timestamp for package staleness checks to 1 day
* Add `--prefer-latest`, `-i` CLI Flags
* Fix crash
* Support line text manually being set on an Error instance
* Add a few more fields for error messages
* Fix bug when counting 8 character strings in string builder
* Implement error handling for automatic package installs!
* Fix crash
* Make it say module when there's a slash
* Update module_loader.zig
* Ban dependency versions in import specifiers when a package.json is present
* Remove unused field
* Update README.md
* Update README.md
* Update README.md
* Update README.md
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-06 21:42:05 -08:00
Carter Snook
645cf90335
chore: remove space lookalike ( #1465 )
2022-11-06 18:03:06 -08:00
Jarred Sumner
e5b2e3c602
Fixes https://github.com/oven-sh/bun/issues/1451
2022-11-06 18:00:01 -08:00
Jarred Sumner
897d7bd564
Add way to explicitly coercion object to int32
2022-11-06 17:59:32 -08:00
Jarred Sumner
07cb04e311
Fix symbol error with make headers
...
cc @lawrencecchen
2022-11-06 17:45:16 -08:00
Jarred Sumner
b1fcc9e6bf
Fix bug when passing ABI Types as integers
2022-11-06 17:45:05 -08:00
Jarred Sumner
1f174b9d95
Fixes https://github.com/oven-sh/bun/issues/1462
2022-11-06 16:14:46 -08:00
Jarred Sumner
c154402c45
Undo
2022-11-06 16:02:10 -08:00
Jarred Sumner
17b8056b31
Update action.yml
2022-11-06 15:45:28 -08:00
Jarred Sumner
40160ec6d6
Prettier
2022-11-06 15:35:35 -08:00
Jarred Sumner
fe92a89b93
Pass tar -C
2022-11-06 15:35:18 -08:00
Jarred Sumner
1cb5a73243
[TypeScript] Fix export = value
2022-11-06 15:26:12 -08:00
Jarred Sumner
70fa1564c2
Fix artifact name, use tarball
2022-11-06 15:02:58 -08:00
Jarred Sumner
fcd8397db2
Try tarball
2022-11-06 14:51:44 -08:00
Jarred Sumner
4688d72945
Try again
2022-11-06 14:33:04 -08:00
Jarred Sumner
c55f59e030
Node12 is deprecated
2022-11-06 14:09:24 -08:00
Derrick Farris
be108c0fea
feat(child_process): add node:child_process polyfill ( #1424 )
...
* feat(child_process): beginning of child_process, add ChildProcess and spawn base case
* fix(child_process): remove invalid single arg array syntax (thanks Copilot)
* refactor(child_process): unhack Readable.on, move stuff into node:stream
* feat(child_process): add more params for spawn, refactor, add fromWeb() to Readable
* feat(child_process): finish rest of exports (minus fork), refactor, add tests
* cleanup(streams): remove a bunch of unnecessary stuff
* cleanup(child_process): remove dead refs
* fix(child_process): fix stdio
* fix(child_process): change stdio to bunStdio
* test(child_process): uncomment timeout test
* test(child_process): fix hanging tests
* test(child_process): remove stray console.log
* test(child_process): fix cwd test for linux
* refactor(child_process): divide paths for encoded vs raw execFile stdio
* fix(child_process): fix logic for execFile slow path
2022-11-06 13:43:42 -08:00
Derrick Farris
4e3fb8ed5b
fix(subprocess): fix typo in spawnSync ( #1464 )
2022-11-06 03:41:32 -08:00
zhiyuan
9d3f1e0d26
Fix fetch api to accept stringifier object ( #1460 )
...
* fetch accept stringifier object
* test: update fetch params tests
2022-11-05 18:51:02 -07:00
Jarred Sumner
88ca7fd738
Fix crash in setTimeout/setInterval
2022-11-03 23:38:23 -07:00
Jarred Sumner
30e1fe1035
Fix incorrect exit code
2022-11-03 23:38:07 -07:00
Jarred Sumner
562595fa02
Fix crash when reading promise value wihtout checking if null
2022-11-03 23:37:54 -07:00
Jarred Sumner
d6520cd761
Fix which not handling absolute paths to a bin
...
This code has not been tested.
2022-11-03 23:22:51 -07:00
Jarred Sumner
13cfca4814
Fix cmd not found in $PATH printing raw struct
2022-11-03 23:02:49 -07:00
Jarred Sumner
e20461d961
Delete unused file
2022-11-03 23:02:23 -07:00
Colin McDonnell
d04c0d51fe
Add minified prod build of react-dom/server.bun ( #1458 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-11-03 18:10:42 -07:00
Hyro
a5b25c5a79
chore: remove unecessary files ( #1457 )
...
* Delete labeler.yml
* Delete labels.yml
2022-11-03 12:42:44 -07:00
Jarred Sumner
6142715c06
Introduce import.meta.primordials for builtin JS
...
the `import.meta` object in Bun now has a `primordials` object which makes a handful of globals safe for access. Inside of bun: or node: modules, it is a special object (ownKeys is not implemented, so Object.keys() wont work on it)
- Array
- String
- `isPromise`
- `isCallable`
- `isConstructable`
- `tryGetById(foo, "bar')` which is like foo?.bar
- `arrayPush` which is like `Array.prototype.push`
- `Bun`
- `isAbortSignal`
cc @ThatOneBro @lawrencecchen
2022-11-03 00:18:26 -07:00
Jarred Sumner
34e130a3e0
Add a misc snippet
2022-11-02 20:46:24 -07:00
Jarred Sumner
09434f1486
Add failing test
2022-11-02 20:44:49 -07:00
Jarred Sumner
1a92b92f8a
Add failing wildcard test
2022-11-02 20:44:13 -07:00
Jarred Sumner
fb903bb091
Update headers-handwritten.h
2022-11-02 20:10:12 -07:00
Jarred Sumner
34fce03f0f
Add missing headers
2022-11-02 20:09:38 -07:00
Jarred Sumner
bfa40d1d3f
Fix 4/4 failing tests
2022-11-02 20:00:44 -07:00
Jarred Sumner
f829bd7190
Fix 5/9 failing tests
2022-11-02 19:55:45 -07:00
Jarred Sumner
ab4e662484
Update ZigGlobalObject.cpp
2022-11-02 19:37:06 -07:00
Jarred Sumner
35ba83584f
Fixes #1448 #1450
2022-11-02 19:25:52 -07:00
Jarred Sumner
50cf083668
Fix missing functions
2022-11-02 18:54:42 -07:00
João Paquim
dd9325d8c9
Fix $PATH on dev container ( #1439 )
...
* Fix $PATH for bun on devcontainer
* Use cat in dev container postCreateCommand
2022-11-02 17:34:20 -07:00
Jarred Sumner
3b7626aacb
Fixup
2022-11-02 17:19:50 -07:00
Jarred Sumner
a9aa3e732c
Fix memory leak
2022-11-02 17:15:28 -07:00
Jarred Sumner
ae0ea761ce
Update ffi.exports.js
2022-11-02 13:59:39 -07:00
Jarred Sumner
1a3a0adc63
Add way to know if JSCallback is threadsafe
2022-11-02 13:44:37 -07:00
Jarred Sumner
006a2f37dd
[bun:ffi] Add threadsafe option to callbacks
2022-11-02 13:35:49 -07:00
Bram Wasti
65b543fba6
Update ffi.zig ( #1449 )
2022-11-02 11:11:23 -07:00
Jarred Sumner
b459d09030
Update README.md
2022-11-02 01:47:27 -07:00
Jarred Sumner
97fa2702d1
Update README.md
2022-11-02 01:45:42 -07:00
Jarred Sumner
4af4d3eeca
Update README.md
2022-11-02 01:43:10 -07:00
Jarred Sumner
1e0155faf2
Flip the callback order
2022-11-02 01:27:54 -07:00
Jarred Sumner
81033c52fb
[bun:ffi] Implement JSCallback so C can call into JS
2022-11-02 01:16:13 -07:00
Jarred Sumner
86639fe62a
Improve async function handling code in setTimeout and setInterval
...
Should fix
2022-11-02 00:14:32 -07:00
Dylan Conway
54e7a6f57a
typescript decorators round 2 ( #1445 )
...
* __decorateClass, __decorateParam, lit test, wiptest test
* decorator factories test
* parameter decorator test
* test for decorators with constructor parameter properties
* Fix issue with `CryptoKey` and `SubtleCrypto` constructors
* Limit concurrency for GitHub Actions due to issues with cache poisoning
If multiple actions are running, sometimes the cache is poisoned from another action. We need to fix this, but this is an interim measure to make actions less flaky
* Make these tests better
* Move this to dependencies so the .a files upload
* Fixup
* temporary fix
* Limit concurrency for MacOS Object actions
* try againn
* againn
* Make `"tls"` an explicit object we pass instead of implicit top-level options
cc @Electroid @colinhacks
* Update server.zig
* Prefer `BUN_PORT` over `PORT`
* Fix typo in homebrew action
* Run homebrew action when release is edited
* Check published_at instead of draft in GitHub action
* Implement `process.release`
* Add missing dependencies to `make devcontainer`
* Allow overriding node polyfills via `BUN_OVERRIDE_MODULE_PATH`
* Add a stub for io_darwin on linux
cc @sno2 hopefully this helps but i'm not sure
* Add missing `break`
* Download more RAM
* feat(core): optimize zig slice (#1408 )
* feat(core): optimize zig slice
* address concerns
* Remove webcrypto from vendor-without-check
* Update default tsconfig (#1418 )
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
* Enable `BUN_OVERRIDE_MODULE_PATH` in `bun wiptest`
* Upgrade WebKit
* space
* Support getting cached values and pending activity in the bindings generator
* Remove ✂️ function
* constructor creation, initializers, handle static and computed fields with decorators
* Updating libuwebsockets C API (#1423 )
* fix for repeated regex match calls and fix for '^' in character classes (#1419 )
* tests and formatting
* fix for ^ in character class
* formatting
* test for repeated match and exec calls
* create oniguruma regex for each exec/test
* check errorCode from creating oniguruma regexp and always return {} on failure
* oops
* call onig_initialize once
* fix incorrect escaping, removed unnecessary oniguruma settings
* tests for "-" and "^" in character classes
* free regex object before returns
* force gc for some tests
* Update React fizz server (#1432 )
* Update fizz server
* Use production build
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
* more decorator tests
* optional setup function for loading elements, simulate clicks in lit test
* fix createWriteStream (#1433 )
* fix createWriteStream
* remove comment
* Update build docs and commands for dev containers (#1438 )
* Update build documentation for dev containers
* Add devcontainer-rebuild make target
* Add make devcontainer-sh target
* Fix missing .PHONY for vendor-without-check (#1437 )
* Fix check for ninja on Debian/Ubuntu (#1436 )
Even though the package is named ninja-build, the ninja binary is still
named ninja, so use `which ninja` to check for it
* Fix #1410
woops
* await on DOMContentLoaded for elements instead of setup function
* avoid lowering class if no decorators
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: Carter Snook <cartersnook04@gmail.com >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com >
Co-authored-by: João Paquim <jpaquim@users.noreply.github.com >
2022-11-01 21:25:30 -07:00
Ashcon Partovi
32826119fc
Delete labeler.yml
2022-11-01 17:07:24 -07:00
Ashcon Partovi
12f586eeb7
Delete label-sync.yml
2022-11-01 17:07:17 -07:00
Jarred Sumner
f9f169bb9e
Fix #1410
...
woops
2022-11-01 14:34:51 -07:00
João Paquim
2fe27fdeea
Fix check for ninja on Debian/Ubuntu ( #1436 )
...
Even though the package is named ninja-build, the ninja binary is still
named ninja, so use `which ninja` to check for it
2022-11-01 13:30:09 -07:00
João Paquim
19afe95cc6
Fix missing .PHONY for vendor-without-check ( #1437 )
2022-11-01 13:29:50 -07:00
João Paquim
af410879cd
Update build docs and commands for dev containers ( #1438 )
...
* Update build documentation for dev containers
* Add devcontainer-rebuild make target
* Add make devcontainer-sh target
2022-11-01 13:29:30 -07:00
Lawrence Chen
26e32ec1cb
fix createWriteStream ( #1433 )
...
* fix createWriteStream
* remove comment
2022-11-01 02:26:51 -07:00
Colin McDonnell
3a60764f32
Update React fizz server ( #1432 )
...
* Update fizz server
* Use production build
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-10-31 22:10:28 -07:00
Dylan Conway
5398ed52d8
fix for repeated regex match calls and fix for '^' in character classes ( #1419 )
...
* tests and formatting
* fix for ^ in character class
* formatting
* test for repeated match and exec calls
* create oniguruma regex for each exec/test
* check errorCode from creating oniguruma regexp and always return {} on failure
* oops
* call onig_initialize once
* fix incorrect escaping, removed unnecessary oniguruma settings
* tests for "-" and "^" in character classes
* free regex object before returns
* force gc for some tests
2022-10-31 22:00:26 -07:00
Ciro Spaciari
6ede31cb04
Updating libuwebsockets C API ( #1423 )
2022-10-30 01:03:11 -07:00
Jarred Sumner
88ddb103f2
Remove ✂️ function
2022-10-28 19:01:23 -07:00
Jarred Sumner
525d055d4a
Support getting cached values and pending activity in the bindings generator
2022-10-28 19:01:13 -07:00
Jarred Sumner
4c8a08d6ba
space
2022-10-28 18:58:05 -07:00
Jarred Sumner
280c45c269
Upgrade WebKit
2022-10-28 18:57:33 -07:00
Jarred Sumner
8bb080fc7c
Enable BUN_OVERRIDE_MODULE_PATH in bun wiptest
2022-10-28 18:09:55 -07:00
Colin McDonnell
619d931568
Update default tsconfig ( #1418 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-10-28 17:06:00 -07:00
Jarred Sumner
50a3853eb4
Remove webcrypto from vendor-without-check
2022-10-28 16:18:01 -07:00
Carter Snook
0bfd00e734
feat(core): optimize zig slice ( #1408 )
...
* feat(core): optimize zig slice
* address concerns
2022-10-27 21:25:32 -07:00
Jarred Sumner
0b1d4ff81b
Download more RAM
2022-10-27 19:04:51 -07:00
Jarred Sumner
792ad30a8c
Add missing break
2022-10-27 18:31:45 -07:00
Jarred Sumner
ed5595f792
Add a stub for io_darwin on linux
...
cc @sno2 hopefully this helps but i'm not sure
2022-10-27 18:26:32 -07:00
Jarred Sumner
5c8cbf9806
Allow overriding node polyfills via BUN_OVERRIDE_MODULE_PATH
2022-10-27 18:25:43 -07:00
Jarred Sumner
57342459dd
Add missing dependencies to make devcontainer
2022-10-27 16:22:32 -07:00
Jarred Sumner
901c4f57aa
Implement process.release
2022-10-27 15:09:20 -07:00
Ashcon Partovi
1c6da5934d
Check published_at instead of draft in GitHub action
2022-10-27 10:38:18 -07:00
Ashcon Partovi
e5344bfcc5
Run homebrew action when release is edited
2022-10-27 10:36:59 -07:00
Ashcon Partovi
46a85358d7
Fix typo in homebrew action
2022-10-27 10:32:00 -07:00
Jarred Sumner
6632135ec0
Prefer BUN_PORT over PORT
2022-10-26 21:06:02 -07:00
Jarred Sumner
7b73dcf906
Update server.zig
2022-10-26 21:05:53 -07:00
Jarred Sumner
75b1ef1ef4
Make "tls" an explicit object we pass instead of implicit top-level options
...
cc @Electroid @colinhacks
2022-10-26 21:04:12 -07:00
Jarred Sumner
830f83a44d
againn
2022-10-26 17:50:35 -07:00
Jarred Sumner
88d6615e4e
try againn
2022-10-26 17:07:22 -07:00
Ashcon Partovi
cc1b340cff
Limit concurrency for MacOS Object actions
2022-10-26 16:41:29 -07:00
Jarred Sumner
8ccf5a07ca
temporary fix
2022-10-26 16:33:08 -07:00
Jarred Sumner
10a8c6acdd
Fixup
2022-10-26 16:31:49 -07:00
Jarred Sumner
2cd1d44739
Move this to dependencies so the .a files upload
2022-10-26 16:30:28 -07:00
Jarred Sumner
de536fc953
Make these tests better
2022-10-26 16:29:46 -07:00
Ashcon Partovi
a1456767f7
Limit concurrency for GitHub Actions due to issues with cache poisoning
...
If multiple actions are running, sometimes the cache is poisoned from another action. We need to fix this, but this is an interim measure to make actions less flaky
2022-10-26 16:21:51 -07:00
Jarred Sumner
e0feff22c9
Fix issue with CryptoKey and SubtleCrypto constructors
2022-10-26 15:28:27 -07:00
João Paquim
44ff09015c
Minor fixes to README.md ( #1395 )
2022-10-26 10:23:51 -07:00
João Paquim
3c45182097
Update Dev Containers extension name ( #1393 )
2022-10-26 09:23:33 -07:00
Jarred Sumner
c02da2c5a6
Fix failing macOS build
2022-10-25 23:32:04 -07:00
Jarred Sumner
5cd91fa1a3
Update Makefile
2022-10-25 23:11:42 -07:00
Jarred Sumner
d21739af1a
Update Makefile
2022-10-25 23:11:42 -07:00
Jarred Sumner
bd372e9cf4
Update Makefile
2022-10-25 23:11:42 -07:00
Ashcon Partovi
afe04aa8bf
Add action to deploy to Homebrew
2022-10-25 23:03:20 -07:00
Jarred Sumner
9b2bad8bed
Update Makefile
2022-10-25 22:41:26 -07:00
Jarred Sumner
7622f2e339
Fix crash in TCP server
2022-10-25 21:41:20 -07:00
Jarred Sumner
3d05cb017d
Update Makefile
2022-10-25 20:53:08 -07:00
Jarred Sumner
1c54deab52
Update README.md
2022-10-25 18:03:07 -07:00
zhiyuan
28d71e2d9f
Fix lexer expected token error ( #1387 )
...
* fix: lexer expected token error
* fix: handle parse error through logs
2022-10-25 12:34:40 -07:00
Jarred Sumner
02c920f4fd
TCP & TLS Socket API ( #1374 )
...
* TCP Socket API
* Wip
* Add snippet for StringDecoder
* Rename `close` to `stop`, replace `close` with `end`
* Add a tcp echo server test
* Some docs
* Update README.md
* Fix build
* Update README.md
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-10-25 00:44:25 -07:00
Dylan Conway
1b50ecc52b
oniguruma regex lookbehind and multibyte hex fix ( #1363 )
...
* handle multibyte hex characters
* non extended strings used for toString() and source
* add hasIndices flags
* more tests for lookbehinds, unicode, and hex characters
* handled case when hex doesnt have enough digit, more tests
* fix adding characters out of bounds
* backslash in character class
* compile() returns object
* escape special characters in oniguruma character class
2022-10-24 19:02:56 -07:00
Jarred Sumner
f8ea534f3b
Hopefully fix failing build
2022-10-24 16:38:56 -07:00
Jarred Sumner
9aea2f90a5
Maybe fix a crash
2022-10-24 16:38:32 -07:00
Jarred Sumner
38cc698b4d
Update README.md
2022-10-24 04:16:52 -07:00
Jarred Sumner
f13f465024
Update README.md
2022-10-24 04:13:29 -07:00
Jarred Sumner
e8d6ad6d66
Update README.md
2022-10-24 04:13:11 -07:00
Jarred Sumner
434f1bffad
Update README.md
2022-10-24 04:12:32 -07:00
Jarred Sumner
0b0db78799
Bun.peek
2022-10-24 04:10:44 -07:00
Jarred Sumner
b3434a8b88
Add fd to SystemError and fix 2 cases with invalid tagged union
...
cc @sno2
2022-10-23 22:29:23 -07:00
Carter Snook
223ce77eca
fix(web): stop segfault on invalid fd error ( #1386 )
2022-10-23 22:14:37 -07:00
Jarred Sumner
ec9787770e
Preserve trailing newline when updating package.json
...
Fixes https://github.com/oven-sh/bun/issues/1375
2022-10-23 21:53:54 -07:00
Jarred Sumner
360a007f16
Fix ReadableStream.prototype.tee
2022-10-23 21:30:50 -07:00
Jarred Sumner
76652ac3ca
Add Web Crypto API ( #1384 )
...
* Add Web Crypto API
* Duplicate symbols
* Update c_cpp_properties.json
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-10-23 20:25:18 -07:00
Carter Snook
14cec299f5
fix(fetch): stop new Response(null) from segfaulting ( #1383 )
...
* fix(fetch): resolve segfaults with 'Response'
* nit: use shorter check
2022-10-23 18:27:03 -07:00
zhiyuan
55c42f1663
Fix spawn exitcode ( #1371 )
2022-10-22 09:41:56 -07:00
Jarred Sumner
85808700c8
Add sqlite to include list
2022-10-21 22:54:26 -07:00
Jarred Sumner
73fba0c5f1
Codegen
2022-10-21 22:54:17 -07:00
Jarred Sumner
7060008b83
Treat invalid buffer value as utf8 string
2022-10-21 22:53:32 -07:00
Jarred Sumner
ae4f2d63c8
Add test for fs.createReadStream
2022-10-21 22:50:23 -07:00
Jarred Sumner
9129309f0a
Implement fs.createReadStream, begin fs.createWriteStream
2022-10-21 22:50:06 -07:00
Jarred Sumner
c987bdcbf9
Make Node Streams work better in Bun
2022-10-21 22:49:49 -07:00
Jarred Sumner
f6a451256f
Fix error handling logic in read()
2022-10-21 22:49:19 -07:00
Jarred Sumner
71b942b581
Fix bugs in mask boolean values
2022-10-21 22:48:55 -07:00
Jarred Sumner
cd2e9e9dcf
Emit errors
2022-10-21 22:47:58 -07:00
Jarred Sumner
347309b26f
Add test for ResolveError.position being inspectable
2022-10-21 22:35:28 -07:00
Jarred Sumner
8d67870da4
Fix segfault when logging position object from failed nested import
2022-10-21 22:34:47 -07:00
Jarred Sumner
04e0583c31
Implement setMaxListeners and getMaxListeners
2022-10-21 21:13:50 -07:00
Jarred Sumner
c37d0be027
Fix import Foo, {bar} when from hardcoded builtin modules in runtime
2022-10-21 21:13:50 -07:00
Jarred Sumner
4c136cddd7
Fix test failure
2022-10-21 21:13:50 -07:00
Jarred Sumner
b50dc40fb8
Reload node:fs in development
2022-10-21 21:13:50 -07:00
Carter Snook
6160dc3995
chore: remove outdated var usages ( #1364 )
2022-10-21 09:54:13 -07:00
Jarred Sumner
a1f40400c1
Fix "/" in example
2022-10-21 01:09:37 -07:00
Jarred Sumner
c940f00e2d
Fix infinite loop
2022-10-21 01:07:49 -07:00
Jarred Sumner
97ccbc189a
micro-optimize
2022-10-21 01:07:49 -07:00
Ashcon Partovi
0a2c101c28
Update install script to use secure flags
2022-10-20 18:44:50 -07:00
Ashcon Partovi
c526a6bce8
Add installation method for Homebrew
2022-10-20 18:26:23 -07:00
Jarred Sumner
da9b2452a7
Fix crash in highWaterMark
2022-10-20 16:34:09 -07:00
zhiyuan
210ae2ffb2
Fix Bun.serve error handler error param ( #1359 )
2022-10-20 01:40:58 -07:00
Jarred Sumner
9f16906499
Fix calling ws.publish inside close when other clients are connected
...
This fixes https://github.com/oven-sh/bun/issues/1357
2022-10-19 19:54:20 -07:00
Lucas Garron
605c429770
Cache dir loader: Prefer $BUN_INSTALL and $XDG_CACHE_HOME to $HOME. ( #1351 )
...
This partially addresses https://github.com/oven-sh/bun/issues/696 , by using `$XDG_CACHE_HOME` for those of us who already have that env var set.
2022-10-19 16:19:50 -07:00
Ashcon Partovi
b064872d9a
Improve issue templates ( #1353 )
2022-10-19 16:19:35 -07:00
Jarred Sumner
ff36fa8a53
Add websocket hot example
2022-10-19 02:36:22 -07:00
Jarred Sumner
19682b4225
Update README.md
2022-10-19 01:13:13 -07:00
Jarred Sumner
536bd72de9
Prettier
2022-10-19 00:18:15 -07:00
Jarred Sumner
87ca9948ec
Allow returning a Response object when upgrading
2022-10-19 00:18:00 -07:00
Jarred Sumner
57e5c35277
latest
2022-10-18 23:05:23 -07:00
Jarred Sumner
8b4c3ec0c7
Add todo
2022-10-18 22:57:06 -07:00
Jarred Sumner
9c7eb75a9a
websocker-server
2022-10-18 22:16:51 -07:00
Jarred Sumner
b0fe167910
Fix test
2022-10-18 22:16:51 -07:00
Aapo Alasuutari
6223030360
Use buffer type for Deno FFI binding to align with Bun usage ( #1321 )
...
* Use buffer type for Deno FFI binding to align with Bun usage
* Prettier
2022-10-18 21:12:33 -07:00
Dylan Conway
1835e4b9f9
get args fix ( #1346 )
...
* fix args.len < capacity check
* tests for args
* file name change
* switch to stdout.writer, use JSON for parsing
* bun-debug or bun
* missing arg
2022-10-18 20:11:17 -07:00
Ikko Ashimine
8ca49f906a
Fix typo in datetime.zig ( #1310 )
...
containg -> contain
2022-10-18 18:48:53 -07:00
Jarred Sumner
dac6c48b1e
woops
2022-10-18 18:21:53 -07:00
Jarred Sumner
2b0694ec8c
Update uws
2022-10-18 17:40:34 -07:00
Jarred Sumner
26bfc4f0a3
Update uws
2022-10-18 16:57:25 -07:00
Jarred Sumner
fbec10758b
Update uws
2022-10-18 16:41:13 -07:00
Jarred Sumner
30d43b027f
Update javascript.zig
2022-10-18 13:48:50 -07:00
Jarred Sumner
693b1c9b23
Implement performance.timeOrigin
2022-10-18 13:36:44 -07:00
Jarred Sumner
ce0efc37cc
build faiilures
2022-10-18 03:12:34 -07:00
Jarred Sumner
11c105aa1d
Update uws
2022-10-18 02:44:23 -07:00
Jarred Sumner
9167aedcc8
y u no work
2022-10-18 00:32:49 -07:00
Jarred Sumner
fc4c3e3199
Fix build
2022-10-17 23:54:47 -07:00
Jarred Sumner
61a8490c66
Fix empty process.argv
2022-10-17 22:44:42 -07:00
Jarred Sumner
abd6e496ab
Add oniguruma to Dockerfile
...
CC @dylan-conway so you have context in the future how to do this
2022-10-17 22:39:49 -07:00
Dylan Conway
8e1b2ba32e
add oniguruma for regex with variable length lookbehinds ( #1329 )
...
* added pcre2 submodule
* pcre2 regex boilerplate
* tests for pcre2 regex
* flag validation, getters, construct and compile mostly working
* string escaping for source and toString(), exec, more tests
* flag sorting, match, matchAll, search, split, replace
* remove lib link
* add destructor to PCRE2RegExp
* header include
* removed ternary
* switched to oniguruma for regex library
* revert sql changes
* fix indices flag, add tests
* revert settings
* working error messages
* more tests for lastIndex, fix logic for compile and lastIndex
* move oniguruma lib to deps out dir
2022-10-17 22:37:18 -07:00
Jarred Sumner
c7fc8fdf96
Updates to UWS
2022-10-17 21:55:38 -07:00
Jarred Sumner
7f4bb93782
Slightly mroe careful TextEncoder
2022-10-17 21:49:00 -07:00
Jarred Sumner
a10a8e9c70
Load fewer copies of uWS
2022-10-17 21:48:37 -07:00
Jarred Sumner
b595ddf20d
Fix error handler
2022-10-17 15:38:36 -07:00
Jarred Sumner
4bd9b20c8a
Workaround crash
2022-10-17 07:25:10 -07:00
Jarred Sumner
9190061ba4
Update websocket-server.test.ts
2022-10-17 07:24:20 -07:00
Jarred Sumner
41f9fd85f6
Handle assertion faillure
2022-10-17 07:24:12 -07:00
Jarred Sumner
cdff2697ef
Implement sendText, sendBinary, publishText, publishBinary
2022-10-17 06:53:18 -07:00
Jarred Sumner
ca02695993
Update README.md
2022-10-17 04:36:22 -07:00
Jarred Sumner
9a2f2a94bf
Update README.md
2022-10-17 04:17:39 -07:00
Jarred Sumner
e22c245d08
Update README.md
2022-10-17 04:07:55 -07:00
Jarred Sumner
171242680d
Update README.md
2022-10-17 03:58:53 -07:00
Jarred Sumner
5995f2ed71
Update README.md
2022-10-17 03:57:43 -07:00
Jarred Sumner
abbde39a02
Clean up some code
2022-10-17 03:33:37 -07:00
Jarred Sumner
e1a17aff4c
Fix headers + add test
2022-10-17 03:25:50 -07:00
Jarred Sumner
b8c5646c49
More tests
2022-10-17 03:04:43 -07:00
Jarred Sumner
62b0b601c2
Implement error and binaryType
2022-10-17 03:03:46 -07:00
Jarred Sumner
e43b4815b5
Handle .zero better
2022-10-17 01:38:18 -07:00
Jarred Sumner
923d9c1bbb
Redo
2022-10-17 00:41:29 -07:00
Jarred Sumner
e3a6007a76
Redo WebSocket api
2022-10-17 00:41:29 -07:00
Dennis Dudek
00ae8f79e4
Reflecting new home for bun templates ( #1317 )
...
* Reflecting new home for bun templates
https://github.com/bun-community/create-templates/
* templates now in root
2022-10-16 20:52:39 -07:00
Jarred Sumner
dc1330aef5
yml
2022-10-16 20:50:15 -07:00
Jarred Sumner
3c1e3792d6
Fix #1335
2022-10-16 20:43:43 -07:00
Jarred Sumner
603164e66a
Revert "disable lto for UWS to workaround bug under load"
...
This reverts commit f356da1b5e .
2022-10-16 20:34:02 -07:00
Jarred Sumner
f19b5ce409
Disable InlineBlob optimization
2022-10-16 19:52:35 -07:00
Jarred Sumner
f356da1b5e
disable lto for UWS to workaround bug under load
2022-10-16 19:02:20 -07:00
Jarred Sumner
07a2f80cbc
Add a comment
2022-10-16 17:03:17 -07:00
Jarred Sumner
2888f43c8a
Make debug logs configurable
2022-10-16 17:03:06 -07:00
Jarred Sumner
697e105ffa
Name the thread
2022-10-16 17:02:56 -07:00
Jarred Sumner
5d7174d789
Changed api
2022-10-16 17:02:45 -07:00
Jarred Sumner
ab3b072249
snapshots
2022-10-16 17:02:35 -07:00
Jarred Sumner
690e79445d
Update uws
2022-10-16 05:02:01 -07:00
Jarred Sumner
bce68bc898
Set Date header
2022-10-16 04:59:43 -07:00
Jarred Sumner
94091a7522
Make more sure we know what the types we are sending are
2022-10-16 00:14:07 -07:00
Jarred Sumner
2852520d90
Fix WebSocket server sending invalid data at the end
2022-10-16 00:13:51 -07:00
Jarred Sumner
abf3a13433
Fail earlier when there are encoding errors
2022-10-16 00:13:18 -07:00
Jarred Sumner
cebd351e61
Disable some logging
2022-10-15 22:55:48 -07:00
Jarred Sumner
19cff80af8
More careful code generator
2022-10-15 22:49:06 -07:00
Jarred Sumner
9830e50a29
Simplify code that turns a fetch() response into a JSResponse
2022-10-15 22:48:27 -07:00
Jarred Sumner
820e6605f8
Simplify the code that reads HTTP client request bodies
2022-10-15 22:47:18 -07:00
Jarred Sumner
c06bba77d4
Add test for body mixin error
2022-10-15 21:34:05 -07:00
Jarred Sumner
4ba217bc42
Dumber code is better code
2022-10-15 21:06:17 -07:00
Jarred Sumner
a42a9e901c
Errors must return 0 instead of undefined
2022-10-15 21:06:08 -07:00
Jarred Sumner
3482d76175
Fix crash when BodyMixin functions throw
...
Fixes https://github.com/oven-sh/bun/issues/1331#issuecomment-1279844836
2022-10-15 21:05:15 -07:00
Jarred Sumner
63c9315b24
Add a helper for InlineBlob from two arrays
2022-10-15 21:03:40 -07:00
Jarred Sumner
40126bbe60
More logging
2022-10-15 21:02:32 -07:00
Jarred Sumner
70615f4036
Add a simple test for websocket server
2022-10-15 21:01:59 -07:00
Jarred Sumner
1b1b96aff8
add more logging
2022-10-15 21:01:50 -07:00
Jarred Sumner
de1e963ffa
More forcefully clone strings
2022-10-15 05:41:57 -07:00
Jarred Sumner
a299b1b8e3
More lenient for response_value data
2022-10-15 05:34:15 -07:00
Jarred Sumner
4cc0eebf4b
Rename pendingSockets to pendingWebSockets
2022-10-15 05:34:05 -07:00
Jarred Sumner
b1e97edc59
Fix memory leak in HTTP server
2022-10-15 05:33:48 -07:00
Jarred Sumner
a56dfe486b
Remove unnecessary GC protect() call
2022-10-15 05:33:38 -07:00
Jarred Sumner
e9c3529476
Fix crash in WebSocketServer close
2022-10-15 05:32:52 -07:00
Jarred Sumner
c9a4bdf44d
Update README.md
2022-10-15 04:48:59 -07:00
Jarred Sumner
c6fe82018a
Fix bug where pong would put it in invalid state
2022-10-15 04:14:55 -07:00
Jarred Sumner
3016723198
Add some logging to WebSocket client
2022-10-15 04:14:42 -07:00
Jarred Sumner
e453b949dd
Be more careful with some of the string handling code
2022-10-15 03:40:10 -07:00
Jarred Sumner
1236e3f59c
Update README.md
2022-10-15 03:35:12 -07:00
Jarred Sumner
c6d314e954
Update README.md
2022-10-15 03:33:45 -07:00
Jarred Sumner
2c548d45f8
Update c_cpp_properties.json
2022-10-15 03:29:25 -07:00
Jarred Sumner
4c741cc8b6
Update README.md
2022-10-15 03:29:14 -07:00
Jarred Sumner
4b5af13ac0
WebSocket Server support
2022-10-15 03:06:41 -07:00
Jarred Sumner
35cbfa63a6
Add a way to update cached values from Zig
2022-10-15 02:57:28 -07:00
Jarred Sumner
dd84681d30
Update README.md
2022-10-15 00:30:19 -07:00
Jarred Sumner
0a1fca5d7d
Update
2022-10-13 16:43:44 -07:00
Jarred Sumner
af033c02c5
Fix bench
2022-10-13 15:32:25 -07:00
Jarred Sumner
40506e33e7
Fix bench
2022-10-13 15:26:48 -07:00
zhiyuan
b542921f3d
Fix import alias ( #1313 )
2022-10-13 05:44:08 -07:00
Jarred Sumner
b0a7f8df92
Create http-request-body.ts
2022-10-13 02:27:54 -07:00
Jarred Sumner
32e16bda23
Update react-hello-world.jsx
2022-10-13 02:18:50 -07:00
Jarred Sumner
e32ada318a
Update react-hello-world.jsx
2022-10-13 02:18:25 -07:00
Jarred Sumner
b011610bb3
Update README.md
2022-10-13 02:02:48 -07:00
Jarred Sumner
723c7c56dc
Add for await
2022-10-13 00:58:37 -07:00
Jarred Sumner
6b7a0c1d3f
Fix crash in TextEncoder with rope strings that happens sometimes
2022-10-12 23:59:00 -07:00
Jarred Sumner
22f7981cff
Regenerate builtins
2022-10-12 23:50:48 -07:00
Jarred Sumner
ad29d9ffb3
Fix cancel not working in some cases in ReadableStream
2022-10-12 23:48:41 -07:00
Jarred Sumner
8200f43a04
Fix a bug with ReadableStreamDefaultReader and "direct" controller
2022-10-12 23:48:27 -07:00
Jarred Sumner
3fceae8070
Implement ReadableStream.prototype[Symbol.asyncIterator]
...
cc @fabiancook
2022-10-12 23:46:15 -07:00
Jarred Sumner
8cd8e34719
Update README.md
2022-10-12 19:16:14 -07:00
Jarred Sumner
930981c9d9
Update README.md
2022-10-12 19:15:51 -07:00
Jarred Sumner
f8b22d51a9
Update README.md
2022-10-12 19:15:23 -07:00
Jarred Sumner
2b1b7eb6b3
Update README.md
2022-10-12 19:15:02 -07:00
Jarred Sumner
e241e503b7
Update README.md
2022-10-12 19:14:08 -07:00
Jarred Sumner
39940ec1f5
Update README.md
2022-10-12 19:13:40 -07:00
Jarred Sumner
f725b7e1ab
Update README.md
2022-10-12 19:11:47 -07:00
Jarred Sumner
da66bed946
Update README.md
2022-10-12 19:10:01 -07:00
Jarred Sumner
58fe024aea
Add --hot to completions
2022-10-12 19:07:11 -07:00
Jarred Sumner
6205cf3fe4
Update README.md
2022-10-12 18:57:28 -07:00
Jarred Sumner
fb6c87da07
Update README.md
2022-10-12 18:57:17 -07:00
Jarred Sumner
d0fb442c59
Update README.md
2022-10-12 18:55:26 -07:00
Jarred Sumner
1c949354c6
Update README.md
2022-10-12 18:17:21 -07:00
Jarred Sumner
3a042cdb48
Add a comment
2022-10-12 18:09:04 -07:00
Jarred Sumner
a97914fff3
Fix require("bun") and import("bun") when statically known
2022-10-12 18:02:18 -07:00
Jarred Sumner
ec00838a03
Update test_scope_debug.ts
2022-10-12 17:47:05 -07:00
Jarred Sumner
860bd53fb3
[bun wiptest] Ignore . folders
2022-10-12 17:10:03 -07:00
Jarred Sumner
477638435c
Update README.md
2022-10-12 17:09:37 -07:00
Jarred Sumner
cb384dfa29
Add a bench
2022-10-12 17:00:17 -07:00
Jarred Sumner
dd15a98879
Add hugemem snippet
2022-10-12 16:56:49 -07:00
Jarred Sumner
6b2637468c
Add snippet
2022-10-12 16:50:57 -07:00
Jarred Sumner
ab4f4bca6d
Add a doc on Bun.spawn
2022-10-12 16:39:26 -07:00
Jarred Sumner
73a611a3b9
Stop keeping the process alive for too long
2022-10-12 16:39:12 -07:00
Jarred Sumner
c5333ab597
support array as first arg in Bun.spawn
2022-10-12 14:43:24 -07:00
Jarred Sumner
75e8c4699c
Fix test bug
2022-10-12 01:47:48 -07:00
Jarred Sumner
8fcb0ff0b6
Remove dead code
2022-10-11 23:45:23 -07:00
Jarred Sumner
dbd569d2ab
remove config struct
2022-10-11 23:44:35 -07:00
Jarred Sumner
40eca63653
Fix crash when decoding latin1 rope strings and the GC is running
2022-10-11 22:42:19 -07:00
Jarred Sumner
e7eadcde5a
Implement Bun.spawnSync
2022-10-11 22:21:06 -07:00
Jarred Sumner
36adee4dc8
Make Bun.spawn work on Linux
2022-10-11 20:25:16 -07:00
Jarred Sumner
9fe1ad93cb
Fixup example
2022-10-11 20:00:04 -07:00
Jarred Sumner
8311761c82
Handle eintr in uSockets
2022-10-11 15:39:58 -07:00
Jarred Sumner
8702f965a2
Add test for Bun.file() for stdin and stdout
2022-10-11 14:56:49 -07:00
Jarred Sumner
888a685e26
Maybe fix linux bug?
2022-10-11 13:53:31 -07:00
Jarred Sumner
51c1d18e68
Update server.zig
2022-10-11 01:44:14 -07:00
Jarred Sumner
af6476ca74
Work around Zig C ABI bug on Linux
2022-10-11 01:10:39 -07:00
Jarred Sumner
614d256cb6
Use poll() to check if writable
2022-10-11 00:07:13 -07:00
Jarred Sumner
3867431ed1
Add test that reads & writes stdin/stderr
2022-10-11 00:04:48 -07:00
Jarred Sumner
1f7f5646de
Update bun-write.test.js
2022-10-11 00:03:37 -07:00
Jarred Sumner
40623cf967
Implement fs.rm cross-platformly
2022-10-11 00:03:32 -07:00
Jarred Sumner
d07e4f8bd1
Automatically close stdout/stderr on subprocess exit if possible
2022-10-10 22:16:19 -07:00
Jarred Sumner
e4bf189e9d
Change behavior of Bun.write
2022-10-10 21:01:06 -07:00
Jarred Sumner
2292ef8d0e
Keep the process alive
2022-10-10 21:00:39 -07:00
Jarred Sumner
a114af4eea
Use write() and read() since not every file type supports positional
2022-10-10 20:59:34 -07:00
Jarred Sumner
5152aebde1
Handle EAGAIN in Bun.write() for short input
2022-10-10 20:58:58 -07:00
Jarred Sumner
1310a1d99e
Ensure we set globalThis in the FileBlob / FileSink
2022-10-10 20:58:43 -07:00
Jarred Sumner
a20d3eaebb
Support cache with same name applied to multiple getters
2022-10-10 20:58:19 -07:00
Jarred Sumner
3cc61f8e30
Fix issue with exit callback in Bun.spawn() never firing
2022-10-10 20:57:38 -07:00
Jarred Sumner
ef2c9c330c
Process inherits from EventEmitter
2022-10-10 20:27:04 -07:00
Jarred Sumner
5db06105ba
Add test for calling assert
2022-10-10 13:51:45 -07:00
Jarred Sumner
24433ceb27
use tweaked CJS transform
2022-10-10 13:51:25 -07:00
Jarred Sumner
ff797f7410
Poll in
2022-10-09 20:38:31 -07:00
Jarred Sumner
cef32c1123
Don't set CLOEXEC
2022-10-09 20:32:10 -07:00
Jarred Sumner
50d4cedd92
Add section about upgrading in the readme
2022-10-09 19:33:07 -07:00
Jarred Sumner
27ad376071
Bump version
2022-10-09 19:04:25 -07:00
Jarred Sumner
eebcd30067
Bun.write - truncate empty files
2022-10-09 18:57:03 -07:00
Jarred Sumner
1afe2f05dc
Rename resposne.file.test.js -> bun-write.test.js + add some large file tests
2022-10-09 18:26:00 -07:00
Jarred Sumner
170e3117d7
maybe workaround C ABI issue on linux amd64
2022-10-09 14:30:00 -07:00
Jarred Sumner
fc08e69039
Missing code
2022-10-09 02:20:16 -07:00
Jarred Sumner
25918ddd2a
More careful code for FileBlobLoader and FIleSink
2022-10-09 02:02:47 -07:00
Jarred Sumner
edfd2af949
Update WebKit
2022-10-09 02:02:47 -07:00
Jarred Sumner
dffaeaca1e
Start to add tests for spawn
2022-10-09 02:02:47 -07:00
Jarred Sumner
88bdae8218
Add a test for server.reload()
2022-10-09 02:02:47 -07:00
Jarred Sumner
fdfe00452b
Add a console.debug for the server:port when HMR is enabled
2022-10-09 02:02:47 -07:00
Jarred Sumner
b38d553d60
Update WebKit
2022-10-09 02:02:47 -07:00
Jarred Sumner
0833275f03
Buffer input & output until the user gets the stream
2022-10-09 02:02:47 -07:00
Jarred Sumner
4252d015ca
soem helpers
2022-10-09 02:02:47 -07:00
Jarred Sumner
9fd0072740
Don't forget to load SQLite in Database.deserialize
...
Fixes https://github.com/oven-sh/bun/issues/1304
2022-10-09 02:02:47 -07:00
Jarred Sumner
4dbbdb1671
Clean up how we reload entry point a little
2022-10-09 02:02:47 -07:00
Jarred Sumner
4b5c9acc72
Update bench
2022-10-09 02:02:47 -07:00
Jarred Sumner
b63218206d
Add some more bench snippets
2022-10-09 02:02:47 -07:00
Jarred Sumner
349ccf229b
Fix navigator.userAgent test
2022-10-09 02:02:47 -07:00
Jarred Sumner
85602b406a
Fix SQLite test
2022-10-09 02:02:47 -07:00
Jarred Sumner
cc6077fbf5
Snippet for return await
2022-10-09 02:02:47 -07:00
Jarred Sumner
495534a054
Expose Bun.version and Bun.revision
2022-10-09 02:02:46 -07:00
Jarred Sumner
57513f38d3
Add a test for Bun.version
2022-10-09 02:02:46 -07:00
Jarred Sumner
0b3abf2c78
Add a test for not logging .env
2022-10-09 02:02:46 -07:00
Jarred Sumner
9294ef73b7
Update WebKit
2022-10-09 02:02:46 -07:00
zhiyuan
36ec06493e
Fix fetch response redirected ( #1303 )
...
* fix: sync codegen
* fix: generate class script
* fix: sync codegen
* fix: add response redirected property
2022-10-08 22:36:33 -07:00
zhiyuan
6068ad15d4
fix: install error when node_modules already in npm package ( #1301 )
2022-10-08 02:16:16 -07:00
Jarred Sumner
c2c9173eff
Fix https://github.com/oven-sh/bun/issues/1263
...
What happened: when moving to uSockets for the http client, I forgot to call `SSL_set_tlsext_host_name` and uSockets apparently doesn't do that
2022-10-08 01:06:35 -07:00
zhiyuang
99e7856269
Fix nested modules bin executable issue ( #1299 )
2022-10-07 09:48:37 -07:00
Jarred Sumner
1355d415e9
Fix linux amd64 crash
2022-10-06 22:14:05 -07:00
Jarred SUmner
410059c9f3
Fix unused arg
2022-10-06 16:23:46 -07:00
Jarred SUmner
80096884f6
Add --profile to bun upgrade
2022-10-06 16:23:08 -07:00
Jarred Sumner
d2dd2ae306
Add protocol getter to Bun.serve()
2022-10-06 15:02:56 -07:00
Jarred Sumner
5c3ce875b2
Automatically support hot reloading with export default { fetch() }
2022-10-06 14:21:14 -07:00
Jarred Sumner
6970250b57
Fix Buffer.toJSON()
2022-10-06 14:18:12 -07:00
Jarred Sumner
c880c53199
Fix failing linux build
2022-10-06 03:02:07 -07:00
Jarred Sumner
75371d1462
Add WebSocket bindings for uWS
2022-10-06 00:48:55 -07:00
Jarred Sumner
2c762f47c9
Add simple Hot Module Reloading to bun's runtime
2022-10-06 00:47:03 -07:00
Jarred Sumner
3246efa580
Implement Server.reload()
2022-10-06 00:01:02 -07:00
Jarred Sumner
4060afb7c7
Implement console.count and console.countReset
...
Fixes https://github.com/oven-sh/bun/issues/1296
2022-10-05 18:59:58 -07:00
Jarred Sumner
e4d3f51161
move Bun.spawn into separate file
2022-10-05 18:07:41 -07:00
Jarred Sumner
1777e9d0b1
Add abstraction for ticking async event loop
2022-10-05 18:07:41 -07:00
Jarred Sumner
707b454bf4
Support buffered input in Bun.spawn
2022-10-05 18:07:41 -07:00
Jarred Sumner
ca4c99b1bf
Fix interopRequireDefault issue with path :(
2022-10-05 18:07:41 -07:00
Jarred Sumner
a302549d3e
Expose private @require symbol
2022-10-05 18:07:41 -07:00
Jarred Sumner
1a7418e890
Mark these strings as not needing to be GC'd
2022-10-05 18:07:41 -07:00
Jarred Sumner
c1219a3b48
[breaking] process.version lies and reports Node 18
...
See https://twitter.com/jarredsumner/status/1577189928294789122
2022-10-05 18:07:41 -07:00
Jarred Sumner
632e4ac6ac
Improve stack traces in fs functions
...
This is a hack
2022-10-05 18:07:41 -07:00
Jarred Sumner
18ae17871d
Export rm in fs/promises
2022-10-05 18:07:41 -07:00
Jarred Sumner
09ebb217dd
Temporary hack so res.socket in node:http doesn't throw
2022-10-05 18:07:41 -07:00
Jarred Sumner
dbccfc2b26
Fix missing path/posix and path/win32
2022-10-05 18:07:41 -07:00
Jarred Sumner
28f7240dd3
Handle more edgecases in fs.rm on macOS
2022-10-05 18:07:41 -07:00
Jarred Sumner
9f10956ce1
We need to explicitly flush now
2022-10-05 18:07:41 -07:00
Jarred Sumner
c9a50b2f2d
Add a test for simultaneous requests
2022-10-05 18:07:41 -07:00
Jarred Sumner
d683d7185d
handle values from native in streams
2022-10-05 18:07:41 -07:00
Jarred Sumner
fc13938fc6
Fix bug with next dev showing raw html instead of the rendered page
2022-10-05 18:07:41 -07:00
Ryan Russell
f8e8b10e10
docs(thread_pool): comment readability improvements ( #1241 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org >
Signed-off-by: Ryan Russell <git@ryanrussell.org >
2022-10-05 16:49:37 -07:00
zhiyuang
050292229f
fix: console.log handle circular correctly ( #1293 )
2022-10-05 16:49:00 -07:00
Jarred Sumner
906e97223a
Fix DotEnv Loader ignoring error log level
2022-10-03 11:07:00 -07:00
Jarred Sumner
dc10b24730
Add readdir snippet
2022-10-03 01:58:57 -07:00
Jarred Sumner
d3ef6c330a
node:fs implement rm on macOS
...
no linux yet
2022-10-03 01:10:38 -07:00
Jarred Sumner
4700762132
Bun.spawn start to implement support for buffered input (ArrayBuffer, Response, Request body)
2022-10-03 01:09:16 -07:00
Jarred Sumner
08d606c3d7
Fix undefined is not a function error in WritableStream
2022-10-03 01:07:54 -07:00
Jarred Sumner
ed82b919a0
Remove extra green
2022-10-02 18:02:54 -07:00
Jarred Sumner
4fa065180b
Fix test expectation counter
2022-10-02 16:06:47 -07:00
Jarred Sumner
cd9b47315c
Reduce memory usage of HTTP requests by 8 KB
2022-10-02 01:59:59 -07:00
Jarred Sumner
062c3948ba
Fix test failures
2022-10-02 01:56:55 -07:00
Jarred Sumner
bff3b902e8
Fix unref'ing websocket
2022-10-01 18:06:01 -07:00
Jarred Sumner
3b4900193b
Fix setTimeout(0), improve test coverage slightly, reduce memory usage of timers
2022-10-01 16:02:29 -07:00
Jarred Sumner
bab317edd1
[napi] Implement napi_remove_wrap
2022-10-01 13:23:32 -07:00
Jarred Sumner
1dac9248ad
Add missing type check to napi_wrap
...
Fixes https://github.com/oven-sh/bun/issues/1286
2022-10-01 13:22:16 -07:00
Jarred Sumner
c57b32fa0c
[bun:test] When there are lots of tests, print the failures at the bottom so you can see them easier
2022-10-01 01:46:34 -07:00
Jarred Sumner
43c22b4411
Fix release mode value semantics bug
2022-10-01 01:46:02 -07:00
Jarred Sumner
bee72be733
Increase test coverage for request body streaming
...
There is still one memory issue to address
2022-10-01 01:13:27 -07:00
Jarred Sumner
ea159b6004
Make setTimeout/setInterval more reliable
2022-09-30 22:12:31 -07:00
Jarred Sumner
ac72f28fc8
Fix body mixin
2022-09-30 20:38:25 -07:00
Jarred Sumner
e4e7966d64
Fix failing tests from backpressure
2022-09-30 19:43:03 -07:00
Jarred Sumner
48cb526e0b
Eagerly receive incoming request bodies
2022-09-30 18:49:25 -07:00
Jarred Sumner
fd6d28a9fa
Fix outdated type
2022-09-30 18:46:58 -07:00
Jarred Sumner
944dc988bf
Simplify some of this
2022-09-30 18:46:50 -07:00
Jarred Sumner
2fac218a36
Delete some code
2022-09-30 18:45:02 -07:00
Jarred Sumner
16c184efdf
Add a couple assertions
2022-09-30 18:44:48 -07:00
Jarred Sumner
6b5c49c269
Fix incorrect first number in byte stream
2022-09-30 18:38:36 -07:00
Jarred Sumner
af6a43c49b
Attempt to address .write() bug
2022-09-30 01:27:35 -07:00
Jarred Sumner
18310cfd7c
Fix unnecessary "Buffer is detached" error
2022-09-30 01:08:53 -07:00
Jarred Sumner
9046767da4
Request->url == string, not ZigString now
2022-09-30 01:08:34 -07:00
Jarred Sumner
f70c83345a
Improve test coverage for Request body streaming!
2022-09-30 01:07:53 -07:00
Jarred Sumner
52f5f9545a
Fix OOB when multiple headers have the same name length
...
Fixes https://github.com/oven-sh/bun/issues/1279
2022-09-30 01:07:35 -07:00
Jarred Sumner
1434fb66d3
Add a better wrapper function for promises
2022-09-30 01:06:42 -07:00
Jarred Sumner
f325a0016b
Use poll_ref in the io tasks
2022-09-30 01:06:28 -07:00
Jarred Sumner
9d7bcac680
Support all ArrayBufferView in all hashing functions and node fs functions
2022-09-30 01:06:04 -07:00
Jarred Sumner
8d11ab3c35
Verbose flag
2022-09-30 01:05:40 -07:00
Jarred Sumner
56e491ad8a
Use pollref in FileBlobLoader
2022-09-30 01:05:33 -07:00
Jarred Sumner
9296a369de
Fixup Body mixin implementation
2022-09-30 01:05:10 -07:00
Jarred Sumner
9050e6ee87
Use PollRef in napi
2022-09-30 01:04:20 -07:00
Jarred Sumner
84af4f0133
more gc in fs test
2022-09-30 01:04:10 -07:00
Jarred Sumner
6338413696
Remove extraneous calls to .ref()
2022-09-30 00:44:36 -07:00
Jarred Sumner
fbec7bda6a
Add hidden verbose flag to fetch (the third argument)
...
```js
fetch(url, {body: ""}, {verbose: true})
```
2022-09-30 00:29:31 -07:00
Jarred Sumner
0f371a2869
[internal] Use PollRef for fetch()
2022-09-30 00:27:39 -07:00
Jarred Sumner
c30346cf5d
Create test_scope_debug.ts
2022-09-30 00:25:28 -07:00
Jarred Sumner
64ef2389dc
fix potentially truncated encodeInto
2022-09-30 00:06:46 -07:00
Jarred Sumner
6ec55cbeeb
Fixup
2022-09-29 18:20:54 -07:00
Jarred Sumner
3430cdd91b
don't need to mark
2022-09-29 18:01:12 -07:00
Jarred Sumner
9702568161
Lazy URL, more explicit close()
2022-09-29 17:58:04 -07:00
Jarred Sumner
016a9d6535
Update base.zig
2022-09-29 10:52:41 -07:00
Jarred Sumner
9f10c1a805
Fix Bun.serve not keeping process alive
2022-09-29 10:26:40 -07:00
Jarred Sumner
7631a47612
Fix console.log(ModuleNamespace)
2022-09-29 00:22:51 -07:00
Jarred Sumner
b8851143f9
Update streams.zig
2022-09-28 23:56:38 -07:00
Jarred Sumner
f3028ff6f3
Use uSockets for setTimeout and setInterval
2022-09-28 23:45:31 -07:00
Jarred Sumner
3d35fae890
Add some tests for request body streaming
...
Need to fix an off-by-one error with Blob it seems
2022-09-28 23:43:40 -07:00
Jarred Sumner
1636291b03
/s/c_int/i32
2022-09-28 23:39:10 -07:00
Jarred Sumner
e69e8d35b9
Fix unreachable
2022-09-28 23:38:54 -07:00
Jarred Sumner
9438540bf9
Fix a crash with fetch(url, {body: arrayBuffer}) introduced with the Blob changes
...
cc @bwasti
2022-09-28 23:38:42 -07:00
Jarred Sumner
d34179b9eb
Queue tests rather than run immediately
2022-09-28 23:38:04 -07:00
Jarred Sumner
90074ce98c
Clean up WebSocket never starting
2022-09-28 23:37:40 -07:00
Jarred Sumner
fd0054a800
Outer event loop tweaks
2022-09-28 23:37:09 -07:00
Jarred Sumner
0fb5f15673
Fix a crash in HTMLRewriter caused by blob changes
2022-09-28 23:34:12 -07:00
Jarred Sumner
16929129f0
Clean up some of the event loop code
2022-09-28 23:34:03 -07:00
Jarred Sumner
524e48a81d
make bun:test ~300x faster when using http server, websockets, etc
...
there was an event loop bug
2022-09-28 23:07:18 -07:00
Jarred Sumner
76b1a3a88d
Bench snippet for Array.map
2022-09-28 14:38:15 -07:00
Jarred Sumner
b74351e55f
Support a default object in CommonJS wrapper
...
Fixes https://github.com/oven-sh/bun/issues/1284
Related to https://github.com/oven-sh/bun/issues/1285
2022-09-28 14:37:35 -07:00
Jarred Sumner
a1b4dc42cb
Implement reportExtraMemoryVisited and reportExtraMemoryAllocated in bindings
2022-09-28 14:36:44 -07:00
Jarred Sumner
5ae5125919
size estimatoor
2022-09-28 11:10:20 -07:00
Jarred Sumner
82a68cd3da
fixup
2022-09-28 00:52:25 -07:00
Jarred Sumner
a41150836a
Add missing commit
2022-09-28 00:20:12 -07:00
Jarred Sumner
e637b43117
Add missing commit
2022-09-28 00:18:50 -07:00
Jarred Sumner
443ba0f396
Inline blobs in the HTTP server
2022-09-28 00:12:31 -07:00
Jarred Sumner
71ea4a2c9b
Fix several bugs with Request body streaming + store small response bodies without an extra memory allocation
2022-09-28 00:11:15 -07:00
Jarred Sumner
a8ab18bd50
Fix potential crash when TS code has an unexpected ")"
2022-09-27 09:40:29 -07:00
Jarred Sumner
ce91423a19
Update streams.zig
2022-09-26 20:49:44 -07:00
Jarred Sumner
5875d1419b
Make Bun.spawn, FileSink and FileBlobLoader a little more reliable
2022-09-26 20:35:26 -07:00
Jarred Sumner
24a9bc23b7
[Web Streams] Add body to Response and Request ( #1255 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-26 20:04:28 -07:00
Jarred Sumner
97c3688788
Make getting the body for fetch a little more reusable
2022-09-26 20:00:34 -07:00
Jarred Sumner
0b915b1dd2
Add missing ignoreUsage call
2022-09-26 19:59:38 -07:00
Jarred Sumner
5fcbfa780f
Bump WebKit
2022-09-26 19:59:09 -07:00
Jarred Sumner
a736010fdd
Fix crash when insufficient arguments
2022-09-26 10:30:33 -07:00
Jarred Sumner
b733125085
Fix console.log not printing an empty line
...
Depends on https://github.com/oven-sh/WebKit/actions/runs/3123884691/jobs/5066828848
Fixes https://github.com/oven-sh/bun/issues/1276
2022-09-25 15:49:35 -07:00
Jarred Sumner
5ef36f1b6f
Implement isatty in node:tty
2022-09-25 14:56:22 -07:00
Jarred Sumner
7cc772cd39
😪
2022-09-25 13:14:23 -07:00
Jarred SUmner
7ae73fad68
Make Linux implementation work
2022-09-25 13:14:23 -07:00
Jarred Sumner
96dcfd3cfe
Linux implementation
2022-09-25 13:14:23 -07:00
Jarred Sumner
9833841101
wip
2022-09-25 13:14:23 -07:00
Jarred Sumner
1cd67b62e9
Update package.json
2022-09-25 13:14:23 -07:00
Jarred Sumner
ffde9f7842
📷
2022-09-25 13:14:23 -07:00
Albert Putra Purnama
2819509786
test: Promisify basic tests ( #1018 )
...
* Promisify basic tests
* Add License header from node
* Add tests to complete existing promisify parity with node
* Update expected error message from nodejs test
2022-09-24 19:05:18 -07:00
Jarred Sumner
5b222996c8
Update bindings.zig
2022-09-23 03:21:38 -07:00
Jarred Sumner
62e22b2995
Implement Bun.which
2022-09-23 03:10:56 -07:00
Jarred Sumner
2346be55fc
Fix issue with react-is in bun-framework-next
2022-09-23 00:31:45 -07:00
Jarred Sumner
61d0c4042b
Use JSC heap for .arrayBuffer()
2022-09-23 00:26:23 -07:00
Jarred Sumner
de0b373c7c
Update streams.zig
2022-09-22 23:53:00 -07:00
Jarred Sumner
2c1926993b
Faster Blob + begin to implement FileSink
2022-09-22 23:45:02 -07:00
Jarred SUmner
e14a3af491
Fix linux build
2022-09-22 03:25:29 -07:00
Jarred Sumner
0968fd339f
Add epoll to list of syscalls that can fail
2022-09-22 03:06:48 -07:00
Jarred Sumner
2ca1861a54
Remove a mutex when enqueuing concurrent tasks
2022-09-22 02:38:36 -07:00
Jarred Sumner
ce9daa4857
1 event loop per thread. Instead of 3.
...
uWebSockets and uSockets will need to be upgraded to match the changes.
Previously:
- Bun had a separate kqueue/eventfd just for async wakeups.
- Bun had a separate kqueue/epoll just for reading files non-blocking in the same thread
This commit unifies it into one event loop per thread
2022-09-22 02:25:32 -07:00
Jarred Sumner
e15fb6b9b2
[breaking] Bun.serve().hostname should return the hostname instead of the baseURI
...
Previously Bun.serve().hostname was returning the baseURI, effectively the `origin`
That was incorrect.
Instead, it should be returning the hostname
2022-09-22 01:57:06 -07:00
Jarred Sumner
f1ffc72a62
Fix bun run foo -- by ignoring --
2022-09-22 01:56:07 -07:00
Jarred Sumner
37eee4235d
Fix preact & other "classic" jsx transforms, most likely
2022-09-21 20:00:12 -07:00
Jarred Sumner
871d530d6a
Fix crash with jsxFragment and jsxFactory in tsconfig.json
...
Fixes https://github.com/oven-sh/bun/issues/1269
2022-09-21 19:55:30 -07:00
Jarred Sumner
16b1e84138
Fix crash when creating an empty array
2022-09-21 18:52:24 -07:00
Jarred Sumner
100ce7b62f
Increase macro stack size
2022-09-21 00:00:46 -07:00
Jarred Sumner
c01cba3ab5
Update types.zig
2022-09-20 23:57:45 -07:00
Jarred Sumner
ef1607c088
fixup
2022-09-20 23:57:07 -07:00
Jarred Sumner
123e8c8d2b
Update WebKit
2022-09-20 23:56:08 -07:00
Jarred Sumner
9667eec9de
Be more careful with process.argv
2022-09-20 23:56:08 -07:00
Hemanth Krishna
26625f3e2a
fix: add destination to ADD command in Dockerfile ( #1268 )
...
Signed-off-by: Hemanth Krishna <hkpdev008@gmail.com >
Signed-off-by: Hemanth Krishna <hkpdev008@gmail.com >
2022-09-20 23:43:21 -07:00
Jarred Sumner
e94e6d8d95
Allow .env files to define the same key multiple times
...
Fixes https://github.com/oven-sh/bun/issues/1262
2022-09-20 01:02:15 -07:00
Jarred Sumner
f0bc50eb71
meant to include this in the previous commit
2022-09-20 00:45:19 -07:00
Jarred Sumner
6163fb830e
Add navigator.userAgent , navigator.hardwareConcurrency
2022-09-20 00:44:59 -07:00
Jarred Sumner
167948f5c3
Fix incorrect hostname logic
...
Fixes https://github.com/oven-sh/bun/issues/1261
2022-09-20 00:07:01 -07:00
Jarred Sumner
37d191bc02
Update process.argv to more closely match node
2022-09-19 23:37:26 -07:00
Jarred Sumner
da7b648971
Pass through arguments unmodified after bun run <script> or bun <script>
...
Fixes https://github.com/oven-sh/bun/issues/231
2022-09-19 23:37:08 -07:00
Jarred Sumner
8b7f43f855
Handle nested files more correctly with "imports" in package.json
2022-09-19 21:02:26 -07:00
Jarred Sumner
21770eb0f3
Implement imports in package.json (#foo imports)
...
Fixes https://github.com/oven-sh/bun/issues/478
Fixes https://github.com/oven-sh/bun/issues/234
Fixes https://github.com/oven-sh/bun/issues/822
2022-09-19 20:03:02 -07:00
Jarred Sumner
17be8023d9
Fix broken destructors
2022-09-19 17:26:30 -07:00
Jarred Sumner
9754c5b32b
Fix larger bodies
2022-09-19 05:50:10 -07:00
Jarred Sumner
a16cb39423
Improve the perf of reading HTTP request body
2022-09-18 18:45:34 -07:00
Jarred Sumner
dfefb05b10
Fix occasional crash with .json()
2022-09-18 18:37:55 -07:00
Jarred Sumner
55bdf2682c
Update build-id
2022-09-18 04:09:03 -07:00
Jarred Sumner
3a50ae92ec
Fix broken sending http body
2022-09-18 04:00:40 -07:00
Jarred Sumner
fe77f6a2f3
Update http_client_async.zig
2022-09-18 02:34:58 -07:00
Jarred Sumner
cd35218141
Add a way to disable timeout and keepalive
2022-09-18 02:30:52 -07:00
Jarred Sumner
daeef8d5b3
extremely minor perf nit
2022-09-17 22:14:38 -07:00
Kit PANG
184230058a
feat: env loader nested values with curly braces ( #1246 )
...
* [env loader] Add support for nested value with curly braces
does not support default values for nested values, e.g., ${undefined:default}, ${undefined:-default}, or ${undefined-default}
* fix: minor fix and add more test
* [env loader] Improve nested value parsing performance
remove unnecessary branching
Co-authored-by: Like <like@ekil.sh >
2022-09-17 22:11:16 -07:00
Jarred Sumner
a08b323e61
Fix napi module registration
...
Fixes https://github.com/oven-sh/bun/issues/1240
2022-09-17 21:56:30 -07:00
Jarred Sumner
745cc5c655
Handle missing 0\r\n chunk in HTTP client
2022-09-17 21:45:03 -07:00
Jarred Sumner
3719c3b736
Update & configure SSL a little
2022-09-17 21:45:03 -07:00
Jarred Sumner
0e424de684
Update WebKit
2022-09-17 21:45:03 -07:00
Jarred Sumner
285ef0ca01
Explicitly enable ShadowRealm
2022-09-17 21:45:03 -07:00
Greg Brimble
ce0df52b7e
Update macOS contributing instructions ( #1247 )
2022-09-17 17:49:46 -07:00
Jarred Sumner
e03204dccf
Avoid undefined memory
2022-09-17 17:41:13 -07:00
Jarred Sumner
0dea2d8515
Smaller stack
2022-09-17 17:40:50 -07:00
Jarred Sumner
31469bb05b
Prevent returning resolved promises
2022-09-17 04:39:59 -07:00
Jarred Sumner
b4f8e5cdb9
Fix default hostname
2022-09-17 04:31:29 -07:00
Jarred Sumner
cefec77646
Partially implement server.fetch() on Bun.serve
2022-09-17 04:28:32 -07:00
Hyro
7c7adc1361
chore: add napi label ( #1245 )
2022-09-17 02:54:41 -07:00
Jarred Sumner
af6609b0a3
[bun install] Add a package index via symlinks to ~/.bun/install/cache
2022-09-17 01:12:59 -07:00
Jarred Sumner
3ae950d829
Fix missing reason and code in CloseEvent
...
cc @paperdave
hardcoded right now but at least tells you why it closed
2022-09-17 00:42:20 -07:00
Jarred Sumner
c2f64d4da1
Fix crash when specifying same package name twice in bun add
...
Fixes https://github.com/oven-sh/bun/issues/1202
2022-09-17 00:21:10 -07:00
Jarred Sumner
9b941dd800
Update build-id
2022-09-16 22:58:31 -07:00
Jarred Sumner
4b9f6baf79
Make fetch throw a SystemError on reject
2022-09-16 22:50:46 -07:00
Jarred Sumner
a675cbd13b
Fix issue with chunked transfer encoding
2022-09-16 22:38:09 -07:00
Jarred Sumner
bd77afb2df
Fix issue with server not starting before exiting
2022-09-16 22:36:06 -07:00
Jarred Sumner
681f5a521f
[bun install] Remove spinloop
2022-09-16 16:53:17 -07:00
Jarred Sumner
f55b9a8530
Fix origin missing protocol in URL
...
Fixes https://github.com/oven-sh/bun/issues/1244
2022-09-16 16:45:26 -07:00
Jarred Sumner
da6f954e0d
Fix process not exiting
2022-09-16 14:28:07 -07:00
Jarred Sumner
453eaf6871
Fix crash when parsing empty JSON file
2022-09-16 03:20:28 -07:00
Jarred Sumner
0ce709d96a
Make new HTTP client more stable
2022-09-16 00:53:03 -07:00
Jarred Sumner
fd808dec52
Use entropy cache for websocket mask
2022-09-14 21:35:12 -07:00
Jarred Sumner
ac949f8181
Fix issue with websockets callback not registering in canary
2022-09-14 21:34:29 -07:00
Jarred Sumner
48c2c8c049
woops that was wrong
2022-09-14 19:29:16 -07:00
Jarred Sumner
2e2e134a1b
typo
2022-09-14 19:25:16 -07:00
Jarred Sumner
4e8bd97d9c
Update crypto.mjs
2022-09-14 19:24:56 -07:00
Jarred Sumner
a31eb6a80c
Add missing getRandomValues to crypto polyfill
2022-09-14 19:15:05 -07:00
Jarred Sumner
b0dd7bee5b
Update crypto benchmark
2022-09-14 18:25:06 -07:00
Jarred Sumner
a291c1676f
5x faster crypto.randomValues()
2022-09-14 18:23:22 -07:00
Jarred Sumner
7bfa302b75
Make crypto.getRandomValues() faster + fix > 1 byte/element typed arrays
...
Fix crypto.getRandomValues() with > 1 byte element typed arrays
Fixes https://github.com/oven-sh/bun/issues/1237
2022-09-14 04:12:32 -07:00
Jarred Sumner
0935ab14d6
Fix Linux 200ms http client delay
...
https://man7.org/linux/man-pages/man2/send.2.html See the section on MSG_MORE
2022-09-13 17:47:50 -07:00
Jarred Sumner
9797b676b1
Add test
2022-09-11 17:11:23 -07:00
Jarred Sumner
2b02f7eb99
Fix bug with Buffer.from([123], "utf8")
...
cc @worm-emoji
2022-09-11 17:11:11 -07:00
Jarred Sumner
71e2c26577
Resolve rope strings in dynamic import paths
...
Fixes https://github.com/oven-sh/bun/issues/1230
2022-09-11 15:30:21 -07:00
Jarred Sumner
b78b36ce33
Fix build issue on Linux?
2022-09-11 15:01:57 -07:00
Jarred Sumner
0130efeedf
Hardcode localhost on macOS
2022-09-11 14:59:48 -07:00
Jarred Sumner
35b51fcbb5
typo
2022-09-11 14:46:08 -07:00
Jarred Sumner
9a5aa059f9
New HTTP client ( #1231 )
...
* wip
* It mostly works!
* Support `bun install`
* Support `bun create`
* Support chunked transfer encoding
* Handle Keep Alive when redirecting to a different domain
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-11 13:37:17 -07:00
Zilin Zhu
8b91360a33
Fix segfault due to GC and some more helper functions ( #1221 )
...
* Fix segfault due to GC and some more helper functions
* fix upon reviews
* add visitChildren
2022-09-09 22:48:55 -07:00
Jarred Sumner
85d80d8fb7
Update README.md
2022-09-09 19:49:38 -07:00
Jarred Sumner
695da9ee29
Fix import path issue in ffi bench
2022-09-09 19:45:39 -07:00
Jarred Sumner
d114e9040b
Add read to README
2022-09-09 19:45:20 -07:00
Jarred Sumner
c600196b1a
[node:fs] Fix readFileSync on non-regular files
...
Fixes https://github.com/oven-sh/bun/issues/1220
2022-09-09 19:26:02 -07:00
Jarred Sumner
3d8edcb77b
Fix potential crash when returning an empty string
2022-09-09 19:20:24 -07:00
Jarred Sumner
f496740c19
[bun:ffi] Add f32, f64, i64, u64 to read`
2022-09-09 18:10:36 -07:00
Jarred Sumner
0c2a207d82
Fix failing tests after ptr change
2022-09-09 17:19:34 -07:00
Jarred Sumner
e9c456ff5c
[breaking][bun:ffi] Change the pointer representation to be a 52-bit integer
...
Storing the pointer this way enables DOMJIT to be used with a new API in `bun:ffi` that lets you efficiently read values from a pointer without creating a new `DataView`
```js
import {read} from 'bun:ffi';
const myPtr = myFunctionThatReturnsAPtr();
// new:
const value = read.u32(myPtr, 0);
// old:
const view = new DataView(toArrayBuffer(myPtr));
const otherValue = view.getUint32(0, true);
```
cc @bwasti this might be a breaking change for that call to `napi_add_finalizer`
2022-09-09 03:12:03 -07:00
Jarred Sumner
bcbe1b410a
Last commit was missing some code
2022-09-08 23:37:59 -07:00
Jarred Sumner
206820d27a
[bun:ffi] Implement read.{u8,i8,i16,i32,u16,u32,ptr,intptr}
...
`read` in `bun:ffi` lets you read data from a pointer without creating a new DataView/ArrayBufferView
```
import {read} from 'bun:ffi';
expect(read.i8(ptr_, i)).toBe(view.getInt8(i, true));
expect(read.i16(ptr_, i)).toBe(view.getInt16(i, true));
expect(read.i32(ptr_, i)).toBe(view.getInt32(i, true));
expect(read.u8(ptr_, i)).toBe(view.getUint8(i, true));
expect(read.u16(ptr_, i)).toBe(view.getUint16(i, true));
expect(read.u32(ptr_, i)).toBe(view.getUint32(i, true));
}
```
2022-09-08 23:29:30 -07:00
Zilin Zhu
8d8b72cf3f
Add native helper functions for Readable and convert ReadableState properties to getter/setter ( #1218 )
2022-09-08 19:52:27 -07:00
Jarred Sumner
a3cc9aaf6f
Make some more globals modifiable
2022-09-08 00:00:18 -07:00
Jarred Sumner
812424bf46
Fix crash with file descriptor
2022-09-07 21:21:18 -07:00
Jarred Sumner
8af05c28a3
Add benchmark for small write() performance
2022-09-07 21:20:41 -07:00
Jarred Sumner
970600724d
Helper for seeing if a File Blob is seekable
2022-09-07 21:06:00 -07:00
Jarred Sumner
c038f513d3
[Bun.write] clean up some error handling
2022-09-07 20:59:51 -07:00
Jarred Sumner
1e5978ad4f
Bun.write - only truncate if its a path string
2022-09-07 19:59:49 -07:00
Jarred Sumner
2dbc991af9
More tests for Bun.write
2022-09-07 19:58:04 -07:00
Jarred Sumner
c4b9c12677
Fix flaky tests
2022-09-07 19:56:23 -07:00
Jarred Sumner
d7759b88ee
Handle default better with ESM node
2022-09-07 19:56:11 -07:00
Jarred Sumner
25e4fcf5c8
Fast path for Bun.write with short-ish strings & typed arrays
...
Helps with https://github.com/oven-sh/bun/issues/646 but does not fully fix
2022-09-07 19:54:51 -07:00
Jarred Sumner
ce382788b0
Mild perf improvement for bindings
2022-09-07 19:53:49 -07:00
Jarred Sumner
c7874ed3fe
Fix issue with loading bundled entry points
2022-09-07 00:18:25 -07:00
Jarred Sumner
65affacc50
Fix missing file in SQL-raw test
2022-09-06 21:00:56 -07:00
Jarred Sumner
6e9159a9ad
workaround test failure
2022-09-06 20:59:18 -07:00
Jarred Sumner
dda23a6076
Move some things to the stack
2022-09-06 18:32:16 -07:00
Jarred Sumner
8d71a931a3
Add a helper for static strings
2022-09-06 18:31:20 -07:00
Jarred Sumner
0a67d7e951
[Bun.plugin] Fix validating loader
2022-09-06 17:38:08 -07:00
Jarred Sumner
52f3377d9e
[Bun.plugin] Throw an error when the loader is invalid
2022-09-06 17:32:00 -07:00
Jarred Sumner
b24a9b29d7
Fix potential crash when resolving package.json "exports"
...
Have not seen a crash happen here yet
2022-09-06 17:25:22 -07:00
Jarred Sumner
bac93e14ad
Fix bug with macros
2022-09-06 17:24:45 -07:00
Jarred Sumner
1454e448e6
[Bun.plugin] Allow slashes in namespaces
2022-09-06 17:24:39 -07:00
Jarred Sumner
9b16e245ba
Update README.md
2022-09-06 08:25:08 -07:00
Jarred Sumner
c2f59e72d6
Rename LinkerMap to Aliases to be less confusing
2022-09-06 07:23:05 -07:00
Jarred Sumner
7a5cfc4bae
Return a Buffer object for fs.readFile
2022-09-06 07:22:52 -07:00
Jarred Sumner
f5129dbd1a
Fix issue with process esm node export
2022-09-06 07:22:25 -07:00
Jarred Sumner
07cbc0193a
Set a default Loader based on filename
2022-09-06 07:22:14 -07:00
Jarred Sumner
1c1346dfa9
Add node:assert to list of hardcoded modules to fix ESM compat issue
2022-09-06 07:21:49 -07:00
Jarred Sumner
58af6db3a7
Update README.md
2022-09-06 04:06:06 -07:00
Jarred Sumner
342234eb64
Start to document loader api
2022-09-06 03:48:15 -07:00
Jarred Sumner
93cfc7edbb
preserve statements when generating a separate module for bun plugin
2022-09-06 03:37:58 -07:00
Jarred Sumner
5b6a2d9efe
Loosen-up the streams polyfill
2022-09-06 03:37:58 -07:00
Jarred Sumner
5ddfd912ef
Add @ to acceptable namespace characters
2022-09-06 03:37:58 -07:00
Jarred Sumner
e9cc9ae816
Make the plugins a little more resilient
2022-09-06 03:37:58 -07:00
Jarred Sumner
ba2a7d72e7
Add missing Blob
2022-09-06 03:37:58 -07:00
Jarred Sumner
308affdcf0
Make fs extensible
2022-09-06 03:37:58 -07:00
Jarred Sumner
07e2c898c6
Fix crash in Buffer module
2022-09-06 03:37:58 -07:00
Zilin Zhu
b9fad14f87
Add native ReadableState ( #1210 )
...
* use functionSpace for JSStringDecoderConstructor and fix console.log on prototype
* Add native ReadableState
* move kPaused to class property
2022-09-06 00:57:16 -07:00
Jarred Sumner
5a71521021
[Bun.plugin] Clean up exception handling
2022-09-05 23:43:34 -07:00
Jarred Sumner
11aa17a57c
Support async onLoad callbacks in Bun.plugin
2022-09-05 23:05:22 -07:00
Jarred Sumner
d2397b60e7
Move generateObjectModuleSourceCode to separate file to fix build error
2022-09-05 05:16:21 -07:00
Jarred Sumner
c31422b308
inline
2022-09-05 05:15:07 -07:00
Jarred Sumner
7ea9909618
Missing #pragma once
2022-09-05 04:43:02 -07:00
Jarred Sumner
62fa5d59cb
Rename is_macro_mode -> use_alternate_source_cache
2022-09-04 21:43:53 -07:00
Jarred Sumner
7acf5d3831
Some tests
2022-09-04 00:54:51 -07:00
Jarred Sumner
1112eb75e3
[node:module] Implement _resolveFileName, stub _nodeModulePaths & _cache
...
Closes https://github.com/oven-sh/bun/issues/1111
2022-09-04 00:54:21 -07:00
Jarred Sumner
ef268c5ee5
@globalPrivate -> @linkTimeConstant
...
See https://github.com/WebKit/WebKit/pull/2553
I'm not 100% sure @linkTimeConstant is correct. Specifically, I don't know if it's a link time constant or just a global private thing.
2022-09-04 00:52:30 -07:00
Jarred Sumner
15b7f9793f
[Node API] Fix napi_module_register
2022-09-03 22:47:00 -07:00
Jarred Sumner
04cc1968db
Fix createRequire() in node:module
...
Fixes https://github.com/oven-sh/bun/issues/831
Fixes https://github.com/oven-sh/bun/issues/453
2022-09-03 21:48:06 -07:00
Jarred Sumner
4891be8d0d
Fix C++ intellisense
2022-09-03 21:40:06 -07:00
Jarred Sumner
cc46604bdb
Fix build error
2022-09-03 21:03:50 -07:00
Jarred Sumner
bcbd448767
Add a code of conduct
...
Copied from Rust
2022-09-03 20:54:15 -07:00
tHyt-lab
892c020b00
update example react-is to v18( #1155 ) ( #1172 )
2022-09-03 18:52:33 -07:00
Jarred Sumner
8e5b1c44bc
Fixes https://github.com/oven-sh/bun/issues/677
2022-09-03 18:49:19 -07:00
Hyro
2340e7e6e5
chore(install-script): automatically add bun to path - bash shell ( #1168 )
...
* chore(install-script): automatically add bun to path - bash shell
* add tildify
* chore: make requested changes
* fix: add equals true
Co-authored-by: Wallunen <44848747+Wallunen@users.noreply.github.com >
* fix: $XDG_CONFIG_HOME can be undefined
Co-authored-by: Wallunen <44848747+Wallunen@users.noreply.github.com >
Co-authored-by: Wallunen <44848747+Wallunen@users.noreply.github.com >
2022-09-03 05:01:26 -07:00
PANG, Kit
98ecfc4f76
Fix GitHub CLI installation ( #1204 )
...
A workaround for <https://github.com/cli/cli/issues/6175 >.
This commit references <https://github.com/devcontainers/features/pull/133 >.
2022-09-03 04:10:21 -07:00
Jarred Sumner
0ca42e81f3
Plugin API ( #1199 )
...
* Plugin API
* Fix the bugs
* Implement `"object"` loader
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-03 03:57:43 -07:00
Dylan Conway
8b2d07e82e
fixed is_export and added test cases ( #1203 )
2022-09-03 01:39:24 -07:00
Jarred Sumner
3e9f7ab3e4
Update devcontainer scripts
...
Won't work until https://github.com/cli/cli/issues/6175 is fixed
2022-09-02 16:15:23 -07:00
usrtax
89524d55bd
allow set proxy for github ( #1198 )
...
in china , github is blocked, we use https://ghproxy.com/ for proxy
for example
use
`wget https://ghproxy.com/https://github.com/stilleshan/ServerStatus/archive/master.zip `
instead of
`wget https://github.com/stilleshan/ServerStatus/archive/master.zip `
2022-09-01 23:12:33 -07:00
Zilin Zhu
2dc07d7505
Fix failing Buffer tests ( #1197 )
2022-09-01 23:11:09 -07:00
Jarred Sumner
4e73726bee
Delete some dead code
2022-09-01 20:34:41 -07:00
Jarred Sumner
dfc27e3c30
Clean up options
2022-09-01 20:22:54 -07:00
Jarred Sumner
c78f7463a9
Add missing directories to make devcontainer
2022-09-01 16:32:27 -07:00
Jarred Sumner
793a42e7f5
[bun run] Silence .env loaded log
...
Fixes https://github.com/oven-sh/bun/issues/1192
2022-09-01 15:31:22 -07:00
Zilin Zhu
700c31dd13
Add native StringDecoder ( #1188 )
...
* Add native StringDecoder
* fix upon reviews
* add Constructor and use LazyClassStructure
2022-09-01 12:56:41 -07:00
Jarred Sumner
f023b89b73
Fix crash in napi finalizer
2022-09-01 01:58:42 -07:00
Jarred Sumner
5eb431dcd0
Fixes https://github.com/oven-sh/bun/issues/1183
2022-09-01 01:08:59 -07:00
Ikko Ashimine
5d99398850
Fix typo in futex.zig ( #1186 )
...
Therefor -> Therefore
2022-09-01 00:14:20 -07:00
Johan Bergström
43fc696d7b
readme: remove recurse flag from xattr ( #1182 )
...
This shouldn't be necessary since we're only doing it for one file.
Fixes: https://github.com/oven-sh/bun/issues/1180
2022-09-01 00:14:01 -07:00
Bram Wasti
bfe9d594a9
Add profiler support ( #1110 )
2022-08-30 19:31:58 -07:00
Taher
8651799097
Fixed JSBuffer write issues ( #1175 )
2022-08-29 13:09:46 -07:00
Jarred Sumner
9d8fb81413
Improve error when FFI fails to dlopen()
2022-08-29 13:02:02 -07:00
Zilin Zhu
34c0f77319
chore: Clean buffer C API ( #1174 )
2022-08-29 05:09:47 -07:00
Jarred Sumner
7b628ca09c
Fixes https://github.com/oven-sh/bun/issues/1127
2022-08-29 03:26:07 -07:00
Jarred Sumner
5dc260d07e
Update README.md
2022-08-28 22:02:27 -07:00
Jarred Sumner
86ac5f09bc
Update README.md
2022-08-28 22:01:07 -07:00
Jarred Sumner
1c492e2791
Update package.json
2022-08-28 21:51:24 -07:00
Jarred Sumner
d7dbe6f329
Remove code that doesn't work
2022-08-28 21:46:47 -07:00
Jarred Sumner
c1734c6ec5
More reliable macOS event loop ( #1166 )
...
* More reliable macOS event loop
* Reduce CPU usage of idling
* Add another implementation
* Add benchmark
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-08-28 21:28:05 -07:00
yepitschunked
b2141a204f
feat: hack in support for tsconfig extends ( #1147 )
...
* hack in support for extends
* Update src/resolver/resolver.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* wip review fixes
* fix style
Co-authored-by: Victor Lin <victor.lin@airbnb.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Victor Lin <vlin@twitter.com >
2022-08-28 21:21:20 -07:00
Zilin Zhu
ce90e0c372
support pass null as NULL ptr ( #1160 )
2022-08-28 06:19:53 -07:00
Jarred Sumner
296fb41e92
[bun:ffi] Fix crash with uint64_t
2022-08-28 00:39:08 -07:00
Jarred Sumner
30992a8b05
[bun:ffi] Fix int16 / uin16 max
2022-08-28 00:28:50 -07:00
Jarred Sumner
af5c4dedca
Update WebKit ( #1165 )
...
* Update WebKit
* Fix `DataView` and non-8 bit sized typed arrays with TextDecoder
* New WebKit
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-08-27 23:46:05 -07:00
Jarred Sumner
8b3afa5831
Fix crash in os module on macOS
2022-08-27 17:30:34 -07:00
Jarred Sumner
574ecfb9c4
Update Makefile
2022-08-27 16:57:43 -07:00
Jarred Sumner
466f9a3eb0
Update Makefile
2022-08-27 16:27:28 -07:00
Zilin Zhu
6644c2fd17
Fix ffi uint64_t parameter ( #1158 )
2022-08-27 12:32:13 -07:00
Zilin Zhu
49447decdd
fix compile error ( #1157 )
2022-08-27 02:59:07 -07:00
Dylan Conway
4720270763
added shell to STRIP variable definition ( #1156 )
2022-08-27 00:37:48 -07:00
Jarred Sumner
e49dcfeff7
Update napi.zig
2022-08-26 18:50:22 -07:00
Jarred Sumner
70e778c2a8
Remove pointer to stack buffer in os module and fix build issue
...
We cannot have pointers to stack memory returned in the same scope because that memory is no longer valid at the end of the scope
cc @xHyroM
2022-08-26 18:50:15 -07:00
Jarred Sumner
975477d0f0
Implement napi_add_finalizer
2022-08-26 18:28:01 -07:00
Jarred Sumner
1580b5fb56
Fix debug build cache
2022-08-26 18:27:52 -07:00
Max Thomson
ebf4ac4e83
fix: Update broken README links ( #1148 )
2022-08-26 02:51:57 -07:00
Jarred Sumner
64b3d28d41
Update node_fs.zig
2022-08-26 01:59:13 -07:00
Zilin Zhu
07a4b26697
fix mkdtemp ( #1151 )
...
* fix mkdtemp
* Update src/bun.js/node/node_fs.zig
* Update src/bun.js/node/node_fs.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-26 01:22:25 -07:00
Zilin Zhu
cf55a38879
Add native BufferList ( #1146 )
...
* add simple methods
* add native BufferList
* use RopeBuilder
* use Deque
2022-08-25 21:12:45 -07:00
Hyro
7a734e0a28
feat: implement native os module ( #1115 )
...
* feat: implement os module
* revert(bun-error): package-lock.json
* feat: implement EOL
* feat: implement EOL
* feat: implement arch function
* feat: implement homedir function
* add comptime to homedir if
* feat: add platform function
* feat: implement type function
* feat: add hostname (not sure iff works on all platforms)
* chore: make requested changes
* fix: change toValueGC into toValue in arch function
* add EOL, devNull constant variables
* fix: store only string
* feat: add tests
* feat: add endianness
* ususe toValue for devNull & EOL
* feat: implement endianness & fix release
* revert javascript.zig fix
* feat: implement tmpdir
* feat: implement totalmem, freemem, uptime
* feat: loadavg
* feat: implement version
* feat: add userInfo
* feat: implement totalmem for macos
* feat: add getPriority (not finished, waiting for dc response)
* feat: finish userInfo implementation
* feat: implement cpus, not done
* feat: finish getPriority implementation & stats cpus()
* feat: implement setPriority
* reemove test.c
* feat: implement constants.dlope.xn, constants.priority.x, constants.UV_UDP_REUSEADDR
* feat: implement signals, errno
* updated cpus function, stilldoesnt work
* increase object length
* feat: add t more ests
* feat: add cpus()
* remov some files
* fix: handle empty array
* started working on interface addresses (in C)
ill use C++ after it work
* fix interface_addresses
* Improved getCpuInfo code, decreased ram usage, increased speed
* getCpuTime optimizations
* started working on networkInterfaces
* feat: networkInterfaces implementation
* delete unnecessary files
* add benchs & fix code
* add tests
* add missing benchs
* Increased buffer of getCpuInfo to 2048, it should skip few iterations
* remove hardcoded constants
* feat: implement errno constants
* fix getWindowsErrorConstant
* feat: add signal constants
* feat: implement priority constants
* remove duplications
* fix: change value to ?i16
* fix(__defineConstant): make some parameters comptime, change value to ?i32
* fix: add E to ERRNO constants, add SIG to SIG constants
* feat: add dlopen constants
* change functions to private
* feat: add UV_UDP_REUSEADDR
* fix typo
* simplify functions
* rename functions in bindings
* feat: implement loadavg for darwin
* feat: implement system uptime
* feat: implement get free memory for darwin
* fix system memory bindings
* feat: implement network interfaces for darwin
* code cleanup
* feat: support for macos version & release
* some fixes
* MacOS support for CpuInfo
* Fixed minor mistake in getCpuInfo_B
* Delete test.zig
* Update c_cpp_properties.json
* Update tasks.json
* feat: implement scopeid
* feat: implement cidr 🚀
* remove unnecesarry changes
* remove unnecesarry changes
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* fix: import string
* fix: change IPV6 to IPv6
* fix some things
* chore: make requested changes
* revert: launch.json
* fix test
* Fixed few memory leaks
* testing
* again
* added len
* another test
* improved parsing
* added small check
* Bonk
* FINISH 🚀 🚀 🚀 🚀 🚀 🚀
* Update tasks.json
* NetworkInterface test
* FINISH 🚀 🚀 🚀
Co-authored-by: Fire-The-Fox <gajdos.jan77@gmail.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-25 19:38:28 -07:00
Jarred Sumner
e0b35b3086
Fix Request and Response in macros
2022-08-25 19:23:49 -07:00
Jarred Sumner
49bec758b7
Faster way to lookup mimetype
2022-08-25 19:23:18 -07:00
Jarred Sumner
950d03a9ea
Fix incorrect indexOfNotChar causing sourcemaps bugs
2022-08-25 18:53:20 -07:00
Zilin Zhu
e6a1209c53
Fix clearTimeout and linux timeout ( #1138 )
2022-08-24 09:12:20 -07:00
Zilin Zhu
f2316a8eda
Add pad back to base64 ( #1140 )
2022-08-24 09:10:49 -07:00
Sam
8f58e07ea1
updated minified url polyfill ( #1132 )
2022-08-23 11:25:37 -07:00
Zilin Zhu
9943ca916d
add SlowBuffer ( #1133 )
2022-08-23 05:12:58 -07:00
Jarred Sumner
75a76fb836
Remove response pool
2022-08-22 10:59:49 -07:00
Jarred Sumner
2a0ab2aa9b
Fix build error
2022-08-22 10:21:54 -07:00
Jarred Sumner
fd5398ce80
woops
2022-08-22 09:52:31 -07:00
Jarred Sumner
633bef7ef1
[node:http] speed up assigning headers
2022-08-22 09:51:33 -07:00
Jarred Sumner
fcd09abec6
reduce usage of protect
2022-08-22 09:36:38 -07:00
Jarred Sumner
38071ce9d5
Update mime_type.zig
2022-08-22 09:14:41 -07:00
Jarred Sumner
8642ac8e86
Improve error message when port is already in use
2022-08-22 09:14:41 -07:00
Jarred Sumner
57d6ef26e9
Update server.zig
2022-08-22 09:14:41 -07:00
Zilin Zhu
6a38441562
Support emit Symbol events in EventEmitter ( #1129 )
2022-08-22 08:22:40 -07:00
Jarred Sumner
4b8409096d
faster way to read content-type
2022-08-22 08:20:05 -07:00
Jarred Sumner
39dc989915
Fix Buffer.isEncoding
2022-08-22 08:19:28 -07:00
Jarred Sumner
5273415ce5
Add some optimizations to FetchHeaders
2022-08-22 07:49:58 -07:00
Jarred Sumner
47a91e7457
Fix import path
2022-08-22 00:04:27 -07:00
Jarred Sumner
f5c6875da5
38% faster node:http
...
Before:
```fish
❯ oha http://localhost:3000 -z 2s -c 20
Summary:
Success rate: 1.0000
Total: 2.0006 secs
Slowest: 0.0095 secs
Fastest: 0.0000 secs
Average: 0.0003 secs
Requests/sec: 69521.0420
```
After:
```
❯ oha http://localhost:3000 -z 2s -c 20
Summary:
Success rate: 1.0000
Total: 2.0005 secs
Slowest: 0.0063 secs
Fastest: 0.0000 secs
Average: 0.0002 secs
Requests/sec: 109119.8614
```
Code
```
const http = require("http");
const hostname = "127.0.0.1";
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain");
res.end("Hello World!");
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/ `);
});
```
2022-08-22 00:04:27 -07:00
Jarred Sumner
eec11a6651
Don't transpile readable-stream
2022-08-22 00:04:27 -07:00
Jarred Sumner
b95e6602c3
Add a snippet for benchmarking EventEmitter vs EventTarget
2022-08-22 00:04:27 -07:00
Jarred Sumner
6897372258
[misc] Reload internal JS modules in development without compiling
2022-08-22 00:04:27 -07:00
Jarred Sumner
ee1d506d06
Use jsCast because it's slightly faster
2022-08-22 00:04:27 -07:00
Jarred Sumner
d620500757
[node compat] Don't throw TypeError for DOM constructors
2022-08-22 00:04:27 -07:00
Jake Lynch
65dd2214d9
fix bun-tools location in macOSx zig instructions ( #1124 )
2022-08-21 19:20:33 -07:00
Zilin Zhu
3d8bc140aa
Add native EventEmitter ( #1123 )
...
* Add native EventEmitter
* add listeners, listenerCount and eventNames
* add global functions
* add Object to EventEmitter conversion
* fix upon review
2022-08-21 05:34:31 -07:00
Jarred Sumner
d8f40e080d
[env loader] Don't panic when .env fails to load for unexpected reasons
2022-08-21 01:45:14 -07:00
Jarred Sumner
6ab53fca36
Reduce allocations for ObjectPool
2022-08-21 01:08:40 -07:00
Jarred Sumner
8fafc2f9ed
[bun-landing] inline via data uri
2022-08-21 01:01:03 -07:00
Jarred Sumner
c4580ee2ca
Rename reactdom-bun -> react-dom-server.bun
2022-08-21 01:00:27 -07:00
Jarred Sumner
a8fa61ed68
Support running scripts in bun's runtime from a shebang
2022-08-21 00:59:50 -07:00
Jarred Sumner
f3779b8e73
[breaking] bun run <missing script> should return a nonzero exit code
2022-08-21 00:58:24 -07:00
Jarred Sumner
ca5b996299
Support loading JavaScript files without extensions
2022-08-21 00:51:57 -07:00
Jarred Sumner
baf218c233
Add a bench snippet for sha512
2022-08-21 00:51:27 -07:00
Jarred Sumner
7880e6e6c8
Remove usage of fnctl64 so we can avoid the libc symbol
2022-08-21 00:50:23 -07:00
Jarred Sumner
97305b7461
Add a binding for creating atomic strings
2022-08-21 00:49:54 -07:00
Jarred Sumner
1fca65fdf6
Slightly optimize escapeHTMLescapeHTML8 & escapeHTML16
2022-08-21 00:48:53 -07:00
Jarred Sumner
aaa019ce37
Update WebKit
2022-08-20 23:03:50 -07:00
Jarred Sumner
32d2be0d08
Export createSyntheticModule
2022-08-20 23:03:50 -07:00
Jarred Sumner
83e4d04ce7
wip support #!
2022-08-20 23:03:50 -07:00
Hyro
8901d23685
fix(ReferenceError): expected type in getCode ( #1120 )
2022-08-20 16:40:28 -07:00
Jarred Sumner
98a03c192d
Fix running zig tests
2022-08-20 04:43:12 -07:00
Jarred Sumner
f4419bd240
Fix crash on invalid JSX
2022-08-20 04:43:12 -07:00
Jarred Sumner
07e1a158e9
Add code to ResolveError
2022-08-20 04:43:12 -07:00
Zilin Zhu
2641884342
Add buffer.indexOf, includes and lastIndexOf ( #1112 )
...
* Add buffer.indexOf, includes and lastIndexOf
* use memmem
* use int64_t
* fix upon reviews
2022-08-20 00:17:17 -07:00
Zilin Zhu
b1bc549cf7
fix buffer.slice(0, 0) ( #1114 )
2022-08-19 23:25:10 -07:00
Zilin Zhu
8cf57eb582
fix buffer.copy ( #1113 )
2022-08-19 23:13:38 -07:00
Jarred Sumner
aa404ded34
Update build-id
2022-08-19 05:06:11 -07:00
Jarred Sumner
eee5046b82
Make React SSR up to 3x faster
2022-08-19 04:47:55 -07:00
Jarred Sumner
9222a5d376
2x faster Bun.serve with async function handlers
2022-08-19 03:51:01 -07:00
Jarred Sumner
0a0f8ff41c
Update bun init test
2022-08-19 00:35:26 -07:00
Jarred Sumner
fe7180bc74
Synchronously dispatch close event
2022-08-18 23:49:14 -07:00
Jarred Sumner
bdf733973c
Fix memory leak in WebSocket
2022-08-18 23:41:33 -07:00
Jarred Sumner
0f45386673
Make Request, Response and TextDecoder not read-only
2022-08-18 23:21:52 -07:00
Jarred Sumner
88d2a97670
Update build-id
2022-08-18 21:17:38 -07:00
Jarred Sumner
922c361f6a
un-delete some code
2022-08-18 21:14:52 -07:00
Jarred Sumner
0e4db0b28f
Add string support to Buffer.fill
2022-08-18 21:09:26 -07:00
Jarred Sumner
d150a2f4dd
[node compat] Fix issue with Buffer.compare when called on the constructor
2022-08-18 19:34:28 -07:00
Jarred Sumner
5eeb704f25
Fix console.log printing [native code] for too many things
2022-08-18 19:23:45 -07:00
Jarred Sumner
e3c2a95e5f
Faster TextDecoder
2022-08-18 19:06:29 -07:00
Jarred Sumner
e45ddc086f
Fix Next.js regression
2022-08-18 19:05:37 -07:00
Jarred Sumner
51ced7d3e3
Fix bun:wrap not loading
2022-08-18 19:05:07 -07:00
Jarred Sumner
036e580045
Fixes https://github.com/oven-sh/bun/issues/1069
2022-08-18 01:13:11 -07:00
Jarred Sumner
9eaed7cec7
Fix missing prototype property on generated classes
2022-08-18 00:56:36 -07:00
Jarred Sumner
eb5b298bc1
Update generate-classes.ts
2022-08-18 00:22:29 -07:00
Jarred Sumner
5de8271181
Handle builds with remote inspector disabled
2022-08-18 00:22:24 -07:00
Jarred Sumner
f4ff5ecbdf
Missing parameter after merge
2022-08-17 22:38:07 -07:00
Jarred Sumner
1ebebbc698
Update build-id
2022-08-17 21:55:36 -07:00
Jarred Sumner
b3f5131981
Update build-id
2022-08-17 21:46:28 -07:00
Jarred Sumner
8399d31af2
Update ZigGlobalObject.cpp
2022-08-17 21:44:00 -07:00
Jarred Sumner
1d2b52d15c
Move the crypto hashers to the new bindings
2022-08-17 21:38:16 -07:00
Zilin Zhu
4fe8b8e5b7
Add native process module ( #1095 )
2022-08-17 20:14:31 -07:00
Jarred Sumner
cb1114dba6
uncomment
2022-08-17 19:27:35 -07:00
Jarred Sumner
c720bdc324
Move around some things
2022-08-17 19:26:10 -07:00
Jarred Sumner
bc412e1f6f
slightly improve streams perf
2022-08-17 19:25:43 -07:00
Jarred Sumner
ddd151a23b
Bump WebKit
2022-08-17 18:53:11 -07:00
Jarred Sumner
ac20150d04
Update http_client_async.zig
2022-08-17 08:18:13 -07:00
Jarred Sumner
9594c82180
Update react-hello-world.jsx
2022-08-17 07:55:19 -07:00
Jarred Sumner
93b663e43d
New Zig <> C++ bindings generator. +20% faster HTTP server
2022-08-17 07:37:14 -07:00
Jarred Sumner
65820893c9
Slightly improve header init perf
2022-08-17 07:36:35 -07:00
Jarred Sumner
6a65631cbd
[bun:ffi] Improve ptr() performance and implement code generation for DOMJIT
2022-08-17 07:36:35 -07:00
Jarred Sumner
382be2cb46
[bun:sqlite] Add DOMJIT to get()
2022-08-17 07:36:35 -07:00
Zilin Zhu
0aa3a0a5b0
Fix server segfault by making controller not early GC'ed ( #1090 )
...
* Fix http server segfault by making controller not get GC'ed
* fix format
2022-08-17 05:22:09 -07:00
Zilin Zhu
77b449856d
Fix active_task count for timeout tasks ( #1081 )
2022-08-15 05:37:37 -07:00
Jonathan Collazo
b59d93b01e
updating libarchive ( #1078 )
2022-08-14 21:23:17 -07:00
Zilin Zhu
afe34df3cc
Add synthetic buffer module ( #1076 )
...
* Add synthetic buffer module
* rename Buffer.h to BufferModule.h
2022-08-14 18:08:25 -07:00
Jarred Sumner
9af4c0420e
Update webKit
2022-08-13 23:29:05 -07:00
Jarred Sumner
952a4ab94a
fixups
2022-08-13 23:06:14 -07:00
Jarred Sumner
e210f271bb
Fix macOS build
2022-08-13 21:58:31 -07:00
Jarred Sumner
64b20cac88
Merge remote-tracking branch 'origin/jarred/redo-linux-event-loop'
2022-08-13 21:01:31 -07:00
Jarred Sumner
f90c09d715
wip SyntheticModule
2022-08-13 18:18:05 -07:00
Jarred Sumner
5644da1a3e
Update WebKit
2022-08-13 18:18:05 -07:00
Jarred Sumner
a2d6e58875
[Bun.serve] Fix crash on req.headers async
2022-08-13 18:18:05 -07:00
Jarred SUmner
0815c83974
Improve event loop reliability on Linux
2022-08-13 06:07:18 -07:00
Ikko Ashimine
65ca0503a7
[bun error] fix typo in markdown.ts ( #995 )
...
happend -> happened
2022-08-12 19:22:32 -07:00
Jarred Sumner
5f68c562f9
Make versions consistent
2022-08-12 19:17:26 -07:00
Jarred Sumner
9ba080e829
Update WebKit URLs
2022-08-12 18:31:26 -07:00
Jarred Sumner
4df0385c23
Update WebKit
2022-08-12 18:28:32 -07:00
Jarred Sumner
75cad910db
Add missing sqlite3 symbol
2022-08-12 15:16:02 -07:00
Jarred Sumner
262f00df3e
Update bun-mac-x64-baseline.yml
2022-08-12 13:26:05 -07:00
Zilin Zhu
1dce0b2af1
remove column name caches in js ( #1057 )
2022-08-12 03:07:51 -07:00
Ryan Russell
c33f39b39c
refactor(src/tagged_pointer): IntPrimtiive -> IntPrimitive ( #1046 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org >
Signed-off-by: Ryan Russell <git@ryanrussell.org >
2022-08-12 03:04:00 -07:00
Zilin Zhu
bcc4580cdc
invalidate column name caches when the schema of table may change ( #1056 )
2022-08-12 02:47:01 -07:00
Jarred Sumner
dba3aaedab
Faster performance.now()
2022-08-12 01:18:31 -07:00
Jarred Sumner
c9cd8bd13b
Update WebKit
2022-08-12 01:18:31 -07:00
Jarred Sumner
5c1ca0cc47
[bun.js] up to 60% faster TextEncoder.encodeInto and ~3% faster TextEncoder.encode
2022-08-12 01:18:31 -07:00
Jarred Sumner
2ac8c83be0
[Bun.serve] Fix crash on invalid certificate file path for SSL
2022-08-12 01:18:31 -07:00
Zilin Zhu
66869f2239
fix appendFile permission ( #1052 )
2022-08-11 01:00:06 -07:00
Zilin Zhu
1bc5036d2e
fix MD5 length and compile error ( #1050 )
2022-08-10 23:11:24 -07:00
Jarred Sumner
bcdc68ac94
Add bun link and bun unlink to completions
2022-08-10 23:09:07 -07:00
Jarred Sumner
f8d5c4594f
[bun unlink] Partially implement
2022-08-10 23:08:51 -07:00
Jarred Sumner
437dc22862
Include GIT_SHA in linux builds
2022-08-10 21:49:31 -07:00
Jarred Sumner
271178d1a5
Update bun-mac-aarch64.yml
2022-08-10 21:46:41 -07:00
Jarred Sumner
5287b482e6
Update ZigGlobalObject.cpp
2022-08-10 21:46:27 -07:00
Jarred Sumner
4fe24a4f3c
Log uncaught exceptions
2022-08-10 21:46:17 -07:00
Jarred Sumner
551cb26afb
Add shared property
2022-08-10 21:26:32 -07:00
Jarred Sumner
d9ae284463
Fix console.log with typed arrays
2022-08-10 21:26:20 -07:00
Jarred Sumner
00d5f6699b
Add Event JSType
2022-08-10 18:45:30 -07:00
Jarred Sumner
3ca4bab2d5
Faster debug builds
2022-08-10 17:44:18 -07:00
Jarred Sumner
e9c855f837
Fix MessageEvent formatting
...
Fixes https://github.com/oven-sh/bun/issues/510
2022-08-10 17:44:10 -07:00
Jarred Sumner
f09e7ac630
improve reliability of WebSocket
...
- Fix GC not keeping WebSocket alive
- Fix ignoring messages sent immediately after upgrade
Fixes https://github.com/oven-sh/bun/issues/521
2022-08-10 17:40:17 -07:00
Jarred Sumner
e511b14b2a
Fix spurious unhandled promise rejection error
2022-08-10 15:46:23 -07:00
Jarred Sumner
6ca32d800d
[bun upgrade] Add changelog URL
...
Fixes https://github.com/oven-sh/bun/issues/1019
2022-08-10 15:30:34 -07:00
Jarred Sumner
218ab7f967
Remove trailing newline in git sha
2022-08-10 15:29:53 -07:00
Jarred Sumner
099ad31deb
Update js_parser.zig
2022-08-10 15:19:03 -07:00
Jarred Sumner
2644b9d792
[TS] Fix bug with import Foo = require("bar")
...
Closes https://github.com/oven-sh/bun/issues/1045
2022-08-10 15:08:54 -07:00
Jarred Sumner
67cdf1c9b3
Commit snapshot
2022-08-10 13:41:43 -07:00
Jarred Sumner
1eddf254e1
Fix linux build?
2022-08-09 18:43:42 -07:00
Jarred Sumner
c148c33510
[js] Fix console.log(Infinity)
2022-08-09 16:37:05 -07:00
Jarred Sumner
429abc1278
[bun:ffi] ~30% perf improvement for wrapped functions
2022-08-09 16:35:06 -07:00
Jarred Sumner
3dca3baaec
[bun:ffi] Re-enable most of the tests
2022-08-09 16:17:35 -07:00
Jarred Sumner
bbb6e25c68
[bun:ffi] Feature: Expose ptr on the FFI function
2022-08-09 16:17:11 -07:00
Jarred Sumner
b428227895
[bun:ffi] Feature: C deallocator callback function for toBuffer and toArrayBuffer
2022-08-09 16:16:51 -07:00
Jarred Sumner
6c8ba6c5fc
Fix linux build
2022-08-09 15:38:47 -07:00
Jarred Sumner
01f567e915
add some comments
2022-08-09 06:05:20 -07:00
Jarred Sumner
f44f98be33
[node compat] Add tests for fs.copyFileSync
2022-08-09 05:48:22 -07:00
Jarred Sumner
16f24086f8
[node compat] Improve fs.copyFileSync performance on macOS
2022-08-09 05:48:20 -07:00
Jarred Sumner
f4ab46a8bd
Update Makefile
2022-08-09 05:47:46 -07:00
Jarred Sumner
8ae4c745e1
Improve fs.copyFile performance on Linux ( #1035 )
...
* [fs] Improve fs.copyFile performance on Linux
* Add a fs.copyFileSync benchmark
* Fix build error
* Update node.mitata.mjs
* Be more careful with permission
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-08-09 05:44:39 -07:00
Jarred Sumner
b274d22205
Simplify building the debug tools
2022-08-09 02:33:04 -07:00
Jarred Sumner
159a1e4bf2
Fix clean-bindings script
2022-08-09 02:32:46 -07:00
Jarred Sumner
a6596ace70
[misc] Add a way to disable LOLHTML
...
LOLHTML costs about 1 MB of binary size
2022-08-09 01:41:13 -07:00
Jarred Sumner
28ad93f02f
[node compat] Update "module" module's require.resolve implementation
2022-08-09 01:41:13 -07:00
Jarred Sumner
4575df38e6
[misc] Add a global private @Bun
2022-08-09 01:41:13 -07:00
Jarred Sumner
b36b7fee16
[node compat] Implement require.resolve
2022-08-09 01:41:13 -07:00
Jarred Sumner
01847cabd2
Delete server polyfill
2022-08-09 01:41:13 -07:00
Zilin Zhu
9a721adbff
Fix static require by setting the state machine manually ( #1034 )
2022-08-09 01:25:41 -07:00
TiKevin83
ceb78d2bb9
Update example Next app to 12.2 ( #1033 )
...
* Update bun-framework-next for version 12.2
* Match on minor version for next peer dependency per compatibility issues
* Update example next app packages per 12.2 integration
* Update next version warning per minor version compatibility changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-08 15:29:12 -07:00
Zilin Zhu
02644ab65a
Raise error on unhandled rejected promises ( #1010 )
...
* deal with unhandled rejected promise
* use Vector<Strong<JSPromise>> to store rejected promises
2022-08-08 10:58:00 -07:00
Jarred Sumner
98c2d20ab0
Flip boolean
2022-08-08 03:54:14 -07:00
Jarred Sumner
84e76ce4ad
Fix baseline builds once again
2022-08-08 03:39:44 -07:00
Zilin Zhu
05a382172f
fix compiling error on linux ( #1027 )
2022-08-08 02:13:11 -07:00
Jarred Sumner
766ce5ab7b
Update JSSQLStatement.cpp
2022-08-08 01:26:21 -07:00
Zilin Zhu
463f2b7dab
fix segfault for query().all() with more than 64 properties ( #1025 )
...
* fix segfault for query().all() with more than 64 properties
* Update src/bun.js/bindings/sqlite/JSSQLStatement.cpp
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-08 00:54:13 -07:00
Ryan Russell
a6b089bd17
refactor(src/install): clap readability fixes ( #1024 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org >
2022-08-08 00:20:44 -07:00
Jarred Sumner
05bca1e4e4
bun link fixture
2022-08-07 23:28:10 -07:00
Jarred Sumner
73a18c99e6
[bun install] Increase "slow filesystem detected" notice
2022-08-07 23:24:23 -07:00
Jarred Sumner
c795c6742d
[misc] fix typo
2022-08-07 23:23:42 -07:00
Jarred Sumner
cc2c50ad09
[bun install] Implement bun link
2022-08-07 23:23:34 -07:00
Jarred Sumner
f990df97ce
[misc] Don't spam protect / unprotect in debug logs
2022-08-07 19:21:37 -07:00
Jarred Sumner
5d7ed5cbce
Improve memlock limit error
2022-08-07 16:51:14 -07:00
Jarred Sumner
12dbc1ed7b
[bun install] Implement symlink backend
...
Fixes https://github.com/oven-sh/bun/issues/1017
2022-08-07 15:58:41 -07:00
Jarred Sumner
cf78745271
[misc] Microptimize directory tree walker
2022-08-07 15:58:41 -07:00
Jarred Sumner
52865750da
Update bun.lockb
2022-08-07 15:58:41 -07:00
Zilin Zhu
6b45f39322
re-register setInterval to VM after completion ( #1014 )
2022-08-07 09:23:45 -07:00
Jarred Sumner
31b8ad8230
Update Dockerfile
2022-08-06 10:40:57 -07:00
Jarred Sumner
49c4f29c1f
Ensure cache invalidation for building bun
2022-08-06 09:17:23 -07:00
Jarred Sumner
a35730a7b6
Ensure correct directory for linking WebKit
2022-08-06 09:17:23 -07:00
Zilin Zhu
b8993dbd78
[wiptest] fix calling toBe in describe ( #1000 )
2022-08-06 02:32:32 -07:00
Jarred Sumner
c94091d8b1
Refresh all the bun.lockb
2022-08-05 23:28:19 -07:00
Jarred Sumner
4c01845f32
[BREAKING][bun install] Invalidate all the lockfiles
2022-08-05 23:20:24 -07:00
Jarred Sumner
b17f5b750e
[bun install] Support authenticated registries
2022-08-05 22:42:22 -07:00
Jarred Sumner
a16dcbbb5b
[bun install] Support private registries & private scopes
2022-08-05 22:41:43 -07:00
Jarred Sumner
c74df4c880
Fix https://github.com/oven-sh/bun/issues/996
2022-08-05 21:49:27 -07:00
Jarred Sumner
e34190fe66
Fix error message in install script
2022-08-05 16:36:25 -07:00
Jarred Sumner
7cbb9add48
Fix baseline detection for macOS x64
2022-08-05 16:30:51 -07:00
Jordan Lees
35a6946b63
Update README for development help ( #982 )
...
* Add info on Docker (was undockumented)
I'm actually just assuming Docker is required on all systems. Feel free to correct me lol
* Update README with info on newer devcontainer cli
since `devcontainer open` is no longer supported
* Update README - Troubleshooting steps
* Update README.md
* Update README.md
Fixing Jarred's correction on https://github.com/oven-sh/bun/pull/982 , plus some better organization
* Update README.md
Forgot to include remote containers extension; added Troubleshooting (general) link to the table of contents
2022-08-05 12:42:43 -07:00
Hyro
1cb8f0fa73
feat(util): support for util.TextDecoder ( #990 )
...
* build:(landing) automated website build
* Revert "build:(landing) automated website build"
This reverts commit ddee8485fd .
* feat(util): support for util.TextDecoder
* tests(util): add TextDecoder
* tests: seperate text-decoder
Co-authored-by: xHyroM <xHyroM@users.noreply.github.com >
2022-08-05 10:42:52 -07:00
Hyro
5bca8a1d47
benchmarks(sqlite): invalid northwind database url ( #989 )
...
* build:(landing) automated website build
* Revert "build:(landing) automated website build"
This reverts commit ddee8485fd .
* benchmarks(sqlite): fix invalid northwind database url
Co-authored-by: xHyroM <xHyroM@users.noreply.github.com >
2022-08-05 10:36:32 -07:00
Soney Mathew
7e93c2368e
Fix of panic in threads while downloading scoped packages ( #992 )
2022-08-05 10:34:50 -07:00
Soney Mathew
9fad889f26
Fix for bearer tokens missing from request headers on bun install step ( #991 )
2022-08-05 03:15:26 -07:00
Lee Robinson
95294d245c
Convert landing page to zero-JS Next.js application. ( #945 )
2022-08-05 00:37:34 -07:00
Jarred Sumner
c5b600ad48
[misc] Add bun init to bun help
2022-08-04 23:24:17 -07:00
Jarred Sumner
9cce277eaf
[misc] Make the macOS builds faster
2022-08-04 23:22:09 -07:00
Jarred Sumner
7e3fe03fb0
[bun init] Add a test
2022-08-04 23:21:41 -07:00
Jarred Sumner
1bc8c92e2f
[misc] Add bun-types to repo
2022-08-04 22:16:05 -07:00
Jarred Sumner
f0d332e287
[bun:sqlite] Fix crash when > 64 columns
...
Fixes https://github.com/oven-sh/bun/issues/987
2022-08-04 22:16:05 -07:00
Zilin Zhu
e7ecedf3e9
allow setting status code in Response.redirect ( #985 )
2022-08-04 21:44:26 -07:00
Jarred Sumner
d034c004f9
Implement bun init subcommand
2022-08-04 21:42:49 -07:00
Jarred Sumner
7ba61bc983
[bun create] Allow custom start commands
2022-08-04 21:41:12 -07:00
Jarred Sumner
2b55f2d00f
Allow timer with 0 -> 1
2022-08-04 21:40:48 -07:00
Jarred Sumner
4d19970663
[bun upgrade] Prepare for version strings with a space
2022-08-04 21:40:23 -07:00
Jarred Sumner
5ccb4f10d2
setImmediate is now a global
2022-08-04 21:39:58 -07:00
Jarred Sumner
6375982d19
[node.js compat] make var {isBuffer} = Buffer; work
2022-08-04 21:25:14 -07:00
Jarred Sumner
58882c0555
Fix building debug tools
2022-08-04 12:46:09 -07:00
Jarred Sumner
fd7be10f3a
Disable browser field for bun, bun_macro
...
Closes #979
2022-08-04 10:42:33 -07:00
Jarred Sumner
1c1ba17908
Update README.md
2022-08-04 01:42:59 -07:00
Jarred Sumner
ef25009bcd
Update README.md
2022-08-04 01:36:30 -07:00
Jarred Sumner
3c5b68caa7
[node.js compat] Clamp for Buffer functions instead of throwing
2022-08-03 21:31:15 -07:00
Jarred Sumner
37fe03e1ca
Fix Dockerfile
2022-08-03 21:17:43 -07:00
Zilin Zhu
36d5d764d8
fix path.normalize on ... ( #966 )
2022-08-03 21:14:08 -07:00
Jarred Sumner
b310d7c40d
[node.js compat] latin1 & ascii encoding for Buffer
2022-08-03 21:11:20 -07:00
Jarred Sumner
290fb7f7e7
[Bun.Transpiler] Fix bug that would cause some bun-specific transforms to run
2022-08-03 20:52:17 -07:00
Jarred Sumner
aa0be51d40
Fix test failures from JSPropertyIterator change
2022-08-03 20:52:17 -07:00
Jarred Sumner
77bab6c782
[misc] Make name more consistent
2022-08-03 20:52:16 -07:00
Jarred Sumner
9d81d24a7a
Fix mac builds
2022-08-03 20:51:01 -07:00
Zilin Zhu
de848d4e1c
fix(makefile): mkdir DEBUG_OBJ_DIR before compiling bindings ( #975 )
2022-08-03 20:11:09 -07:00
Jarred Sumner
440eba7c9b
[misc] Fix make headers
2022-08-03 19:13:08 -07:00
Jarred Sumner
cf81ee5f41
Update build-id
2022-08-03 18:58:59 -07:00
Jarred Sumner
e29ef5561f
[bun install] Include scripts when lockfile doesn't change
2022-08-03 18:44:54 -07:00
Jarred Sumner
6ef45c9e33
[misc] Make debug builds faster
2022-08-03 18:35:53 -07:00
Jarred Sumner
2094667417
[bun install] Support lifecycle hooks for cwd's package.json
...
`bun install` will now run prepare & install `"scripts"` for the root package.json (not dependencies)
This makes things like `husky` work and possibly `patch-package`
2022-08-03 18:35:53 -07:00
Jarred Sumner
928f6e068b
Don't use SIMD in non-SIMD builds
2022-08-03 18:35:53 -07:00
Jarred Sumner
e253ce0948
Add process.revision and expose git sha to builds
2022-08-03 18:35:53 -07:00
Zilin Zhu
58feb81c36
use import.meta.require instead of import ( #973 )
2022-08-03 18:31:39 -07:00
Carter Snook
f4ac41b5d9
fix: prop iterator cstring variant ( #974 )
2022-08-03 15:32:39 -07:00
Carter Snook
033eebce29
refactor: create a high-level property iterator ( #972 )
...
This also fixes multiple memory leaks double frees.
2022-08-03 14:05:38 -07:00
Jarred Sumner
40a187f0de
fix bug in process.hrtime()
2022-08-03 13:26:19 -07:00
Zilin Zhu
a8d499208b
Fix Makefile ( #957 )
2022-08-02 16:45:57 -07:00
Zilin Zhu
a5a1435867
Fix u32 jsNumber cast ( #964 )
2022-08-02 16:45:18 -07:00
Jarred Sumner
ed9abb0cb0
[node.js compat] Implement process.hrtime() and process.hrtime.bigint()
2022-08-02 16:41:47 -07:00
Jarred Sumner
fcce3ff5ac
Basename
2022-08-01 15:17:59 -07:00
Jarred Sumner
85c4c25bc2
Use WebKit LTO builds where appropriate
2022-08-01 15:16:17 -07:00
Jarred Sumner
35bd08f7d7
Mention moduleResolution: node so people copy paste the right thing
2022-08-01 15:06:50 -07:00
Jarred Sumner
cfa7a43ee7
Fix typo
2022-07-31 15:44:25 -07:00
Kid
52c962cb5b
chore: migrate deprecated @vscode/dev-container-cli ( #912 )
2022-07-31 15:43:15 -07:00
Oran Simhony
43c1f17d1f
Fix: move bun, Webkit and zig urls from Jarred-Sumner to oven-sh. ( #944 )
...
* Fix: move bun, Webkit and zig urls from Jarred-Sumner to oven-sh.
* Fix: changed urls from types.d.ts to base bun-types repo.
2022-07-31 15:41:45 -07:00
Hyro
a04c29aaf1
chore: fix labeler ( #899 )
2022-07-31 01:11:26 -07:00
Ryan Russell
af5a062424
refactor(bunjs/bindings): code readability fix functionLazyLoadStreamPrototypeMap_getter ( #926 )
2022-07-31 01:10:49 -07:00
Charles F. Munat
8882e52539
Fix/react accessibility ( #932 )
2022-07-31 01:10:10 -07:00
dave caruso
ccc22bb968
fix(makefile): devcontainer install ( #933 )
2022-07-31 01:09:42 -07:00
Jarred Sumner
05953a0680
Fix typo
2022-07-30 23:11:36 -07:00
Jarred Sumner
d132c131eb
Fix default value in Dockerfile
2022-07-30 23:09:04 -07:00
Jarred Sumner
1e8af74564
There is no non-LTO build for amd64 webkit, but probably should change that
2022-07-30 23:06:39 -07:00
Jarred Sumner
1ff60e7534
Use webkit without march
2022-07-30 23:02:48 -07:00
Jarred Sumner
7b7b4b46af
Fix build
2022-07-29 22:09:01 -07:00
Jarred Sumner
d61ef19ecf
Update bun-framework-next for Next 12.2
2022-07-29 22:06:57 -07:00
TiKevin83
b765619ad6
Update bun-framework-next for Compatibility with Next 12.2+ ( #920 )
2022-07-29 20:48:18 -07:00
Jarred Sumner
e8b848dfcf
Fix path
2022-07-29 18:31:39 -07:00
Jarred Sumner
467a106db0
Potentially fix build
2022-07-29 18:27:22 -07:00
Carter Snook
3d6d2651da
fix(ffi): double-free segfault with symbols object ( #919 )
2022-07-29 17:43:18 -07:00
Hyro
a5eaa907e2
docs: fix broken ffi benchmark link ( #914 )
...
* build:(landing) automated website build
* Revert "build:(landing) automated website build"
This reverts commit ddee8485fd .
* docs: fix broken ffi benchmark link
Co-authored-by: xHyroM <xHyroM@users.noreply.github.com >
2022-07-29 14:00:03 -07:00
Hyro
50284f38a6
chore(ci): add segfault label ( https://github.com/oven-sh/bun/pull/916 )
2022-07-29 21:06:46 +02:00
sno2
09c6802891
chore(ci): add segfault label
2022-07-29 14:04:26 -05:00
Jarred Sumner
4bdad99ead
Use WebKit baseline build
2022-07-28 18:49:34 -07:00
Jarred Sumner
56885fae4d
Bust cache again
2022-07-28 17:37:37 -07:00
Jarred Sumner
d173f777a7
Bust cache
2022-07-28 15:08:45 -07:00
Jarred Sumner
94ea5f28db
Bump WebKit
2022-07-28 14:26:46 -07:00
Kevin Ingersoll
b70f6fcb51
landing/docs: make Bun naming consistent ( #906 )
...
* landing/docs: make Bun naming consistent
* fix spacing, wrap one more code thing
2022-07-28 13:48:21 -07:00
Jarred Sumner
6fecda6b73
There are ~3 different versions of strip with different flags and it is very confusing
2022-07-28 04:31:45 -07:00
Jarred Sumner
cbae4a31aa
Bust cache
2022-07-28 04:09:04 -07:00
Jarred Sumner
13364767fb
Bump webkit
2022-07-28 04:05:33 -07:00
Jarred Sumner
3e73ea2e26
Only strip debug symbols
2022-07-28 04:05:02 -07:00
Jarred Sumner
21b8f80a99
[misc] Make debug builds not depend on a specific directory structure
2022-07-28 04:04:53 -07:00
Jarred Sumner
23f1e008a2
Use ADD so that the caching is set
2022-07-28 04:04:29 -07:00
Jarred Sumner
380e7e1cfb
Update WebKit
2022-07-28 04:04:10 -07:00
Jarred Sumner
2106afc4d4
Fix process.versions.webkit
2022-07-28 04:04:07 -07:00
Jarred Sumner
97cd944237
[node compat] Fix bug with process.title
2022-07-28 04:03:49 -07:00
Jarred Sumner
5cf39ef6c5
Update build-id
2022-07-28 02:54:28 -07:00
Jarred Sumner
90727f305e
Downgrade baseline target to westmere
2022-07-28 00:40:07 -07:00
Jarred Sumner
78dd366272
Update bun-dockerhub.yml
2022-07-28 00:09:23 -07:00
Jarred Sumner
dddc645d4b
[misc] Remove irrelevant scripts
2022-07-27 21:21:36 -07:00
Jarred Sumner
bd547ace80
[misc] Replace reference to old repo
2022-07-27 21:20:45 -07:00
Jarred Sumner
194a5c896e
[misc] Simplify the commands used to build bun
2022-07-27 21:20:09 -07:00
Jarred Sumner
7c5c4f5694
Clean up some things with the devcontainer
2022-07-27 21:18:58 -07:00
Jarred Sumner
6b25e6935e
[bun install] Fix segfault when loading scopes
2022-07-27 21:16:22 -07:00
Jarred Sumner
bebce1ec63
[bun install] Fix missing lockfile data for tarballs
2022-07-27 21:15:57 -07:00
Jarred Sumner
eea925e7e0
Remove disabled workflow
2022-07-27 18:37:43 -07:00
Jarred Sumner
a1e0af20b8
Fix Dockerfile
2022-07-27 18:37:23 -07:00
Rishi Goomar
9e342c17b2
docs(macos): Improve MacOS Development Instructions ( #836 )
...
* docs(macos): Improve MacOS Development Instructions
* Update MacOS zig install to be more automated
2022-07-27 18:28:38 -07:00
Jarred Sumner
9bd4a8f7bb
[docker] wip
2022-07-27 18:13:30 -07:00
Jarred Sumner
ed56c1350e
[docker] wip
2022-07-27 18:11:13 -07:00
Jarred Sumner
0c6512cd33
[docker] wip
2022-07-27 18:09:00 -07:00
Jarred Sumner
75b14341af
[docker] wip
2022-07-27 18:06:17 -07:00
Jarred Sumner
fa3404920a
Upgrade WebKit in Dockerfile
2022-07-27 18:03:09 -07:00
Jarred Sumner
353f899309
getObject -> asCell because it's a little bit safer
2022-07-27 17:48:25 -07:00
Jarred Sumner
bdbd70ca0f
Update WebKit
2022-07-27 17:46:28 -07:00
Jarred Sumner
87746d611b
Upgrade WebKit
2022-07-27 17:46:28 -07:00
szatkus
a00eb95e29
#609 Don't truncate ascii buffers to 7-bit ( #775 )
2022-07-27 11:42:39 -07:00
Jarred Sumner
e468a61811
fixup
2022-07-27 02:06:46 -07:00
Jarred Sumner
4ee298fe20
"SegmentationFault at 1" -> "SegmentationFault at 0x10000000"
2022-07-27 02:04:19 -07:00
Jarred Sumner
999d39ec0b
WIP fix workflow run
2022-07-26 22:25:17 -07:00
Jarred Sumner
6772d3a102
Update readme
2022-07-26 22:14:00 -07:00
Jarred Sumner
ba0657410d
Remove bun-types from repo
2022-07-26 22:10:01 -07:00
Jarred Sumner
03fde4c3fd
WIP fix workflow run
2022-07-26 22:00:13 -07:00
Jarred Sumner
b189b6e947
WIP fix workflow run
2022-07-26 21:19:25 -07:00
Jarred Sumner
3b247daf75
WIP fix workflow run
2022-07-26 20:01:55 -07:00
Jarred Sumner
6b556a186f
WIP fix workflow run
2022-07-26 01:05:19 -07:00
Jarred Sumner
03f0431800
WIP fix workflow run
2022-07-26 00:54:21 -07:00
Jarred Sumner
b56979ebe1
WIP fix workflow run
2022-07-26 00:53:39 -07:00
Jarred Sumner
4123ce1a4f
WIP fix workflow run
2022-07-26 00:27:18 -07:00
Jarred Sumner
5d52e22aee
WIP fix workflow run
2022-07-26 00:24:03 -07:00
Jarred Sumner
ae4595f9e2
WIP fix workflow run
2022-07-25 23:46:29 -07:00
Jarred Sumner
8ccfe2957f
WIP fix workflow run
2022-07-25 23:17:57 -07:00
Jarred Sumner
63adad8caf
WIP fix workflow run
2022-07-25 23:17:34 -07:00
Jarred Sumner
162c3f2d13
WIP fix workflow run
2022-07-25 23:12:59 -07:00
Jarred Sumner
e03cde7cd5
WIP fix workflow run
2022-07-25 23:11:10 -07:00
Jarred Sumner
27736f1103
WIP fix workflow run
2022-07-25 22:31:44 -07:00
Jarred Sumner
81dc410e50
WIP fix workflow run
2022-07-25 21:49:09 -07:00
Jarred Sumner
731adbc9a0
WIP fix workflow run
2022-07-25 21:47:40 -07:00
Jarred Sumner
dba221ba22
WIP fix workflow run
2022-07-25 21:34:01 -07:00
Jarred Sumner
45249b4a71
WIP fix workflow run
2022-07-25 21:05:47 -07:00
Jarred Sumner
0450615b61
WIP fix workflow run
2022-07-25 20:09:49 -07:00
Jarred Sumner
9f45ec1959
WIP fix workflow run
2022-07-25 19:30:57 -07:00
Jarred Sumner
4bb610c984
WIP fix workflow run
2022-07-25 18:49:23 -07:00
Jarred Sumner
0769f90301
WIP fix workflow run
2022-07-25 18:49:16 -07:00
Jarred Sumner
31db186baf
WIP fix workflow run
2022-07-25 18:19:36 -07:00
Jarred Sumner
2501cb0160
WIP fix workflow run
2022-07-25 17:00:01 -07:00
Jarred Sumner
a2ac1d22af
WIP fix workflow run
2022-07-25 16:57:49 -07:00
Jarred Sumner
fcf77792bc
WIP fix workflow run
2022-07-25 16:55:41 -07:00
Jarred Sumner
b582d64df2
WIP fix workflow run
2022-07-25 16:47:43 -07:00
Jarred Sumner
552e21c6ab
Update Makefile
2022-07-25 16:40:23 -07:00
Jarred Sumner
2a0357814a
WIP fix workflow run
2022-07-25 16:38:36 -07:00
Jarred Sumner
583135aef7
WIP fix workflow run
2022-07-25 16:38:19 -07:00
Jarred Sumner
80f9ae7789
WIP fix workflow run
2022-07-25 16:35:49 -07:00
Jarred Sumner
959b6a80d0
WIP fix workflow run
2022-07-25 16:21:00 -07:00
Jarred Sumner
3c1a9bcb74
WIP fix workflow run
2022-07-25 16:17:44 -07:00
Jarred Sumner
386ba0abfd
WIP fix workflow run
2022-07-25 14:59:39 -07:00
Jarred Sumner
146aafed92
WIP fix workflow run
2022-07-25 14:54:25 -07:00
Jarred Sumner
2f89501a6e
WIP fix workflow run
2022-07-25 14:54:03 -07:00
Jarred Sumner
b11069420d
update bench number
2022-07-25 13:30:44 -07:00
Jarred Sumner
5a81acce3a
[bun install] Fix AccessDenied error when installing some packages
...
Fixes https://github.com/oven-sh/bun/issues/728
Fixes https://github.com/oven-sh/bun/issues/867
Fixes https://github.com/oven-sh/bun/issues/135
Credit @SheetJSDev
2022-07-25 01:37:58 -07:00
Victory Osikwemhe
8a43083415
Support for completion in Bash ( #403 )
...
* Add bash completions for optional flags (long and short options)
* extend bash completion to support options with specific requirements
* fix: remove global variables
* fix: rename cur_file to cur_word
* add c,rm,i aliases
* fix: add --help flag to create alias
* fix: --loader options bug
* fix --backend and linting
* linting
* add support for file completion for `bun run` as well as few changes also
* chore(): use _ as prefix for function names
* fix undefined function
* feat(wip): implement installation for bash bun completion in zig
* fix(): use separate paths instead of slice of paths
* rename _bun.bash to bun.completion.bash for compatability with oh-my-bash
* change `bun.completion.bash` to filename
2022-07-25 00:47:34 -07:00
Pekka Enberg
6df6dac128
Add 'scripts/nproc' helper script ( #623 )
...
* Add 'scripts/nproc' helper script
There's no 'nproc' on macOS by default so add a helper script that uses
sysctl instead. Simplifies build environment setup on macOS.
* Delete nproc
* Update Makefile
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-07-25 00:45:57 -07:00
Hyro
d3c4f5c444
fix(types): add missing types for WebSocket ( #578 )
...
* fix(types): add missing types for ws
* fix: add missing path
\n
index.d.ts\npaths.txt
* fix: use types from lib.dom.d.ts
* types: update header
* style: new line
* Delete index.js
* fix: remove MessagePort
* fix: remove MessagePort
* fix: set MessageEventSource to undefined
2022-07-25 00:39:26 -07:00
Hyro
e68c4f584b
feat(install): use this repository ( #582 )
...
https://github.com/oven-sh/bun instead of https://github.com/Jarred-Sumner/bun-releases-for-updater
2022-07-25 00:38:55 -07:00
Soney Mathew
ff5f2c357d
Increasing test coverage for node compatibility for util ( #854 )
...
* [Bun.js] support for util.TextEncoder
* [Bun.js] test for util.TextEncoder
* [Bun.js] tests ported from node's test-util
2022-07-25 00:38:36 -07:00
mikeswann
285b47ff36
Use 'ADD' instead of running wget to make docker compare checksums on bun's latest file ( #864 )
2022-07-25 00:36:33 -07:00
Jarred Sumner
0a113d7f0c
WIP fix workflow run
2022-07-24 23:30:42 -07:00
Jarred Sumner
dea662c796
WIP fix workflow run
2022-07-24 23:25:07 -07:00
Jarred Sumner
4ec6520927
WIP fix workflow run
2022-07-24 23:24:54 -07:00
Jarred Sumner
b0da58ad89
WIP fix workflow run
2022-07-24 23:15:01 -07:00
Jarred Sumner
43b5105a5e
WIP fix workflow run
2022-07-24 23:06:13 -07:00
Jarred Sumner
c93ae8666c
WIP fix workflow run
2022-07-24 23:02:47 -07:00
Jarred Sumner
d8052f733d
WIP fix workflow run
2022-07-24 23:01:14 -07:00
Jarred Sumner
e7966f37ec
WIP fix workflow run
2022-07-24 22:58:32 -07:00
Jarred Sumner
7e6e1cbf96
WIP fix workflow run
2022-07-24 22:53:15 -07:00
Jarred Sumner
2c39345fb4
WIP fix workflow run
2022-07-24 22:51:08 -07:00
Jarred Sumner
43f74ebcfe
WIP fix workflow run
2022-07-24 22:44:02 -07:00
Jarred Sumner
aa44ac4b24
WIP fix workflow run
2022-07-24 22:43:12 -07:00
Jarred Sumner
acf177f651
WIP fix workflow run
2022-07-24 22:33:36 -07:00
Jarred Sumner
02a61e5277
WIP fix workflow run
2022-07-24 22:30:02 -07:00
Jarred Sumner
8d138061a9
WIP fix workflow run
2022-07-24 22:28:28 -07:00
Jarred Sumner
dd0dafbeec
[docker] Prepare for macOS releases
2022-07-24 22:21:07 -07:00
Jarred Sumner
3ae3cdaa64
Update build.zig
2022-07-24 21:40:07 -07:00
Jarred Sumner
4f2d74edb9
Set explicit skylake
2022-07-24 21:33:54 -07:00
Jarred Sumner
4aa3bc7bee
[wip] docker
2022-07-24 21:28:25 -07:00
Jarred Sumner
6c6e8509ad
Build macOS object files
2022-07-24 21:21:21 -07:00
Jarred Sumner
5875bb3195
[docker] Move more flags
2022-07-24 18:27:45 -07:00
Jarred Sumner
25de617c92
[docker] WIP
2022-07-24 18:19:32 -07:00
Jarred Sumner
1abe377e20
[docker] wip
2022-07-24 18:17:10 -07:00
darker
88b85752a2
feat: clean/factorize ARGS ( #839 )
2022-07-24 18:16:47 -07:00
Jarred Sumner
fde64ace31
probably fix avx2 builds
2022-07-24 17:19:05 -07:00
Jarred Sumner
3369881e73
Update bun.yml
2022-07-24 16:25:57 -07:00
Rishi Goomar
f42a0759f8
fix(release): Remove the ${{}} from the if block in GHA ( #863 )
...
See - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif
```
When you use expressions in an if conditional, you may omit the expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression.
```
2022-07-24 15:51:52 -07:00
Jarred Sumner
e19da7bb36
Attempt to fix canary build
2022-07-24 15:02:59 -07:00
Jarred Sumner
306132eda3
Attempt to fix canary build
2022-07-24 14:49:32 -07:00
Jochem Hagenaars
1be0100911
chore(examples/kingworld): Change bun-types to latest ( #766 )
...
* Bumped hono version number
* Changed bun-types version
* Bumped bun-types
2022-07-24 22:55:16 +02:00
Yusuke Wada
7896361084
chores(examples/hono): Refine Hono example ( #773 )
...
* fixed path
* add favicon
* Correct version: `^2.0.0`
* remove wiptest command
2022-07-24 22:51:41 +02:00
Jarred Sumner
bdf6b3e312
Wire up console.log(new Blob)
2022-07-24 01:22:33 -07:00
Jarred Sumner
af36e99317
Some tests for console.log(new Blob([123]))
2022-07-24 01:22:33 -07:00
Jarred Sumner
8e84f361ac
Print < 512 bytes as "N bytes" instead of "0.0"
2022-07-24 01:22:33 -07:00
Jarred Sumner
c921e4a3f1
Improve console.log(new Blob([123])) output
2022-07-24 01:22:33 -07:00
Jarred Sumner
f524c72095
Make errors always print error: unless the name of the error is Error
2022-07-24 01:22:33 -07:00
Jarred Sumner
b09290b9cb
[wip] GitHub action fix
2022-07-24 01:22:33 -07:00
Soney Mathew
7de90a82b0
[Bun.js] support for util.TextEncoder ( #844 )
...
* [Bun.js] support for util.TextEncoder
* [Bun.js] test for util.TextEncoder
2022-07-23 15:51:27 -07:00
darker
c412d0069e
feat: added info, info_bod and success method to wrap type of messages ( #845 )
2022-07-23 12:39:12 -07:00
Harsh Mishra
277360e656
ci: add docker caching to ci workflows ( #846 )
2022-07-23 12:38:47 -07:00
darker
a61b959491
feat: add .PHONY on makefile targets ( #847 )
2022-07-23 12:38:28 -07:00
Michell Brito
09da245aa0
Merge pull request #827 from aaditeynair/main
2022-07-23 10:16:40 -04:00
Michell Brito
872304852e
Merge pull request #800 from alexkuz/fix-install-script-colors--645
2022-07-22 20:32:57 -04:00
Michell Brito
75741d7d44
Merge pull request #804 from Sanix-Darker/doc/Makefile
2022-07-22 20:31:58 -04:00
Jarred Sumner
849c743cd2
[bun install] Fix issue with URL path when sending request
2022-07-22 17:12:37 -07:00
Jarred Sumner
52144c0577
Fix missing function bug
2022-07-22 16:17:13 -07:00
Jarred Sumner
1e9706d76d
[bun wiptest] This test does not seem to run?
2022-07-22 16:17:13 -07:00
SheetJSDev
db51f285f8
bun install use custom BUN_CONFIG_REGISTRY port (#823 )
2022-07-22 15:55:24 -07:00
Jarred Sumner
8392a86300
[docker] wip
2022-07-22 15:41:08 -07:00
Jarred Sumner
6edae78c6f
[docker] wip
2022-07-22 14:04:12 -07:00
Jarred Sumner
136c696043
[docker] Use gcr
2022-07-22 14:01:32 -07:00
Jarred Sumner
2e71ea4db9
[bun dev] Add flag to force hmr
2022-07-22 13:52:55 -07:00
Jarred Sumner
7914adff1e
Fix link command on macOS
2022-07-22 13:34:28 -07:00
Jarred Sumner
2dcd9e7eb9
[bun upgrade] Fix version display name for canary build
2022-07-22 13:26:31 -07:00
Jarred Sumner
2a6acf3c90
[bun upgrade] Fix name used in temporary dir for canary builds
2022-07-22 13:06:51 -07:00
Jarred Sumner
cd7f6db1d3
WIP fix workflow run
2022-07-22 12:34:35 -07:00
Jarred Sumner
15e8e67017
Clarify
2022-07-22 12:21:24 -07:00
Jarred Sumner
105350b826
Mention WSL version requirement
2022-07-22 12:20:04 -07:00
Jarred Sumner
d003fb4288
Only run canary release on push to main
2022-07-22 12:19:55 -07:00
Jarred Sumner
c2d6ceb0f3
[bun upgrade] Implement --canary and BUN_CANARY=1
2022-07-22 12:19:30 -07:00
Aaditey Nair
7c7cec0416
Fix mistake in Next.js Example README.
2022-07-22 16:50:24 +05:30
Jarred Sumner
ddfd2fd442
Update WebKit
2022-07-22 02:06:30 -07:00
Jarred Sumner
c654a6fceb
Workaround submodules issue
2022-07-22 01:58:48 -07:00
Jarred Sumner
bced6fab58
Delete plus100-napi
2022-07-22 01:53:57 -07:00
Jarred Sumner
cd9680c61c
Rename linux amd64 -> linux x64
2022-07-22 01:48:40 -07:00
Jarred Sumner
80f797b2e5
Mark as executable
2022-07-22 01:37:42 -07:00
Connor Lurring
2960a5cd72
fix: remove suffix arg for mktemp compatibility ( #825 )
2022-07-22 01:34:00 -07:00
Jarred Sumner
0d4b4c4942
Canary builds (Linux) ( #824 )
...
* wip
* WIP:
* WIP
* WIP
* WIP
* WIP
* WIP
* Update WebKit
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Update WebKit
* WIP
* WIP
* WIP
* WIP
* Workaround missing system calls
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Fix baseline detection
* WIP
* strip debug symbol
* Auto-generate canary build
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-07-22 00:58:45 -07:00
Jarred Sumner
c772256e93
Separate Dockerfile for devcontainer
2022-07-21 16:58:24 -07:00
Jarred Sumner
4b5e7cdab7
Bump
2022-07-21 16:58:24 -07:00
Jarred SUmner
588669ea6a
Redo the dockerfile
2022-07-21 16:58:07 -07:00
Sakib Hasan
e6c58ae4f2
docs(templates): Update README.md ( #783 )
...
Improvement reactjs example readme file, Added learning resources
2022-07-21 13:07:40 +02:00
Carter Snook
afb1dc1d79
chore(vscode): set tab size and tab format ( #810 )
2022-07-20 13:37:52 -07:00
Carter Snook
7500f4b2ca
feat(node/fs): implement more stat methods ( #807 )
2022-07-20 10:19:41 -07:00
sanix-darker
8d96b184df
doc: added an helper for the huge Makefile
2022-07-20 13:15:28 +02:00
Alexander
5c620959bb
fix install script colors
2022-07-20 11:51:21 +04:00
Jarred Sumner
08bff8e090
Allow blank
2022-07-19 23:04:54 -07:00
Carter Snook
8bcf68e5e0
fix(api): stop double-free of prop array ( #793 )
2022-07-19 21:05:52 -07:00
Wallunen
e5af1ea3bc
refactor(installer): renovate install script ( #745 )
2022-07-19 14:56:28 -04:00
SheetJSDev
6afbf1b166
added mystery-box example macro ( #787 )
2022-07-18 22:26:56 -07:00
Shahidul Islam Majumder
600929ee6d
fix deno console.log benchmark ( #771 )
...
* chore(benchmark): fix deno console.log benchmark
* only show benchmark results
Co-authored-by: evanwashere <github@evan.lol >
2022-07-18 19:30:58 -04:00
Jarred Sumner
d2874f6a49
bump examples
2022-07-18 13:12:03 -07:00
Jarred Sumner
a1a0c18478
[js] Set global and self
...
Fixes https://github.com/oven-sh/bun/issues/768
2022-07-17 22:49:09 -07:00
Jarred Sumner
ba65185bcb
[js] Fix invalid unicode codepoint in error
2022-07-17 22:39:57 -07:00
Jarred Sumner
a17221258d
Fixes https://github.com/oven-sh/bun/issues/769
...
Not tested
2022-07-17 22:37:24 -07:00
SheetJSDev
a00380c7c2
url.js use util_isString ( #772 )
2022-07-17 22:00:23 -07:00
Jarred Sumner
2ef7a12383
Update Dockerfile
2022-07-17 17:16:45 -07:00
Jarred Sumner
d54470ef98
Use Node v16 in Dockerfile due to glibc 2.28 requirement
2022-07-17 16:48:26 -07:00
Jarred Sumner
17bbdf790e
Try with 18.04
2022-07-17 16:37:36 -07:00
Jarred Sumner
bcad0d4de7
Downgrade Ubuntu used in Dockerfile to hopefully reduce glibc requirement to 2.27
2022-07-17 16:35:42 -07:00
Jarred Sumner
9ab63dced8
[bun install] Forgot to commit isCI function
2022-07-17 15:54:43 -07:00
Alexander Kuznetsov
e79ed4f738
fix printing message for thrown non-error objects ( #764 )
...
* fix printing message for thrown non-error objects
* fine tuning error formatting
* more fine tuning error formatting
2022-07-17 13:24:35 -07:00
Jarred Sumner
b897ad3ec2
[bun install] Implement --no-verify flag to skip verifying integrity of downloaded packages
2022-07-17 10:08:37 -07:00
Jarred Sumner
daed2a79f9
[bun install] Rename skip_verify -> skip_verify_installed_version_number
2022-07-17 10:08:37 -07:00
Jarred Sumner
0a5470e802
[bun install] Implement --no-progress to disable the progress bar
2022-07-17 10:08:37 -07:00
Jarred Sumner
a02b2d1c5b
[bun install] Improve performance of integrity hashing
...
By using optimized BoringSSL implementations
2022-07-17 10:08:37 -07:00
Jochem Hagenaars
0cc88b8669
Bumped hono version number ( #746 )
...
* Bumped hono version number
* Changed bun-types version
2022-07-17 09:57:29 -07:00
pathei-kosmos
c4fbcaeb21
fixed some licenses in README ( #758 )
...
* fixed some licenses
* typo
2022-07-17 07:58:49 -07:00
Alexander Kuznetsov
a85413c802
fix scoped packages name resolution ( #760 )
2022-07-17 07:58:28 -07:00
thislooksfun
24a5f9ba29
test(wiptest): add a way to test wiptest ( #699 )
...
This adds a really basic test runner that will execute test files using
`bun wiptest` and compare the output to make sure it's correct. It could
definitely be improved, especially in the speed department, but it's at
least functional now, which is better than we had before!
2022-07-16 20:36:46 -07:00
thislooksfun
e9f376825c
docs: fix documentation of atob and btoa ( #748 )
...
These function are confusingly named. `btoa` converts "Binary" to Ascii
by encoding the input using base64. `atob` reverses that process by
base64 decoding the Ascii input into a "Binary" output.
The names come from the Unix utilities with the same names, which
"converts a binary file to ascii for transmission over a telephone line"
(https://www.unix.com/man-page/minix/1/btoa/ )
See:
- https://developer.mozilla.org/en-US/docs/Web/API/atob
- https://developer.mozilla.org/en-US/docs/Web/API/btoa
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa-dev
Note: the actual implementation of `btoa` and `atob` are correct, but
the docs were backwards.
2022-07-16 15:23:18 -07:00
John Daly
3c0f18f704
fix/clean-up-bun-error ( #753 )
...
* Fixing TypeScript errors in bun-error package
* Fixing import path
* Removing unused 'isClient' prop from AsyncSourceLines
* PR feedback
2022-07-16 15:14:14 -07:00
Jarred Sumner
f7e9b91701
[parser] Fix symbol collision with require
...
Fixes https://github.com/oven-sh/bun/issues/674
Fixes https://github.com/oven-sh/bun/issues/382
2022-07-15 23:08:25 -07:00
Jarred Sumner
e7246837a1
Add a TLA test
2022-07-15 21:48:30 -07:00
Jarred Sumner
fd4a210b84
[bun.js] Fix non-ascii latin1 string handling in console.log
...
Closes https://github.com/oven-sh/bun/issues/738
Closes https://github.com/oven-sh/bun/issues/737
2022-07-15 21:07:41 -07:00
Travis Pulley
9a7874a680
minor edit: Makefile ( #672 )
...
* minor edit: Makefile
Fixed a suggested command when ninja isn't found to the correct package name
* Makefile: minor edit
Ninja build has different names in different package managers. This handles both known instances.
* Makefile: ninja package name suggestion
When checking requirements, ninja build has a different name for brew and ubuntu/debian. This handles both.
2022-07-15 16:42:53 -07:00
Finn R. Gärtner
5c2ec9cad2
fix(README): Remove unused troubleshooting link ( #736 )
2022-07-15 13:20:19 -07:00
Foyzul Karim
5b248962e7
docs: Added readme file for blank template ( #727 )
...
* Added readme file for blank template
* Removed `Special note` section
2022-07-15 22:09:56 +02:00
Hyro
65027bff99
chore(workflows): dont run on forks ( #734 )
...
* build:(landing) automated website build
* Revert "build:(landing) automated website build"
This reverts commit ddee8485fd .
* workflows(bun-dockerhub): dont run on forks
* chore(bun-landing): update
dont run on forks
fix commit changes
* workflows(bun): dont run on forks
Co-authored-by: xHyroM <xHyroM@users.noreply.github.com >
2022-07-15 12:41:12 -07:00
Hiroaki Nakamura
f35e13d57e
Use Jarred-Sumner/vscode-zig march18 in devcontainer ( #266 )
2022-07-15 12:13:02 -07:00
Hyro
04572506ba
chore(workflows): labeler, label sync ( #701 )
...
* chore: labeler.yml
* chore(workflows): labeler
* chore(workflows): label syncer
* chore: labels.yml
* chore(labeler): add benchmarks
* chore(labels): add packages:bun
* chore(labeler): add packages:bun
* chore(labels): add question
* chore(labels): add esm<>cjs
* chore(labels): add chore label
2022-07-15 12:02:28 -07:00
Finn R. Gärtner
ebf78e5ea6
fix(examples/bun-bakery): Create gitignore ( #697 )
2022-07-15 12:02:03 -07:00
Wulfre
7e695c0086
Create github workflow to publish releases on dockerhub ( #716 )
...
* Create github workflow to publish releases on dockerhub
* Improve readability of final dockerhub dockerfile RUN command
Co-authored-by: Wulfre <wulfre@users.noreply.github.com >
2022-07-15 12:00:48 -07:00
SaltyAom
40b7b99c2c
fix(types): add missing types from URLSearchParams ( #731 )
...
* feat(examples): add kingworld
* fix(examples/kingworld): add .gitignore
* fix(template/kingworld): rename .gitignore to gitignore
* fix(template/kingworld): update to request change
* fix(template/kingworld): update 'getting start' to 'Getting Started'
* template(kingworld/bun): update to requested change
* fix(bun-types): add missing method type of URLSearchParams
2022-07-15 12:00:16 -07:00
SaltyAom
61de6032af
template(kingworld): Add kingworld template ( #708 )
...
* feat(examples): add kingworld
* fix(examples/kingworld): add .gitignore
* fix(template/kingworld): rename .gitignore to gitignore
* fix(template/kingworld): update to request change
* fix(template/kingworld): update 'getting start' to 'Getting Started'
2022-07-15 13:54:18 +02:00
Jonathan Rubin
b901f55164
chores(template/react): Update to React 18 ( #627 )
...
* Updated react example template
* build:(landing) automated website build
* removed bun.lockb and most of changes from react example index.html
Co-authored-by: rubinj30 <rubinj30@users.noreply.github.com >
2022-07-15 12:17:38 +02:00
Hyro
9eac93d176
fix(templates/blank): Update bun types ( #704 )
2022-07-14 20:43:02 +02:00
YOSHIKI
a4ced701dc
fix(templates): Fix hono example template ( #633 )
...
* Fix hono example template
* Update package.json
2022-07-14 20:42:18 +02:00
Mustafa Hasan Khan
0d65a1fe10
fix(packages/bun-landing): Fixed punctuation ( #280 )
2022-07-14 20:20:43 +02:00
0xflotus
de50c709a4
fix small typo in readme ( #706 )
2022-07-14 13:56:50 -04:00
Robert Soriano
3b5ad05627
docs: remove emulating cpu section ( #714 )
2022-07-14 13:49:49 -04:00
pnxdxt
1ea4dc13f0
docs: correct typo missing dots ( #603 )
2022-07-13 23:51:22 +02:00
Fábio Santos
74a600b833
docs: Substitute npm install with bun add ( #670 )
2022-07-13 23:44:08 +02:00
Ikko Ashimine
4b271ee430
fix(napi): gurantee -> guarantee ( #683 )
2022-07-13 23:32:46 +02:00
Omer Shahar
6e4e5fa94c
fix(README): Add punctuation ( #611 )
2022-07-13 23:20:54 +02:00
Dennis Dudek
8e9042142c
docs: Add bun-bakery template ( #649 )
2022-07-13 22:40:29 +02:00
Gabriel Nunes
5a2425d585
fix: og:image share url ( #678 )
...
* feat: create share image for social media
* fix: group meta tags
* fix: adjust og:image to full url
2022-07-13 10:39:51 -07:00
evan
bf19759188
add node:http Server polyfill ( #572 )
...
* node:http polyfill
* remove @ts-ignore
* reuse emitter instance
* requested changes
* cleanup
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-07-13 07:08:57 -07:00
Thomas Jaggi
0bcd812bd5
docs: Link esbuild and @evanw in README ( #669 )
2022-07-13 11:35:00 +02:00
Finn R. Gärtner
2769c74c74
fix(env_loader): Off by one error ( #668 )
2022-07-13 02:33:32 -07:00
Jarred Sumner
64c93a0569
Types
2022-07-13 01:32:21 -07:00
evanwashere
f01bc3c752
switch from stream-browserify to readable-stream
2022-07-13 04:18:51 -04:00
Jarred Sumner
9bba47129a
Add a console.log bench
2022-07-13 01:03:03 -07:00
Jarred Sumner
54b03f6e8a
Add newline to symbols (fixes warning)
2022-07-13 01:03:03 -07:00
evanwashere
71930db9b0
fix benchmark not building with old rust version
2022-07-13 03:14:50 -04:00
Jarred Sumner
e4016c1a77
[http] Fix assertion
2022-07-12 22:56:20 -07:00
Jarred Sumner
b37ffde4ed
[bun.js] GC more strings
2022-07-12 22:56:09 -07:00
Jarred Sumner
dd7a346ac8
[bun install] Handle case that should really never happen
2022-07-12 22:55:38 -07:00
Jarred Sumner
d3963d6ea2
[bun.js] Fix GC bug with fetch
2022-07-12 22:46:27 -07:00
pnxdxt
0592b1dbed
feat(landing): create github action rebuilding the site on changes ( #651 )
2022-07-12 21:37:39 -07:00
Gabriel Nunes
7b3dbf1108
feat(packages/bun-landing): Create share image for social media ( #629 )
...
* feat: create share image for social media
* fix: group meta tags
2022-07-12 22:20:39 +02:00
Aditya Agarwal
60e8cf4746
fix(README): Exchange backticks for <code></code> ( #641 )
2022-07-12 22:11:43 +02:00
Aditya Agarwal
a396e69384
fix(README): Fix punctuation ( #639 )
2022-07-12 22:10:05 +02:00
Jarred Sumner
6eebd11a06
.3 not .0
2022-07-12 12:26:58 -07:00
Jarred Sumner
56ac919f54
[landing] Hashing benchmark
2022-07-12 12:21:56 -07:00
evanwashere
cbc1e407c3
use permalinks for landing page
2022-07-12 12:57:28 -04:00
evan
e55d6eed2b
fix benchmark urls on landing page ( #636 )
2022-07-12 18:49:32 +02:00
Giorgio Bellisario
ed18a318b9
docs: Fix "coercion" spelling ( #628 )
2022-07-12 16:43:08 +02:00
pnxdxt
80969a59a5
chore(landing): build changes ( #626 )
2022-07-12 16:40:39 +02:00
Finn R. Gärtner
a0f8b8c68a
fix(examples/hono): Update package name ( #620 )
2022-07-12 03:09:15 -07:00
SheetJSDev
5774069cfe
fix blank template ( #523 )
2022-07-12 03:03:17 -07:00
Jarred Sumner
83ad9fa780
[napi] Implement napi_get_property_names
2022-07-12 02:50:47 -07:00
Jesse-Lucas1996
a63a0ccc10
docs: Hono example with typescript ( #577 )
...
* hono example with typescript
* changing of name in package json
* adding dom to lib
* removal of git ignore
* removed DOM
* Update examples/hono/src/index.ts
Co-authored-by: Hyro <generalkubo@gmail.com >
* changed port
* added read me
* Update index.ts
* Update package.json
* Update readme.md
Co-authored-by: Hyro <generalkubo@gmail.com >
Co-authored-by: Jesse Lucas <jlucas@corpcloud.com.au >
Co-authored-by: Finn R. Gärtner <65015656+FinnRG@users.noreply.github.com >
2022-07-12 11:46:22 +02:00
Ryan Bargholz
734775e410
Support specifying a JSON response type in bun.d.ts ( #563 )
...
Co-authored-by: Ryan Bargholz <ryan@asteria.com >
2022-07-12 01:47:58 -07:00
Ryan Russell
4987067a18
refactor(exports.zig): Fix WebSocketHTTPSClient var name ( #598 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org >
2022-07-12 01:47:36 -07:00
Finn R. Gärtner
a6ab6e2131
fix(env_loader): Ignore spaces before equals sign ( #602 )
...
* fix(env_loader): Ignore spaces before equals sign
* fix(env_loader): Change the type of key_end to usize
2022-07-12 01:42:36 -07:00
evan
a9e4ff2029
cleanup benchmarks folder ( #587 )
...
* cleanup benchmarks
* run prettier
2022-07-12 01:40:12 -07:00
Jarred Sumner
7eea306b0f
Update build-id
2022-07-12 00:21:45 -07:00
Jarred Sumner
7b708255f5
[jsc] Fix segfault with promises
2022-07-12 00:20:46 -07:00
Jarred Sumner
46e8717e6c
[bun install] Fix NotSameFileSystem error (for real this time)
2022-07-12 00:20:46 -07:00
Ben Williams
e85f8011d5
docs: Updated logLevel to include debug ( #189 )
2022-07-12 01:20:10 +02:00
pnxdxt
ae02cad3f5
docs: remove double v of version ( #601 )
2022-07-12 01:11:32 +02:00
Ryan Russell
f0529ca253
docs(various): .md readability improvements ( #597 )
2022-07-12 00:41:23 +02:00
Evan Boehs
349eb9481d
docs: builtin -> built-in ( #585 )
2022-07-12 00:38:42 +02:00
deijjji303
889ed66a01
docs: Added note of AVX2 requirement and mentioned Intel SDE workaround in README.md ( #346 )
2022-07-12 00:36:51 +02:00
josesilveiraa
ede7576899
chore(docs): add comma ( #580 )
2022-07-12 00:33:03 +02:00
Rudraksh Karpe
299c61896e
docs: Fix typo ( #599 )
...
Under the Credits section
On line no. 2, it is mentioned as based off of whereas based on would be the correct choice of a word representing it as official documentation of Bun.
I hope this would help to make the Bun Documentation more precise to the users.
2022-07-12 00:28:17 +02:00
Jarred Sumner
fb03027b5b
Broken links?
2022-07-11 13:41:48 -07:00
B E C H
d3ec0e204f
Fixed broken links on the Bun.serve benchmark ( #590 )
...
Fixed the broken links to the Bun.serve benchmark sources.
2022-07-11 13:39:42 -07:00
Jarred Sumner
9bd8e6e604
Update javascript.zig
2022-07-11 11:06:59 -07:00
Jarred Sumner
3086fff66d
woops
2022-07-11 08:46:04 -07:00
Jarred Sumner
2b709315e3
[integration test scripts] bun -> bun dev
2022-07-11 08:45:44 -07:00
Jarred Sumner
a7adf3d369
Revert changes to integration test scripts that break macOS tests
2022-07-11 08:39:30 -07:00
Jarred Sumner
59113ea3ae
Update build-id
2022-07-11 08:19:07 -07:00
Carter Snook
5fc353797f
feat(core): implement web interaction APIs ( #528 )
...
* feat(core): implement web interaction APIs
* fix(core): adjust web prompt code and add types
2022-07-11 08:11:02 -07:00
Jarred Sumner
6190130626
[resolver] Stripe file:// from import paths
2022-07-11 08:04:55 -07:00
Jarred Sumner
f6cd941522
Fixes https://github.com/oven-sh/bun/issues/195
2022-07-11 08:04:55 -07:00
Jarred Sumner
a6c216db00
Revert "Fix: NotSameFileSystem at clonefile ( #546 )" ( #581 )
...
This reverts commit 2659febd1b .
2022-07-11 08:04:20 -07:00
Snazzah
4394169405
feat(types): Add types for node modules and various fixing ( #470 )
...
* fix(types): add __dirname and __filename as deprecated types
* fix(types): add stream() method to Blob
* fix(types): update getRandomValues in Crypto
* fix(types): add buffer type defs
* fix(types): remove buffer type setting in fs
* fix(types): extend TypedArray in crypto.getRandomValues
Co-authored-by: Carter Snook <cartersnook04@gmail.com >
* fix(types): add notes to some buffer methods
* fix(types): remove since jsdoc comments from buffer
* chore(types): fix bundle script and build types
* fix(types): update bundle script
This really shouldn't do anything differently, but it no longer hangs whenever I bundle types. Not sure if anyone else has this problem but, ehhhh...
* fix(types): remove unused types in buffer
* feat(types): add assert module types
* feat(types): add events module types
* feat(types): add os module types
* feat(types): add domain module types
* fix(types): add process.isBun type
* feat(types): add util module types
* feat(types): add querystring module types
* feat(types): add process module types
* feat(types): add string_decoder module types
* feat(types): add sys module types
* feat(types): add timers module types
* feat(types): add stream module types
* feat(types): add crypto module types
fix(types): fix types for stream, timers and util modules
* feat(types): add constants module types
* feat(types): add url module types
* feat(types): add tty module types
* feat(types): add http module types
* feat(types): add https module types
* feat(types): add punycode module types
* feat(types): add zlib module types
* feat(types): add supports-color module types
Co-authored-by: Carter Snook <cartersnook04@gmail.com >
2022-07-11 05:40:07 -07:00
Carlos Gabriel Vilas Novas Soares
6e5665de4e
fix: environment typo ( #568 )
2022-07-11 05:39:03 -07:00
CharlieS1103
ea6d96f409
Cleanup discord-interactions readme ( #451 )
2022-07-11 05:34:21 -07:00
Aditya Gupta
2659febd1b
Fix: NotSameFileSystem at clonefile ( #546 )
...
Fixes issue #531
Before this, using 'bun install' on a directory in different filesystem
such as tmpfs (/tmp) would have caused "Error: NotSameFileSystem".
This commit fixes that by handling this error, and at end of function it
will fall back to use copyfile (same as --backend=copyfile)
2022-07-11 05:31:00 -07:00
rml1997
1405158dfb
Updated typo in example ( #573 )
...
Changed deocder to decoder
2022-07-11 05:26:45 -07:00
Jarred Sumner
d6d8c0b80d
Fixes https://github.com/oven-sh/bun/issues/561
2022-07-11 04:34:38 -07:00
Jarred Sumner
d9491fe022
[js] Include TypedArray type name for empty arrays
2022-07-11 04:24:11 -07:00
Jarred Sumner
3609063d81
[js] When console.log typed arrays, include the type name and limit printed count to 512
2022-07-11 04:20:28 -07:00
Jarred Sumner
7904f49b5d
Fixes https://github.com/oven-sh/bun/issues/229
2022-07-11 03:41:03 -07:00
Jarred Sumner
d35ca945c2
Bump zig build
2022-07-11 03:08:07 -07:00
Jarred Sumner
a20a341729
Move symbol
2022-07-11 02:12:23 -07:00
Jarred Sumner
7381c33f76
Run prettier
2022-07-11 02:10:32 -07:00
Jarred Sumner
1091ee2318
Fix broken build
2022-07-11 02:10:23 -07:00
Jarred Sumner
b79dd18ca5
[bun wiptest] Fix copy
2022-07-11 02:03:46 -07:00
evan
3abfc3566b
add depd browser polyfill ( #517 )
2022-07-11 01:53:45 -07:00
thislooksfun
71992634a6
Fix macOS build ( #525 )
...
* style: remove some trailing whitespace
* docs: make `identifier-cache` _before_ `jsc`
Running them the other way around results in a failed build.
* docs: `npm i` in both `test/snippets` _and_ `test/scripts`
`test/scripts` has node packages as well. If they aren't installed, then
some of the tests fail to start.
* docs: add `rust` to list of homebrew packages
One of the dependencies tries to run `cargo`, and will fail the build if
it can't. The `cargo` command is provided by the `rust` brew package.
* docs: clean up section on macOS code signing
This requirement applies to _all_ macOS builds, not just those on Apple
Silicon, and also had some slightly confusing wording.
* build: remove leading whitespace from flags
This leading whitespace was making my system treat the argument as a
file with name ` -L$(LLVM_PREFIX)/lib` (leading whitespace included),
instead of as a library path argument.
* build: try llvm@13 first, then fall back on bare llvm
The macOS instructions say to install `llvm@13`, which has a different
path than the bare `llvm` install (`brew --prefix llvm@13` != `brew
--prefix llvm`). This patch takes a slightly smarter approach:
1. If the user defined `LLVM_PREFIX` and it points to a valid path on
disk, use that.
2. If `LLVM_PREFIX` is NOT a valid path, try setting it to the `llvm@13`
path.
3. If it's STILL not a valid path, try the plain `llvm` path
4. If it's STILL not valid, set it to a user-friendly error.
There might be a better solution for doing this, I'm not well-versed in
Makefile syntax, but it's at least slightly better than it was before.
* fix(build): update cast signature
`std.math.cast` was changed in 0e6285c8fc31ff866df96847fe34e660da38b4a9.
It used to throw if the cast would overflow, but now it returns `null`
instead.
2022-07-11 01:52:30 -07:00
Michell Brito
90ff529b55
Merge pull request #544 from xHyroM/chore/update-templates
2022-07-10 23:46:30 -04:00
Michell Brito
5a8b3b8ad7
Merge pull request #464 from dkarter/main
...
fix: remove unnecessary quotes in commit message
2022-07-10 23:42:44 -04:00
Aurora Luna Takemi
418972b423
Update GitHub URL to match new repo URL ( #547 )
...
* Update repo URLs
* GitHub URL update
* Revert accidental URL changes
2022-07-10 19:37:30 -07:00
Hyro
c1d4917593
chore(feature-request): change feature request to enhancement
2022-07-10 19:04:33 +02:00
Hyro
65d6e28b4f
chore(api-ref-docs): change doc to documentation
2022-07-10 19:03:45 +02:00
Hyro
3c435f7856
chore(bug-report): add label bug, need repro
2022-07-10 19:01:20 +02:00
Hyro
659c3e0e12
chore: disable blank issues, add discord contact link
2022-07-10 19:00:27 +02:00
Giorgio Bellisario
1e9cba9972
Fix "operations" word spelling ( #543 )
2022-07-10 09:21:50 -07:00
Jacob
c3bf97002d
clarify launch step ( #534 )
2022-07-10 07:23:09 -07:00
r00ster91
16452c16da
Remove unnecessary Output.flushs before Global.exit and Global.crash ( #535 )
...
* fix: add missing newline
* refactor: std.process.exit -> Global.exit
* fix: std.os.abort -> Global.exit
I'm not sure about this one. Please verify.
* cleanup: remove unnecessary `Output.flush`s
2022-07-10 06:44:57 -07:00
Snazzah
05970fe1fb
fix(bun-error): fix line endings
2022-07-10 06:42:09 -07:00
Snazzah
0f20d5913d
feat(bun-error): update "powered by" logo to use new bun wordmark
2022-07-10 06:42:09 -07:00
Ryan Russell
0acf8a6618
refactor(websockets): Rename connectedWebSocketContext()
...
Signed-off-by: Ryan Russell <git@ryanrussell.org >
2022-07-09 18:34:46 -07:00
Hisam Fahri
547ac721fa
fix: add grammar fix on templates
2022-07-09 18:34:20 -07:00
Hisam Fahri
8ff70a6224
feat: add bun docs report template
2022-07-09 18:34:20 -07:00
Hisam Fahri
b880c6663c
feat: add feature request template
2022-07-09 18:34:20 -07:00
Hisam Fahri
66e52396dc
feat: add bug report template
2022-07-09 18:34:20 -07:00
Laurens Lavaert
92225faa82
fix: actuality return result instead of ns time
2022-07-09 18:33:51 -07:00
Laurens Lavaert
36718c45fc
bugfix: performance.now function should return MS instead of nano
2022-07-09 18:33:51 -07:00
lucasew
118c134918
update bash references to work in non-fhs compliant distros
...
Signed-off-by: lucasew <lucas59356@gmail.com >
2022-07-09 18:28:32 -07:00
b0iq
85dbb9cc92
using {process.version} instead of hardcoding
2022-07-09 18:27:56 -07:00
b0iq
e11f1476af
Update Bun CLI version typo to v0.1.2
2022-07-09 18:27:56 -07:00
sno2
f5d896542a
fix: update build files to latest Zig version
2022-07-09 18:25:25 -07:00
evanwashere
961d0a159a
add partial node:net polyfill
2022-07-09 16:29:57 -07:00
JolteonYellow
1597424d17
fix dotenv package example on landing page ( #436 )
2022-07-09 15:49:37 -04:00
Jordan Lees
465e185a74
fix typo in readme ( #449 )
2022-07-09 15:39:01 -04:00
Michell Brito
5abee04991
Merge pull request #483 from pvinis/patch-1
2022-07-09 14:29:16 -04:00
Michell Brito
a884ca155e
Merge pull request #476 from jakemcf22/main
2022-07-09 14:29:04 -04:00
Finn R. Gärtner
d3f912a79e
fix: Append n when printing a BigInt
2022-07-09 20:23:56 +02:00
FinnRG
5d7aabb38a
fix: Append n when printing a BigInt
2022-07-09 20:19:35 +02:00
Finn R. Gärtner
adda6f6dd1
fix: Remove unnecessary n while formatting
2022-07-09 20:05:32 +02:00
FinnRG
5191a57037
fix: Remove unnecessary n while formatting
2022-07-09 20:02:21 +02:00
Alexander
7d1c9fa1a4
Migrate to Zig v0.10.0
2022-07-09 05:09:16 -07:00
Ziloka
dd5996379d
Update README.md
2022-07-09 04:51:23 -07:00
Pavlos Vinieratos
a0d471eda5
typo
2022-07-09 10:40:17 +01:00
Snazzah
f58501fc62
feat(landing): add favicon.ico
2022-07-09 00:57:52 -07:00
Snazzah
80dc9b97f2
chore(landing): build changes
2022-07-09 00:57:52 -07:00
Snazzah
d018b08082
feat(landing): add og:locale and twitter:site metadata
2022-07-09 00:57:52 -07:00
Snazzah
576ee66f20
feat(landing): add 256x icon
2022-07-09 00:57:52 -07:00
Snazzah
b55b49ac4e
feat(landing): remove space between zig and "'s"
2022-07-09 00:57:52 -07:00
Snazzah
712f4a7f5d
feat(landing): add SVG logo, manifest, and meta tags
2022-07-09 00:57:52 -07:00
Snazzah
528972ef8b
feat: update default favicon to new logo
2022-07-09 00:57:08 -07:00
jakemcf22
8b4c7434c3
Fix grammar erros in README.md
2022-07-08 23:44:51 -07:00
Dorian Karter
b0760bbab5
fix: remove unnecessary quotes in commit message
...
These quotes are not necessary and appear literally in the commit
2022-07-08 18:46:53 -05:00
Hyro
ac8bcb5edb
remove comments
2022-07-08 14:09:14 -07:00
Michell Brito
2b98ffd776
Merge pull request #433 from keidarcy/patch-1
2022-07-08 09:24:25 -04:00
Michell Brito
b373126927
Merge pull request #330 from Tropix126/a11y
2022-07-08 09:13:49 -04:00
Xing Yahao
34bb627a54
Fix react example README typo.
2022-07-08 19:37:06 +09:00
FinnRG
92584630c3
fix(templates/react): Add a SVG type definition
2022-07-08 02:59:52 -07:00
Hyro
6035ef353a
use tsconfig from readme
2022-07-08 02:32:55 -07:00
xhyrom
4bd42e1cf0
add tsconfig
2022-07-08 02:32:55 -07:00
Hyro
f95919b5a3
update hello world
2022-07-08 02:32:55 -07:00
xhyrom
43657c4dd8
new template blank
2022-07-08 02:32:55 -07:00
Tropical
e158ee542d
Slightly darken pink link color for contrast requirements.
2022-07-08 04:48:58 +00:00
Tropical
6256b88768
Pink chip contrast
2022-07-08 04:46:17 +00:00
Jarred Sumner
57d9c500a8
Update bun-types
2022-07-07 20:22:51 -07:00
Michell Brito
35d1f51d75
Merge pull request #305 from MoritzLoewenstein/main
2022-07-07 21:36:41 -04:00
Jarred Sumner
1ee94d5bd2
Bump examples
2022-07-07 16:02:04 -07:00
Hassan El Mghari
d513a62862
Updating format of Next.js example app README to match the rest
2022-07-07 15:58:05 -07:00
Hassan El Mghari
76ef4fc976
Deleted installing dependencies from Discord README since it's done automatically when cloning
2022-07-07 15:58:05 -07:00
Hassan El Mghari
fe858a9196
Updating README for React example to match Discord
2022-07-07 15:58:05 -07:00
Hassan El Mghari
6770356c5b
Clean up README for React example
2022-07-07 15:58:05 -07:00
Hassan El Mghari
ebccbaeee9
Update command to run react app to bun dev
2022-07-07 15:58:05 -07:00
K.J. Valencik
b64c71eece
fix: napi_get_version should return the Node-API version and not the bun version
2022-07-07 14:18:44 -07:00
CoffeeMovedCoder
4b4bc8a380
Add troubleshooting for old intel CPUs
2022-07-07 14:15:45 -07:00
Hassan El Mghari
485ef8c4fc
Delete second.tsx page as it's not being used
2022-07-07 14:14:57 -07:00
Hassan El Mghari
5b880512fb
Removed unused parts of index.tsx
2022-07-07 14:14:57 -07:00
Hassan El Mghari
3b43a192f1
Cleaned up the Next.js example README
2022-07-07 14:14:57 -07:00
Tropical
911f74496d
Merge branch 'main' into a11y
2022-07-07 15:29:44 -05:00
michell brito
7118df32bb
Fix: long numbers + unused css
2022-07-07 11:52:26 -07:00
Michell Brito
73c0300d63
Merge pull request #370 from PyBaker/patch-1
2022-07-07 12:57:41 -04:00
PyBaker
0cf76f628e
Update README.md
2022-07-07 18:38:12 +03:00
Jarred Sumner
ee83e25120
[install] Use an identifier for the accept header value
2022-07-07 05:36:37 -07:00
Jarred Sumner
d6fb068230
Fixes https://github.com/Jarred-Sumner/bun/issues/341
2022-07-07 04:50:37 -07:00
Jarred Sumner
e1e3cee16a
Outdated type
2022-07-07 03:44:11 -07:00
Jarred Sumner
fb6d438485
Fix copy
2022-07-07 03:33:05 -07:00
shanehsi
f84f7f8acb
fix devcontainer starship installation
2022-07-07 02:49:04 -07:00
Hiroaki Nakamura
8e912b4a20
Use Node.js v18.x from NodeSource to use string.replaceAll method
...
Node.js in Ubuntu focal does not have string.replaceAll method.
```
root@focal:~# node --version
v10.19.0
root@focal:~# echo "console.log(''.replace)" | node
[Function: replace]
root@focal:~# echo "console.log(''.replaceAll)" | node
undefined
```
And it gives the following error at
f0c283c632/Makefile (L722)
```
/build/bun/misctools/headers-cleaner.js:33
input = input.replaceAll("*WebCore__", "*bindings.");
^
TypeError: input.replaceAll is not a function
at Object.<anonymous>
(/build/bun/misctools/headers-cleaner.js:33:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
make: *** [Makefile:722: jsc-bindings-headers] Error 1
```
2022-07-07 02:47:57 -07:00
Ikko Ashimine
6c5472a84c
[strings] Fix typo in string_immutable.zig
...
occurences -> occurrences
2022-07-07 02:46:32 -07:00
Jarred Sumner
1f887bb863
Bump build-id
2022-07-07 01:05:39 -07:00
Hassan El Mghari
1739513095
Update list of unsupported bun Next.js features
2022-07-07 00:44:31 -07:00
Jarred Sumner
621fe3f5d2
[next] Fix @types/react error
2022-07-06 23:57:47 -07:00
Jarred Sumner
0196bbee21
[cli] Clarify
2022-07-06 23:40:22 -07:00
Jarred Sumner
e4670b7513
Improve error message for outdated linux kernel
2022-07-06 23:30:19 -07:00
Jarred Sumner
4601531bf0
[tsconfig] Fix crash affecting preact
2022-07-06 23:16:18 -07:00
Jarred Sumner
520f7e78ac
[internal] Fix failing build
2022-07-06 23:16:05 -07:00
Jarred Sumner
9962df69d6
[bun install] Fix NotSameFileSystem error
2022-07-06 22:29:30 -07:00
Tropical
47498eb375
properly style inner navigation ulist
2022-07-07 05:26:01 +00:00
Tropical
c78c810294
Refactor InstallBox
2022-07-07 05:19:30 +00:00
Michell Brito
8dc6f839a9
Merge pull request #264 from eyalcohen4/main
2022-07-07 01:03:06 -04:00
Tropical
c8d51cc05a
Improve link contrast, refactor tabbar
2022-07-07 04:59:58 +00:00
mrowles
c99a9a6cb7
chore(examples): Updates start doco
2022-07-06 21:18:03 -07:00
Isaac McFadyen
fb95f6b225
Updated CPU in benchmarks
2022-07-06 20:07:13 -07:00
josefaidt
c747a08649
docs: add callout for typedefs with TypeScript
2022-07-06 19:22:53 -07:00
Egor
ee5144924b
fix: spawn thread on linux
2022-07-06 19:22:29 -07:00
Moritz Löwenstein
ba9c64dc14
fix: add unzip is required information
2022-07-07 00:25:08 +02:00
Jarred Sumner
57f2208bdf
Update Deno number for React SSR after 8c1157be22
...
This is the best of 3 runs
jarred in jarred-desktop in ~
❯ oha -z 5s http://localhost:8080
Summary:
Success rate: 1.0000
Total: 5.0006 secs
Slowest: 0.0504 secs
Fastest: 0.0001 secs
Average: 0.0037 secs
Requests/sec: 13533.1616
Total data: 3.94 MiB
Size/request: 61 B
Size/sec: 806.17 KiB
Response time histogram:
0.001 [51666] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.002 [9726] |■■■■■■
0.003 [1369] |
0.004 [185] |
0.005 [34] |
0.006 [0] |
0.007 [4] |
0.008 [1] |
0.009 [2] |
0.010 [2] |
0.011 [4685] |■■
Latency distribution:
10% in 0.0001 secs
25% in 0.0002 secs
50% in 0.0006 secs
75% in 0.0010 secs
90% in 0.0019 secs
95% in 0.0434 secs
99% in 0.0473 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0002 secs, 0.0001 secs, 0.0006 secs
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs
Status code distribution:
[200] 67674 responses
jarred in jarred-desktop in ~ took 5s
❯ oha -z 5s http://localhost:8080
Summary:
Success rate: 1.0000
Total: 5.0005 secs
Slowest: 0.0492 secs
Fastest: 0.0001 secs
Average: 0.0032 secs
Requests/sec: 15328.8994
Total data: 4.46 MiB
Size/request: 61 B
Size/sec: 913.15 KiB
Response time histogram:
0.001 [63524] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.002 [7172] |■■■
0.003 [1155] |
0.004 [52] |
0.004 [3] |
0.005 [9] |
0.006 [4] |
0.007 [26] |
0.008 [2] |
0.009 [3] |
0.010 [4702] |■■
Latency distribution:
10% in 0.0002 secs
25% in 0.0003 secs
50% in 0.0005 secs
75% in 0.0008 secs
90% in 0.0013 secs
95% in 0.0434 secs
99% in 0.0440 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0003 secs, 0.0001 secs, 0.0006 secs
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs
Status code distribution:
[200] 76652 responses
jarred in jarred-desktop in ~ took 5s
❯ oha -z 5s http://localhost:8080
Summary:
Success rate: 1.0000
Total: 5.0006 secs
Slowest: 0.0518 secs
Fastest: 0.0001 secs
Average: 0.0032 secs
Requests/sec: 15786.6566
Total data: 4.59 MiB
Size/request: 61 B
Size/sec: 940.42 KiB
Response time histogram:
0.001 [66905] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.002 [6834] |■■■
0.003 [409] |
0.003 [18] |
0.004 [17] |
0.005 [17] |
0.006 [3] |
0.007 [3] |
0.008 [2] |
0.009 [2] |
0.009 [4733] |■■
Latency distribution:
10% in 0.0002 secs
25% in 0.0004 secs
50% in 0.0005 secs
75% in 0.0008 secs
90% in 0.0012 secs
95% in 0.0434 secs
99% in 0.0440 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0003 secs, 0.0001 secs, 0.0007 secs
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs
Status code distribution:
[200] 78943 responses
2022-07-06 14:50:57 -07:00
Hiroaki Nakamura
a2313cede3
Add needed dependencies to Makefile devcontainer target
2022-07-06 14:41:39 -07:00
Alexander
996a7ade9f
fix tabpanel a11y
2022-07-06 14:04:35 -07:00
Alexander
024233feeb
fix a11y issues on landing
2022-07-06 14:04:35 -07:00
Yongwook Choi
48058fac99
docs: Fix broken toc link
2022-07-06 14:03:20 -07:00
Joe Previte
9a9bb823f6
fixup!: add newline to end of file
2022-07-06 14:00:47 -07:00
Joe Previte
73ab469102
refactor: wrap BigInt tests in describe block
...
Place BigInt tests inside of describe block to match test structure of
the rest of the codebase.
2022-07-06 14:00:47 -07:00
Eyal Cohen
c6967634c9
Add a space in page.tsx
2022-07-06 16:34:07 +03:00
Daniel Tolentino
f0c283c632
Add Bun logo
2022-07-06 04:12:45 -07:00
ManiTheDev
4654de7ee5
adding a template .gitignore
2022-07-06 04:11:31 -07:00
Andrea Giammarchi
b59908d291
Fix #253 - Explicitly exported randomUUID from global crypto
2022-07-06 04:08:53 -07:00
Feng Yu
a22b333f2a
Fix Safari's implementation broken link
2022-07-06 04:06:51 -07:00
Kayla Washburn
636e71d54e
Allow setting MIN_MACOS_VERSION as an environment variable
2022-07-06 01:17:31 -07:00
Kayla Washburn
6ea9332c87
Allow setting LLVM_PREFIX as an environment variable
2022-07-06 01:17:31 -07:00
Nishan
72184748d8
fix: home page links
2022-07-06 01:17:09 -07:00
Jay Baker
797d52beb5
fix: typo in the word enormous. fixes #214
2022-07-06 01:16:18 -07:00
Jarred Sumner
d875c9988a
[bench] Add comparison for react-dom builds
2022-07-06 00:07:59 -07:00
Luca Casonato
8c1157be22
Disable response body auto compression in Deno
...
Allows for a more apples to apples comparison between runtimes
2022-07-05 17:13:52 -07:00
Steven
f32153754c
fix: missing space in docs on homepage
2022-07-05 15:50:04 -07:00
addy
44ee4caf6f
Change fish path addition command
2022-07-05 14:39:04 -07:00
Jarred Sumner
e4fb842757
Update build-id
2022-07-05 13:03:02 -07:00
Jarred Sumner
780b919e26
delete this
2022-07-05 13:03:02 -07:00
Jarred Sumner
f7c32745e0
update
2022-07-05 13:03:02 -07:00
evanwashere
bd8c7915b9
add invite url guide
2022-07-05 11:45:28 -07:00
evanwashere
91cff94739
add creating discord bots to readme
2022-07-05 11:45:28 -07:00
Kirk Scheibelhut
0c9fb7e063
nitpick README
...
- modify wording of example which implies there are two blobs beings passed when only one is
- styling Bun.js -> bun.js for consistency
- correct 63 bits -> 53 bits
2022-07-05 11:40:27 -07:00
Jarred Sumner
70e2bda971
Fix tests
2022-07-05 11:04:59 -07:00
Jarred Sumner
0d54275314
[create] Don't print timestamp because it formats weird
2022-07-05 10:29:03 -07:00
Jarred Sumner
b64bfc0153
mitigate HMR bug
2022-07-05 10:28:34 -07:00
Jarred Sumner
9afed496a8
Bump discord-interactions template
2022-07-05 10:28:14 -07:00
Jarred Sumner
3bf467375b
latest
2022-07-05 09:40:37 -07:00
evanwashere
aaffcb410f
nitpicks
2022-07-05 09:26:58 -07:00
evanwashere
d3e0955ddc
more examples
2022-07-05 09:26:58 -07:00
evanwashere
5d4fbf7f02
TLA & typescript
2022-07-05 09:26:58 -07:00
evanwashere
4a927e09b7
discord interactions template
2022-07-05 09:26:58 -07:00
Jarred Sumner
a577e3507f
latest
2022-07-05 08:55:20 -07:00
Jarred Sumner
cb67add26a
Fix copy button
2022-07-05 02:53:25 -07:00
Jarred Sumner
2470c0d090
Current landing
2022-07-05 02:25:33 -07:00
Jarred Sumner
2d8dfeff49
[breaking] bun now prints the help menu instead of the dev server
2022-07-05 00:56:39 -07:00
Jarred Sumner
18290dee8b
[jsc] More careful code in dynamic require
2022-07-05 00:55:43 -07:00
Jarred Sumner
9137862bc7
Fix crash in dynamic import?
2022-07-05 00:55:24 -07:00
Jarred Sumner
288178e94c
Fix bug in ffi
2022-07-05 00:55:07 -07:00
Jarred Sumner
ebb4f85feb
[bun-framework-next] Bump
2022-07-05 00:54:56 -07:00
Jarred Sumner
f5527c976e
Clean up some benchmarks
2022-07-05 00:54:42 -07:00
Jarred Sumner
ab7f57239d
[bench] react hello world
2022-07-04 18:06:30 -07:00
Jarred Sumner
a822135603
Update Dockerfile
2022-07-04 17:36:20 -07:00
Jarred Sumner
6190dc5da5
[internal] Don't need to run jsc-bindings-headers in CI
2022-07-04 17:32:19 -07:00
Jarred Sumner
090a913660
once more
2022-07-04 17:26:46 -07:00
Jarred Sumner
db2f101971
[internal] Fix build script on old node
2022-07-04 17:23:43 -07:00
Jarred Sumner
41f4302d39
Handle global require("string")
2022-07-04 17:17:29 -07:00
Jarred Sumner
91cada219b
Fix case in dynamic require()
2022-07-04 17:17:11 -07:00
Jarred Sumner
7d3459f53d
[internal] Fix duplicate symbol issue
2022-07-04 16:47:34 -07:00
Jarred Sumner
cf4c9912c3
Fix npm peer dep issue
2022-07-04 16:46:17 -07:00
Jarred Sumner
b685cd49a6
[bench] Add a react ssr hello world
2022-07-04 16:41:16 -07:00
Jarred Sumner
9c960fcafd
Update bun.lockb
2022-07-04 16:39:55 -07:00
Jarred Sumner
4acc0351cf
Update README.md
2022-07-04 16:39:48 -07:00
Jarred Sumner
2f212d1386
[resolver] Add a test for self-referencing package.json exports
2022-07-04 16:39:33 -07:00
Jarred Sumner
1e54e94cc2
Bump docker build of webkit
2022-07-04 16:39:05 -07:00
Jarred Sumner
48f64bc6e5
[itnernal] Cleanup some of the streams code
2022-07-04 16:38:45 -07:00
Jarred Sumner
667303fc86
[internal] Add a note explaining what to do if this fails
2022-07-04 16:36:51 -07:00
Jarred Sumner
6768db9a6e
[jsc] Handle promise ownership (might revert this)
2022-07-04 16:36:28 -07:00
Jarred Sumner
d516e3523b
[jsc] Run JSC's deferredWorkTimer sometimes
2022-07-04 16:35:11 -07:00
Jarred Sumner
a6d4283986
[jsc] Attempt to make detecting ArrayBuffer/Uint8Array faster
2022-07-04 16:34:42 -07:00
Jarred Sumner
abd9d8bcab
[server] Clean up some of the logic for freeing ReadableStream
2022-07-04 16:34:08 -07:00
Jarred Sumner
430532feec
Update __global.zig
2022-07-04 16:33:39 -07:00
Jarred Sumner
cf5939c425
[jsc] Make JSC own the memory for source code strings
2022-07-04 08:42:29 -07:00
Jarred Sumner
bbcc08dbb4
Merge branch 'jarred/landing'
2022-07-04 08:41:03 -07:00
Jarred Sumner
77b5999b73
[bench] Add a performance.now bench
2022-07-04 08:39:27 -07:00
Jarred Sumner
2f553df8be
[bench] Add an async overhead bench
2022-07-04 08:39:18 -07:00
Jarred Sumner
17045601e7
[bench] Add an ffi data overhead bench
2022-07-04 08:39:07 -07:00
Jarred Sumner
0f987a5601
[strings] Minor performance optimizations to SourceMaps
2022-07-04 08:05:21 -07:00
Jarred Sumner
fb48557154
Export Bun__readOriginTimer
2022-07-04 08:04:54 -07:00
Jarred Sumner
14846710c5
Make log_protection dev_only
2022-07-04 08:04:31 -07:00
Jarred Sumner
2ba3a6fbbc
Improve the performance of performance
2022-07-04 08:04:21 -07:00
Jarred Sumner
027d64c78f
0.1
2022-07-04 08:03:34 -07:00
Jarred Sumner
d653341e03
0!
2022-07-04 08:03:24 -07:00
Jarred Sumner
fd09b30538
[sourcemaps] Add an assertion
2022-07-04 06:03:31 -07:00
Jarred Sumner
eea02d9500
[misc] Make that test work
2022-07-04 06:03:19 -07:00
Jarred Sumner
c7e0ed8e21
Update page.tsx
2022-07-04 02:02:43 -07:00
Jarred Sumner
c34e9ced81
Add a getting started section
2022-07-04 01:26:09 -07:00
Jarred Sumner
344998a873
Fix WebAssembly.instantiate
2022-07-04 01:25:41 -07:00
Jarred Sumner
6f7af725ff
Export fs.promises
2022-07-04 00:16:29 -07:00
Jarred Sumner
e553e82acc
wip
2022-07-03 23:55:11 -07:00
Jarred Sumner
78d5a0f201
Update README.md
2022-07-03 23:54:44 -07:00
Jarred Sumner
53a8ab5715
Re-enable buffer pooling
2022-07-03 23:17:27 -07:00
Jarred Sumner
544ab558dc
wip
2022-07-02 23:33:24 -07:00
Jarred Sumner
edd550a5ee
wip
2022-07-02 23:33:20 -07:00
Jarred Sumner
c3ea15f4bc
Backport https://github.com/WebKit/WebKit/pull/2024
2022-07-02 04:05:21 -07:00
Jarred Sumner
efdc60372f
[bun:jsc] Add generateHeapSnapshotForDebugging
2022-07-02 04:05:04 -07:00
Jarred Sumner
6f3a092564
[bun:jsc] Add protectedObjectTypeCounts, disallow gc
2022-07-02 02:35:43 -07:00
Jarred Sumner
d1ad1089bc
Update README.md
2022-07-02 01:37:13 -07:00
Jarred Sumner
29af6560d3
[internal] Add react-dom as a dev dependency for the tests
2022-07-02 01:36:04 -07:00
Jarred Sumner
ef742f2fa8
[internal] Clean up launch.json
2022-07-02 01:36:04 -07:00
Jarred Sumner
2c70badad6
Update WebKit
2022-07-02 01:36:04 -07:00
Jarred Sumner
0d9ebb1fd2
[internal] Make make jsc-bindings-headers more reliable
2022-07-02 01:36:04 -07:00
Jarred Sumner
ba2c24e77c
[bindings] Mark more stuff as unreachable
2022-07-02 01:36:04 -07:00
Jarred Sumner
d1cc2b85cb
Update reactdom-bun.js
2022-07-02 01:36:04 -07:00
Jarred Sumner
7c996fe2e6
[bun:jsc] Add a test for getProtectedObjects
2022-07-02 01:36:04 -07:00
Jarred Sumner
f9f573ebb4
[strings] Optimize TextEncoder a little more
2022-07-02 01:36:04 -07:00
Jarred Sumner
476b3c7404
[bun http] Attempt to fix a crash
2022-07-02 01:36:04 -07:00
Jarred Sumner
500e5ed949
[streams] Rename drain() -> flush()
2022-07-02 01:36:04 -07:00
Jarred Sumner
b995e7797d
[bun:jsc] Add export for getProtectedObjects
2022-07-02 01:36:04 -07:00
Jarred Sumner
69b32a01c4
Update html_rewriter.zig
2022-07-02 01:36:04 -07:00
Jarred Sumner
d3ba6f0f12
Rename defaultErrorHandler to runErrorHandler
2022-07-02 01:36:04 -07:00
Jarred Sumner
f6002b799b
Delete BunStream
2022-07-02 01:36:04 -07:00
Jarred Sumner
874344eead
[bun:jsc] expose getProtectedObjects gc hook
2022-07-02 01:36:04 -07:00
Jarred Sumner
6567224125
wip
2022-07-02 01:36:04 -07:00
Koka Easwarendra
7907de58be
update cli comment to match the create next app instructions
2022-07-01 19:12:01 -07:00
Jarred Sumner
b686003710
[stremas] Regenerate JSSInk
2022-07-01 04:03:32 -07:00
Jarred Sumner
cd7dd0f007
[streams] Add an integer tag identifying what the stream type is
2022-07-01 04:02:09 -07:00
Jarred Sumner
6ecf7ec138
[Bun.serve] Add explicit function for clearing the abort callback
2022-07-01 04:01:27 -07:00
Jarred Sumner
0ab0d35542
[Bun.serve] Clean up lifetimes & error handling somewhat
2022-07-01 04:01:00 -07:00
Jarred Sumner
460ee12906
[Bun.serve] Don't run error recursively
2022-07-01 03:27:27 -07:00
Jarred Sumner
13e2ac08bd
Add some tests for error handling
2022-07-01 03:25:17 -07:00
Jarred Sumner
589993192a
Improve test coverage for streams
2022-07-01 03:24:58 -07:00
Jarred Sumner
4812fb8faf
Fix failing tests for ReadableStream -> {text, arrayBuffer, blob}
2022-07-01 03:24:16 -07:00
Jarred Sumner
e105cfcca8
Zig::ImportMeta
2022-07-01 03:22:23 -07:00
Jarred Sumner
f2569c8c6e
Move ImportMeta into it's own object
2022-07-01 03:21:55 -07:00
Jarred Sumner
4aec5151e5
[TextEncoder] Use JSC heap for small buffers
2022-06-30 20:40:05 -07:00
Jarred Sumner
ac8dd5e59b
Create process object lazily
2022-06-30 19:27:30 -07:00
Jarred Sumner
c9f1d146c2
Fix incorrect type
2022-06-30 19:25:56 -07:00
Jarred Sumner
180068e46c
Improve test coverage for react ssr
2022-06-30 19:25:46 -07:00
Jarred Sumner
6e59b996ba
Fix memory leak
2022-06-30 19:24:15 -07:00
Jarred Sumner
39d111fa63
Document failed experiment
2022-06-30 19:23:36 -07:00
Jarred Sumner
4821b9c10b
Fix promise memory leak
2022-06-30 19:23:27 -07:00
Jarred Sumner
457a13e238
[strings] Faster latin1 -> UTF8 length count
2022-06-29 20:53:50 -07:00
Jarred Sumner
6bc0bc2f63
[misc] Helper functions to ObjectPool
2022-06-29 20:52:58 -07:00
Jarred Sumner
856589bd98
[misc] Add generate-sink
2022-06-29 07:12:13 -07:00
Jarred Sumner
2fa51493c5
[http server] Fix a segfault when aborting
2022-06-29 07:10:30 -07:00
Jarred Sumner
4d3698e842
Correctly handle latin1 rope strings with non-ascii characters
2022-06-29 07:09:55 -07:00
Jarred Sumner
647110d513
[React SSR] Avoid getById slow path
...
thanks @Constellation
2022-06-29 07:09:25 -07:00
Jarred Sumner
425846f868
Regenerate builtins
2022-06-29 07:08:44 -07:00
Jarred Sumner
013dfb0498
[web streams] Handle direct streams in readableStreamToArray
2022-06-29 07:08:37 -07:00
Jarred Sumner
7168a40328
Make HTTP web streams faster
2022-06-29 07:07:52 -07:00
Jarred Sumner
66a297888f
Remove incorrect assertion
2022-06-29 04:29:42 -07:00
Jarred Sumner
a02f42f84c
Fix bug with printer
2022-06-29 04:29:32 -07:00
Jarred Sumner
7d5464adbe
[encoder] Fix non-ascii latin1 characters
2022-06-29 04:29:01 -07:00
Jarred Sumner
95c1785271
begin adding react-ssr tests
2022-06-27 06:44:39 -07:00
Jarred Sumner
292f60a8a8
[http server] couple more tests
2022-06-27 05:46:26 -07:00
Jarred Sumner
cfcd8a1531
[uws] Add helper for corking
2022-06-27 05:33:44 -07:00
Jarred Sumner
cf4ec2b109
Handle when there are no headers to send
2022-06-27 05:33:27 -07:00
Jarred Sumner
628cbc8eb3
Cork streams when possible
2022-06-27 05:32:46 -07:00
Jarred Sumner
f66c277e54
Fix memory issue with error messages
2022-06-27 05:32:07 -07:00
Jarred Sumner
6544b2b57e
Faster web streams
2022-06-27 05:31:58 -07:00
Jarred Sumner
3943ce5ac5
[web streams] Add more tests
2022-06-27 05:30:45 -07:00
Jarred Sumner
e93bdc79c7
Use less undefined
2022-06-27 05:30:16 -07:00
Jarred Sumner
3059d0fbb3
Add scoped logger functions for debug builds
2022-06-27 05:30:07 -07:00
Jarred Sumner
dc3a1170d4
use less undefined
2022-06-27 05:29:53 -07:00
Jarred Sumner
07050901a6
[fetch] Fix data corruption bug
2022-06-27 05:29:25 -07:00
Jarred Sumner
f70784a6d1
Fix data corruption bug in HTTP server
2022-06-27 05:28:45 -07:00
Jarred Sumner
77a0f335cb
wip ReadableStream for HTTP(s) Server
2022-06-26 06:01:22 -07:00
Jarred Sumner
31cfcf2c9f
Better node:url polyfill
2022-06-25 04:59:49 -07:00
Jarred Sumner
5bd5678ba3
Implement Bun.pathToFileURL & Bun.pathToFileURL
2022-06-25 04:42:56 -07:00
Jarred Sumner
1c04073e5e
Update transpiler.zig
2022-06-25 04:42:11 -07:00
Jarred Sumner
8fbd92e37d
Cleanup some of the require code
2022-06-25 04:41:20 -07:00
Jarred Sumner
7bb75f5553
Add dynamic require support
2022-06-24 06:59:47 -07:00
Jarred Sumner
6d6a89780b
Update Makefile
2022-06-23 14:26:37 -07:00
Jarred Sumner
3decfcc442
Update Makefile
2022-06-23 14:25:35 -07:00
Jarred Sumner
32185fe791
Update Makefile
2022-06-23 14:24:37 -07:00
Jarred Sumner
3739816ce2
Update Makefile
2022-06-23 14:21:30 -07:00
Jarred Sumner
874692c9c9
Update Dockerfile
2022-06-23 14:17:57 -07:00
Jarred Sumner
a589153d89
Update Makefile
2022-06-23 02:49:46 -07:00
Jarred Sumner
252f8a0eec
give up on emit-llvm for sqlite3
2022-06-23 01:52:28 -07:00
Jarred Sumner
86173f355a
maybe that fixes it?
2022-06-23 01:41:06 -07:00
Jarred Sumner
b15d862275
Fix buffer test which was failing for correct reasons
2022-06-23 01:35:48 -07:00
Jarred Sumner
729e55a357
Update Makefile
2022-06-23 01:35:32 -07:00
Jarred Sumner
da616966a8
Update Makefile
2022-06-23 01:31:13 -07:00
Jarred Sumner
92c6837460
Delete some files
2022-06-22 23:39:07 -07:00
Jarred Sumner
d8a3c0f841
Update libbacktrace
2022-06-22 23:38:57 -07:00
Jarred Sumner
729d445b68
change the directory structure
2022-06-22 23:21:48 -07:00
Jarred Sumner
25f820c6bf
maybe improve CPP build time
2022-06-22 22:52:24 -07:00
Jarred Sumner
a77825799e
Move builtins to src/javascript/jsc/builtins
2022-06-22 22:52:03 -07:00
Jarred Sumner
7db88ca6b5
Tweak test runner output
2022-06-22 21:25:20 -07:00
Jarred Sumner
9843a9de53
Cleanup some tests
2022-06-22 21:25:07 -07:00
Jarred Sumner
aa97c1da2f
Update Dockerfile.base
2022-06-22 21:25:01 -07:00
Jarred Sumner
dce542a623
Update WebKit
2022-06-22 21:11:34 -07:00
Jarred Sumner
e4e915d2ec
cleanup websocket test
2022-06-22 21:11:28 -07:00
Jarred Sumner
f05428e4f3
Fix WebSocket when HTTP server is not running
2022-06-22 21:11:10 -07:00
Jarred Sumner
20249b9f80
Update build-id
2022-06-22 16:49:51 -07:00
Jarred Sumner
41575b982c
cleanup
2022-06-22 16:48:03 -07:00
Jarred Sumner
b4feb33df9
Update index.d.ts
2022-06-22 06:56:47 -07:00
Jarred Sumner
d8dfddffe2
types for bun:jsc
2022-06-22 06:56:47 -07:00
Jarred Sumner
8c81fd5fc0
Slightly customize the events polyfill so it uses ESM
2022-06-22 06:56:47 -07:00
Jarred Sumner
0aa0eefd4e
Fix memory bugs in escapeHTML & arrayBufferToString
2022-06-22 06:56:47 -07:00
Jarred Sumner
fa2d6a0d40
Add a simple test for EventEmitter
2022-06-22 06:56:47 -07:00
Jarred Sumner
d1ae1771eb
Add a simple test for websockets
2022-06-22 06:56:47 -07:00
Jarred Sumner
08314c328e
Handle integer overflow in logs better
2022-06-22 06:56:47 -07:00
Jarred Sumner
d450c4cdee
[JS Printer] Fix bug with printing re-exported functions that are from an object binding
2022-06-22 06:56:47 -07:00
Jarred Sumner
659d4497d0
Fix bug with browser disabled modules
2022-06-22 06:56:47 -07:00
Jarred Sumner
772350a309
Disable modules in the linker
2022-06-22 06:56:47 -07:00
Jarred Sumner
cf0ee82926
this assertion isn't good enough
2022-06-22 06:56:47 -07:00
Jarred Sumner
150f33c6fa
Disable modules constently for bun inbun bun
2022-06-22 06:56:47 -07:00
Jarred Sumner
56aec17b9b
Fix bug with exceptions inside EventTarget
2022-06-22 06:56:47 -07:00
Jarred Sumner
92aeb0af55
Add a way to schedule microtasks from C++
2022-06-22 06:56:47 -07:00
Jarred Sumner
759bfadb93
Update javascript.zig
2022-06-22 06:56:47 -07:00
Jarred Sumner
93d03e5147
Clean up perf hooks a little
2022-06-22 06:56:47 -07:00
Jarred Sumner
e3a00268eb
use JSValue for bun test
2022-06-22 06:56:47 -07:00
Jarred Sumner
527eb40a2c
ws polyfil
2022-06-22 06:56:47 -07:00
Jarred Sumner
2cdbd2de83
Polyfills for undici, streams/web, streams/consumer timers timers/promises, fs/promises, ws
2022-06-22 06:56:47 -07:00
Jarred Sumner
d9f6a3f2d2
Fix close
2022-06-22 06:56:47 -07:00
Jarred Sumner
6db9e10ff1
Explicitly tag memory ownership for escapeHTML
2022-06-22 06:56:47 -07:00
Jarred Sumner
1947c62539
Fix assertion that checks globally allocated memory pointers
2022-06-22 06:56:47 -07:00
Jarred Sumner
0843e383b2
Fix error messages sometimes printing undefined memory
2022-06-22 06:56:47 -07:00
Jarred Sumner
624bebd20f
Add a way to assert memory is not undefined in debug builds
2022-06-22 06:56:47 -07:00
Jarred Sumner
41b03b5c4c
Cleanup tests
2022-06-22 06:56:47 -07:00
Jarred Sumner
bfa5b29555
Add checks in debug mode that strings being built via counting were actually counted
2022-06-22 06:56:47 -07:00
Jarred Sumner
13693b7b63
[JS Parser] Improve memory safety of error messages & logs
2022-06-22 06:56:47 -07:00
Jarred Sumner
1bc3747042
[JS Parser] Fix undefined memory bug when printing an "cannot be used in strict mode" error message
2022-06-22 06:56:47 -07:00
Jarred Sumner
689666f17c
[bun wiptest] Implement beforeEach, afterEach, beforeAll, afterAll
2022-06-22 06:56:47 -07:00
Jarred Sumner
0c12f1684f
[websockets] Support receiving data of length 128 - 65354, bigger not supported yet
2022-06-22 06:56:47 -07:00
Jarred Sumner
07c010a377
Better error for undefined memory here
2022-06-22 06:56:47 -07:00
Jarred Sumner
9e4c11e280
Preallocate some event loop tasks
2022-06-22 06:56:47 -07:00
Jarred Sumner
7f836f2d73
Fix bugs with fifo tweaks
2022-06-22 06:56:47 -07:00
Jarred Sumner
abd042ea4a
Update test_command.zig
2022-06-22 06:56:47 -07:00
Jarred Sumner
f004115dae
bun wiptest improve test runner output
2022-06-22 06:56:47 -07:00
Jarred Sumner
d057b89a33
Sending works
2022-06-22 06:56:47 -07:00
Jarred Sumner
dda85d92c9
implement a custom websocket client
2022-06-22 06:56:47 -07:00
Jarred Sumner
ab888d2ebe
It connects! but the frames are corrupt
2022-06-22 06:56:47 -07:00
Jarred Sumner
be9efacf1b
WebSocket is a global
2022-06-22 06:56:47 -07:00
Jarred Sumner
71025c8bcc
Fix most of the errors
2022-06-22 06:56:47 -07:00
Jarred Sumner
89f08aae27
more code
2022-06-22 06:56:47 -07:00
Jarred Sumner
38cc869104
WIP WebSocket
2022-06-22 06:56:47 -07:00
Alexander Kuznetsov
5d8a99e1d4
Group zsh completion options by type ( #194 )
2022-06-20 06:30:32 -07:00
Jarred Sumner
5eaf6d713e
Import most of MessageEvent from WebKit
2022-06-17 04:10:21 -07:00
Jarred Sumner
b4049016ca
some more tests
2022-06-15 22:12:04 -07:00
Jarred Sumner
9eaa427ec9
Update WebKit
2022-06-15 22:11:09 -07:00
Jarred Sumner
5b1eaa7719
[web standards] Add CloseEvent from WebKit
2022-06-15 22:10:57 -07:00
Jarred Sumner
e6fbbd48db
Fix lazy loading internal streams
2022-06-15 22:10:12 -07:00
Jarred Sumner
56e88fb4dd
direct streams mostly work
2022-06-15 07:17:42 -07:00
Jarred Sumner
d93f093313
wip direct streams
2022-06-15 02:00:45 -07:00
Jarred Sumner
dbde52504d
ArrayBufferSink works and it's good.
2022-06-12 21:40:45 -07:00
Jarred Sumner
6d88a3d9c0
Fix build issue
2022-06-12 03:26:03 -07:00
Jarred Sumner
fddf8f8163
Delete broken submodule
2022-06-12 03:16:50 -07:00
Jarred Sumner
f4e578b598
Update Dockerfile.base
2022-06-10 19:54:22 -07:00
Jarred Sumner
a5d0706c78
Update WebKit
2022-06-10 19:12:37 -07:00
Jarred Sumner
0740cecbfb
Update event_loop.zig
2022-06-10 18:59:09 -07:00
Jarred Sumner
b86ca5f67b
Missing errno on linux
2022-06-10 18:58:15 -07:00
Jarred Sumner
cc4a164f20
Update js_parser.zig
2022-06-10 18:55:16 -07:00
Jarred Sumner
40184a9511
Update Makefile
2022-06-10 18:53:20 -07:00
Jarred Sumner
8859815d7b
wip fix linux build
2022-06-10 18:52:31 -07:00
Jarred Sumner
60a0b10174
Don't show generic crash info when given invalid bunfig.toml
2022-06-10 02:28:36 -07:00
Jarred Sumner
9d54e2ca92
Update logger.zig
2022-06-10 02:27:37 -07:00
Jarred Sumner
89c182e9c5
Show tracing
2022-06-10 02:27:13 -07:00
Jarred Sumner
e441360ca7
Update bunfig.zig
2022-06-10 02:27:03 -07:00
Jarred Sumner
fc26e92b3e
Update jest.zig
2022-06-10 02:26:45 -07:00
Jarred Sumner
3e70df3fb3
Update bun.d.ts
2022-06-09 21:40:13 -07:00
Jarred Sumner
7cda36c601
Add types
2022-06-09 21:36:43 -07:00
Jarred Sumner
5ccf606107
new Response(stream).arrayBuffer() + 3 more
...
- `new Response(stream).arrayBuffer()`
- `new Response(stream).json()`
- `new Response(stream).text()`
- `new Response(stream).blob()`
2022-06-09 21:29:57 -07:00
Jarred Sumner
b8eea5cc4a
fix some memory leaks with strings
2022-06-09 05:09:48 -07:00
Jarred Sumner
c88dd2c52c
Support console.log(myBigInt)
2022-06-09 05:09:22 -07:00
Jarred Sumner
78bf1150ff
Fix defaultProps with JSX optimization
2022-06-09 05:09:00 -07:00
Jarred Sumner
7a20836a1b
small perf improvements to encoding
2022-06-09 05:02:46 -07:00
Jarred Sumner
1467ec137a
Update event_loop.zig
2022-06-07 22:47:28 -07:00
Jarred Sumner
552e93bfba
Add fixture used in benchmark snippet
2022-06-07 22:46:05 -07:00
Jarred Sumner
e617dee621
Update bundler.zig
2022-06-07 22:42:50 -07:00
Jarred Sumner
609edc368f
wip ReadableStream <> zig
2022-06-07 22:42:47 -07:00
Jarred Sumner
5b4dcb8d16
log esm import order
2022-06-07 22:42:12 -07:00
Jarred Sumner
cdd1a2bdc0
Implement hashCode
2022-06-07 22:41:27 -07:00
Jarred Sumner
43de33afc7
Web Streams API ( #176 )
...
* [bun.js] `WritableStream`, `ReadableStream`, `TransformStream`, `WritableStreamDefaultController`, `ReadableStreamDefaultController` & more
* Implement `Blob.stream()`
* Update streams.test.js
* Fix sourcemaps crash
* [TextEncoder] 3x faster in hot loops
* reading almost works
* start to implement native streams
* Implement `Blob.stream()`
* Implement `Bun.file(pathOrFd).stream()`
* Add an extra function
* [fs.readFile] Improve performance
* make jsc bindings a little easier to work with
* fix segfault
* faster async/await + readablestream optimizations
* WebKit updates
* More WebKit updates
* Add releaseWEakrefs binding
* `bun:jsc`
* More streams
* Update streams.test.js
* Update Makefile
* Update mimalloc
* Update WebKit
* Create bun-jsc.test.js
* Faster ReadableStream
* Fix off by one & exceptions
* Handle empty files/blobs
* Update streams.test.js
* Move streams to it's own file
* temp
* impl #1
* take two
* good enough for now
* Implement `readableStreamToArray`, `readableStreamToArrayBuffer`, `concatArrayBuffers`
* jsxOptimizationInlining
* Fix crash
* Add `jsxOptimizationInline` to Bun.Transpiler
* Update Transpiler types
* Update js_ast.zig
* Automatically choose production mode when NODE_ENV="production"
* Update cli.zig
* [jsx] Handle defaultProps when inlining
* Update transpiler.test.js
* uncomment some tests
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-06-07 22:32:46 -07:00
Jarred Sumner
958fc3d4f5
Update .gitignore
2022-05-30 03:50:35 -07:00
Jarred Sumner
aecc849692
Improve error messages when you mistype commands/files/scripts
2022-05-30 03:50:24 -07:00
Jarred Sumner
882559f0b9
Load bunfig.toml by default if bun or bun {file}\.[cjt]sx?
...
Fixes https://github.com/Jarred-Sumner/bun/issues/183
2022-05-30 03:50:24 -07:00
Alexander Kuznetsov
ca21c00f86
Remove generated files from git index ( #182 )
2022-05-30 01:13:12 -07:00
M Javad
960cb1a8d5
docs: fix typo in readme ( #179 )
2022-05-20 12:26:15 -07:00
Jarred Sumner
8a3a5c3b74
Update string_mutable.zig
2022-05-20 00:59:50 -07:00
Jarred Sumner
99d61877d6
[solid] more progress, no fragments, but still not right
2022-05-20 00:45:51 -07:00
Jarred Sumner
224cfa91fb
[TSConfig] Propagate runtime from tsconfig.json
2022-05-19 21:10:11 -07:00
Jarred Sumner
1af67dbe15
woops
2022-05-19 19:44:19 -07:00
Jarred Sumner
55bfa6cd02
Update cache.zig
2022-05-19 19:27:25 -07:00
Jarred Sumner
1d0124093c
[solid] Move the post-process JSX step
2022-05-19 19:27:23 -07:00
Jarred Sumner
70078f48c0
[bun de] Fix crash when printing source maps
2022-05-19 19:26:45 -07:00
Jarred Sumner
44d1b217ac
move js_parser to src/
2022-05-19 17:52:40 -07:00
Jarred Sumner
3672bb85eb
[solid] wip make nested components work
2022-05-19 17:52:07 -07:00
Jarred Sumner
6f741e8c10
Symbols
2022-05-19 05:37:30 -07:00
Jarred Sumner
d4767ca763
[wip] Solid.js support for Bun!
2022-05-19 05:37:18 -07:00
Jarred Sumner
07e695da03
add a test
2022-05-16 23:05:21 -07:00
Jarred Sumner
4f72021007
Update README.md
2022-05-16 21:14:34 -07:00
Jarred Sumner
bc73d21917
Update types.d.ts
2022-05-16 20:54:01 -07:00
Jarred Sumner
7ca297a5cc
Update download-northwind.sh
2022-05-16 19:51:30 -07:00
Jarred Sumner
e114fca5ee
Still not correct!
2022-05-16 19:33:19 -07:00
Jarred Sumner
d0ca9f2499
Update README.md
2022-05-16 19:28:29 -07:00
Jarred Sumner
95daafee0f
Update serve.test.ts
2022-05-16 19:26:57 -07:00
Jarred Sumner
37e4848c6f
work around test failure
2022-05-16 19:25:49 -07:00
Jarred Sumner
78cd9e89f3
Update sqlite3.c
2022-05-16 19:15:10 -07:00
Jarred Sumner
15c40f5ea3
Fix build error on linux
2022-05-16 19:12:22 -07:00
Jarred Sumner
5f3256d939
Update Makefile
2022-05-16 19:06:01 -07:00
Jarred Sumner
a2b22c339e
Update sqlite.d.ts
2022-05-16 19:03:30 -07:00
Jarred Sumner
aed5e39f4d
remove bad examples
2022-05-16 19:02:38 -07:00
Jarred Sumner
bd1e64b9b1
Fix type errors
2022-05-16 18:58:11 -07:00
Jarred Sumner
31f3050356
Bump
2022-05-16 18:53:33 -07:00
Jarred Sumner
ba36f5db7e
prepare for release
2022-05-16 18:45:46 -07:00
Jarred Sumner
a372a0dd6d
Update JSSQLStatement.cpp
2022-05-16 18:24:55 -07:00
Jarred Sumner
aba032e176
Copy strings when binding to sqlite
2022-05-16 18:19:08 -07:00
Jarred Sumner
e31f44c3d1
Update README.md
2022-05-16 17:40:33 -07:00
Jarred Sumner
0d12a1f9ee
reset on stmt on error
2022-05-16 17:18:50 -07:00
Jarred Sumner
036eb2a9ed
Update README.md
2022-05-16 16:34:05 -07:00
Jarred Sumner
2eb889be89
Update README.md
2022-05-16 16:33:13 -07:00
Jarred Sumner
dd07717b80
Update README.md
2022-05-16 16:28:48 -07:00
Jarred Sumner
36a82cfb93
Update README.md
2022-05-16 16:26:32 -07:00
Jarred Sumner
6fce02bd85
Update sqlite.d.ts
2022-05-16 16:25:54 -07:00
Jarred Sumner
93767bf78f
Update .gitattributes
2022-05-16 16:24:42 -07:00
Jarred Sumner
a779fc180f
Update README.md
2022-05-16 16:07:59 -07:00
Jarred Sumner
223ce6b22d
Update README.md
2022-05-16 16:00:30 -07:00
Jarred Sumner
5d4673742e
Update README.md
2022-05-16 15:59:57 -07:00
Jarred Sumner
05eb1e5684
Update README.md
2022-05-16 15:57:45 -07:00
Jarred Sumner
b4ac7697ac
Update README.md
2022-05-16 15:55:35 -07:00
Jarred Sumner
2cfc1d42a3
Update README.md
2022-05-16 15:52:05 -07:00
Jarred Sumner
be1f469ec5
Update README.md
2022-05-16 15:48:56 -07:00
Jarred Sumner
a37f86e89d
bun:sqlite (#167 )
...
* ✂️
* Add the slow version
* draw the rest of the owl
* Fix crash when allocating lots of memory
* [Bun.Transipiler] Support passing objects
* [JS Parser] Support passing objects to macros via Bun.Transpiler
* Update JSSQLStatement.cpp
* Embed SQLite
* Add SQLite to Dockerfile
* [sqlite] Add quick one-off queries without creating a whole object
* [sqlite] Add `columnsCount`, rename raw() to `values()`, remove `rebind`
* Implement `bun:sqlite`
* return null
* Fix updating query
* Update bun.d.ts
* more tests
* Support variadic arguments, write tests and add types
* Update sqlite.d.ts
* Update sqlite.d.ts
* latest
* Implement `Database.loadExtension` and `Database.setCustomSQLite`
* Support `require.resolve`
* [napi] Improve string performance
* [bun.js] Support some of `node:module`
* another test
* [sqlite] Support serialize & deserialize
* [`bun:ffi`] Implement `CFunction` and `linkSymbols`
* [bun.js] Fix crash in `Buffer.from`
* Update sqlite.test.js
* Document linkSymbols
* docs
* Update README.md
2022-05-16 15:46:20 -07:00
Divy Srivastava
2bd0dcfdfa
Add go and esbuild to build instructions ( #169 )
2022-05-16 13:55:14 -07:00
Hugo Romano
e75535d14c
wrangler 2 released ( #166 )
2022-05-12 14:43:44 -07:00
Jarred Sumner
1d6923bead
Update README.md
2022-05-11 19:12:00 -07:00
Jarred Sumner
732124e3dd
Update README.md
2022-05-11 19:11:17 -07:00
Jarred Sumner
a15e66cc7b
Add section about napi
2022-05-11 19:08:46 -07:00
Jarred Sumner
3eacfe2314
Update README.md
2022-05-11 18:29:05 -07:00
Jarred Sumner
89c0d9dd56
Update build-id
2022-05-11 17:57:55 -07:00
Jarred Sumner
b21d0f0b22
Fix several bugs in napi
...
Closes https://github.com/Jarred-Sumner/bun/issues/163
Closes https://github.com/Jarred-Sumner/bun/issues/162
Closes https://github.com/Jarred-Sumner/bun/issues/161
2022-05-11 17:49:18 -07:00
Jarred Sumner
61b2821472
Make the napi mjs file runnable in both bun & node
2022-05-11 15:12:17 -07:00
Jarred Sumner
1f86e0c87e
Update build-id
2022-05-11 04:47:34 -07:00
Jarred Sumner
d1ea51e9f2
disable the new target allowed error
2022-05-11 04:45:47 -07:00
Jarred Sumner
5de2e2c71e
Update Makefile
2022-05-11 04:05:08 -07:00
Jarred Sumner
2c1051f539
Update Makefile
2022-05-11 03:46:00 -07:00
Jarred Sumner
247f4810c5
Fix export symbols on Linux
2022-05-11 03:45:00 -07:00
Jarred Sumner
47b6dc9eea
Add test for import.meta.require
2022-05-11 03:19:29 -07:00
Jarred Sumner
aea3b4e280
[napi] Add a couple more symbols
2022-05-11 02:59:46 -07:00
Jarred Sumner
12e0496a79
[napi] Fix panic inside napi_fatal_error
2022-05-11 02:59:38 -07:00
Jarred Sumner
aa87d40f4b
[napi] Stub a couple more
2022-05-11 02:59:22 -07:00
Jarred Sumner
7d1eced8c6
[bun.js] eagerly convert to import.meta.require
2022-05-11 02:57:51 -07:00
Jarred Sumner
123267685f
[json] Fix bug with negative integers in json parser
2022-05-11 02:56:46 -07:00
Jarred Sumner
0bec7001ba
[bun.js] Implement a polyfill for the detect-libc npm package
2022-05-11 00:57:06 -07:00
Jarred Sumner
3c87fbfd37
[bun.js] Implement import.meta.require
...
This allows synchronous dynamic loading of `.node`, `.json`, and `.toml` files.
It is not a CommonJS require, but it can be used that way so long as the content is not JavaScript.
2022-05-11 00:56:35 -07:00
Jarred Sumner
fd00950852
[bun.js] Implement import.meta.resolveSync
2022-05-11 00:54:42 -07:00
Jarred Sumner
eb2a6aee4d
Include napi in plus100
2022-05-10 20:50:38 -07:00
Jarred Sumner
84e8d08ec6
Add test for Buffer.byteLength
2022-05-10 20:47:51 -07:00
Jarred Sumner
92e8eaf581
[napi] Error on import .node
2022-05-10 20:47:38 -07:00
Jarred Sumner
e8e58a511f
Update napi.cpp
2022-05-10 20:44:25 -07:00
Jarred Sumner
08e40efe11
[napi] Fix string bug
2022-05-10 20:24:07 -07:00
Jarred Sumner
01a0aee1e8
[napi] transpile require(*.node) into process.dlopen
2022-05-10 19:12:15 -07:00
Jarred Sumner
8def37c14e
[bun.js] Implement Buffer.byteLength
2022-05-10 19:09:28 -07:00
Jarred Sumner
b3760cd723
Fix extra quote in bundled require errors
2022-05-09 23:01:05 -07:00
Jarred Sumner
1cb870be16
few more napi functions
2022-05-09 22:39:22 -07:00
Jarred Sumner
35232fa422
Update Makefile
2022-05-09 22:07:47 -07:00
Jarred Sumner
77342a2268
Update Dockerfile.base
2022-05-09 22:01:56 -07:00
Jarred Sumner
b834e21192
[napi] getters & setters work
2022-05-09 21:58:41 -07:00
Jarred Sumner
f4188b3ddc
Add test for __dirname
2022-05-09 21:54:08 -07:00
Jarred Sumner
963c08d472
Update symbols.txt
2022-05-09 21:54:00 -07:00
Jarred Sumner
29b9ced11a
Update bindings.cpp
2022-05-09 21:53:44 -07:00
Jarred Sumner
8ac108ba06
[napi] Move some code to C++ for perf
2022-05-09 04:11:48 -07:00
Jarred Sumner
8014a0b8d8
[napi] Support import and require of .node modules
2022-05-09 00:24:25 -07:00
Jarred Sumner
3bd83eb134
[napi] Fix strings
2022-05-09 00:23:51 -07:00
Jarred Sumner
a5ebcefeeb
fixup
2022-05-09 00:23:35 -07:00
Jarred Sumner
c806e778d6
[JS Parser] Support __dirname and __filename
2022-05-09 00:00:01 -07:00
Jarred Sumner
3850fc5b0b
Make a lot more stuff work
2022-05-08 17:37:58 -07:00
Jarred Sumner
6bac11f066
Create change-array-by-copy.js
2022-05-08 17:37:36 -07:00
Jarred Sumner
bc2ca8afbd
Update WebKit
2022-05-08 01:34:53 -07:00
Jarred Sumner
e403b6111f
more napi
2022-05-08 01:32:20 -07:00
Jarred Sumner
d613ba5fcd
Update serve.test.ts
2022-05-08 01:14:21 -07:00
Jarred Sumner
4dee9be3eb
Update http-file.ts
2022-05-08 01:13:03 -07:00
Jarred Sumner
61afb8955c
Update build-id
2022-05-08 01:12:56 -07:00
Jarred Sumner
61d548c7bf
[bun.js] Fix bug with headers not being sent in fetch
2022-05-08 01:12:46 -07:00
Jarred Sumner
c1efeefb8a
Ugprade webkit
2022-05-08 01:12:27 -07:00
Jarred Sumner
3b6c3d8196
Update wtf-bindings.cpp
2022-05-08 01:12:20 -07:00
Jarred Sumner
97cceb47b9
Upgrade WebKit
2022-05-08 01:12:13 -07:00
Jarred Sumner
94637711b9
Update zlib.test.js
2022-05-07 13:27:23 -07:00
Jarred Sumner
bdf28e42f6
[bun.js] Support gzipSync, gunzipSync, inflateSync, deflateSync
2022-05-07 01:38:26 -07:00
Jarred Sumner
1687455a3f
[napi] Fix function arguments
2022-05-06 06:43:49 -07:00
Jarred Sumner
84e40a4f74
symbols list
2022-05-06 00:37:23 -07:00
Jarred Sumner
bce60a5a86
more napi
2022-05-06 00:05:31 -07:00
Jarred Sumner
a7b0bc8790
it can call functions
2022-05-05 21:35:08 -07:00
Jarred Sumner
30ca112260
napi_threadsafe_function
2022-05-05 21:35:08 -07:00
Jarred Sumner
b487eb7e13
Update napi.zig
2022-05-05 21:35:08 -07:00
Jarred Sumner
5d24f45ac1
Update napi.zig
2022-05-05 21:35:08 -07:00
Jarred Sumner
c1f65ef975
napi_get_dataview_info?
2022-05-05 21:35:08 -07:00
Jarred Sumner
d6ce585ef3
cleanup hook
2022-05-05 21:35:08 -07:00
Jarred Sumner
c80e048ab3
implement napi_async_work
2022-05-05 21:35:08 -07:00
Jarred Sumner
b6a8675658
typeof
2022-05-05 21:35:08 -07:00
Jarred Sumner
2c0c91e2d0
more
2022-05-05 21:35:08 -07:00
Jarred Sumner
6b97680224
Update napi.zig
2022-05-05 21:35:08 -07:00
Jarred Sumner
c76bebca0b
more
2022-05-05 21:35:08 -07:00
Jarred Sumner
b534c4d661
More
2022-05-05 21:35:08 -07:00
Jarred Sumner
170d09b6bd
More
2022-05-05 21:35:08 -07:00
Jarred Sumner
b4fc584d18
Even More NAPI
2022-05-05 21:35:08 -07:00
Jarred Sumner
5b2d9f8128
Begin napi
2022-05-05 21:35:08 -07:00
Jarred Sumner
d629cfafd6
E.String gets a Rope
2022-05-05 21:32:19 -07:00
Jarred Sumner
7b125c9731
Update README.md
2022-05-04 09:02:25 -07:00
Jarred Sumner
0e3df25526
specifically check utf8
2022-05-04 07:03:55 -07:00
Jarred Sumner
66e8d7346f
make our http test run more
2022-05-04 07:03:46 -07:00
Jarred Sumner
d29dcf3680
Document FFIType.i64_fast
2022-05-04 07:03:38 -07:00
Jarred Sumner
164483c137
Update buffer.js
2022-05-04 07:03:22 -07:00