aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGlobalObject.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-05wipGravatar Jarred Sumner 1-0/+2
2023-05-29Natively support CommonJS at runtime (#3104)Gravatar Jarred Sumner 1-0/+5
* 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/+4
* 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-05-24Implement `require.cache` (#3045)Gravatar Jarred Sumner 1-0/+3
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-22Write out builtins with TypeScript + Minify them (#2999)Gravatar dave caruso 1-1/+1
* start work drafting how builtins will work * work on ts builtin * builtins stuff so far * builtins * done for today * continue work * working on it * bindings so far * well, it builds. doesnt run * IT RUNS * still lots of ts errors but it is functional * sloppy mode
2023-05-19[node:vm] Make `vm.runInThisContext` 10x fasterGravatar Jarred Sumner 1-0/+5
2023-05-18Implement `node:vm` (#2785)Gravatar Silver 1-0/+9
* feat: begin implementing node:vm Script object * refactor: clean up and address review comments * refactor: rename Script to VMModuleScript * fix: expose VMModuleScript.prototype also oops I forgot to commit the new files last time * feat(vm): Implement contexts and scripts * feat(vm): implement globalThis * feat(vm): expose node:vm module with global helper functions * refactor(vm): rename VMModuleScript to NodeVMScript * feat: implement script options * doc: add TODOs for runIn*Context options
2023-05-10Clean-up 85b4be5f7189e51e63672ddc874e7c6e09ae8befGravatar Jarred Sumner 1-2/+5
- We don't need to make `Bun__fetch` exported in every C++ header file - We shouldn't return JSObjectRef, its an unnecessary wrapper - The version of `fetch` on the Bun global should be non-configurable so that it is safe for anyone who wants to use that without a user-modifiable one
2023-05-10fix(fetch) fix fetch inheritance (#2842)Gravatar Ciro Spaciari 1-0/+1
* patch fetch function inheritance * fmt * fix reserveCapacity and number of arguments for fetch * change Bun.fetch to use Fetch.jsFunction * merge Fetch.jsFunction and Fetch.call * remove commented code
2023-04-25Implement `onResolve` plugins in `Bun.build()`, support multiple onLoad and ↵Gravatar Jarred Sumner 1-5/+1
onResolve plugins (#2739) * its 2023 * WIP `onResolve` plugins * more progress * it compiles * Lots of small fixes * Seems to work excluding entry points * Update BundlerPluginBuiltins.cpp --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-24Support plugins in `Bun.build` (#2720)Gravatar Jarred Sumner 1-1/+5
* 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-04-13Upgrade WebKit (#2643)Gravatar Jarred Sumner 1-19/+14
* Missing export * Regenerate builtins * Fix crash in require() * Various breaking JSC changes * hopefully speed up C++ compilation a little * Skip failing test fo rnow * Update WebKit * Add a comment * Fix error in postinstall * Update WebKit --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-13Implement `FormData` (#2051)Gravatar Jarred Sumner 1-2/+3
* Backport std::forward change * Implement `FormData` * Fix io_darwin headers issue * Implement `Blob` support in FormData * Add test for file upload * Fix bug with Blob not reading Content-Type * Finish implementing FormData * Add FormData to types --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-03Introduce `await Bun.sleep(ms)`Gravatar Jarred Sumner 1-0/+3
2023-01-27Make `Bun.dns` lazyGravatar Jarred Sumner 1-0/+3
2023-01-22[EventEmitter] Preserve `this` in event emitter callbacksGravatar Jarred Sumner 1-0/+1
2023-01-17Fix lifetime issue in require.resolveGravatar Jarred Sumner 1-0/+5
2023-01-10attempt (unsuccessfully) to improve c++ build timeGravatar Jarred Sumner 1-114/+1
2023-01-0410x faster `new Buffer` (#1717)Gravatar Jarred Sumner 1-0/+7
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-17Delete Oniguruma (#1625)Gravatar Jarred Sumner 1-5/+0
* Update .gitmodules * Delete oniguruma * Delete Oniguruma * Make this test less flaky * :scissors: Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-02Add `AbortSignal.timeout`Gravatar Jarred Sumner 1-0/+1
2022-12-013x faster `TextEncoder.prototype.encodeInto`Gravatar Jarred Sumner 1-2/+2
thanks to @Constellation for the tip
2022-11-30Accidentally deleted `prompt` as a result of the process.env changesGravatar Jarred Sumner 1-2/+0
2022-11-29:scissors:Gravatar Jarred Sumner 1-1/+0
2022-11-28Fix process.env and Bun.env object spreadGravatar Jarred Sumner 1-0/+1
Fixes https://github.com/oven-sh/bun/issues/1512
2022-11-19Implement a singleton version of `napi_get_instance_data` and ↵Gravatar Jarred Sumner 1-0/+7
`napi_set_instance_data` Still need to figure out how to do this without adding a layer of indirection to the global object as exposed to NAPI Addons This code is not tested
2022-11-14Fix crash in web crypto. caused by refptrGravatar Jarred Sumner 1-0/+7
2022-11-13Make node streams faster (#1502)Gravatar Jarred Sumner 1-0/+3
* Make node streams faster * Fix for macOS, improve performance, handle ref and unref Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-09Error.captureStackTrace implementation (#1476)Gravatar Dylan Conway 1-0/+12
* capture stack trace formatting, tests * fix callsite methods, stack formatting or undefined * isNative, tests for callsite methods * Update src/bun.js/bindings/ZigGlobalObject.cpp * Update src/bun.js/bindings/ZigGlobalObject.cpp * template and macros for visitchildren * static strings, handle infinity and clamp stacktracelimit Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2022-11-07Visit all the fieldsGravatar Jarred Sumner 1-32/+54
2022-11-07Fix missing error in `process.nextTick` and `queueMicrotask`Gravatar Jarred Sumner 1-0/+5
2022-11-03Introduce `import.meta.primordials` for builtin JSGravatar Jarred Sumner 1-0/+3
the `import.meta` object in Bun now has a `primordials` object which makes a handful of globals safe for access. Inside of bun: or node: modules, it is a special object (ownKeys is not implemented, so Object.keys() wont work on it) - Array - String - `isPromise` - `isCallable` - `isConstructable` - `tryGetById(foo, "bar')` which is like foo?.bar - `arrayPush` which is like `Array.prototype.push` - `Bun` - `isAbortSignal` cc @ThatOneBro @lawrencecchen
2022-11-02Fix missing functionsGravatar Jarred Sumner 1-1/+8
2022-10-23Add Web Crypto API (#1384)Gravatar Jarred Sumner 1-1/+8
* Add Web Crypto API * Duplicate symbols * Update c_cpp_properties.json Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-10-17add oniguruma for regex with variable length lookbehinds (#1329)Gravatar Dylan Conway 1-0/+5
* added pcre2 submodule * pcre2 regex boilerplate * tests for pcre2 regex * flag validation, getters, construct and compile mostly working * string escaping for source and toString(), exec, more tests * flag sorting, match, matchAll, search, split, replace * remove lib link * add destructor to PCRE2RegExp * header include * removed ternary * switched to oniguruma for regex library * revert sql changes * fix indices flag, add tests * revert settings * working error messages * more tests for lastIndex, fix logic for compile and lastIndex * move oniguruma lib to deps out dir
2022-10-06Add simple Hot Module Reloading to bun's runtimeGravatar Jarred Sumner 1-0/+3
2022-09-28Clean up some of the event loop codeGravatar Jarred Sumner 1-1/+8
2022-09-22Faster `Blob` + begin to implement `FileSink`Gravatar Jarred Sumner 1-0/+9
2022-09-20meant to include this in the previous commitGravatar Jarred Sumner 1-0/+4
2022-09-17Fix napi module registrationGravatar Jarred Sumner 1-0/+4
Fixes https://github.com/oven-sh/bun/issues/1240
2022-09-08Make some more globals modifiableGravatar Jarred Sumner 1-0/+7
2022-09-06workaround test failureGravatar Jarred Sumner 1-0/+11
2022-09-06Add native ReadableState (#1210)Gravatar Zilin Zhu 1-0/+10
* use functionSpace for JSStringDecoderConstructor and fix console.log on prototype * Add native ReadableState * move kPaused to class property
2022-09-05Support async `onLoad` callbacks in `Bun.plugin`Gravatar Jarred Sumner 1-2/+19
2022-09-03[Node API] Fix `napi_module_register`Gravatar Jarred Sumner 1-0/+6
2022-09-03Plugin API (#1199)Gravatar Jarred Sumner 1-0/+5
* 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/+5
* Add native StringDecoder * fix upon reviews * add Constructor and use LazyClassStructure
2022-08-27Update WebKit (#1165)Gravatar Jarred Sumner 1-0/+74
* Update WebKit * Fix `DataView` and non-8 bit sized typed arrays with TextDecoder * New WebKit Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-08-17slightly improve streams perfGravatar Jarred Sumner 1-0/+3
2022-08-17New Zig <> C++ bindings generator. +20% faster HTTP serverGravatar Jarred Sumner 1-0/+6