Socket
Socket
Sign inDemoInstall

github

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github - npm Package Compare versions

Comparing version 8.2.1 to 9.0.0

examples/getReference.js

12

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

16

lib/index.js

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

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