getcontributors
Advanced tools
Comparing version 2.4.0 to 2.5.0-next.1585540735.c7c54ef79925c4c82f73c05ea928a50b3cbb77e8
@@ -9,7 +9,2 @@ /* eslint camelcase:0 */ | ||
export { Fellow } | ||
/** Continue despite certain errors */ | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set() | ||
} | ||
/** Fetch the full profile information for a contributor */ | ||
@@ -110,4 +105,16 @@ export async function getContributorProfile(url) { | ||
await Promise.all([ | ||
getContributorsFromCommits(slug), | ||
getContributorsFromPackage(slug).catch(ignore), | ||
getContributorsFromCommits(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from commits for ${slug} - this can happen if the repository does not yet have a commit history`, | ||
err | ||
) | ||
return new Set() | ||
}), | ||
getContributorsFromPackage(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from package for ${slug} - this can happen if the repository does not yet have a package.json file`, | ||
err | ||
) | ||
return new Set() | ||
}), | ||
]) | ||
@@ -114,0 +121,0 @@ ) |
@@ -15,7 +15,2 @@ 'use strict' | ||
const ghapi = process.env.GITHUB_API || 'https://api.github.com' | ||
/** Continue despite certain errors */ | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set() | ||
} | ||
/** Fetch the full profile information for a contributor */ | ||
@@ -119,4 +114,16 @@ async function getContributorProfile(url) { | ||
await Promise.all([ | ||
getContributorsFromCommits(slug), | ||
getContributorsFromPackage(slug).catch(ignore), | ||
getContributorsFromCommits(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from commits for ${slug} - this can happen if the repository does not yet have a commit history`, | ||
err | ||
) | ||
return new Set() | ||
}), | ||
getContributorsFromPackage(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from package for ${slug} - this can happen if the repository does not yet have a package.json file`, | ||
err | ||
) | ||
return new Set() | ||
}), | ||
]) | ||
@@ -123,0 +130,0 @@ ) |
# History | ||
## v2.5.0 2020 March 30 | ||
- `getContributorsFromRepo` no longer hard fails | ||
- enables compat with new repos | ||
## v2.4.0 2020 March 27 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"title": "Get Contributors", | ||
"name": "getcontributors", | ||
"version": "2.4.0", | ||
"version": "2.5.0-next.1585540735.c7c54ef79925c4c82f73c05ea928a50b3cbb77e8", | ||
"description": "Fetch all the contributors from a github repository, github organisation, or github search", | ||
@@ -118,3 +118,3 @@ "homepage": "https://github.com/bevry/getcontributors", | ||
"cross-fetch": "^3.0.4", | ||
"fellow": "^6.2.0", | ||
"fellow": "^6.3.0", | ||
"getrepos": "^5.0.0", | ||
@@ -121,0 +121,0 @@ "githubauthreq": "^5.0.0", |
@@ -55,3 +55,3 @@ <!-- TITLE/ --> | ||
<script type="module"> | ||
import * as pkg from '//cdn.pika.dev/getcontributors/^2.4.0' | ||
import * as pkg from '//cdn.pika.dev/getcontributors/^2.5.0' | ||
</script> | ||
@@ -64,3 +64,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//unpkg.com/getcontributors@^2.4.0' | ||
import * as pkg from '//unpkg.com/getcontributors@^2.5.0' | ||
</script> | ||
@@ -73,3 +73,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//dev.jspm.io/getcontributors@2.4.0' | ||
import * as pkg from '//dev.jspm.io/getcontributors@2.5.0' | ||
</script> | ||
@@ -76,0 +76,0 @@ ``` |
@@ -17,8 +17,2 @@ /* eslint camelcase:0 */ | ||
/** Continue despite certain errors */ | ||
function ignore() { | ||
// console.warn(err) | ||
return new Set<Fellow>() | ||
} | ||
/** GitHub's response when an error occurs */ | ||
@@ -222,4 +216,16 @@ interface GitHubError { | ||
await Promise.all([ | ||
getContributorsFromCommits(slug), | ||
getContributorsFromPackage(slug).catch(ignore), | ||
getContributorsFromCommits(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from commits for ${slug} - this can happen if the repository does not yet have a commit history`, | ||
err | ||
) | ||
return new Set<Fellow>() | ||
}), | ||
getContributorsFromPackage(slug).catch(function (err) { | ||
console.warn( | ||
`unable to fetch contributors from package for ${slug} - this can happen if the repository does not yet have a package.json file`, | ||
err | ||
) | ||
return new Set<Fellow>() | ||
}), | ||
]) | ||
@@ -226,0 +232,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
40397
557
1
Updatedfellow@^6.3.0