aboutsummaryrefslogtreecommitdiff
path: root/test/js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-01fix(node:process): fix return value of `process.kill` (#6207)Gravatar Ai Hoshino 1-2/+4
2023-09-30Update cp.test.tsGravatar Jarred Sumner 1-1/+1
2023-09-30tweak github actions (#6195)Gravatar Jarred Sumner 1-1/+1
* Discord comments * better * better * actions --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-29Fix hang in `bun install` (#6192)Gravatar Jarred Sumner 1-0/+92
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-29Implement virtual module support in `Bun.plugin` (#6167)Gravatar Jarred Sumner 2-0/+116
* 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-29fix(runtime): followup for `server.requestIP` (#6185)Gravatar dave caruso 1-2/+30
* 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-29fix: don't set default request method when creating a Request (#6154)Gravatar Liz 1-0/+10
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-29add Socket.prototype; lol (#5945)Gravatar dave caruso 1-0/+7
2023-09-29fix(resolver): support encoded file urls (#5766)Gravatar dave caruso 3-6/+143
* start working on this * it works now * better implementation imo * yippee * more tests and better unrefing * fix leak?
2023-09-29feat(runtime): implement `server.requestIp` + node:http `socket.address()` ↵Gravatar dave caruso 1-0/+36
(#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:sparkles: * I will abide by the results of this poll. --------- Co-authored-by: Parzival-3141 <29632054+Parzival-3141@users.noreply.github.com>
2023-09-29Fixes #6053 (#6162)Gravatar Jarred Sumner 1-1/+3
Fixes #6053 Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-28Get Next.js Pages Router to work (#6095)Gravatar dave caruso 9-9/+62
* 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-27Complete rework of the majority of `node:util`, primarily `util.inspect` (#4493)Gravatar jhmaster 8-1/+4114
* 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 2c27e16e7d361657b9c3a7dc7892117cf31e15ee. * 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-27fix: implement correct behaviour for urls with blob: scheme (#5825)Gravatar Liz 1-2/+4
* 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-27fix(node:fs): fix `fs.exists` callback parameters (#6097)Gravatar Ai Hoshino 1-0/+41
Close: #6073
2023-09-26fix: support console.dir options object correctly (#6059)Gravatar Liz 2-0/+22
* 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-26fix server end of stream, fix fetch not streaming without content-length or ↵Gravatar Ciro Spaciari 1-0/+29
chunked encoding, fix case when stream do not return a promise on pull (#6086)
2023-09-25no this value (#6063)Gravatar Dylan Conway 1-0/+15
2023-09-25Add Module._extensions (#5998)Gravatar Jarred Sumner 1-0/+7
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-25Make error message for `new URL(invalid)` better (#6032)Gravatar Jarred Sumner 1-0/+13
* 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-24Fixes #5985 (#5986)Gravatar Jarred Sumner 2-2/+41
* Fixes #5985 * Update confirm-fixture.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-22isBinary (#5944)Gravatar Dylan Conway 1-1/+25
2023-09-21fix #5865 (#5890)Gravatar Dylan Conway 1-0/+6
* make sure types are the same * tests
2023-09-21Don't use arena in node:fs (#5863)Gravatar Jarred Sumner 1-0/+19
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-21fix: correctly pass the encrypted(bool) property on "Socket" for express.js ↵Gravatar Liz 3-3/+105
(#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-21fix(node:fs): use the right copyFile constants (#5874)Gravatar dave caruso 1-1/+30
2023-09-21Fix test failures (#5862)Gravatar Jarred Sumner 2-3/+3
* Fix test failures * Fixes #5851 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-21On Linux, respect memory limit from cgroups (#5849)Gravatar Jarred Sumner 1-0/+10
* Implement `process.constrainedMemory()` * Add a comment * Handle max * Missing header * We can use WTF::ramSize now * Update WebKit * Update ZigGlobalObject.cpp * WebKit * :scissors: --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-21Revert "feat(encoding): support BOM detection (#5550)"Gravatar Jarred Sumner 1-23/+1
This reverts commit 5f66b4e729105286863a13955b1ed8897b45210e. This caused test failures in text-encoder. cc @WingLim
2023-09-21Don't await pluginsGravatar Jarred Sumner 1-1/+1
2023-09-21Add another testGravatar Jarred Sumner 1-0/+5
2023-09-21Fixes #5859jarred/5859Gravatar Jarred Sumner 1-0/+42
2023-09-21PrettierGravatar Jarred Sumner 1-11/+10
2023-09-20fix(console.log): change default depth from 8 to 2 (#5839)Gravatar Jibran Kalia 2-0/+21
This make it as the same default depth in Node. Source: https://github.com/nodejs/node/blob/480ab8c3a40451d5ea459dd35b4039679b26e195/doc/api/console.md?plain=1#L285
2023-09-20fix(fetch): fix redirect in relative path location. (#5781)Gravatar Ai Hoshino 1-0/+94
* fix(fetch): fix redirect in relative path location. * fix utf-8 encoding * use server.reload * check buf size * add RedirectURLTooLong test
2023-09-20fix(run): interpret extensionless files as typescript (#5711)Gravatar dave caruso 2-0/+11
* test * gadsgsagdsa * add better err msg * r * oops * ok
2023-09-20fix(ffi) fix size limit for dlopen (#5516)Gravatar Ciro Spaciari 1-0/+286
* fix size limit * 63 * throw error * ffi.test.js * add macos tests * oops
2023-09-20feat(encoding): support BOM detection (#5550)Gravatar WingLim 1-1/+24
* fix(encoding): export `getIgnoreBOM` * feat(encoding): support ignoreBOM * fix(encoding): not replace BOM to 0xFFFD * chore: use strict equal
2023-09-20feat(node:dns): implement `dns.lookupService` (#5613)Gravatar Ai Hoshino 1-0/+66
* feat(node:dns): implement dns.lookupService Close: #4347 * fix flags * add `getSockaddr` * fix sockaddr size * flaky test
2023-09-20implement `Module.prototype._compile` (#5840)Gravatar dave caruso 1-0/+17
2023-09-20feat(runtime): implement `console._stdout` (#5842)Gravatar dave caruso 1-0/+24
* implement console._stdout * nonenum
2023-09-20Run bun fmtGravatar Ashcon Partovi 1-9/+6
2023-09-20Call `Error.prepareStackTrace` on `new Error().stack` (#5802)Gravatar Jarred Sumner 2-11/+60
* 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-20Fixes #5800Gravatar Jarred Sumner 1-1/+1
Fixes #5800
2023-09-19Fixes #5769 (#5775)Gravatar Jarred Sumner 1-0/+13
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-19Align fetch() redirect behavior with spec (#5729)Gravatar Jarred Sumner 1-0/+121
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-19Fixes #3712 (#5730)Gravatar Jarred Sumner 1-0/+3
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-18PrettierGravatar Jarred Sumner 2-7/+7
2023-09-18fix(runtime/node): Allow `new Buffer.alloc()` + Upgrade WebKit (#5699)Gravatar dave caruso 1-0/+11
* make bufferconstructor a static hash table * chore: Upgrade WebKit to 4d995edbc44062b251be638818edcd88d7d14dd7 * make it constructable now * fix comment * yippee * update CI workflows
2023-09-18feat(runtime): Implement `console.Console` (#5448)Gravatar dave caruso 1-0/+66
* prototype * asdfg * It works! * okay its done now fr * self review * ok * fix * fix test --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>