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
Dylan Conway
0268807be2
fix workspace dependency install ( #6092 )
...
* handle `*`
* test
* always use the package name
* more tests
* install dependency in each
2023-09-26 21:53:14 -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
17fa9378e9
Drain microtasks at end of abort() if called into JS ( #6036 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-25 16:09:37 -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
axel escalada
bbc70d2b73
Fix create command with template prefixed with @ char #6007 ( #6013 )
...
* fix create command with template prefixed with @ char
* add typescript test for create command
* format test
2023-09-25 05:22:47 -07:00
Ai Hoshino
3eca2c7fee
fix c-string sentinel ( #6026 )
2023-09-25 05:19:33 -07:00
Jarred Sumner
96411580c1
Do not use removefileat() ( #6001 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-24 18:27:55 -07:00
Jarred Sumner
3f463786a5
Correctly fix #5888 ( #6000 )
...
* Update our MultiArrayList
* More consistent CI
* Fix serialization issue
* Update bun.lockb
* Update bun.lockb
* fixup
* Fix `Bin{}`
* `bun update` should not cache the manifest
* Make bun install tests more consistent
* This differs by platform evidently
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-24 17:43:59 -07:00
Jarred Sumner
57010cc448
Avoid using std.net.Address.parse ( #5950 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-24 03:17:19 -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
Ai Hoshino
a5908e9f27
fix(lockfile): ensure all bytes of union are initialized before serialization. ( #5957 )
2023-09-23 20:09:45 -07:00
Jarred Sumner
ec0e931e9f
Bump!
2023-09-22 21:26:59 -07:00
Jarred Sumner
a229cfd3c6
Make this function inline
2023-09-22 21:26:35 -07:00
Dylan Conway
966b636e5d
isBinary ( #5944 )
2023-09-22 19:48:36 -07:00
Dylan Conway
ee93f1b88c
[install] fix GitHub dependency bugs ( #5941 )
...
* handle branches with slashes
* handle empty repo string
2023-09-22 18:41:55 -07:00
Colin McDonnell
ffd21e98e7
Remove bun dev stuff from create_command ( #5939 )
2023-09-22 18:41:05 -07:00
Ai Hoshino
1445775d64
fix(runtime): exclude unevaluated module in require.cache ( #5903 )
...
Close : #5898
2023-09-22 18:40:06 -07:00
dave caruso
25e69c71e7
Implement module.parent ( #5889 )
...
* Make module.parent work
* yay
* oops
* yay
2023-09-21 22:09:55 -07:00
Dylan Conway
9d5459221f
fix #5865 ( #5890 )
...
* make sure types are the same
* tests
2023-09-21 21:02:34 -07:00
dave caruso
341c1c1804
disable child_process execArgv + fix crash in cli parsing ( #5843 )
...
* stuff
* stuff
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-21 20:37:32 -07:00
Colin McDonnell
b218c40a5d
Hide env elapsed time when loglevel=info ( #5882 )
...
* Hide env elapsed time when loglevel=info
* Updates
* Update
* Fix test
2023-09-21 20:07:25 -07:00
Dylan Conway
09d6e8553b
ref and deinit ( #5883 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-09-21 20:02:51 -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
Colin McDonnell
030407c52e
Update completions list
2023-09-21 17:32:19 -07:00
Dylan Conway
4a1573e007
decorator metadata defaults and rest args
2023-09-21 12:20:53 -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
e1cf08b3a6
Fixes #5859
2023-09-21 05:48:40 -07:00
Jarred Sumner
28f3453466
Regenerate builtins
2023-09-21 02:59:50 -07:00
Liz
2664dfad9b
fix: add check to sqlite extension loading logic ( #5773 )
...
The sqlite3 logic to dynamically load extensions can be disabled to save space,
which macos does by default.
sqlite3 provides a api to check for these compile time settings at runtime,
we can use that to throw a js error rather then crashing.
It is worth noting though that the api to check for these settings at runtime
itself can be disabled through SQLITE_OMIT_COMPILEOPTION_DIAGS but this seams
to be a edge case.
2023-09-20 23:43:21 -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
Jarred Sumner
e160223627
In http client, use .toOwnedSlice() instead of potentially re-using the WTFString here
2023-09-20 23:40:42 -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
Jonah Snider
67defd95af
[bun install] Add -E as alias of --exact ( #5104 )
...
* [bun install] Add `-E` as alias of `--exact`
* Add test for -E flag
2023-09-20 11:14:55 -07:00
Lucas Coratger
aa3355dc82
feat: switch disableTelemetry to bunfig ( #5690 )
...
* feat: switch disableTelemetry to bunfig
* feat: zig fmt
* revert: the env variable and invert the logic of telemetry
---------
Co-authored-by: MrPalixir <73360179+MrPalixir@users.noreply.github.com >
2023-09-20 10:13:31 -07:00
LongYinan
8c612adcdb
Treat undefined value as empty in expect.toThrow ( #5788 )
...
Fix: https://github.com/napi-rs/napi-rs/blob/main/examples/napi/__tests__/test.framework.js#L16-L19
2023-09-20 10:11:41 -07:00