File tree Expand file tree Collapse file tree 3 files changed +28
-9
lines changed
Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ node_modules
44lib
55es
66.eslintcache
7- * .js
8- * .js.flow
9- ! /src /**
10- ! /test /**
7+ /* .js
8+ /* .js.flow
9+ /util
1110! /.babelrc.js
Original file line number Diff line number Diff line change @@ -17,6 +17,18 @@ fall back to trying to parse the package's `CHANGELOG.md` or `changelog.md`.
1717GitHub releases are way more reliable for this purpose though, so please use
1818them!
1919
20+ # Caveats
21+
22+ ` what-broke ` inevitably fails to find changelog entries for some packages/releases
23+ because many maintainers are not very detail-oriented about it (and don't choose
24+ to use excellent tools that would do the work for them, like
25+ [ ` semantic-release ` ] ( https://github.com/semantic-release/semantic-release ) ).
26+
27+ However, I've also seen cases where some versions were never published to npm
28+ (for instance, at the time of writing, ` superagent ` version 5.0.0 was never
29+ published to npm, yet it does have a changelog entry). ` what-broke ` currently
30+ only displays changelog entries for published versions.
31+
2032# API Tokens
2133
2234GitHub heavily rate limits public API requests, but allows more throughput for
Original file line number Diff line number Diff line change @@ -103,11 +103,19 @@ export async function whatBroke(
103103 const { owner , repo } = parseRepositoryUrl ( url )
104104
105105 try {
106- const body = ( await octokit . repos . getReleaseByTag ( {
107- owner,
108- repo,
109- tag : `v${ version } ` ,
110- } ) ) . data . body
106+ const body = ( await octokit . repos
107+ . getReleaseByTag ( {
108+ owner,
109+ repo,
110+ tag : `v${ version } ` ,
111+ } )
112+ . catch ( ( ) =>
113+ octokit . repos . getReleaseByTag ( {
114+ owner,
115+ repo,
116+ tag : version ,
117+ } )
118+ ) ) . data . body
111119
112120 release . body = body
113121
You can’t perform that action at this time.
0 commit comments