got 6.7.0 → 6.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -73,8 +73,8 @@ function requestAsEventEmitter(opts) {
73
73
  ee.emit('error', new got.RequestError(err, opts));
74
74
  });
75
75
 
76
- if (opts.timeout) {
77
- timedOut(req, opts.timeout);
76
+ if (opts.gotTimeout) {
77
+ timedOut(req, opts.gotTimeout);
78
78
  }
79
79
 
80
80
  setImmediate(() => {
@@ -289,6 +289,11 @@ function normalizeArguments(url, opts) {
289
289
  opts.followRedirect = true;
290
290
  }
291
291
 
292
+ if (opts.timeout) {
293
+ opts.gotTimeout = opts.timeout;
294
+ delete opts.timeout;
295
+ }
296
+
292
297
  return opts;
293
298
  }
294
299
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "got",
3
- "version": "6.7.0",
3
+ "version": "6.7.1",
4
4
  "description": "Simplified HTTP requests",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/got",