aboutsummaryrefslogtreecommitdiff
path: root/src/js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-15It's starting to workGravatar Jarred Sumner 2-5/+8
2023-10-15Things can happenGravatar Jarred Sumner 2-4/+4
2023-10-15The startup message sends successfullyGravatar Jarred Sumner 2-8/+10
2023-10-15okay we are starting to try itGravatar Jarred Sumner 2-7/+6
2023-10-15Okay most of the code is writtenGravatar Jarred Sumner 1-2/+12
2023-10-14MoreGravatar Jarred Sumner 1-1/+1
2023-10-13wipGravatar Jarred Sumner 2-7/+20
2023-10-13Introduce `bun:sql`Gravatar Jarred Sumner 9-298/+639
2023-10-13[node:dns] Fix unnecessary array creation + prettierGravatar Jarred Sumner 2-12/+9
2023-10-13fix(node): dns lookup deprecated behavior (#6391)Gravatar João Alisson 2-3/+16
Co-authored-by: alisson <alisson@Ubuntu.myguest.virtualbox.org> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-10-12feat(install): support npm overrides/yarn resolutions, one level deep only ↵Gravatar dave caruso 2-6/+8
(#6435) * disable zig fmt on generated ResolvedSourceTag.zig * overrides * it works * ok * a --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-10-09fix(AbortSignal/fetch) fix AbortSignal.timeout, fetch lock behavior and ↵Gravatar Ciro Spaciari 7-9/+38
fetch errors (#6390) * fix abort signal and fetch error * fix fetch error and lock behavior
2023-10-07feat(KeyObject) (#5940)Gravatar Ciro Spaciari 2-15/+446
* oops * createSecretKey but weird error * use the right prototype, do not add a function called export lol * HMAC JWT export + base64 fix * Fix Equals, Fix Get KeySize, add complete export RSA * fix RSA export * add EC exports * X25519 and ED25519 export + fixes * fix default exports * better asymmetricKeyType * fix private exports * fix symmetricKeySize * createPublicKey validations + refactor * jwt + der fixes * oopsies * add PEM into createPublicKey * cleanup * WIP * bunch of fixes * public from private + private OKP * encrypted keys fixes * oops * fix clear tls error, add some support to jwk and other formats on publicEncrypt/publicDecrypt * more fixes and tests working * more fixes more tests * more clear hmac errors * more tests and fixes * add generateKeyPair * more tests passing, some skips * fix EC key from private * fix OKP JWK * nodejs ignores ext and key_ops on KeyObject.exports * add EC sign verify test * some fixes * add crypto.generateKeyPairSync(type, options) * more fixes and more tests * fix hmac tests * jsonwebtoken tests * oops * oops2 * generated files * revert package.json * vm tests * todos instead of failues * toBunString -> toString * undo simdutf * improvements * unlikely * cleanup * cleanup 2 * oops * move _generateKeyPairSync checks to native
2023-10-05Update Node.js compat docs (#6282)Gravatar Colin McDonnell 1-1/+1
* Update nodejs-apis * No commas * Updates
2023-10-04generatedGravatar Dylan Conway 1-3/+3
2023-10-04Fix `query` property of `url` object (#6274)Gravatar Jarred Sumner 2-4/+5
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-10-04Closes #6309 (#6310)Gravatar Colin McDonnell 2-4/+4
2023-10-03Update tsconfigsGravatar Colin McDonnell 1-1/+3
2023-09-29Implement virtual module support in `Bun.plugin` (#6167)Gravatar Jarred Sumner 2-2/+5
* 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 2-4/+4
* 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-29add Socket.prototype; lol (#5945)Gravatar dave caruso 3-27/+22
2023-09-29feat(runtime): implement `server.requestIp` + node:http `socket.address()` ↵Gravatar dave caruso 2-19/+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-28Get Next.js Pages Router to work (#6095)Gravatar dave caruso 12-42/+186
* 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 14-610/+3745
* 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(node:fs): fix `fs.exists` callback parameters (#6097)Gravatar Ai Hoshino 2-7/+20
Close: #6073
2023-09-22isBinary (#5944)Gravatar Dylan Conway 2-4/+6
2023-09-22fix(runtime): exclude unevaluated module in `require.cache` (#5903)Gravatar Ai Hoshino 2-3/+3
Close: #5898
2023-09-21Implement module.parent (#5889)bun-v1.0.3Gravatar dave caruso 8-6615/+6622
* Make module.parent work * yay * oops * yay
2023-09-21disable child_process execArgv + fix crash in cli parsing (#5843)Gravatar dave caruso 2-15/+15
* stuff * stuff --------- 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 5-3708/+3708
(#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-21Regenerate builtinsGravatar Jarred Sumner 3-5009/+5009
2023-09-20fix(run): interpret extensionless files as typescript (#5711)Gravatar dave caruso 2-4/+4
* test * gadsgsagdsa * add better err msg * r * oops * ok
2023-09-20fix(ffi) fix size limit for dlopen (#5516)Gravatar Ciro Spaciari 5-5013/+5013
* fix size limit * 63 * throw error * ffi.test.js * add macos tests * oops
2023-09-20feat(node:dns): implement `dns.lookupService` (#5613)Gravatar Ai Hoshino 2-5/+12
* feat(node:dns): implement dns.lookupService Close: #4347 * fix flags * add `getSockaddr` * fix sockaddr size * flaky test
2023-09-19Fixes #3712 (#5730)Gravatar Jarred Sumner 2-5/+9
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-18fix(runtime/node): Allow `new Buffer.alloc()` + Upgrade WebKit (#5699)Gravatar dave caruso 5-12/+18
* 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 5-4/+783
* prototype * asdfg * It works! * okay its done now fr * self review * ok * fix * fix test --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-18Fix HTTP listen behavior being non-compliant with node (#5689)Gravatar dave caruso 2-4/+4
* Fix HTTP listen behavior being non-compliant with node * Add error code for address in use * use SystemError --------- Co-authored-by: SuperAuguste <19855629+SuperAuguste@users.noreply.github.com>
2023-09-16webkit upgrade (#5535)Gravatar Dylan Conway 2-27/+27
* update files * Update cold-jsc-start.cpp * bump webkit
2023-09-15Update InternalModuleRegistryConstants.hGravatar Dylan Conway 1-2/+2
2023-09-15feat(runtime): add `process.binding` `uv`/`natives`/`config` + make global ↵Gravatar dave caruso 5-73/+42
object properties lazy (#5355) * binding uv * we did that * some more bindings * fix doc * fix uv * yo * static hash table nonsense <3 * huge refactor to the global object i am not ready for merge conflicts * it works part 3 * lose --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-15Fixes #5465 (#5468)Gravatar Jarred Sumner 2-10/+8
* Fixes #5465 Fixes #5465 * Update tty.js * Update InternalModuleRegistryConstants.h --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-14fix http set cookie headers (#5428)Gravatar Dylan Conway 2-15/+9
* allow multiple set-cookie values * make it work for `getHeader` * move `getHeader` to cpp * remove set-cookie check * move `setHeader` to cpp --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-14async-ify all node:fs functions (#5360)Gravatar Jarred Sumner 3-107/+86
* async all node:fs functions * draw the rest of the owl * LLVM & Clang 16 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-14fix(runtime): emit `node:net` connect error event vs throw (#5336)Gravatar dave caruso 2-56/+70
* fix(runtime): emit `node:net` connect error event vs throw * oops * finally * ok * we are good
2023-09-13fix(runtime): make most globals configurable/deletable, allow resuming the ↵Gravatar dave caruso 11-880/+920
console iterator (#5216) * Fix #5177 * Fix #5175 * make most globals deletable/overridable * not done * cool * a * done * fix test * oops * yippee
2023-09-13feat(nodejs): implement `os.availableParallelism` (#5109)Gravatar WingLim 2-3/+6
* feat(nodejs): implement `os.availableParallelism` * chore: do not throw error as same as node * refactor: use `navigator.hardwareConcurrency`
2023-09-13fix(runtime): require cache should not include unevaluated ESM modules. (#5233)Gravatar dave caruso 2-7/+5
2023-09-12js/node/stream.js: call write() callback when encoding is not provided (#4841)Gravatar cfal 2-3/+7
* js/node/stream.js: call write() callback when encoding is not provided * js/out/InternalModuleRegistryConstants.h: update
2023-09-11Fix punctuation (#4870)Gravatar Matthew Yu 1-2/+2