aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/headers-handwritten.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-07feat(KeyObject) (#5940)Gravatar Ciro Spaciari 1-0/+1
* 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-09-29fix(resolver): support encoded file urls (#5766)Gravatar dave caruso 1-6/+17
* start working on this * it works now * better implementation imo * yippee * more tests and better unrefing * fix leak?
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-14/+3
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-19move constants module to cpp (#3683)Gravatar Ciro Spaciari 1-0/+1
2023-07-01Use `BunString` in `SystemError` (#3485)Gravatar Jarred Sumner 1-4/+8
* 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-06-28Use `bun.String` for `ZigException` (#3451)Gravatar Jarred Sumner 1-8/+8
* Use `bun.String` for `ZigException` * woopsie --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-26Runtime support for `__esModule` annotations (#3393)Gravatar Jarred Sumner 1-0/+1
* 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-20enable asymmetric matchers in `expect.toEqual`, `expect.toStrictEqual`, and ↵Gravatar Dylan Conway 1-1/+2
`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-19implement more of V8's stack trace API (#3359)Gravatar Keyhan Vakil 1-0/+2
- 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-13Fix crash in CJS (#3294)bun-v0.6.9Gravatar Jarred Sumner 1-1/+1
* 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-11Support using `WTF::StringImpl` from Zig (#3279)Gravatar Jarred Sumner 1-8/+65
* 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-09`toMatchObject` and some asymmetric matchers (#3260)Gravatar Dylan Conway 1-0/+2
* `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-05-29Natively support CommonJS at runtime (#3104)Gravatar Jarred Sumner 1-0/+2
* 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-26Fix crash in test.todo + remove JSC C API usages in bun:test (#3079)Gravatar Jarred Sumner 1-0/+2
* 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-04-24Support plugins in `Bun.build` (#2720)Gravatar Jarred Sumner 1-18/+18
* 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-03-07improve `Buffer` compatibility with Node.js (#2341)Gravatar Alex Lam S.L 1-2/+2
* improve `Buffer` compatibility with Node.js * use `memmove()` allow `encoding` to be `undefined`
2023-01-08Update process.versionsGravatar Jarred Sumner 1-5/+10
2022-12-17Implement `node:util/types`Gravatar Jarred Sumner 1-0/+1
Fixes #1617
2022-12-01bun test `toStrictEqual` (#1568)Gravatar Dylan Conway 1-0/+1
* 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-11-29:scissors:Gravatar Jarred Sumner 1-2/+2
2022-11-29Remove some dead bindings codeGravatar Jarred Sumner 1-0/+6
2022-11-23Bun.deepEquals and expect().toEqual() (#1548)Gravatar Dylan Conway 1-0/+2
* all of deepEquals * remove comment, tests, move inline function
2022-11-06Automatically install npm packages when running a script in Bun's runtime ↵Gravatar Jarred Sumner 1-2/+2
(#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-02Update headers-handwritten.hGravatar Jarred Sumner 1-3/+3
2022-11-02Add missing headersGravatar Jarred Sumner 1-0/+3
2022-10-23Add `fd` to `SystemError` and fix 2 cases with invalid tagged unionGravatar Jarred Sumner 1-0/+2
cc @sno2
2022-09-30Fix outdated typeGravatar Jarred Sumner 1-1/+1
2022-09-25Implement `isatty` in `node:tty`Gravatar Jarred Sumner 1-0/+1
2022-09-20Add `navigator.userAgent` , `navigator.hardwareConcurrency`Gravatar Jarred Sumner 1-0/+2
2022-09-05Support async `onLoad` callbacks in `Bun.plugin`Gravatar Jarred Sumner 1-0/+39
2022-09-03Fix `createRequire()` in `node:module`Gravatar Jarred Sumner 1-0/+1
Fixes https://github.com/oven-sh/bun/issues/831 Fixes https://github.com/oven-sh/bun/issues/453
2022-09-03Plugin API (#1199)Gravatar Jarred Sumner 1-0/+8
* Plugin API * Fix the bugs * Implement `"object"` loader Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-09-01Add native StringDecoder (#1188)Gravatar Zilin Zhu 1-0/+1
* Add native StringDecoder * fix upon reviews * add Constructor and use LazyClassStructure
2022-08-29chore: Clean buffer C API (#1174)Gravatar Zilin Zhu 1-38/+8
2022-08-21Add native EventEmitter (#1123)Gravatar Zilin Zhu 1-0/+1
* Add native EventEmitter * add listeners, listenerCount and eventNames * add global functions * add Object to EventEmitter conversion * fix upon review
2022-08-17[bun:ffi] Improve `ptr()` performance and implement code generation for DOMJITGravatar Jarred Sumner 1-0/+3
2022-08-13wip SyntheticModuleGravatar Jarred Sumner 1-0/+5
2022-08-10Fix console.log with typed arraysGravatar Jarred Sumner 1-0/+1
2022-08-03Add `process.revision` and expose git sha to buildsGravatar Jarred Sumner 1-0/+2
2022-07-02[streams] Rename `drain()` -> `flush()`Gravatar Jarred Sumner 1-34/+13
2022-06-22change the directory structurejarred/renameGravatar Jarred Sumner 1-0/+256