Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update encodeurl to v2 #60

Open
wojtekmaj opened this issue Sep 10, 2024 · 3 comments · May be fixed by #61
Open

Update encodeurl to v2 #60

wojtekmaj opened this issue Sep 10, 2024 · 3 comments · May be fixed by #61

Comments

@wojtekmaj
Copy link

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.

@wesleytodd
Copy link
Member

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.

@blakeembrey
Copy link
Member

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
Copy link
Member

The dependency is used here:

msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req))

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 blakeembrey linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants