Matthias
4630216c30
Add description for max-cache-age flag
2022-01-14 16:55:56 +01:00
Matthias
994aadf6a1
Simplify error messages ( #462 )
...
Using pattern matching to make the hubcaps and reqwest error messages a little shorter and (subjectively) more readable.
2022-01-14 15:26:13 +01:00
Matthias
ac490f9c53
Add caching functionality (v2) ( #443 )
...
A while ago, caching was removed due to some issues (see #349 ).
This is a new implementation with the following improvements:
* Architecture: The new implementation is decoupled from the collector, which was a major issue in the last version. Now the collector has a single responsibility: collecting links. This also avoids race-conditions when running multiple collect_links instances, which probably was an issue before.
* Performance: Uses DashMap under the hood, which was noticeably faster than Mutex<HashMap> in my tests.
* Simplicity: The cache format is a CSV file with two columns: URI and status. I decided to create a new struct called CacheStatus for serialization, because trying to serialize the error kinds in Status turned out to be a bit of a nightmare and at this point I don't think it's worth the pain (and probably isn't idiomatic either).
This is an optional feature. Caching only gets used if the `--cache` flag is set.
2022-01-14 15:25:51 +01:00
dependabot[bot]
69805fa73e
Bump assert_cmd from 2.0.3 to 2.0.4
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.3...v2.0.4 )
---
updated-dependencies:
- dependency-name: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14 15:16:26 +01:00
Matthias
76c96b0cfd
Ignore .lycheecache
2022-01-14 12:15:08 +01:00
dependabot[bot]
80fb20cca5
Bump cached from 0.28.0 to 0.29.0
...
Bumps [cached](https://github.com/jaemk/cached ) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/jaemk/cached/releases )
- [Changelog](https://github.com/jaemk/cached/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jaemk/cached/commits )
---
updated-dependencies:
- dependency-name: cached
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-13 13:38:48 +01:00
Matthias
92b939eb2f
Update README.md
2022-01-13 13:11:55 +01:00
Matthias
0e4973eda6
Avoid flagging lychee as HTML
2022-01-13 01:07:33 +01:00
dependabot[bot]
93f486ec3a
Bump assert_cmd from 2.0.2 to 2.0.3
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.2...v2.0.3 )
---
updated-dependencies:
- dependency-name: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 22:56:12 +01:00
dependabot[bot]
2db9a3bdb5
Bump predicates from 2.1.0 to 2.1.1
...
Bumps [predicates](https://github.com/assert-rs/predicates-rs ) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases )
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v2.1.0...v2.1.1 )
---
updated-dependencies:
- dependency-name: predicates
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 13:25:51 +01:00
dependabot[bot]
a0d34a04f5
Bump cached from 0.26.2 to 0.28.0
...
Bumps [cached](https://github.com/jaemk/cached ) from 0.26.2 to 0.28.0.
- [Release notes](https://github.com/jaemk/cached/releases )
- [Changelog](https://github.com/jaemk/cached/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jaemk/cached/commits )
---
updated-dependencies:
- dependency-name: cached
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 13:25:43 +01:00
Matthias
1e76e82811
Add test for nonexistent Github file
2022-01-12 09:25:12 +01:00
Matthias
48c8153e11
Refactor Github checking; add docs
2022-01-12 09:25:12 +01:00
Matthias
50d7b05736
Conditionally compile constructors for GithubUri for tests
2022-01-12 09:25:12 +01:00
Matthias
2b31144394
add docs endpoint
2022-01-12 09:25:12 +01:00
Matthias
8d445a3a4b
Be more permissive around private GH repos
...
The Github API doesn't handle checking individual files inside repos or
paths like `github.com/org/repo/issues`, so we are more
permissive and only check for repo existence. This is the
only way to get a basic check for private repos. Public repos are not affected and should work
with a normal check.
2022-01-12 09:25:12 +01:00
Matthias
e91c0c60f0
Only accept two path segments (org/repo) for Github API check
2022-01-12 09:25:12 +01:00
Matthias
7667842bb6
Strip .git suffix from Github URLs ( #384 )
2022-01-12 09:25:12 +01:00
dependabot[bot]
5a5ed00ba4
Bump reqwest from 0.11.8 to 0.11.9 ( #455 )
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.8 to 0.11.9.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.8...v0.11.9 )
---
updated-dependencies:
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 13:43:35 +01:00
Matthias
36450621fa
Update dependencies ( #454 )
2022-01-10 22:35:37 +01:00
Matthias
3b060c80dc
Update README.md
2022-01-10 21:03:30 +01:00
dependabot[bot]
6b7671b97c
Bump wiremock from 0.5.9 to 0.5.10 ( #451 )
...
Bumps [wiremock](https://github.com/LukeMathWalker/wiremock-rs ) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/LukeMathWalker/wiremock-rs/releases )
- [Changelog](https://github.com/LukeMathWalker/wiremock-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/LukeMathWalker/wiremock-rs/compare/v0.5.9...v0.5.10 )
---
updated-dependencies:
- dependency-name: wiremock
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 18:15:58 +01:00
Matthias
0645177b84
Bump version ( #450 )
2022-01-10 01:38:46 +01:00
dependabot[bot]
54b5be81c2
Bump tabled from 0.3.0 to 0.4.2 ( #447 )
...
* Bump tabled from 0.3.0 to 0.4.2
Bumps [tabled](https://github.com/zhiburt/tabled ) from 0.3.0 to 0.4.2.
- [Release notes](https://github.com/zhiburt/tabled/releases )
- [Changelog](https://github.com/zhiburt/tabled/blob/master/CHANGELOG.md )
- [Commits](https://github.com/zhiburt/tabled/compare/v0.3.0...v0.4.2 )
---
updated-dependencies:
- dependency-name: tabled
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias <matthias-endler@gmx.net>
2022-01-07 23:10:39 +01:00
Matthias
21f3160b71
Make retries configurable; align constants ( #446 )
...
Using the same default values for the library and the
binary now but tweaked the values a bit for slightly faster performance.
2022-01-07 01:03:10 +01:00
Matthias
8df50cf501
Stop testing Twitter quirk (see #448 )
2022-01-07 00:15:55 +01:00
Matthias
5eb062cbec
Always hide GH token in opts
2022-01-06 09:54:03 +01:00
Matthias
388bbbe7b0
Exclude known false-positives from Github API check ( #445 )
...
Fixes https://github.com/lycheeverse/lychee/issues/431
2022-01-06 00:33:53 +01:00
Matthias
d9af0817e5
Lock deps on make install
2022-01-05 18:25:55 +01:00
dependabot[bot]
f515d096db
Bump wiremock from 0.5.8 to 0.5.9 ( #442 )
...
Bumps [wiremock](https://github.com/LukeMathWalker/wiremock-rs ) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/LukeMathWalker/wiremock-rs/releases )
- [Changelog](https://github.com/LukeMathWalker/wiremock-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/LukeMathWalker/wiremock-rs/compare/v0.5.8...v0.5.9 )
---
updated-dependencies:
- dependency-name: wiremock
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-05 15:18:08 +01:00
Matthias
dd48466d9a
Add missing test for local links in plaintext files ( #444 )
2022-01-05 12:51:14 +01:00
dependabot[bot]
df330f0276
Bump serde_json from 1.0.73 to 1.0.74 ( #441 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.73 to 1.0.74.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.74 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-03 20:53:17 +01:00
Matthias
f2109a41a7
Mention workaround for too many file handles
...
Add information on how to handle too many open file handles in troubleshooting guide
2022-01-02 14:21:12 +01:00
dependabot[bot]
66f2a993fd
Bump tracing-subscriber from 0.3.4 to 0.3.5 ( #437 )
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.3.4 to 0.3.5.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.4...tracing-subscriber-0.3.5 )
---
updated-dependencies:
- dependency-name: tracing-subscriber
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-02 01:21:01 +01:00
dependabot[bot]
7a4de16138
Bump http from 0.2.5 to 0.2.6 ( #438 )
...
Bumps [http](https://github.com/hyperium/http ) from 0.2.5 to 0.2.6.
- [Release notes](https://github.com/hyperium/http/releases )
- [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hyperium/http/compare/v0.2.5...v0.2.6 )
---
updated-dependencies:
- dependency-name: http
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-31 18:33:22 +01:00
dependabot[bot]
17d3bb627e
Bump tracing-subscriber from 0.3.3 to 0.3.4 ( #435 )
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.3...tracing-subscriber-0.3.4 )
---
updated-dependencies:
- dependency-name: tracing-subscriber
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-26 20:25:53 +01:00
dependabot[bot]
c0e79a095d
Bump anyhow from 1.0.51 to 1.0.52 ( #434 )
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.51...1.0.52 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-26 20:25:23 +01:00
dependabot[bot]
c0b7205a71
Bump pulldown-cmark from 0.8.0 to 0.9.0 ( #433 )
...
Bumps [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark ) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/raphlinus/pulldown-cmark/releases )
- [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.8.0...v0.9.0 )
---
updated-dependencies:
- dependency-name: pulldown-cmark
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-23 13:49:54 +01:00
dependabot[bot]
147fa8de87
Bump reqwest from 0.11.7 to 0.11.8 ( #432 )
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.7 to 0.11.8.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.7...v0.11.8 )
---
updated-dependencies:
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 16:28:22 +01:00
Matthias
9f8e496a8d
Add Azure/ResourceModules
2021-12-20 22:50:19 +01:00
dependabot[bot]
b2bc0e7eac
Bump futures from 0.3.18 to 0.3.19 ( #430 )
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.18 to 0.3.19.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.18...0.3.19 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 15:37:18 +01:00
Matthias
a795f2bf3f
Change usage examples ( #429 )
2021-12-18 00:28:08 +01:00
Matthias
d80b9b8e6a
Update docs ( #428 )
...
Add more lychee users, update usage instructions, fix typos
2021-12-17 02:00:28 +01:00
Matthias
01393b34a2
Upgrade to Rust 2021 ( #427 )
2021-12-17 01:32:13 +01:00
Matthias
83182c29ca
Fix JSON serialization ( #426 )
...
We recently removed the custom serialization for InputSource.
This causes the JSON formatter to fail
with "key must be a string".
Add it back and add a comment on
why this is needed.
2021-12-16 23:55:04 +01:00
Matthias
18c606d2e8
Fix docs badge
2021-12-16 20:47:35 +01:00
dependabot[bot]
58785311f0
Bump tokio from 1.14.0 to 1.15.0 ( #425 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.14.0...tokio-1.15.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-16 19:32:51 +01:00
Matthias
166c86c30e
Use tokenizer for extraction; add benchmark ( #424 )
...
This avoids creating a DOM tree for link extraction and instead uses a `TokenSink` for on-the-fly extraction. In hyperfine benchmarks it was about 10-25% faster than the master.
Old: 4.557 s ± 0.404 s
New: 3.832 s ± 0.131 s
The performance fluctuates a little less as well.
Some missing element/attribute pairs were also added, which contain links according to the HTML spec. These occur very rarely, but it's good to parse them for completeness' sake.
Furthermore tried to clean up a lot of papercuts around our types. We now differentiate between a `RawUri` (stringy-types) and a Uri, which is a properly parsed `URI` type.
The extractor now only deals with extracting `RawUri`s while the collector creates the request objects.
2021-12-16 18:45:52 +01:00
dependabot[bot]
c97ff95575
Bump once_cell from 1.8.0 to 1.9.0 ( #423 )
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.8.0...v1.9.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-15 13:45:19 +01:00
dependabot[bot]
7ac3a44e3d
Bump serde_json from 1.0.72 to 1.0.73 ( #422 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.72 to 1.0.73.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.72...v1.0.73 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-14 14:00:58 +01:00