Skip to content

Commit 1477655

Browse files
authored
Merge branch 'master' into refactor-and-tests
2 parents 120da94 + c5bdee7 commit 1477655

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Compressed Size
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2-beta
12+
with:
13+
fetch-depth: 1
14+
- uses: preactjs/compressed-size-action@v1
15+
with:
16+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Unfetch will account for the following properties in `options`:
139139
target resource (The most common ones being `GET`, `POST`, `PUT`, `PATCH`, `HEAD`, `OPTIONS` or `DELETE`).
140140
* `headers`: An `Object` containing additional information to be sent with the request, e.g. `{ 'Content-Type': 'application/json' }` to indicate a JSON-typed request body.
141141
* `credentials`: ⚠ Accepts a `"include"` string, which will allow both CORS and same origin requests to work with cookies. As pointed in the ['Caveats' section](#caveats), Unfetch won't send or receive cookies otherwise. The `"same-origin"` value is not supported. ⚠
142-
* `body`: The content to be transmited in request's body. Common content types include `FormData`, `JSON`, `Blob`, `ArrayBuffer` or plain text.
142+
* `body`: The content to be transmitted in request's body. Common content types include `FormData`, `JSON`, `Blob`, `ArrayBuffer` or plain text.
143143

144144
### `response` Methods and Attributes
145145
These methods are used to handle the response accordingly in your Promise chain. Instead of implementing full spec-compliant [Response Class](https://fetch.spec.whatwg.org/#response-class) functionality, Unfetch provides the following methods and attributes:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = global.fetch = global.fetch || (
22
typeof process=='undefined' ? (require('unfetch').default || require('unfetch')) : (function(url, opts) {
3-
return require('node-fetch')(url.replace(/^\/\//g,'https://'), opts);
3+
return (require('node-fetch').default || require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
44
})
55
);

packages/isomorphic-unfetch/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"index.d.ts",
88
"browser.js"
99
],
10+
"license": "MIT",
1011
"repository": "developit/unfetch",
1112
"browser": "browser.js",
1213
"main": "index.js",
1314
"types": "index.d.ts",
15+
"license": "MIT",
1416
"dependencies": {
1517
"node-fetch": "^2.2.0",
1618
"unfetch": "^4.0.0"

0 commit comments

Comments
 (0)