Socket
Socket
Sign inDemoInstall

gangway

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gangway - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0-rc

docs/recipes/progress.md

6

CHANGELOG.md
# 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

CONTRIBUTING.md

@@ -0,0 +0,0 @@ # Contributing

13

docs/readme.md

@@ -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

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