Socket
Socket
Sign inDemoInstall

@effection/fetch

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effection/fetch - npm Package Compare versions

Comparing version 2.0.0-beta.3 to 2.0.0-beta.4

dist/fetch.d.ts.map

7

CHANGELOG.md
# @effection/fetch
## 2.0.0-beta.4
### Patch Changes
- Updated dependencies [e297c86]
- @effection/core@2.0.0-beta.4
## 2.0.0-beta.3

@@ -4,0 +11,0 @@

1

dist/fetch.d.ts

@@ -10,1 +10,2 @@ import { Operation, Resource } from '@effection/core';

export declare function fetch(info: RequestInfo, requestInit?: RequestInit): Fetch;
//# sourceMappingURL=fetch.d.ts.map
export { AbortController } from 'abort-controller';
export { fetch } from './fetch';
//# sourceMappingURL=index.d.ts.map

16

dist/index.js

@@ -1,8 +0,8 @@

'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./fetch.cjs.production.min.js')
} else {
module.exports = require('./fetch.cjs.development.js')
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetch = exports.AbortController = void 0;
var abort_controller_1 = require("abort-controller");
Object.defineProperty(exports, "AbortController", { enumerable: true, get: function () { return abort_controller_1.AbortController; } });
var fetch_1 = require("./fetch");
Object.defineProperty(exports, "fetch", { enumerable: true, get: function () { return fetch_1.fetch; } });
//# sourceMappingURL=index.js.map
{
"name": "@effection/fetch",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"description": "Fetch operation for Effection",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"repository": "https://github.com/thefrontside/effection.git",
"types": "dist/index.d.ts",
"homepage": "https://github.com/thefrontside/effection",
"repository": {
"type": "git",
"url": "https://github.com/thefrontside/effection.git",
"directory": "packages/fetch"
},
"author": "Frontside Engineering <engineering@frontside.com>",
"license": "MIT",
"files": [
"README.md",
"CHANGELOG.md",
"dist/**/*",
"src/**/*"
],
"scripts": {
"lint": "eslint '{src,tests}/**/*.ts'",
"prepack": "tsdx build --tsconfig tsconfig.dist.json",
"prepack": "tsc --build tsconfig.dist.json",
"test": "mocha -r ts-node/register test/**/*.test.ts",

@@ -24,18 +23,20 @@ "docs": "yarn typedoc src/index.ts",

"devDependencies": {
"@effection/mocha": "2.0.0-beta.3",
"@effection/mocha": "2.0.0-beta.4",
"@frontside/tsconfig": "^1.2.0",
"@types/node": "^13.13.5",
"@types/node": "^16.3.2",
"expect": "26.0.1",
"mocha": "8.3.1",
"ts-node": "8.10.2",
"tsdx": "0.13.2",
"ts-node": "^8.10.2",
"typedoc": "^0.20.36",
"typescript": "^3.9.5"
"typescript": "^4.3.5"
},
"dependencies": {
"@effection/core": "2.0.0-beta.3",
"@effection/core": "2.0.0-beta.4",
"abort-controller": "^3.0.0",
"cross-fetch": "^3.0.4",
"node-fetch": "^2.6.1"
},
"volta": {
"extends": "../../package.json"
}
}

@@ -1,2 +0,2 @@

import { Task, Operation, Resource } from '@effection/core';
import { spawn, Operation, Resource } from '@effection/core';
import { fetch as nativeFetch } from 'cross-fetch';

@@ -14,6 +14,6 @@ import { AbortController } from 'abort-controller';

export function fetch(info: RequestInfo, requestInit: RequestInit = {}): Fetch {
function* init(scope: Task) {
function* init() {
let controller = new AbortController();
scope.spawn(function*() {
yield spawn(function*() {
try {

@@ -28,5 +28,5 @@ yield;

let response = yield nativeFetch(info, requestInit);
let response: Response = yield nativeFetch(info, requestInit);
return response;
};
}

@@ -33,0 +33,0 @@ return {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc