This repository was archived by the owner on Jan 21, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363 "@types/pify" : " ^3.0.0" ,
6464 "@types/protobufjs" : " ^5.0.31" ,
6565 "@types/proxyquire" : " ^1.3.28" ,
66- "@types/request" : " ^2.0.8 " ,
66+ "@types/request" : " ^2.47.1 " ,
6767 "@types/semver" : " ^5.4.0" ,
6868 "@types/shimmer" : " ^1.0.1" ,
6969 "@types/tmp" : " 0.0.33" ,
103103 "hex2dec" : " ^1.0.1" ,
104104 "is" : " ^3.2.0" ,
105105 "methods" : " ^1.1.1" ,
106- "request" : " ^2.83.0" ,
107106 "require-in-the-middle" : " ^3.0.0" ,
108107 "semver" : " ^5.4.1" ,
109108 "shimmer" : " ^1.2.0" ,
109+ "teeny-request" : " ^3.9.0" ,
110110 "uuid" : " ^3.0.1"
111111 }
112112}
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ import {AxiosError} from 'axios';
1919import * as gcpMetadata from 'gcp-metadata' ;
2020import { OutgoingHttpHeaders } from 'http' ;
2121import * as os from 'os' ;
22- import * as request from 'request' ;
22+ import * as r from 'request' ; // Only for type declarations.
23+ import { teenyRequest } from 'teeny-request' ;
2324
2425import { Constants } from './constants' ;
2526import { Logger } from './logger' ;
@@ -79,7 +80,7 @@ export class TraceWriter extends common.Service {
7980 private readonly logger : Logger ) {
8081 super (
8182 {
82- requestModule : request ,
83+ requestModule : teenyRequest as typeof r ,
8384 packageJson : pjson ,
8485 projectIdRequired : false ,
8586 baseUrl : 'https://cloudtrace.googleapis.com/v1' ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import * as assert from 'assert';
1919import { OutgoingHttpHeaders } from 'http' ;
2020import * as nock from 'nock' ;
2121import * as os from 'os' ;
22- import { Response } from 'request' ;
22+ import { Response } from 'request' ; // Only for type declarations.
2323import * as shimmer from 'shimmer' ;
2424
2525import { SpanKind , Trace } from '../src/trace' ;
You can’t perform that action at this time.
0 commit comments