getcontributors
Advanced tools
Comparing version 2.2.0 to 2.3.0-next.1585286323.eb27d7f37f472bfb7fde3ade418ca92086631db3
@@ -5,3 +5,3 @@ /* eslint camelcase:0 */ | ||
import { getReposFromUsers, getReposFromSearch } from 'getrepos' | ||
import githubAuthQueryString from 'githubauthquerystring' | ||
import { githubAuthorizationHeader } from 'githubauthreq' | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
@@ -11,4 +11,4 @@ /** Export the Fellow class we have imported and are using, such that consumers of this package and ensure they are interacting with the same singletons */ | ||
/** Continue despite certain errors */ | ||
function ignore(err) { | ||
console.warn(err) | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set() | ||
@@ -20,2 +20,3 @@ } | ||
headers: { | ||
Authorization: githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -35,5 +36,6 @@ }, | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100&${githubAuthQueryString}` | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const resp = await fetch(url, { | ||
headers: { | ||
Authorization: githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -84,7 +86,3 @@ }, | ||
const url = `http://raw.github.com/${slug}/master/package.json` | ||
const resp = await fetch(url, { | ||
headers: { | ||
Accept: 'application/vnd.github.v3+json', | ||
}, | ||
}) | ||
const resp = await fetch(url) | ||
const packageData = await resp.json() | ||
@@ -91,0 +89,0 @@ // Process |
@@ -13,9 +13,7 @@ 'use strict' | ||
const getrepos_1 = require('getrepos') | ||
const githubauthquerystring_1 = __importDefault( | ||
require('githubauthquerystring') | ||
) | ||
const githubauthreq_1 = require('githubauthreq') | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
/** Continue despite certain errors */ | ||
function ignore(err) { | ||
console.warn(err) | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set() | ||
@@ -27,2 +25,3 @@ } | ||
headers: { | ||
Authorization: githubauthreq_1.githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -43,5 +42,6 @@ }, | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100&${githubauthquerystring_1.default}` | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const resp = await cross_fetch_1.default(url, { | ||
headers: { | ||
Authorization: githubauthreq_1.githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -93,7 +93,3 @@ }, | ||
const url = `http://raw.github.com/${slug}/master/package.json` | ||
const resp = await cross_fetch_1.default(url, { | ||
headers: { | ||
Accept: 'application/vnd.github.v3+json', | ||
}, | ||
}) | ||
const resp = await cross_fetch_1.default(url) | ||
const packageData = await resp.json() | ||
@@ -100,0 +96,0 @@ // Process |
# History | ||
## v2.3.0 2020 March 27 | ||
- No longer log the warning if fetching packages fail, just continue silently | ||
- Updated for [GitHub's new authorization recommendations](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param) | ||
- Export the Fellow import we are using to ensure singelton compatability | ||
## v2.2.0 2020 March 27 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"title": "Get Contributors", | ||
"name": "getcontributors", | ||
"version": "2.2.0", | ||
"version": "2.3.0-next.1585286323.eb27d7f37f472bfb7fde3ade418ca92086631db3", | ||
"description": "Fetch all the contributors from a github repository, github organisation, or github search", | ||
@@ -106,3 +106,3 @@ "homepage": "https://github.com/bevry/getcontributors", | ||
"engines": { | ||
"node": "10 || 12 || 13", | ||
"node": "10 || 12", | ||
"browsers": false | ||
@@ -119,5 +119,5 @@ } | ||
"cross-fetch": "^3.0.4", | ||
"fellow": "^6.1.0", | ||
"getrepos": "^4.0.3", | ||
"githubauthquerystring": "^4.0.0", | ||
"fellow": "^6.2.0", | ||
"getrepos": "^5.0.0", | ||
"githubauthreq": "^5.0.0", | ||
"simplytyped": "^3.2.3" | ||
@@ -124,0 +124,0 @@ }, |
@@ -55,3 +55,3 @@ <!-- TITLE/ --> | ||
<script type="module"> | ||
import * as pkg from '//cdn.pika.dev/getcontributors/^2.2.0' | ||
import * as pkg from '//cdn.pika.dev/getcontributors/^2.3.0' | ||
</script> | ||
@@ -64,3 +64,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//unpkg.com/getcontributors@^2.2.0' | ||
import * as pkg from '//unpkg.com/getcontributors@^2.3.0' | ||
</script> | ||
@@ -73,3 +73,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//dev.jspm.io/getcontributors@2.2.0' | ||
import * as pkg from '//dev.jspm.io/getcontributors@2.3.0' | ||
</script> | ||
@@ -76,0 +76,0 @@ ``` |
@@ -8,3 +8,3 @@ /* eslint camelcase:0 */ | ||
import { getReposFromUsers, getReposFromSearch, SearchOptions } from 'getrepos' | ||
import githubAuthQueryString from 'githubauthquerystring' | ||
import { githubAuthorizationHeader } from 'githubauthreq' | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
@@ -19,4 +19,4 @@ | ||
/** Continue despite certain errors */ | ||
function ignore(err: Error) { | ||
console.warn(err) | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set<Fellow>() | ||
@@ -104,2 +104,3 @@ } | ||
headers: { | ||
Authorization: githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -124,5 +125,6 @@ }, | ||
// Fetch | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100&${githubAuthQueryString}` | ||
const url = `${ghapi}/repos/${slug}/contributors?per_page=100` | ||
const resp = await fetch(url, { | ||
headers: { | ||
Authorization: githubAuthorizationHeader(), | ||
Accept: 'application/vnd.github.v3+json', | ||
@@ -193,7 +195,3 @@ }, | ||
const url = `http://raw.github.com/${slug}/master/package.json` | ||
const resp = await fetch(url, { | ||
headers: { | ||
Accept: 'application/vnd.github.v3+json', | ||
}, | ||
}) | ||
const resp = await fetch(url) | ||
const packageData = (await resp.json()) as PackageData | ||
@@ -200,0 +198,0 @@ |
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
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
39198
533
1
+ Addedgithubauthreq@^5.0.0
+ Addededitions@6.21.0(transitive)
+ Addedgetrepos@5.17.0(transitive)
+ Addedgithubauthreq@5.19.0(transitive)
+ Addednative-promise-pool@3.28.0(transitive)
+ Addedversion-range@4.14.0(transitive)
- Removedgithubauthquerystring@^4.0.0
- Removedgetrepos@4.0.3(transitive)
- Removedgithubauthquerystring@4.0.0(transitive)
Updatedfellow@^6.2.0
Updatedgetrepos@^5.0.0