Commit graph

128 commits

Author SHA1 Message Date
Matthias Endler
3592972d64
chore: release v0.19.1 (#1726) 2025-06-16 14:56:32 +03:00
Matthias Endler
639c74e392 chore: release v0.19.0 2025-06-11 16:04:34 +02:00
Matthias Endler
2aa22f8b7a
chore: release v0.18.1 (#1598) 2025-02-11 15:47:55 +01:00
Matthias Endler
1780aa0daa
chore: release v0.18.0 (#1554) 2024-12-18 16:25:26 +01:00
Matthias Endler
2cdec324c2
chore: release v0.17.0 (#1549) 2024-11-06 17:48:30 +01:00
github-actions[bot]
f63b4ae65b
chore: release (#1514)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-06 17:42:45 +02:00
github-actions[bot]
eff84617a0
chore: release (#1512)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-06 16:56:00 +02:00
Thomas Zahner
0a54079d01 Bump to version 0.15.1 2024-04-29 09:28:34 +02:00
Thomas Zahner
8451f8846b Bump to version 0.15.0 2024-04-25 09:39:43 +02:00
Matthias Endler
90ed0e70b7
Bump to version; move to workspace versioning (#1372) 2024-02-05 16:50:32 +01:00
Lucius Hu
53c41b03d8
replace hubcaps by octocrab (#502)
This commit replaced `hubcaps` by `octocrab`, which has more downloads per month
and receives more frequent release updates.

The caveats are:

1. When instantiating the API client, `octocrab` doesn't offer you a way to
specify custom user-agent. But I would argue that, at least presently, this
doesn't seem to cause issues.
2. `octocrab` doesn't export as much details of its error types as `hubcaps`
does. So we will have fewer control on the display of the error message. But I
would also argue that this is not really important. Though we should do more
tests to make sure the error looks good enough.

* hide implementation details in error message

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2022-02-11 23:43:47 +01:00
Lucius Hu
6bf8c1fe39
lychee-bin: replace lazy_static by const_format (#495)
This commit replaced the use of `lazy_static` by
`const_format` in `lychee-bin`.

Currently `lazy_static` is used to generate static
String at runtime. With `const_format` we can instead
make constant String at compile time.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2022-02-07 22:45:17 +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
Matthias
a7f809612d
Refactor extractor (#354)
This avoids sending URLs back and forth between the different parsers.
Also, it should allow for future optimizations to reduce allocs.
2021-10-07 12:51:02 +02:00
Matthias
9f75f28d3d
Add example folder (#241) 2021-04-30 13:33:24 +02:00
Lucius Hu
228e5df6a3
Major refactor of codebase (#208)
- The binary component and library component are separated as two
  packages in the same workspace.
  - `lychee` is the binary component, in `lychee-bin/*`.
  - `lychee-lib` is the library component, in `lychee-lib/*`.
  - Users can now install only the `lychee-lib`, instead of both
    components, that would require fewer dependencies and faster
    compilation.
  - Dependencies for each component are adjusted and updated. E.g.,
    no CLI dependencies for `lychee-lib`.
  - CLI tests are only moved to `lychee`, as it has nothing to do
    with the library component.
- `Status::Error` is refactored to contain dedicated error enum,
  `ErrorKind`.
  - The motivation is to delay the formatting of errors to strings.
    Note that `e.to_string()` is not necessarily cheap (though
    trivial in many cases). The formatting is no delayed until the
    error is needed to be displayed to users. So in some cases, if
    the error is never used, it means that it won't be formatted at
    all.
- Replaced `regex` based matching with one of the following:
  - Simple string equality test in the case of 'false positivie'.
  - URL parsing based test, in the case of extracting repository and
    user name for GitHub links.
  - Either cases would be much more efficient than `regex` based
    matching. First, there's no need to construct a state machine for
    regex. Second, URL is already verified and parsed on its creation,
    and extracting its components is fairly cheap. Also, this removes
    the dependency on `lazy-static` in `lychee-lib`.
- `types` module now has a sub-directory, and its components are now
  separated into their own modules (in that sub-directory).
- `lychee-lib::test_utils` module is only compiled for tests.
- `wiremock` is moved to `dev-dependency` as it's only needed for
  `test` modules.
- Dependencies are listed in alphabetical order.
- Imports are organized in the following fashion:
  - Imports from `std`
  - Imports from 3rd-party crates, and `lychee-lib`.
  - Imports from `crate::*` or `super::*`.
- No glob import.
- I followed suggestion from `cargo clippy`, with `clippy::all` and
  `clippy:pedantic`.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-15 01:24:11 +02:00
dependabot-preview[bot]
a3f62fc558 Bump tokio from 1.4.0 to 1.5.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.4.0...tokio-1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:15:51 +00:00
dependabot-preview[bot]
6278964536 Bump reqwest from 0.11.2 to 0.11.3
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.2 to 0.11.3.
- [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.2...v0.11.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:07:45 +00:00
Matthias
f66aaecf0f
Assume HTML in case there is no extension (e.g. for URLs) (#197) 2021-04-12 14:40:39 +02:00
dependabot-preview[bot]
c62a44aa30 Bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [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.13...0.3.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-12 07:23:45 +00:00
dependabot-preview[bot]
45b40a3e06
Bump linkify from 0.5.0 to 0.6.0 (#212)
Bumps [linkify](https://github.com/robinst/linkify) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/robinst/linkify/releases)
- [Changelog](https://github.com/robinst/linkify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/robinst/linkify/compare/0.5.0...0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-09 10:56:09 +02:00
dependabot-preview[bot]
840e1c753d Bump http from 0.2.3 to 0.2.4
Bumps [http](https://github.com/hyperium/http) from 0.2.3 to 0.2.4.
- [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.3...v0.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 07:44:45 +00:00
dependabot-preview[bot]
5aeea1d3f7
Bump derive_builder from 0.9.0 to 0.10.0 (#205)
Bumps [derive_builder](https://github.com/colin-kiegel/rust-derive-builder) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/colin-kiegel/rust-derive-builder/releases)
- [Commits](https://github.com/colin-kiegel/rust-derive-builder/compare/v0.9.0...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-05 18:38:41 +02:00
Paweł Romanowski
e6f11c381b
Bump check-if-email-exists to latest (#203) 2021-04-01 10:43:50 +02:00
Lucius Hu
9f07d1f594
fixed issues in Cargo.toml that blocks publishing (#196)
The solution is simple, add `[patch]` section.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-03-28 22:32:59 +02:00
Matthias
72c01df6fb
Merge "failed" status into "error" status (#191)
I think that the separation between Status::Failed and Status::Error is a
bit misleading. It was easier to implement, but from a user's perspective
they are more or less the same: something unexpected happened.
So I merged both into one: Status::Error. Still not 100% happy with the
semantics, but it's an improvement I'd say.
2021-03-28 17:20:03 +02:00
dependabot-preview[bot]
df53b80e67
Bump console from 0.14.0 to 0.14.1 (#179)
Bumps [console](https://github.com/mitsuhiko/console) from 0.14.0 to 0.14.1.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/console/compare/0.14.0...0.14.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:03:16 +01:00
dependabot-preview[bot]
ba7d0cca33
Bump regex from 1.4.4 to 1.4.5 (#182)
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.4...1.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:02:33 +01:00
dependabot-preview[bot]
462879d7b0
Bump openssl-sys from 0.9.60 to 0.9.61 (#181)
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.60 to 0.9.61.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 11:02:20 +01:00
Paweł Romanowski
a45e781d47
Fix URLs with '@' parsing as emails (#177)
* Fix URLs with '@' parsing as emails

Only consider a link an email if it fails to parse as URL.

Also use a proper email validation instead of a simple '@' check.

This uses the fast_chemail crate which parses email links according
to the HTML specification (which is much more practical than checking
for RFC 5322 formatted emails).  It's also worth noting that
fast_chemail is used internally (albeit indirectly) by the
check_if_email_exists crate.  This means that email addresses
not considered valid by fast_chemail wouldn't pass link checks
anyway.

* Fix comment in test
2021-03-14 20:10:36 +01:00
dependabot-preview[bot]
5a775b5801
Bump regex from 1.4.3 to 1.4.4 (#176)
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.3...1.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-12 13:03:12 +01:00
dependabot-preview[bot]
694e75fa22
Bump reqwest from 0.11.1 to 0.11.2 (#173)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.1 to 0.11.2.
- [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.1...v0.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-10 10:19:49 +01:00
dependabot-preview[bot]
64ec9ec44a
Bump tokio from 1.2.0 to 1.3.0 (#174)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.2.0...tokio-1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-10 10:19:34 +01:00
Matthias
b7e641636c
Fix author mail in Cargo.toml 2021-03-04 14:59:48 +01:00
dependabot-preview[bot]
5506f9da17
Bump headers from 0.3.3 to 0.3.4 (#170)
Bumps [headers](https://github.com/hyperium/headers) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/hyperium/headers/releases)
- [Commits](https://github.com/hyperium/headers/compare/headers-v0.3.3...headers-v0.3.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-04 12:30:59 +01:00
dependabot-preview[bot]
af188d5eb7
Bump serde_json from 1.0.63 to 1.0.64 (#168)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.63 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.63...v1.0.64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 10:05:08 +01:00
dependabot-preview[bot]
367c8fe48f
Bump serde_json from 1.0.62 to 1.0.63 (#162)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.62...v1.0.63)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-26 11:25:43 +01:00
dependabot-preview[bot]
82cf6c63df
Bump wiremock from 0.5.0 to 0.5.1 (#159)
Bumps [wiremock](https://github.com/LukeMathWalker/wiremock-rs) from 0.5.0 to 0.5.1.
- [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.0...v0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-26 01:14:58 +01:00
dependabot-preview[bot]
89beb19702
Bump futures from 0.3.12 to 0.3.13 (#157)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.12 to 0.3.13.
- [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.12...0.3.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-23 16:03:41 +01:00
dependabot-preview[bot]
f0e97afeb5
Bump wiremock from 0.4.9 to 0.5.0 (#158)
Bumps [wiremock](https://github.com/LukeMathWalker/wiremock-rs) from 0.4.9 to 0.5.0.
- [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.4.9...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-23 16:03:27 +01:00
Matthias
b8f24bfa3b
Merge pull request #145 from lycheeverse/simple-client
Improve lychee ergonomics
2021-02-19 17:56:55 +01:00
Matthias
252ac4761a
Merge pull request #148 from lycheeverse/dependabot/cargo/reqwest-0.11.1
Bump reqwest from 0.11.0 to 0.11.1
2021-02-19 12:31:18 +01:00
dependabot-preview[bot]
6c1bc8fe39
Bump reqwest from 0.11.0 to 0.11.1
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.0 to 0.11.1.
- [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.0...v0.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-19 06:56:01 +00:00
dependabot-preview[bot]
fbab3c9b71
Bump url from 2.2.0 to 2.2.1
Bumps [url](https://github.com/servo/rust-url) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.2.0...v2.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-19 06:55:28 +00:00
Matthias Endler
678dc4f18e Add support for colored output 2021-02-19 00:41:49 +01:00
Matthias Endler
fe5cea1de3 Add doc-comment tests 2021-02-18 11:14:00 +01:00
Matthias Endler
0db81e27d6 Bump version 2021-02-17 12:22:39 +01:00
Matthias Endler
4bec47904e Show input source in status output
If an error occurs during link checking,
it is important to know where the error occured.
Therefore the request and response objects now contain a the input
source as a field. This makes error tracking easier.
2021-02-16 00:15:14 +01:00
dependabot-preview[bot]
c7b2b9e805
Bump linkify from 0.4.0 to 0.5.0 (#141)
Bumps [linkify](https://github.com/robinst/linkify) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/robinst/linkify/releases)
- [Changelog](https://github.com/robinst/linkify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/robinst/linkify/compare/0.4.0...0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-15 10:04:02 +01:00
Matthias
75e2f32fac
Fix issues with some dependencies (#140)
* Try to make lychee buildable for Apple Silicon (ring)
* Fix issues with old tokio 0.2 deps (async_smtp)
2021-02-12 22:34:41 +01:00