@effection/fetch
Advanced tools
Comparing version 2.0.1 to 2.0.2
# @effection/fetch | ||
## \[2.0.2] | ||
- Extract `AbortSignal` from `@effection/fetch` to `@effection/core` as a resource | ||
- [8ac2e85](https://github.com/thefrontside/effection/commit/8ac2e8515ac2cb1ee6ed5a200f31d28024bfdae2) Add covector change file on 2021-11-18 | ||
- [b6d0e15](https://github.com/thefrontside/effection/commit/b6d0e1502ca8345bf488aef695b16fe7a5a5945d) Patch for fetch and not minor on 2021-11-19 | ||
## \[2.0.1] | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,2 @@ "use strict"; | ||
const cross_fetch_1 = require("cross-fetch"); | ||
const abort_controller_1 = require("abort-controller"); | ||
/** | ||
@@ -55,5 +54,4 @@ * Retrieve network content with a superset of the | ||
function* init() { | ||
let controller = new abort_controller_1.AbortController(); | ||
yield core_1.ensure(() => { controller.abort(); }); | ||
requestInit.signal = controller.signal; | ||
let signal = yield core_1.createAbortSignal(); | ||
requestInit.signal = signal; | ||
let response = yield cross_fetch_1.fetch(info, requestInit); | ||
@@ -60,0 +58,0 @@ return response; |
@@ -1,4 +0,3 @@ | ||
import { ensure, withLabels } from '@effection/core'; | ||
import { createAbortSignal, withLabels } from '@effection/core'; | ||
import { fetch as nativeFetch } from 'cross-fetch'; | ||
import { AbortController } from 'abort-controller'; | ||
/** | ||
@@ -51,5 +50,4 @@ * Retrieve network content with a superset of the | ||
function* init() { | ||
let controller = new AbortController(); | ||
yield ensure(() => { controller.abort(); }); | ||
requestInit.signal = controller.signal; | ||
let signal = yield createAbortSignal(); | ||
requestInit.signal = signal; | ||
let response = yield nativeFetch(info, requestInit); | ||
@@ -56,0 +54,0 @@ return response; |
{ | ||
"name": "@effection/fetch", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Fetch operation for Effection", | ||
@@ -35,8 +35,7 @@ "main": "dist-cjs/index.js", | ||
"mocha": "8.3.1", | ||
"ts-node": "^8.10.2", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.3.5" | ||
}, | ||
"dependencies": { | ||
"@effection/core": "2.0.1", | ||
"abort-controller": "^3.0.0", | ||
"@effection/core": "2.1.0", | ||
"cross-fetch": "^3.0.4", | ||
@@ -43,0 +42,0 @@ "node-fetch": "^2.6.1" |
@@ -1,4 +0,3 @@ | ||
import { ensure, withLabels, Operation, Resource } from '@effection/core'; | ||
import { AbortSignal, createAbortSignal, withLabels, Operation, Resource } from '@effection/core'; | ||
import { fetch as nativeFetch } from 'cross-fetch'; | ||
import { AbortController } from 'abort-controller'; | ||
@@ -92,8 +91,4 @@ /** | ||
function* init() { | ||
let controller = new AbortController(); | ||
yield ensure(() => { controller.abort() }); | ||
requestInit.signal = controller.signal; | ||
let signal: AbortSignal = yield createAbortSignal(); | ||
requestInit.signal = signal; | ||
let response: Response = yield nativeFetch(info, requestInit); | ||
@@ -100,0 +95,0 @@ return response; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3
35061
466
+ Added@effection/core@2.1.0(transitive)
- Removedabort-controller@^3.0.0
- Removed@effection/core@2.0.1(transitive)
Updated@effection/core@2.1.0