Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vonage/vetch

Package Overview
Dependencies
Maintainers
32
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vonage/vetch - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

dist/index.d.ts
import { VetchOptions } from './types';
import { Vetch } from './vetch';
export { VetchError, VetchPromise, VetchResponse, Headers, RetryConfig, ResponseTypes } from './types';
export { VetchError, VetchPromise, VetchResponse, Headers, ResponseTypes, } from './types';
export { Vetch, VetchOptions };
export declare const instance: Vetch;
export declare function request<T>(opts: VetchOptions): Promise<import("./types").VetchResponse<T>>;

@@ -53,3 +53,1 @@ export declare class VetchError extends Error {

}
export interface RetryConfig {
}

@@ -53,3 +53,3 @@ "use strict";

if (!opts.checkStatus(formattedResponse.status)) {
let err = new types_1.VetchError(`Request failed with status code ${formattedResponse.status}`, opts);
const err = new types_1.VetchError(`Request failed with status code ${formattedResponse.status}`, opts);
err.code = String(formattedResponse.status);

@@ -101,3 +101,3 @@ err.response = formattedResponse;

}
let prefix = opts.url.includes('?') ? '&' : '?';
const prefix = opts.url.includes('?') ? '&' : '?';
opts.url = `${opts.url}${prefix}${queryParams}`;

@@ -114,4 +114,4 @@ }

}
if (!opts.headers['Accept'] && opts.responseType === 'json') {
opts.headers['Accept'] = 'application/json';
if (!opts.headers.Accept && opts.responseType === 'json') {
opts.headers.Accept = 'application/json';
}

@@ -118,0 +118,0 @@ return opts;

{
"name": "@vonage/vetch",
"version": "0.1.0",
"version": "0.2.0",
"description": "Vonage package for server side fetch.",

@@ -14,3 +14,3 @@ "author": "Kelly J Andrews <kelly@kellyjandrews.com>",

"publishConfig": {
"directory": "dist"
"directory": "dist"
},

@@ -25,6 +25,9 @@ "repository": {

"compile": "tsc -p tsconfig.json",
"lerna": "../../node_modules/.bin/lerna",
"prepare": "npm run build",
"format": "prettier --write \"lib/**/*.ts\" \"__tests__/**/*.ts\"",
"lint": "tslint -p tsconfig.json",
"prepublishOnly": "npm run build && npm run test && npm run lint",
"preversion": "npm run lint",
"test-watch": "npx jest --watch",
"test": "npx jest"
"test": "npx jest",
"version": "npm run format && git add -A lib"
},

@@ -36,10 +39,12 @@ "bugs": {

"lodash.merge": "^4.6.2",
"node-fetch": "^2.6.1"
"node-fetch": "^2.6"
},
"gitHead": "b5818afa99349dec888eb9c7bc7c3ced3c10bece",
"devDependencies": {
"@types/lodash": "^4.14.172",
"@types/node-fetch": "^2.5.12",
"typescript": "^4.3.5"
"@types/lodash": "^4.14.182",
"prettier": "^2.7.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.7.4"
}
}
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