WIP: support bun

This commit is contained in:
AJ ONeal 2022-10-27 14:47:11 -06:00
parent 7ce7e9d091
commit 9ee294eab3
Signed by: coolaj86
GPG Key ID: 585419CA6DB0AA23
1 changed files with 8 additions and 1 deletions

View File

@ -668,11 +668,18 @@ function setDefaults(defs) {
return smartUrequest; return smartUrequest;
} }
var runtime = process.release?.name || '';
if (!runtime) {
if (process.isBun) {
runtime = 'bun';
}
}
var nodeUa = var nodeUa =
'@root+request/' + '@root+request/' +
pkg.version + pkg.version +
' ' + ' ' +
process.release.name + runtime +
'/' + '/' +
process.version + process.version +
' ' + ' ' +