New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

syncano-server

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syncano-server - npm Package Compare versions

Comparing version 0.7.2-11 to 0.7.2-12

.nyc_output/1601f7b7ae9699e486b090fc223022b9.json

8

lib/query-builder.js

@@ -33,3 +33,3 @@ 'use strict';

value: function fetch(url, options) {
var request = (0, _nodeFetch2.default)(url, _extends({
return (0, _nodeFetch2.default)(url, _extends({
headers: {

@@ -40,4 +40,2 @@ 'Content-Type': 'application/json',

}, options)).then(_utils.checkStatus).then(_utils.parseJSON);
return request;
}

@@ -47,3 +45,3 @@ }, {

value: function nonInstanceFetch(url, options, headers) {
var request = (0, _nodeFetch2.default)(url, _extends({
return (0, _nodeFetch2.default)(url, _extends({
headers: _extends({

@@ -53,4 +51,2 @@ 'Content-Type': 'application/json'

}, options)).then(_utils.checkStatus).then(_utils.parseJSON);
return request;
}

@@ -57,0 +53,0 @@ }, {

@@ -26,7 +26,6 @@ 'use strict';

function parseJSON(response) {
try {
return response.json();
} catch (err) {
return response.text();
if (response.status === 202) {
return Promise.resolve();
}
return response.json();
}

@@ -33,0 +32,0 @@

{
"name": "syncano-server",
"version": "0.7.2-11",
"version": "0.7.2-12",
"description": "A library to intereact with the Syncano API on a server side",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -11,3 +11,3 @@ import nodeFetch from 'node-fetch'

fetch(url, options) {
const request = nodeFetch(url, {
return nodeFetch(url, {
headers: {

@@ -21,8 +21,6 @@ 'Content-Type': 'application/json',

.then(parseJSON)
return request
}
nonInstanceFetch(url, options, headers) {
const request = nodeFetch(url, {
return nodeFetch(url, {
headers: {

@@ -36,4 +34,2 @@ 'Content-Type': 'application/json',

.then(parseJSON)
return request
}

@@ -40,0 +36,0 @@

@@ -16,7 +16,6 @@ import {getHost, SYNCANO_API_VERSION} from './settings'

export function parseJSON(response) {
try {
return response.json()
} catch (err) {
return response.text()
if (response.status === 202) {
return Promise.resolve()
}
return response.json()
}

@@ -23,0 +22,0 @@

Sorry, the diff of this file is not supported yet

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