From 9ee294eab37c3979acb018405d84a368cd1e59c0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 27 Oct 2022 14:47:11 -0600 Subject: [PATCH] WIP: support bun --- request.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/request.js b/request.js index cbcdebe..d88f24b 100644 --- a/request.js +++ b/request.js @@ -668,11 +668,18 @@ function setDefaults(defs) { return smartUrequest; } +var runtime = process.release?.name || ''; +if (!runtime) { + if (process.isBun) { + runtime = 'bun'; + } +} + var nodeUa = '@root+request/' + pkg.version + ' ' + - process.release.name + + runtime + '/' + process.version + ' ' +