@effection/fetch
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
# @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 @@ |
@@ -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 |
@@ -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 { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
40756
8
19
334
1
0
2
+ Added@effection/core@2.0.0-beta.4(transitive)
- Removed@effection/core@2.0.0-beta.3(transitive)
Updated@effection/core@2.0.0-beta.4