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

(chore) Refactor the code around parsed and entry #52

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

nitriques
Copy link
Member

This commit changes a couple of things to make both apis be more similar.

There was an error in parsed where toSchemeLess would return a protocol-less version. This is fixed.

toRelative does not make sense without a 'base' url (relative to what?). node's path.relative requires 2 params.
So it is now deprecated

4 new functions, across 3 new files were created to avoid code dup. 2 of them are exposed in the barrel file, since they work on strings. The other two are not since they require a valid URL object, which is not validated, hence, not exposed.

Some improvement, IMHO, to the docs.

This commit changes a couple of things to make both apis be more
similar.

There was an error in parsed where toSchemeLess would return a
protocol-less version. This is fixed.

toRelative does not make sense without a 'base' url (relative to what?).
node's path.relative requires 2 params.
So it is now deprecated

4 new functions, across 3 new files were created to avoid code dup.
2 of them are exposed in the barrel file, since they work on strings.
The other two are not since they require a valid URL object, which is
not validated, hence, not exposed.

Some improvement, IMHO, to the docs.
nitriques and others added 2 commits February 11, 2025 14:05
Co-authored-by: Felix Guerin <[email protected]>
Co-authored-by: Felix Guerin <[email protected]>
@nitriques nitriques merged commit 2fc065b into main Feb 12, 2025
1 check passed
@nitriques nitriques deleted the nitriques/url-refactor branch February 12, 2025 16:02
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 this pull request may close these issues.

3 participants