finalhandler icon indicating copy to clipboard operation
finalhandler copied to clipboard

Update encodeurl to v2

Open wojtekmaj opened this issue 1 year ago • 3 comments

You may or may not be aware, but I just thought I'd let you know, that it appears this package is the only package in [email protected] dependency tree that pulls in encodeurl v1. Updating the dependency here would be very welcome as it would remove duplicated dependency from dependency tree.

wojtekmaj avatar Sep 10 '24 15:09 wojtekmaj

I think our goal was to fully deprecate that package, so yeah good catch. @blakeembrey that was the plan right? So many moving pieces here I am not sure I remember if our decision on this was finalized.

wesleytodd avatar Sep 10 '24 15:09 wesleytodd

It's not being deprecated, it should probably be updated. Version 2 changed the escape characters to ensure it aligned closer to the URL spec. I do reference it as a useful library for path-to-regexp.

However, if you trust URLs are already encoded correctly, you could remove the dependency.

blakeembrey avatar Sep 10 '24 15:09 blakeembrey

The dependency is used here: https://github.com/pillarjs/finalhandler/blob/42a0a2a14ff37fe0bd6413c5986f86fe7a1b2e7e/index.js#L115

I don't actually think it's necessary and can be removed. The pathname would already be encoded if grabbing it from the request 🤷

blakeembrey avatar Sep 10 '24 15:09 blakeembrey

This was fixed by #72 and can be closed

Phillip9587 avatar Feb 03 '25 10:02 Phillip9587

@Phillip9587, don't you have the necessary permissions to close it?

bjohansebas avatar Feb 03 '25 13:02 bjohansebas