diff options
author | 2023-09-15 11:22:06 -0400 | |
---|---|---|
committer | 2023-09-15 08:22:06 -0700 | |
commit | 29b22175bf6fc726d0b028c7bf5619ab89fca09a (patch) | |
tree | f0664d677e6cd2d130c76db9fb135402ae2c1110 /src/js/builtins | |
parent | 75697890ce1040d2c2f9bc50499faf54b3205915 (diff) | |
download | bun-29b22175bf6fc726d0b028c7bf5619ab89fca09a.tar.gz bun-29b22175bf6fc726d0b028c7bf5619ab89fca09a.tar.zst bun-29b22175bf6fc726d0b028c7bf5619ab89fca09a.zip |
feat(runtime): add `process.binding` `uv`/`natives`/`config` + make global 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>
Diffstat (limited to 'src/js/builtins')
-rw-r--r-- | src/js/builtins/ProcessObjectInternals.ts | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/js/builtins/ProcessObjectInternals.ts b/src/js/builtins/ProcessObjectInternals.ts index 2bb8648df..ef8f1f9ce 100644 --- a/src/js/builtins/ProcessObjectInternals.ts +++ b/src/js/builtins/ProcessObjectInternals.ts @@ -24,27 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// TODO: move this to native code? -export function binding(bindingName) { - if (bindingName === "constants") { - return $processBindingConstants; - } - const issue = { - fs: 3546, - buffer: 2020, - natives: 2254, - uv: 2891, - }[bindingName]; - if (issue) { - throw new Error( - `process.binding("${bindingName}") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`, - ); - } - throw new TypeError( - `process.binding("${bindingName}") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`, - ); -} - export function getStdioWriteStream(fd) { const tty = require("node:tty"); |