Dylan Conway
5a315f4df0
fix another os test failure
2023-10-04 22:45:11 -07:00
Ai Hoshino
b7982ac131
fix(blob): Add the current offset to the new blob. ( #6259 )
...
Close : #6252
2023-10-03 12:03:57 -07:00
WingLim
476fa4deda
feat(encoding): support BOM detection with test passed ( #6074 )
2023-10-03 10:28:59 -07:00
Ai Hoshino
f7618aba20
fix(node:process): fix return value of process.kill ( #6207 )
2023-10-01 12:55:38 -07:00
Jarred Sumner
54d25b8f6b
Update cp.test.ts
2023-09-30 17:09:27 -07:00
Jarred Sumner
c21be13be4
tweak github actions ( #6195 )
...
* Discord comments
* better
* better
* actions
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-30 02:50:38 -07:00
Jarred Sumner
d65fdb6035
Fix hang in bun install ( #6192 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-29 20:45:51 -07:00
Jarred Sumner
a97847a494
Implement virtual module support in Bun.plugin ( #6167 )
...
* Add support for `build.module` in `Bun.plugin`
* Another test
* Update docs
* Update isBuiltinModule.cpp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-09-29 16:34:20 -07:00
dave caruso
eddb0078b5
fix(runtime): followup for server.requestIP ( #6185 )
...
* fix(runtime): followup for `server.requestIP`
* oops
* yeah
* sure
* Update src/deps/libuwsockets.cpp
* Update Dockerfile
* lol
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-29 16:17:54 -07:00
Liz
fa7d7bd1e4
fix: don't set default request method when creating a Request ( #6154 )
...
In the case of creating a Request with the parameters `(Request, object)`,
there was a bug that method and headers are set from the default created by
the init rather then the already present value from the request param.
This is because for a to me unknown reason the order in which the parameters
are processed is reversed.
This fixes that by adding a check which stops the defaults from being set,
unless they are explicitly passed.
Fixes: https://github.com/oven-sh/bun/issues/6144
2023-09-29 16:13:49 -07:00
dave caruso
72bdd380af
add Socket.prototype; lol ( #5945 )
2023-09-29 15:42:06 -07:00
dave caruso
10bee33909
fix(resolver): support encoded file urls ( #5766 )
...
* start working on this
* it works now
* better implementation imo
* yippee
* more tests and better unrefing
* fix leak?
2023-09-29 14:58:39 -07:00
dave caruso
6afa78120a
feat(runtime): implement server.requestIp + node:http socket.address() ( #6165 )
...
* [server] requestIp and AnyRequestContext
Changed Request.uws_request to the new AnyRequestContext. This
allows grabbing the IP from a Request. Unfinished.
* [server] basic `requestIp` implementation
Currently using uws's requestIpAsText, which always returns a ipv6
string. We should return a `SocketAddress` object to the user instead,
which will contain the formatted address string and what type it is.
We'll have to use requestIpAsBinary and parse that ourselves.
* TypeScript docs, use `bun.String`, return `undefined` instead of `null`
if we can't get the ip.
* binary address formatting
* uws getRemoteAddress binding
* remove dead code
* working
* final touches✨
* I will abide by the results of this poll.
---------
Co-authored-by: Parzival-3141 <29632054+Parzival-3141@users.noreply.github.com >
2023-09-29 03:39:26 -07:00
Jarred Sumner
6514dcf4cb
Fixes #6053 ( #6162 )
...
Fixes #6053
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-29 00:03:58 -07:00
dave caruso
387f1260c9
Get Next.js Pages Router to work ( #6095 )
...
* hell
* make it so bun-debug-src
* teag
* wild
* yippee
* fas
* fix async hooks assertions
* yap
* yeah that's wild
* aa
* a
* increase time allowed
* so trivial
2023-09-28 03:53:24 -07:00
jhmaster
e60b3607c1
Complete rework of the majority of node:util, primarily util.inspect ( #4493 )
...
* 1st revision of new util.inspect impl. (not done)
* fix util.types.isArrayBuffer
* fix some utl tests and bugs
* fix node:tty missing primordials
* fix utl stackoverflow handling & some tests
* narrow down diff. context test
* util.inspect indirect circulars optimization
* temp workaround for buggy is...Function checks
* impl. Map/Set/Iterator entries inspection
* fix bigint & symbol objects inspection
* error inspection fixes
* misc util tests stuff
* inline getExternalValue stub
* leftovers
* util.inspect promise internals
* run bun fmt
* commit make js changes
* cut out unnecessary utl files
* reorganize utl folder structure
* remove browserify buffer check
* Try to revert git messing up uws somehow
This reverts commit 2c27e16e7d .
* commit src/js/out files again
* redo this edit too
* refresh js/out files
* Removed uws submodule
* tidy up
* unused primordials
* run fmt
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-09-27 23:51:49 -07:00
Liz
8608b5286a
fix: implement correct behaviour for urls with blob: scheme ( #5825 )
...
* fix: implement correct behaviour for urls with blob: scheme
Urls using the blob scheme can have special behaviour if their origin itself
is a url.
This fixes that by parsing the subdomain and if valid and the schemes(protocols)
are valid returns its origin.
Ive used node.js here a lot to make sure its behaviour is copied 1:1 and enabled
the automated tests for it.
Fixes https://github.com/oven-sh/bun/issues/5805
* fix: subUrl can be const, we are not modifying it
* style: add spaces after `if` keyword
2023-09-27 16:15:45 -07:00
Ai Hoshino
a0081f9e29
fix(node:fs): fix fs.exists callback parameters ( #6097 )
...
Close : #6073
2023-09-27 03:40:45 -07:00
Liz
d7b43f8ea1
fix: support console.dir options object correctly ( #6059 )
...
* fix: support console,dir options object correctly
`console.dir` can be passed a second argument which is a object of options.
This implements that logic with the currently supported properties: `depth`
and `colors`.
I used node as a reference for implementation details.
Fixes: https://github.com/oven-sh/bun/issues/6039
* style: format zig file
* fix: implement changes from review
Implements changes requested from review, like adding
more test cases and refactoring code style.
2023-09-26 19:47:37 -07:00
Ciro Spaciari
648d5aecf3
fix server end of stream, fix fetch not streaming without content-length or chunked encoding, fix case when stream do not return a promise on pull ( #6086 )
2023-09-26 19:31:20 -07:00
Dylan Conway
aec0d35f9b
no this value ( #6063 )
2023-09-25 23:27:55 -07:00
Jarred Sumner
6cde1d3b89
Add Module._extensions ( #5998 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-25 16:09:09 -07:00
Jarred Sumner
6d842e7dcb
Make error message for new URL(invalid) better ( #6032 )
...
* Make error message for `new URL(invalid)` better
Thanks to @karlcow https://github.com/WebKit/WebKit/pull/13802
* redact
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-25 16:07:33 -07:00
Jarred Sumner
b6a4161cc5
Fixes #5985 ( #5986 )
...
* Fixes #5985
* Update confirm-fixture.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-24 03:16:51 -07:00
Dylan Conway
966b636e5d
isBinary ( #5944 )
2023-09-22 19:48:36 -07:00
Dylan Conway
9d5459221f
fix #5865 ( #5890 )
...
* make sure types are the same
* tests
2023-09-21 21:02:34 -07:00
Jarred Sumner
e34ff61339
Don't use arena in node:fs ( #5863 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-21 18:59:01 -07:00
Liz
b297fabd17
fix: correctly pass the encrypted(bool) property on "Socket" for express.js ( #5878 )
...
* fix: correctly pass the encrypted property on "Socket" for express.js
Express relies on this for setting the requests protocol.
Since this is on a dummy object, a property is simply set with the actual value.
Which seams okay as a workaround.
* chore: add generated files
* chore: add test
* refactor: set property directly rather then through a getter
2023-09-21 18:44:05 -07:00
dave caruso
b05e10cd8b
fix(node:fs): use the right copyFile constants ( #5874 )
2023-09-21 18:42:49 -07:00
Jarred Sumner
0b4a34bbd6
Fix test failures ( #5862 )
...
* Fix test failures
* Fixes #5851
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-21 07:56:44 -07:00
Jarred Sumner
d1e9b33cac
On Linux, respect memory limit from cgroups ( #5849 )
...
* Implement `process.constrainedMemory()`
* Add a comment
* Handle max
* Missing header
* We can use WTF::ramSize now
* Update WebKit
* Update ZigGlobalObject.cpp
* WebKit
* ✂️
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-21 07:25:18 -07:00
Jarred Sumner
abfc10afeb
Revert "feat(encoding): support BOM detection ( #5550 )"
...
This reverts commit 5f66b4e729 .
This caused test failures in text-encoder. cc @WingLim
2023-09-21 07:10:07 -07:00
Jarred Sumner
a18ef053a4
Don't await plugins
2023-09-21 06:16:31 -07:00
Jarred Sumner
6abc9af472
Add another test
2023-09-21 06:04:58 -07:00
Jarred Sumner
e1cf08b3a6
Fixes #5859
2023-09-21 05:48:40 -07:00
Jarred Sumner
01d2cb5d98
Prettier
2023-09-21 00:51:48 -07:00
Jibran Kalia
e0c5debc57
fix(console.log): change default depth from 8 to 2 ( #5839 )
...
This make it as the same default depth in Node.
Source: 480ab8c3a4/doc/api/console.md (L285)
2023-09-20 23:42:44 -07:00
Ai Hoshino
b00588e98c
fix(fetch): fix redirect in relative path location. ( #5781 )
...
* fix(fetch): fix redirect in relative path location.
* fix utf-8 encoding
* use server.reload
* check buf size
* add RedirectURLTooLong test
2023-09-20 23:34:00 -07:00
dave caruso
b7951511a3
fix(run): interpret extensionless files as typescript ( #5711 )
...
* test
* gadsgsagdsa
* add better err msg
* r
* oops
* ok
2023-09-20 19:48:46 -07:00
Ciro Spaciari
b65862e23b
fix(ffi) fix size limit for dlopen ( #5516 )
...
* fix size limit
* 63
* throw error
* ffi.test.js
* add macos tests
* oops
2023-09-20 18:50:10 -07:00
WingLim
5f66b4e729
feat(encoding): support BOM detection ( #5550 )
...
* fix(encoding): export `getIgnoreBOM`
* feat(encoding): support ignoreBOM
* fix(encoding): not replace BOM to 0xFFFD
* chore: use strict equal
2023-09-20 18:44:05 -07:00
Ai Hoshino
7319142fd8
feat(node:dns): implement dns.lookupService ( #5613 )
...
* feat(node:dns): implement dns.lookupService
Close : #4347
* fix flags
* add `getSockaddr`
* fix sockaddr size
* flaky test
2023-09-20 18:43:08 -07:00
dave caruso
365fc0d39d
implement Module.prototype._compile ( #5840 )
2023-09-20 18:31:57 -07:00
dave caruso
34d191be67
feat(runtime): implement console._stdout ( #5842 )
...
* implement console._stdout
* nonenum
2023-09-20 18:28:07 -07:00
Ashcon Partovi
64a717ab33
Run bun fmt
2023-09-20 17:24:09 -07:00
Jarred Sumner
ff7f642099
Call Error.prepareStackTrace on new Error().stack ( #5802 )
...
* Always call `Error.prepareStackTrace`
* Support node:vm
* Remove this
* Handle more cases
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-20 05:52:59 -07:00
Jarred Sumner
1456c72648
Fixes #5800
...
Fixes #5800
2023-09-20 04:33:38 -07:00
Jarred Sumner
5defdf3e28
Fixes #5769 ( #5775 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-19 18:16:51 -07:00
Jarred Sumner
66d490d109
Align fetch() redirect behavior with spec ( #5729 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-19 05:51:05 -07:00
Jarred Sumner
19fc8ecba2
Fixes #3712 ( #5730 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-19 05:50:23 -07:00