@octokit/request
Advanced tools
Comparing version 7.0.1 to 8.0.0
@@ -30,3 +30,3 @@ "use strict"; | ||
// pkg/dist-src/version.js | ||
var VERSION = "7.0.1"; | ||
var VERSION = "8.0.0"; | ||
@@ -61,19 +61,12 @@ // pkg/dist-src/fetch-wrapper.js | ||
} | ||
return fetch( | ||
requestOptions.url, | ||
Object.assign( | ||
{ | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
redirect: requestOptions.redirect, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}, | ||
// `requestOptions.request.agent` type is incompatible | ||
// see https://github.com/octokit/types.ts/pull/264 | ||
requestOptions.request | ||
) | ||
).then(async (response) => { | ||
return fetch(requestOptions.url, { | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
signal: requestOptions.signal, | ||
data: requestOptions.data, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}).then(async (response) => { | ||
url = response.url; | ||
@@ -80,0 +73,0 @@ status = response.status; |
@@ -21,19 +21,12 @@ import { isPlainObject } from "is-plain-object"; | ||
} | ||
return fetch( | ||
requestOptions.url, | ||
Object.assign( | ||
{ | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
redirect: requestOptions.redirect, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}, | ||
// `requestOptions.request.agent` type is incompatible | ||
// see https://github.com/octokit/types.ts/pull/264 | ||
requestOptions.request | ||
) | ||
).then(async (response) => { | ||
return fetch(requestOptions.url, { | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
signal: requestOptions.signal, | ||
data: requestOptions.data, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}).then(async (response) => { | ||
url = response.url; | ||
@@ -40,0 +33,0 @@ status = response.status; |
@@ -1,4 +0,4 @@ | ||
const VERSION = "7.0.1"; | ||
const VERSION = "8.0.0"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "7.0.1"; | ||
export declare const VERSION = "8.0.0"; |
@@ -6,3 +6,3 @@ // pkg/dist-src/index.js | ||
// pkg/dist-src/version.js | ||
var VERSION = "7.0.1"; | ||
var VERSION = "8.0.0"; | ||
@@ -36,19 +36,12 @@ // pkg/dist-src/fetch-wrapper.js | ||
} | ||
return fetch( | ||
requestOptions.url, | ||
Object.assign( | ||
{ | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
redirect: requestOptions.redirect, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}, | ||
// `requestOptions.request.agent` type is incompatible | ||
// see https://github.com/octokit/types.ts/pull/264 | ||
requestOptions.request | ||
) | ||
).then(async (response) => { | ||
return fetch(requestOptions.url, { | ||
method: requestOptions.method, | ||
body: requestOptions.body, | ||
headers: requestOptions.headers, | ||
signal: requestOptions.signal, | ||
data: requestOptions.data, | ||
// duplex must be set if request.body is ReadableStream or Async Iterables. | ||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. | ||
...requestOptions.body && { duplex: "half" } | ||
}).then(async (response) => { | ||
url = response.url; | ||
@@ -55,0 +48,0 @@ status = response.status; |
{ | ||
"name": "@octokit/request", | ||
"version": "7.0.1", | ||
"version": "8.0.0", | ||
"publishConfig": { | ||
@@ -20,3 +20,3 @@ "access": "public" | ||
"@octokit/request-error": "^4.0.1", | ||
"@octokit/types": "^10.0.0", | ||
"@octokit/types": "^11.0.0", | ||
"is-plain-object": "^5.0.0", | ||
@@ -38,3 +38,3 @@ "universal-user-agent": "^6.0.0" | ||
"lolex": "^6.0.0", | ||
"prettier": "2.8.8", | ||
"prettier": "3.0.0", | ||
"semantic-release-plugin-update-version-in-files": "^1.0.0", | ||
@@ -41,0 +41,0 @@ "string-to-arraybuffer": "^1.0.2", |
@@ -188,3 +188,3 @@ # request.js | ||
title: "Hello from the engine room", | ||
} | ||
}, | ||
); | ||
@@ -249,3 +249,3 @@ ``` | ||
<th align=left> | ||
<code>options.mediaType.format</code> | ||
<code>options.method</code> | ||
</th> | ||
@@ -256,3 +256,3 @@ <td> | ||
<td> | ||
Media type param, such as `raw`, `html`, or `full`. See <a href="https://developer.github.com/v3/media/">Media Types</a>. | ||
Any supported <a href="https://developer.github.com/v3/#http-verbs">http verb</a>, case insensitive. <em>Defaults to <code>Get</code></em>. | ||
</td> | ||
@@ -262,9 +262,9 @@ </tr> | ||
<th align=left> | ||
<code>options.mediaType.previews</code> | ||
<code>options.mediaType.format</code> | ||
</th> | ||
<td> | ||
Array of strings | ||
String | ||
</td> | ||
<td> | ||
Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See <a href="https://developer.github.com/v3/previews/">API Previews</a>. | ||
Media type param, such as `raw`, `html`, or `full`. See <a href="https://developer.github.com/v3/media/">Media Types</a>. | ||
</td> | ||
@@ -274,9 +274,10 @@ </tr> | ||
<th align=left> | ||
<code>options.method</code> | ||
<code>options.mediaType.previews</code> | ||
</th> | ||
<td> | ||
String | ||
Array of strings | ||
</td> | ||
<td> | ||
Any supported <a href="https://developer.github.com/v3/#http-verbs">http verb</a>, case insensitive. <em>Defaults to <code>Get</code></em>. | ||
Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See <a href="https://docs.github.com/graphql/overview/schema-previews">GraphQL Schema Previews</a>. | ||
Note that these only apply to GraphQL requests and have no effect on REST routes. | ||
</td> | ||
@@ -307,15 +308,5 @@ </tr> | ||
</tr> | ||
<tr> | ||
<th align=left> | ||
<code>options.request.agent</code> | ||
</th> | ||
<td> | ||
<a href="https://nodejs.org/api/http.html#http_class_http_agent">http(s).Agent</a> instance | ||
</td> | ||
<td> | ||
Node only. Useful for custom proxy, certificate, or dns lookup. | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left> | ||
<code>options.request.fetch</code> | ||
@@ -541,3 +532,3 @@ </th> | ||
data: "Hello, world!", | ||
} | ||
}, | ||
); | ||
@@ -544,0 +535,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53065
545
533
+ Added@octokit/types@11.1.0(transitive)
Updated@octokit/types@^11.0.0