Comparing version 2.2.0 to 3.0.0-rc
# Changelog | ||
## 3.0.0 | ||
- Removes `body` from the default configuration object, and always directly | ||
sends whatever body is sent. Previously, body was expected to always be | ||
an object, and could be merged with a default. This was problematic since | ||
body can be other things, such as `FormData`. | ||
## 2.2.0 | ||
@@ -4,0 +10,0 @@ |
@@ -0,0 +0,0 @@ # Contributing |
@@ -14,2 +14,3 @@ # Gangway Documentation | ||
1. [Aborting requests](recipes/aborting-requests.md) | ||
2. [Progress](recipes/progress.md) | ||
@@ -43,11 +44,7 @@ ## API | ||
API.route({ | ||
users: { | ||
read: { | ||
path: '/users/{:id?}' | ||
} | ||
getUsers: { | ||
path: '/users/{:id?}' | ||
}, | ||
comments: { | ||
read: { | ||
path: '/comments/{:id?}' | ||
} | ||
getComments: { | ||
path: '/comments/{:id?}' | ||
} | ||
@@ -54,0 +51,0 @@ }) |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "gangway", | ||
"version": "2.2.0", | ||
"version": "3.0.0-rc", | ||
"description": "A client-side API abstraction layer", | ||
@@ -22,9 +22,9 @@ "engines": { | ||
"dependencies": { | ||
"superagent": "~1.8" | ||
"superagent": "~2.1" | ||
}, | ||
"devDependencies": { | ||
"faux-jax": "5.0.1", | ||
"istanbul": "0.4.3", | ||
"mocha": "2.4.5" | ||
"istanbul": "0.4.4", | ||
"mocha": "2.5.3" | ||
} | ||
} |
@@ -11,3 +11,2 @@ /** | ||
basePath : '', | ||
body : undefined, | ||
params : undefined, | ||
@@ -35,3 +34,2 @@ headers : { | ||
return next ? assign(memo, next, { | ||
body : next.body ? assign(memo.body, next.body) : next.body, | ||
params : assign(memo.params, next.params), | ||
@@ -38,0 +36,0 @@ query : assign(memo.query, next.query), |
@@ -81,3 +81,3 @@ var API = require('../src/api') | ||
it ('folds together body params', function() { | ||
it ('does not set default body params', function() { | ||
var endpoints = API({ | ||
@@ -98,3 +98,3 @@ baseURL: baseURL, | ||
assert.equal(endpoints.foo.config.body.one, 1) | ||
assert.equal(endpoints.foo.config.body.one, undefined) | ||
assert.equal(endpoints.foo.config.body.two, 2) | ||
@@ -101,0 +101,0 @@ }) |
Sorry, the diff of this file is not supported yet
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
54444
36
975
2
1
+ Addedcall-bind@1.0.7(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedform-data@1.0.0-rc4(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedsuperagent@2.1.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedcomponent-emitter@1.2.1(transitive)
- Removedcookiejar@2.0.6(transitive)
- Removedextend@3.0.0(transitive)
- Removedform-data@1.0.0-rc3(transitive)
- Removedformidable@1.0.17(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmime@1.3.4(transitive)
- Removedqs@2.3.3(transitive)
- Removedreadable-stream@1.0.27-1(transitive)
- Removedreduce-component@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedsuperagent@1.8.5(transitive)
Updatedsuperagent@~2.1