Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 215204c

Browse files
committed
Revert "feat: use small HTTP dependency (#416)"
System-tests broke with that commit. This reverts commit c2c1382.
1 parent c2c1382 commit 215204c

6 files changed

Lines changed: 12 additions & 21 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
"mime-types": "^2.0.8",
9595
"once": "^1.3.1",
9696
"pumpify": "^1.5.1",
97+
"request": "^2.88.0",
9798
"snakeize": "^0.1.0",
9899
"stream-events": "^1.0.1",
99-
"teeny-request": "^3.10.0",
100100
"through2": "^2.0.0",
101101
"xdg-basedir": "^3.0.0"
102102
},

src/bucket.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import * as is from 'is';
2727
import * as mime from 'mime-types';
2828
import * as path from 'path';
2929
const snakeize = require('snakeize');
30-
import * as request from 'request'; // Only for type declarations.
31-
import {teenyRequest} from 'teeny-request';
30+
import * as request from 'request';
3231

3332
import {Acl} from './acl';
3433
import {Channel} from './channel';
@@ -704,7 +703,7 @@ class Bucket extends ServiceObject {
704703
id: name,
705704
createMethod: storage.createBucket.bind(storage),
706705
methods,
707-
requestModule: teenyRequest as typeof request,
706+
requestModule: request,
708707
});
709708

710709
this.name = name;

src/channel.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
import {ServiceObject, util} from '@google-cloud/common';
2020
import {promisifyAll} from '@google-cloud/promisify';
21-
import * as request from 'request'; // Only for type declarations.
22-
import {teenyRequest} from 'teeny-request';
23-
21+
import * as request from 'request';
2422
import {Storage} from '.';
2523
import {Response} from 'request';
2624

@@ -33,7 +31,6 @@ export interface StopCallback {
3331
(err: Error|null, apiResponse?: request.Response): void;
3432
}
3533

36-
3734
/**
3835
* Create a channel object to interact with a Cloud Storage channel.
3936
*
@@ -63,7 +60,7 @@ class Channel extends ServiceObject {
6360
methods: {
6461
// Only need `request`.
6562
},
66-
requestModule: teenyRequest as typeof request,
63+
requestModule: request,
6764
};
6865

6966
super(config);

src/file.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ import * as through from 'through2';
3737
import * as xdgBasedir from 'xdg-basedir';
3838
import * as zlib from 'zlib';
3939
import * as url from 'url';
40+
import * as r from 'request';
4041
import * as http from 'http';
41-
import * as r from 'request'; // Only for type declarations.
42-
import {teenyRequest} from 'teeny-request';
4342

4443
import {Storage} from '.';
4544
import {Bucket} from './bucket';
@@ -472,7 +471,7 @@ class File extends ServiceObject {
472471
parent: bucket,
473472
baseUrl: '/o',
474473
id: encodeURIComponent(name),
475-
requestModule: teenyRequest as typeof r,
474+
requestModule: r,
476475
});
477476

478477
this.bucket = bucket;
@@ -2894,7 +2893,7 @@ class File extends ServiceObject {
28942893
},
28952894
metadata: options.metadata,
28962895
request: reqOpts,
2897-
requestModule: teenyRequest as typeof r,
2896+
requestModule: r,
28982897
});
28992898
}
29002899
}

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {Service, GoogleAuthOptions, CreateOptions} from '@google-cloud/common';
2121
import {paginator} from '@google-cloud/paginator';
2222
import {promisifyAll} from '@google-cloud/promisify';
2323
import * as extend from 'extend';
24-
import * as request from 'request'; // Only for type declarations.
25-
import {teenyRequest} from 'teeny-request';
24+
import * as request from 'request';
2625

2726
import {Bucket} from './bucket';
2827
import {Channel} from './channel';
@@ -259,7 +258,7 @@ class Storage extends Service {
259258
'https://www.googleapis.com/auth/devstorage.full_control',
260259
],
261260
packageJson: require('../../package.json'),
262-
requestModule: teenyRequest as typeof request,
261+
requestModule: request,
263262
};
264263

265264
super(config, options);

src/notification.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
import {ServiceObject, util, ApiError, GetMetadataCallback} from '@google-cloud/common';
2020
import {promisifyAll} from '@google-cloud/promisify';
2121
import * as is from 'is';
22-
import * as request from 'request'; // Only for type declarations.
23-
import {teenyRequest} from 'teeny-request';
24-
22+
import * as request from 'request';
2523
import {Bucket} from './bucket';
2624
import {ResponseBody} from '@google-cloud/common/build/src/util';
2725

@@ -90,7 +88,6 @@ export interface DeleteNotificationCallback {
9088
(err: Error|null, apiResponse?: request.Response): void;
9189
}
9290

93-
9491
/**
9592
* A Notification object is created from your {@link Bucket} object using
9693
* {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub
@@ -194,7 +191,7 @@ class Notification extends ServiceObject {
194191
id: id.toString(),
195192
createMethod: bucket.createNotification.bind(bucket),
196193
methods,
197-
requestModule: teenyRequest as typeof request,
194+
requestModule: request,
198195
});
199196
}
200197

0 commit comments

Comments
 (0)