Munter / hyperlink

A node library and command line tool to test the integrity of your internal an external hyperlinks
231 stars 24 forks source link

Emit an error if a relation with a fragment gets redirected #165

Closed papandreou closed 5 years ago

papandreou commented 5 years ago

... except through a FileRedirect (implicit += index.html) with a trailing slash on the href.

https://github.com/webpack/webpack.js.org/pull/3332#issue-332087335

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.1%) to 77.067% when pulling 832c00999a145dfb8cc595ca04d3fb4a30ac9f88 on feature/warnAboutFragmentRedirects into 007c38e4f4cadc5059c9dd4867071abf42bab3c2 on master.

Munter commented 5 years ago

Awesome!

I think I need to have a look at changing the error messages for that case. The expected property isn't really helping to surface the problem. And I should probably also add an expected and actual so reports become more explicit

papandreou commented 5 years ago

Yeah, I am not super familiar with how those error reports are supposed to look. Feel free to change them :hugs:

papandreou commented 5 years ago

LGTM, although I'm a little bit on the fence about assetgraph/lib/util/getHrefType being part of the public api.

Munter commented 5 years ago

I think gethreftype should be pulled out into its own module. I can do that

Munter commented 5 years ago

https://www.npmjs.com/package/hreftypes now exists, and this PR is using it. I'll make a PR for switching assetgraph over soon

Munter commented 5 years ago

Released in v4.4.0