Comparing version 8.2.1 to 9.0.0
# CHANGELOG | ||
## 9.0.0 | ||
Breaking changes: | ||
* Always return a response as an object with data and meta attributes. | ||
Features: | ||
* Add getReference example. | ||
* Add note to createReference description. | ||
Bug fixes: | ||
* Encode hash in ref param. | ||
## 8.2.1 | ||
@@ -4,0 +16,0 @@ |
@@ -578,7 +578,8 @@ "use strict"; | ||
} else { | ||
// we don't want to encode ref param values since they're paths | ||
if (paramName !== 'ref') { | ||
// the ref param is a path so we don't want to [fully] encode it but we do want to encode the # if there is one | ||
// (see https://github.com/mikedeboer/node-github/issues/499#issuecomment-280093040) | ||
if (paramName === 'ref') { | ||
val = msg[paramName].replace(/#/g, '%23'); | ||
} else { | ||
val = encodeURIComponent(msg[paramName]); | ||
} else { | ||
val = msg[paramName]; | ||
} | ||
@@ -855,8 +856,9 @@ } | ||
try { | ||
var data = res.data; | ||
var contentType = res.headers["content-type"]; | ||
if (contentType && contentType.indexOf("application/json") !== -1) { | ||
ret = res.data && JSON.parse(res.data); | ||
} else { | ||
ret = {data: res.data}; | ||
data = res.data && JSON.parse(res.data); | ||
} | ||
ret = {data: data}; | ||
} catch (ex) { | ||
@@ -863,0 +865,0 @@ if (callback) { |
{ | ||
"name": "github", | ||
"version": "8.2.1", | ||
"version": "9.0.0", | ||
"description": "NodeJS wrapper for the GitHub API", | ||
@@ -53,3 +53,3 @@ "author": "Mike de Boer <info@mikedeboer.nl>", | ||
"name": "node-github", | ||
"version": "8.2.1", | ||
"version": "9.0.0", | ||
"template": { | ||
@@ -56,0 +56,0 @@ "withCompare": true |
Sorry, the diff of this file is too big to display
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
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
1695871
81
45712