@dcos/connections
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -27,3 +27,3 @@ "use strict"; | ||
var ALLOWED_METHODS = ["GET", "POST", "PUT", "DELETE"]; | ||
var ALLOWED_METHODS = ["GET", "POST", "PUT", "DELETE", "PATCH"]; | ||
var ALLOWED_RESPONSE_TYPES = ["arraybuffer", "blob", "document", "json", "text"]; | ||
@@ -30,0 +30,0 @@ |
{ | ||
"name": "@dcos/connections", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Provides different connection types with a unified interface", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/dcos-labs/connections", |
import AbstractConnection from "./AbstractConnection"; | ||
import ConnectionEvent from "./ConnectionEvent"; | ||
const ALLOWED_METHODS = ["GET", "POST", "PUT", "DELETE"]; | ||
const ALLOWED_METHODS = ["GET", "POST", "PUT", "DELETE", "PATCH"]; | ||
const ALLOWED_RESPONSE_TYPES = [ | ||
@@ -44,3 +44,5 @@ "arraybuffer", | ||
throw new Error( | ||
`Invalid method "${method}". Valid methods are: "${ALLOWED_METHODS.join('", "')}".` | ||
`Invalid method "${method}". Valid methods are: "${ALLOWED_METHODS.join( | ||
'", "' | ||
)}".` | ||
); | ||
@@ -51,3 +53,5 @@ } | ||
throw new Error( | ||
`Invalid response type "${responseType}". Valid reponse types are "${ALLOWED_RESPONSE_TYPES.join('", "')}".` | ||
`Invalid response type "${responseType}". Valid reponse types are "${ALLOWED_RESPONSE_TYPES.join( | ||
'", "' | ||
)}".` | ||
); | ||
@@ -109,3 +113,3 @@ } | ||
Object.defineProperty(this, "xhr", { value: new XMLHttpRequest() }); | ||
this.xhr.withCredentials = withCredentials; | ||
@@ -112,0 +116,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1899
82950
1